The Chinese Remainder Theorem

The Chinese Remainder Theorem (CRT) is a fundamental result in number theory that allows us to solve a system of simultaneous congruences with pairwise relatively prime moduli.

Statement of the Theorem

Let m1,m2,,mnm_1, m_2, \dots, m_n be pairwise relatively prime positive integers and let a1,a2,,ana_1, a_2, \dots, a_n be any integers. Then the system of congruences

xa1(modm1)xa2(modm2)xan(modmn)\begin{aligned} x &\equiv a_1 \pmod{m_1}\\ x &\equiv a_2 \pmod{m_2}\\ &\vdots\\ x &\equiv a_n \pmod{m_n} \end{aligned}

has a unique solution modulo M=m1m2mnM = m_1m_2\cdots m_n.

Proof of the Theorem

The proof of CRT can be divided into two parts. First, we show that the system of congruences has a solution. Second, we show that the solution is unique modulo MM.

Existence of a Solution

Let Mi=M/miM_i = M/m_i for i=1,2,,ni=1,2,\dots,n. Since mim_i and MiM_i are relatively prime, there exists an integer NiN_i such that MiNi1(modmi)M_iN_i \equiv 1 \pmod{m_i}. Let xx be the integer defined by

x=i=1naiMiNi.x = \sum_{i=1}^{n}a_iM_iN_i.

We claim that xx is a solution to the system of congruences. To see this, we compute

xaiMiNi(modmi)ai1Ni(modmi)ai(modmi).\begin{aligned} x &\equiv a_iM_iN_i \pmod{m_i} \\ &\equiv a_i \cdot 1 \cdot N_i \pmod{m_i} \\ &\equiv a_i \pmod{m_i}. \end{aligned}

Therefore, xx satisfies each congruence in the system.

Uniqueness of the Solution

Suppose that x1x_1 and x2x_2 are two solutions to the system of congruences. Then we have

x1x2(modmi),for i=1,2,,nMix1x2,for i=1,2,,nMx1x2.\begin{aligned} x_1 &\equiv x_2 \pmod{m_i}, \quad \text{for } i=1,2,\dots,n \\ \Rightarrow \quad M_i &\mid x_1 - x_2, \quad \text{for } i=1,2,\dots,n \\ \Rightarrow \quad M &\mid x_1 - x_2. \end{aligned}

Therefore, the two solutions are congruent modulo MM. Hence, the solution is unique modulo MM.

Applications of the Theorem

The Chinese Remainder Theorem has numerous applications in number theory, computer science, cryptography, and other fields. For example, it is used in the Chinese remainder algorithm for computing large powers of integers, in the RSA cryptosystem, in error-correcting codes, and in the construction of finite fields.

Conclusion

The Chinese Remainder Theorem is a powerful tool in number theory that allows us to solve a system of simultaneous congruences with pairwise relatively prime moduli. It has many applications in various fields, and its elegant proof highlights the beauty of number theory.

中国剰余定理[JA]