Overview
Congruence allows a calculation to retain only the information relevant to a modulus. It turns infinitely many integers into finitely many classes while preserving addition and multiplication. This is useful for divisibility tests, integer equations and finite algebra. A congruence is not an approximate equality: it is an exact statement about divisibility of a difference.
Prerequisites
Know integer divisibility and division with remainder. For inverse calculations, use gcds and the Bézout identity. The modulus in this article is a positive integer ; allowing other conventions is possible but does not help the basic construction.
Definition and conventions
Write when . This is an equivalence relation. The equivalence class of consists of the integers for . Every class has a unique representative among , but the class is not identical to that chosen representative.
The quotient consists of these classes. Define and . These operations are well-defined because replacing either input by a congruent integer changes the result by a multiple of . When , there is just one class.
Intuition
Think of reducing a computation to a remainder without repeatedly choosing a new representative. The class remembers a whole family of integers. Multiplication and addition respect this reduction, so intermediate numbers can be replaced by smaller convenient values. Division is different: not every nonzero class has a multiplicative inverse.
Examples and non-examples
Since , one has . Squaring gives without computing a quotient of .
Modulo , , so the inverse of is . But has no inverse: every product is even and cannot be congruent to . The congruence does not force ; take and .
Important properties
A class is invertible precisely when . A Bézout identity gives an inverse when the gcd is one. Conversely, an inverse implies for some integers, so every common divisor of divides one.
More generally, is solvable exactly when divides . Necessity follows from divisibility of . Sufficiency follows by multiplying a Bézout identity by . Cancellation by a nonunit may reduce the modulus rather than preserve it, which explains the failure in the example above.
Connections and further reading
Prime moduli give finite fields; composite moduli usually give zero divisors. The Chinese remainder theorem decomposes a composite modulus with coprime factors into independent calculations. Milne, Chapter 1 connects congruences with quotient rings and ideals.