Professional Documents
Culture Documents
Congruence Classes
Idea. As in the previous section, when we calculate mod 7, say, the integers 2, −5
and 17 are considered to be identical, as are 3, −4 and 18. Thus is makes sense to
collect together all those integers that are considered to be identical modulo 7 to form
a congruence class mod 7.
Goals. We will show that there are exactly m conguence classes mod m. Thus the set
of these classes is finite. This set is denotes Zm . An important objective of this chapter
is to show that Zm comes equipped with operations + and ×. Thus, Zm is a completely
new example where arithmetic is defined on a finite set. We will also introduce the subset
Z∗m of Zm . The set Z∗m has only one operation, ×, but this multiplicative structure is
extremely important in modern applications, e.g., cryptography.
[a]m = {b ∈ Z : b ≡ a mod m} .
Recall from Proposition 3.3 that congruences are reflexive, so a ≡ a mod m and thus
a ∈ [a]m for all a ∈ Z. (That is, an integer is an element of the class labelled by that
element.)
Note that in the example above all the integers appear in these classes, and these classes
are disjoint. We could go on, for instance
But this is not disjoint with [1]3 , and in fact it equals [1]3 . In general we have the
fundamental result
Zm = {[a]m : a ∈ Z}.
4.6. Example.
Z3 = {[0]3 , [1]3 , [2]3 } .
But we could equally have written
Idea. Since we can add and multiply elements of Z, we can define the operations of
addition and multiplication on the finite set Zm .
Congruence Classes 37
and
etc.
This definition of addition and multiplication on Zm might seem to depend on the choice
of labels for the classes. The next result shows this is not the case. The following result
is, in fact, simply a reinterpretation of the earlier Theorem on Modular Arithmetic.
[a]m = a0 m =⇒ a ≡ a0 mod m
[b]m = b0 m =⇒ b ≡ b0 mod m.
= a0 m + b0 m again by (1) .
Congruence Classes 38
= a0 m × b0 m again by (2) .
4.10. Example.
Aside In the latter table we see something never seen in (Z, ×), namely that we can
multiply two non-zero objects and get zero! For example [2]4 × [2]4 = [0]4 . Here, [2]4 is
an example of divisors of zero.
Notation If, in a problem, we are working throughout with one modulus m we may
drop the [..]m and write simply r in place of [r]m . See section 21.3 of PJE for a discussion
of the map [r]m 7−→ r. If we want to be reminded of the modulus we can write r1 +m r2
and r1 ×m r2 in place of [r1 ]m + [r2 ]m and [r1 ]m × [r2 ]m respectively.
Congruence Classes 39
4.11. Example. We have not given the table for (Z8 , ×) because it is too large. But
consider the subset {[0]8 , [2]8 , [4]8 , [6]8 } ⊆ Z8 . The multiplication table modulo 8 for
this subset is
× [0]8 [2]8 [4]8 [6]8
[0]8 [0]8 [0]8 [0]8 [0]8
[2]8 [0]8 [4]8 [0]8 [4]8
[4]8 [0]8 [0]8 [0]8 [0]8
[6]8 [0]8 [4]8 [0]8 [4]8
We can fill in this table using the elements from the set {[0]8 , [2]8 , [4]8 , [6]8 } because
the product of two even integers is even.
We say that the set {[0]8 , [2]8 , [4]8 , [6]8 } is closed under multiplication modulo 8.
Remark. The set {[2]8 , [4]8 , [6]8 } is not closed under multiplication modulo 8. For
example, [2]8 × [4]8 = [0]8 which is not in the set. That is, we cannot complete the table
Example. The set {[2]10 , [4]10 , [6]10 , [8]10 } is a closed subset of (Z10 , ×) .
Verification
× [2]10 [4]10 [6]10 [8]10
[2]10 [4]10 [8]10 [2]10 [6]10
[4]10 [8]10 [6]10 [4]10 [2]10
[6]10 [2]10 [4]10 [6]10 [8]10
[8]10 [6]10 [2]10 [8]10 [4]10
[a]m a0 m = [1]m .
• We say that [a0 ]m is the inverse of [a]m and write [a0 ]m = [a]−1
m .
Example. In the last section we found that 56 had inverse 5 modulo 93. Thus [56]93 ∈
Z93 is invertible with inverse [5]93 , i.e. [56]−1 ∗
93 = [5]93 . Hence [56]93 ∈ Z93 . Similarly
[5]93 ∈ Z1∗93 .
Question What does Z∗m look like?
4.14. Proposition. [a]m is invertible if, and only if, gcd (a, m) = 1.
4.15. Example. Z∗5 = {[1]5 , [2]5 , [3]5 , [4]5 } and the multiplication table for (Z∗5 , ×) is
[1]−1 −1 −1
5 = [1]5 , [2]5 = [3]5 , [3]5 = [2]5 and [4]−1
5 = [4]5 .
4.16. Example. Z∗8 = {[1]8 , [3]8 , [5]8 , [7]8 } and the multiplication table for (Z∗8 , ×) is
do they not have the same “form”? As an advert for future courses on Algebraic Struc-
tures, they look at different algebraic structures on sets, attempting to answer difficult
questions such as how many are there on a given set and how to recognise if two given
structures are the same or different.
Proof. Let [a]m and [b]m ∈ Z∗m . This means they have inverses, i.e. there exist [a]−1
m
and [b]−1
m ∈ Z∗ for which [a] [a]−1 = [1] and [b] [b]−1 = [1] . Consider
m m m m m m m
−1 −1
([a]m [b]m ) [b]m [a]m = [a]m [b]m [b]m [a]−1
−1
m
= [a]m [a]−1
m = [1]m .