MathLabs
TheoremProved

Congruence is an equivalence relation compatible with $+$ and $\times$

Statement

For a fixed modulus mm: (i) a≡a(modm)a \equiv a \pmod{m} for every aa; (ii) a≡b(modm)  ⟹  b≡a(modm)a\equiv b \pmod m \implies b\equiv a\pmod m; (iii) a≡b, b≡c(modm)  ⟹  a≡c(modm)a\equiv b,\ b\equiv c \pmod m \implies a\equiv c \pmod m; and if a≡b(modm)a\equiv b \pmod m and c≡d(modm)c\equiv d\pmod m then a+c≡b+d(modm)a+c \equiv b+d \pmod{m} and ac≡bd(modm)ac \equiv bd \pmod{m}.

Why is it true?

This is what makes congruences usable as arithmetic: it means we can add, subtract, and multiply remainders directly instead of the huge original numbers, and always get the correct remainder back — the reason computers can check a 1616-digit card number or compute 7100 mod 137^{100} \bmod 13 without ever storing a 100100-digit number.

Proof sketch

Reflexivity: a−a=0a-a=0 and m∣0m\mid 0 for every mm, so a≡a(modm)a\equiv a\pmod m.

Symmetry: if a≡b(modm)a\equiv b\pmod m then a−b=mka-b=mk for some integer kk, so b−a=m(−k)b-a=m(-k); since −k-k is also an integer, m∣(b−a)m\mid(b-a), i.e. b≡a(modm)b\equiv a\pmod m.

Transitivity: if a≡b(modm)a\equiv b\pmod m and b≡c(modm)b\equiv c\pmod m, write a−b=mk1a-b=mk_1 and b−c=mk2b-c=mk_2. Adding these, a−c=(a−b)+(b−c)=m(k1+k2)a-c=(a-b)+(b-c)=m(k_1+k_2), so m∣(a−c)m\mid(a-c) and a≡c(modm)a\equiv c\pmod m.

Compatibility with addition: from a−b=mk1a-b=mk_1 and c−d=mk2c-d=mk_2, add the two equations: (a+c)−(b+d)=m(k1+k2)(a+c)-(b+d) = m(k_1+k_2), which is a multiple of mm, so a+c≡b+d(modm)a+c\equiv b+d\pmod m.

Compatibility with multiplication: write ac−bd=ac−bc+bc−bd=c(a−b)+b(c−d)=c⋅mk1+b⋅mk2=m(ck1+bk2)ac-bd = ac-bc+bc-bd = c(a-b)+b(c-d) = c\cdot mk_1 + b\cdot mk_2 = m(ck_1+bk_2). This is again a multiple of mm, so ac≡bd(modm)ac\equiv bd\pmod m. Together, (i)-(iii) make congruence an equivalence relation, and the last two steps show every ring operation on Z\mathbb{Z} descends to a well-defined operation on residue classes Z/mZ\mathbb{Z}/m\mathbb{Z}.

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Carl Friedrich Gauss (1801). Disquisitiones Arithmeticae
  2. Jung Hee Cheon, Andrey Kim, Miran Kim, Yongsoo Song (2017). Homomorphic Encryption for Arithmetic of Approximate Numbers · DOI:10.1007/978-3-319-70694-8_15