Mod P
Mod P
+ 0 1 * 0 1
0 0 1 0 0 0
1 1 0 1 0 1
+ 0 1 2 * 0 1 2
0 0 1 2 0 0 0 0
1 1 2 0 1 0 1 2
2 2 0 1 2 0 2 1
+ 0 1 2 3 4 * 0 1 2 3 4
0 0 1 2 3 4 0 0 0 0 0 0
1 1 2 3 4 0 1 0 1 2 3 4
2 2 3 4 0 1 2 0 2 4 1 3
3 3 4 0 1 2 3 0 3 1 4 2
4 4 0 1 2 3 4 0 4 3 2 1
Inverses in mod 5 arithmetic:
−1 = 4, −2 = 3, −3 = 2, −4 = 1 (mod 5) and
1/2 = 3, 1/3 = 2 and 1/4 = 4 (mod 5)
Some patterns are now emerging. First,
Additive inverses mod p are easy to find. Since:
k + (p − k) = p for all k = 0, 1, . . . , p − 1
it follows that k and p − k are additive inverses of each other. That is:
−k = p − k (mod p)
This means, for example, that we can replace p − k with −k in the
multiplication tables and cut the work in half. The addition tables by
now are easy to fill in. We’ll concentrate on multiplication tables for
the next two primes, and leave out the row and column of zeroes.
3
c−b
x= (mod p)
a
Example. Solve:
3x + 4 = 1 (mod 5)
5
Check!!
Exercise 3. Try this out with more primes, and also find solutions to:
x2 + x + 1 = 0 (mod p)
for a few primes. (This one has no real solutions, since b2 − 4ac = −3).
It is a fact that primitive numbers mod p exist for any prime p, but
it is not such an easy task to find them!
Exercise 4. Find all the primitive numbers:
(a) mod 11
(b) mod 13
(c) mod 17