Number Theory Home

Basic Properties of Congruences

    


The concept of congruence was introduced in the book Disquisitiones Arithmeticae ("Arithmetical Investigations" in Latin) written by 21 years old Carl Friedrich Gauss in 1798.

Given a positive integer n, integers a and b are congruent modulo n if their difference is an integer multiple of n. We denote it by ab(modn) (Read as a is congruent to b modulo n ). ab(modn)n|(ab)a=kn+b for some kZ. Example. 71(mod3) and 91(mod3), i.e., 9 and 1 are incongruent modulo 3.

Many arithmetic properties and operations on congruence are similar to that of equality as follows.

Proposition. Let n be a positive integer. The following hold for all integers a,b,c, and d.

  1. aa(modn) (Reflexivity).
  2. ab(modn)ba(modn) (Symmetry).
  3. If ab(modn) and bc(modn), then ac(modn) (Transitivity).
  4. If ab(modn), then a+cb+c(modn) (Translation).
  5. If ab(modn), then acbc(modn) (Scaling).
  6. If ab(modn) and cd(modn), then a+cb+d(modn) (Addition).
  7. If ab(modn) and cd(modn), then acbd(modn) (Multiplication).
  8. If ab(modn), then akbk(modn) for all nonnegative integers k (Exponentiation).

Proof. (1) and (2) are obvious. For (3), suppose ab(modn) and bc(modn). Then ab=rn and bc=sn for some integers r and s. Then ac=(ab)+(bc)=rn+sn=(r+s)n which means ac(modn).

(4) and (5) are easy. For (6) and (7), suppose ab(modn) and cd(modn). Then ab=xn and cd=yn for some integers x and y. Then (a+c)(b+d)=(ab)+(cd)=xn+yn=(x+y)n which means a+cb+d(modn). For (7), note that a=b+xn and c=d+yn. Then ac=(b+xn)(d+yn)=bd+(by+xd+xyn)n which means acbd(modn). (8) holds by inductively using c=a and d=b in (7). ◼

Let us use the above properties for the following divisibility problem.

Problem. Determine if 10 divides 17233.
It suffices to determine if 17233(mod10). Note that 177(mod10). Then 172729(mod10), 1739173(mod10), and 174921(mod10) by (8) and (5). Now since 23=45+3, 1723=(174)5173(1)51733(mod10) by (8) and (5).

Note that while the converse of (4) is true, but not the converse of (5). For example, 6323(mod6) but 62(mod6). How to divide both sides of a congruence?

Theorem. Let n be a positive integer. Let a,b, and c be integers. If acbc(modn), then ab(modngcd(n,c)).

Proof. Suppose acbc(modn). Then (ab)c=acbc=kn for some integer k. Dividing both sides by d=gcd(n,c), we get (ab)cd=knd. So nd|(ab)cd. Since gcd(nd,cd)=1, nd|(ab). ◼

Corollary. Let n be a positive integer. The following hold for all integers a,b, and c.

  1. If acbc(modn) and gcd(c,n)=1, then ab(modn).
  2. If acbc(modn) for a prime nc, then ab(modn).

Application. A nice application of modular arithmetic finds w, the day of the week, where w=0 means Sunday,..., w=6 means Saturday: For the date d/m/100c+y,c16,0y99, wd+2.6m0.22c+y+c4+y4(mod7), where m=1 means March,..., m=12 means February. For 4th of November, 2024 we have w4+2.690.2220+24+204+244221(mod7). So 4th of November, 2024 is a Monday.


Last edited 03/25/2022 22:47:29