Primes Arithmetic

Pick a representative prime number, say 13.

Multiplication

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.

* 0123456789101112
0 0000000000000
1 0123456789101112
2 0246810121357911
3 0369122581114710
4 0481237112610159
5 0510271249161138
6 0612511410392817
7 0718293104115126
8 0831161941272105
9 0951106211731284
10 0107411185212963
11 0119753112108642
12 0121110987654321

Division

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.)

/123456789101112
0 000000000000
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

Powers (exponentiation)

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.

^0123456789101112
1 1111111111111
2 1248361211951071
3 1391391391391
4 14312910143129101
5 1512815128151281
6 1610892127354111
7 1710591112638421
8 1812518125181251
9 1931931931931
10 11091234110912341
11 1114537122981061
12 1121121121121121121

Keywords: finite field, Galois field


$Id: prime-arithmetic.html,v 1.6 2018/10/30 20:34:31 kenta Exp $