logo

Congruences in Number Theory 📂Number Theory

Congruences in Number Theory

Definition 1

Given integers ab(modm)a \equiv b \pmod{m},     \iff, aa, bb, mm, there exists an integer kk that satisfies a=b+mka = b + mk.

Theorem

Assuming a1b1(modm)a_{1} \equiv b_{1} \pmod{m} and a2b2(modm)a_{2} \equiv b_{2} \pmod{m} are true:

  • [1] Addition: a1+a2b1+b2(modm)a_{1} + a_{2} \equiv b_{1} + b_{2} \pmod{m}
  • [2] Subtraction: a1a2b1b2(modm)a_{1} - a_{2} \equiv b_{1} - b_{2} \pmod{m}
  • [3] Multiplication: a1a2b1b2(modm)a_{1} a_{2} \equiv b_{1} b_{2} \pmod{m}
  • [4] Division: if gcd(c,m)=1\gcd ( c , m ) = 1, then acbc(modm)    ab(modm) ac \equiv bc \pmod{m} \implies a \equiv b \pmod{m}
  • [5] Product of Modulos: if gcd(m1,m2)=1\gcd ( m_{1} , m_{2} ) = 1, then {ab(modm1)a=b(modm2)    ab(modm1m2) \begin{cases} a \equiv b \pmod{ m_{1} } \\ a = b \pmod{ m_{2} } \end{cases} \implies a \equiv b \pmod{ m_{1} m_{2} }
  • [6] Power of Modulo: if ab(modmn)a \equiv b \pmod{m^n}, then ab(modm)a \equiv b \pmod{m}
  • [7] Reduction including modulo: axay(modam)    xy(modm)ax \equiv ay \pmod{am} \iff x \equiv y \pmod{m}

Explanation

The equation ab(modm)a \equiv b \pmod{m} is called a congruence, and within the Modulo mm, aa is said to be congruent to bb. The modulo is often simply pronounced as modulo mm, as (mod)\pmod{} is used as is in the formula.

In theorem [4], without the condition gcd(c,m)=1\gcd(c,m) = 1, it is not possible to divide both sides by cc. For example, 820(mod12) 8 \equiv 20 \pmod{12} holds, but 25(mod12) 2 \equiv 5 \pmod{12}, which is divided by 44 on both sides, does not hold.

In dealing with simple number theory problems, mm is often set to be a prime number, but as things become complicated, mm is set to be a composite number. Therefore, it’s necessary to understand the overall properties of congruence equations.

Proof

[5]

Because of ab(modm1)a \equiv b \pmod{m_{1}}, there exists an integer n1n_{1} satisfying: a=b+n1m1 a = b + n_{1} m_{1} Because of ab(modm2)a \equiv b \pmod{m_{2}}, there exists an integer n2n_{2} satisfying: a=b+n2m2 a = b + n_{2} m_{2} Since m1m_{1} and m2m_{2} are coprime, for both equations to be satisfied simultaneously, n1n_{1} must be a multiple of m2m_{2}, and n2n_{2} must be a multiple of m1m_{1}. Thus, there exists an integer n3n_{3} satisfying: a=b+n3m1m2 a = b + n_{3} m_{1} m_{2} Then, by the definition of congruence: ab(modm1m2) a \equiv b \pmod{ m_{1} m_{2} }

[6]

If ab(modmn)a \equiv b \pmod{m^n}, then there exists an integer kk satisfying: a=b+mnk a = b + m^n k Detaching mn1m^{n-1} gives: a=b+mnkn=b+m(mn1k) a = b + m^{n} k \cdot n = b + m \cdot (m^{n-1} k) Thus, there exists an integer mn1km^{n-1} k satisfying: ab(modm) a \equiv b \pmod{m}

[7]

For some integer kk, axay(modam)    ax=ay+amk    x=y+mk    xy(modm) \begin{align*} ax \equiv ay \pmod{am} & \iff ax = ay + amk \\ & \iff x = y + mk \\ & \iff x \equiv y \pmod{m} \end{align*}


  1. Silverman. (2012). A Friendly Introduction to Number Theory (4th Edition): p55. ↩︎