Professional Documents
Culture Documents
Congruences
Definition 5.1 Let m be an integer with m > 1. We say that two integers
a and b are congruent modulo m if a b is divisible by m. We denote this
by a b (mod m).
Thus
a b (mod m)
if and only if
m | (a b).
The concept of congruence links nicely back to our basic fact about
division. If a is an integer and we attempt to divide by m, we obtain
quotient q and remainder r:
a = mq + r.
Then a r = mq, so m | (a r). Then, by definition of congruence, a r
(mod m).
Example 5.2 3 24 (mod 7)
31 11 (mod 7)
20 6 100 (mod 7)
Example 5.3 a 0 (mod m) if and only if m | a.
Example 5.4 Two integers are congruent modulo 10 if and only if they end
with the same digit.
We shall begin by developing some properties of congruence arithmetic.
Theorem 5.5 Let m be an integer with m > 1 and let a, b and c be integers.
(i) a a (mod m).
(ii) If a b (mod m), then b a (mod m).
30
(mod m)
and
ac bd
(mod m).
(mod m)
ac bc
(mod m)
a k bk
(mod m).
and
and
c d = mr.
Then
(a + c) (b + d) = (a b) + (c d)
= mq + mr
= m(q + r).
31
So m | (a + c) (b + d) ; that is
a+cb+d
(mod m).
Also
ac bd = ac bc + bc bd
= (a b)c + b(c d)
= mqc + bmr
= m(qc + br),
so m | (ac bd); that is,
ac bd
(mod m).
(mod m)
and
ac bc
(mod m).
Equally if we assume by induction that ak1 bk1 (mod m), then part (i)
gives
ak = a ak1 b bk1 = bk (mod m).
Example 5.7 The number 270 + 370 is divisible by 13.
Indeed
26 = 64 1 (mod 13),
so
266 = (26 )11 (1)11 = 1 (mod 13),
so
270 = 266 24 (1) 16 10 (mod 13).
Similarly
33 = 27 1 (mod 13),
so
369 = (33 )23 123 = 1 (mod 13),
so
370 = 369 3 1 3 = 3 (mod 13).
Hence
270 + 370 10 + 3 = 13 0 (mod 13),
so
13 | (270 + 370 ).
32
Example 5.8 Let us find the last digit of 21003 . We work modulo 10:
21 = 2
22 = 4
23 = 8
24 = 16 6 (mod 10).
Now note
62 = 36 6 (mod 10).
Assume, as an inductive hypothesis, that 6k1 6 (mod 10) (where k > 2).
Then
6k = 6k1 6 6 6 6 (mod 10).
Hence 6k 6 (mod 10) for all positive integers k. So
21003 = (24 )1003 23 6250 8 (mod 10)
6 8 (mod 10)
= 48
8
(mod 10).
33