Pick a representative prime number, say 13.
Below is the multiplication table modulo 13. Note how every nonzero row is a permutation of [0..12]. This property is unique to primes.
We highlight pairs which multiply to one, as these are reciprocals of each other.
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
2 | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 1 | 3 | 5 | 7 | 9 | 11 |
3 | 0 | 3 | 6 | 9 | 12 | 2 | 5 | 8 | 11 | 1 | 4 | 7 | 10 |
4 | 0 | 4 | 8 | 12 | 3 | 7 | 11 | 2 | 6 | 10 | 1 | 5 | 9 |
5 | 0 | 5 | 10 | 2 | 7 | 12 | 4 | 9 | 1 | 6 | 11 | 3 | 8 |
6 | 0 | 6 | 12 | 5 | 11 | 4 | 10 | 3 | 9 | 2 | 8 | 1 | 7 |
7 | 0 | 7 | 1 | 8 | 2 | 9 | 3 | 10 | 4 | 11 | 5 | 12 | 6 |
8 | 0 | 8 | 3 | 11 | 6 | 1 | 9 | 4 | 12 | 7 | 2 | 10 | 5 |
9 | 0 | 9 | 5 | 1 | 10 | 6 | 2 | 11 | 7 | 3 | 12 | 8 | 4 |
10 | 0 | 10 | 7 | 4 | 1 | 11 | 8 | 5 | 2 | 12 | 9 | 6 | 3 |
11 | 0 | 11 | 9 | 7 | 5 | 3 | 1 | 12 | 10 | 8 | 6 | 4 | 2 |
12 | 0 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Below is the division table modulo 13. The division table exists because of the permutation property of the rows of the multiplication table. No analogous division table exists for composites. The highlighted row gives the reciprocals modulo 13.
For example 1/2=7 (mod 13). (Multiply both sides of the equation by 2 if not immediately clear.)
/ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 7 | 9 | 10 | 8 | 11 | 2 | 5 | 3 | 4 | 6 | 12 |
2 | 2 | 1 | 5 | 7 | 3 | 9 | 4 | 10 | 6 | 8 | 12 | 11 |
3 | 3 | 8 | 1 | 4 | 11 | 7 | 6 | 2 | 9 | 12 | 5 | 10 |
4 | 4 | 2 | 10 | 1 | 6 | 5 | 8 | 7 | 12 | 3 | 11 | 9 |
5 | 5 | 9 | 6 | 11 | 1 | 3 | 10 | 12 | 2 | 7 | 4 | 8 |
6 | 6 | 3 | 2 | 8 | 9 | 1 | 12 | 4 | 5 | 11 | 10 | 7 |
7 | 7 | 10 | 11 | 5 | 4 | 12 | 1 | 9 | 8 | 2 | 3 | 6 |
8 | 8 | 4 | 7 | 2 | 12 | 10 | 3 | 1 | 11 | 6 | 9 | 5 |
9 | 9 | 11 | 3 | 12 | 7 | 8 | 5 | 6 | 1 | 10 | 2 | 4 |
10 | 10 | 5 | 12 | 9 | 2 | 6 | 7 | 11 | 4 | 1 | 8 | 3 |
11 | 11 | 12 | 8 | 6 | 10 | 4 | 9 | 3 | 7 | 5 | 1 | 2 |
12 | 12 | 6 | 4 | 3 | 5 | 2 | 11 | 8 | 10 | 9 | 7 | 1 |
Below is the power table modulo 13. The yellow highlighted rows contain permutations of [1..12]. Those rows represent the primitive roots (or generators) of 13, namely {2,6,7,11}. Only primes have primitive roots.
The final column is all ones by Fermat's Little Theorem. Another column beyond would give a^13=a (mod 13) for all a, another statement of Fermat's Little Theorem.
The ones (blue) are evenly spaced out in each row. For things to be evenly spaced out, the size of the gaps correspond to the divisors of 12, or in general, the factorization p-1. We had chosen 13 as our example prime number because 12 has lots of divisors, making the pattern of ones interesting.
^ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
2 | 1 | 2 | 4 | 8 | 3 | 6 | 12 | 11 | 9 | 5 | 10 | 7 | 1 |
3 | 1 | 3 | 9 | 1 | 3 | 9 | 1 | 3 | 9 | 1 | 3 | 9 | 1 |
4 | 1 | 4 | 3 | 12 | 9 | 10 | 1 | 4 | 3 | 12 | 9 | 10 | 1 |
5 | 1 | 5 | 12 | 8 | 1 | 5 | 12 | 8 | 1 | 5 | 12 | 8 | 1 |
6 | 1 | 6 | 10 | 8 | 9 | 2 | 12 | 7 | 3 | 5 | 4 | 11 | 1 |
7 | 1 | 7 | 10 | 5 | 9 | 11 | 12 | 6 | 3 | 8 | 4 | 2 | 1 |
8 | 1 | 8 | 12 | 5 | 1 | 8 | 12 | 5 | 1 | 8 | 12 | 5 | 1 |
9 | 1 | 9 | 3 | 1 | 9 | 3 | 1 | 9 | 3 | 1 | 9 | 3 | 1 |
10 | 1 | 10 | 9 | 12 | 3 | 4 | 1 | 10 | 9 | 12 | 3 | 4 | 1 |
11 | 1 | 11 | 4 | 5 | 3 | 7 | 12 | 2 | 9 | 8 | 10 | 6 | 1 |
12 | 1 | 12 | 1 | 12 | 1 | 12 | 1 | 12 | 1 | 12 | 1 | 12 | 1 |
Keywords: finite field, Galois field