Number Theory II: Congruences
Number Theory II: Congruences
Number Theory II: Congruences
Hildebrand
Definition
Definition: Let a, b ∈ Z, and m ∈ N. We say “a is congruent to b modulo m”,
and write “a ≡ b mod m”, if m | (a − b). The integer m is called the modulus of
the congruence.
Equivalent definition: By the definition of divisibility, “m | (a − b)” means that there exists k ∈ Z
such that a − b = km, i.e., a = b + km. Thus, the above definition can be stated as follows. This version
is particularly suited for proofs involving congruences.
• Special case: Congruences modulo 2: n ≡ 0 mod 2 means that n = 2k for some k ∈ Z. But
the integers of the form n = 2k are exactly the even integers. Similarly, the integers satisfying
n ≡ 1 mod 2 are those of the form n = 1 + 2k for some k ∈ Z, i.e., the odd integers.
• Notes:
• Congruences are only defined for integers, and the modulus m must be a natural number. For
example, a ≡ 1/2 mod 2 is not defined since 1/2 is not an integer; similarly, a ≡ b mod 0 is
not defined since 0 is not a natural number.
• The modulus m is an essential part of the definition. Make sure to always specify the modulus;
saying “a is congruent to b”, or writing “a ≡ b”, without specifying a modulus, makes no sense.
Properties
What makes congruences so useful is that, to a large extent, they can be manipulated like ordinary
equations. Congruences to the same modulus can be added, multiplied, and taken to a fixed positive
integral power; i.e., for any a, b, c, d ∈ Z and m ∈ N we have:
1
Math 347, Summer 2019 Number Theory II: Congruences A.J. Hildebrand
• Proofs. Proving the above congruence properties is an instructive exercise in applying proof
techniques you’ve learned earlier in this course, and you should be able to carry out such proofs.
Some examples will be given in class or on worksheets; others will be assigned as homework.
• Notes.
• Congruences to different moduli can NOT be added, multiplied, etc. In the above properties,
the modulus m must be the same at each occurrence.
• Congruences can NOT be divided. An analogous property involving division of congruences
does not exist. This is because congruences are only defined for integers, and dividing congru-
ences would introduce rational numbers.
• Congruences can NOT be exponentiated. It is not true that a ≡ b mod m and c ≡ d mod m
implies ac ≡ bd mod m. (However, you can take each side of the congruence to the same
exponent k: a ≡ b mod m implies ak ≡ bk mod m.)
• Example: The number 2017 is prime, so by Fermat’s Little theorem, we have a2016 ≡ 1 mod 2017
for any natural number a that is not divisible by 2017. In particular, it follows that each of the
numbers 22016 − 1, 32016 − 1, . . . , 20162016 − 1 is divisible by 2017.
• Note: The modulus, p, in this theorem must be a prime. For composite moduli the above congru-
ence does, in general, not hold.
• Congruences and remainders. The remainder, r, in the division algorithm is the smallest
nonnegative integer that is congruent to a modulo q.
Further Resources
In the text the above definitions and theorems can be found in Chapter 6:
Congruences: Definition 7.15, p. 142.
Addition/Multiplication Properties: Lemma 7.19, p. 145.
Fermat’s Little Theorem: Theorem 7.36, p. 148.
Division with Remainder: Proposition 6.14, p. 126.