Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

The Chinese Remainder Theorem is a powerful method for solving systems of congruences with different moduli. This cheat sheet helps students organize the conditions, notation, and construction steps needed to solve CRT problems accurately. It is especially useful in number theory, contest math, cryptography, and modular arithmetic applications.

Key Facts

  • A congruence xa(modm)x \equiv a \pmod{m} means that mm divides xax-a, or mxam \mid x-a.
  • The Chinese Remainder Theorem applies directly when the moduli m1,m2,,mkm_1,m_2,\ldots,m_k are pairwise coprime, meaning gcd(mi,mj)=1\gcd(m_i,m_j)=1 for iji \ne j.
  • If the moduli are pairwise coprime, the system xai(modmi)x \equiv a_i \pmod{m_i} has one unique solution modulo M=m1m2mkM=m_1m_2\cdots m_k.
  • For each congruence, define Mi=MmiM_i=\frac{M}{m_i}, where M=m1m2mkM=m_1m_2\cdots m_k.
  • The modular inverse yiy_i is chosen so that Miyi1(modmi)M_i y_i \equiv 1 \pmod{m_i}.
  • A CRT solution is xi=1kaiMiyi(modM)x \equiv \sum_{i=1}^{k} a_i M_i y_i \pmod{M}.
  • For two congruences xa(modm)x \equiv a \pmod{m} and xb(modn)x \equiv b \pmod{n} with gcd(m,n)=1\gcd(m,n)=1, the solution is unique modulo mnmn.
  • If moduli are not coprime, a solution exists only when aiaj(modgcd(mi,mj))a_i \equiv a_j \pmod{\gcd(m_i,m_j)} for every pair of congruences.

Vocabulary

Congruence
A statement such as xa(modm)x \equiv a \pmod{m} saying that xx and aa have the same remainder when divided by mm.
Modulus
The positive integer mm in xa(modm)x \equiv a \pmod{m} that determines the remainder system being used.
Pairwise coprime
A set of integers is pairwise coprime when every two different integers in the set have greatest common divisor 11.
Modular inverse
The modular inverse of aa modulo mm is a number a1a^{-1} such that aa11(modm)aa^{-1} \equiv 1 \pmod{m}.
Residue class
A residue class modulo mm is the set of all integers congruent to the same remainder modulo mm.
Unique modulo MM
A solution is unique modulo MM when all solutions differ from it by a multiple of MM.

Common Mistakes to Avoid

  • Forgetting to check that the moduli are pairwise coprime is wrong because the standard CRT formula requires gcd(mi,mj)=1\gcd(m_i,m_j)=1 for every pair.
  • Using Mi=miM_i=m_i instead of Mi=MmiM_i=\frac{M}{m_i} is wrong because each MiM_i must include all moduli except the one for its own congruence.
  • Finding the inverse of the wrong number is wrong because yiy_i must satisfy Miyi1(modmi)M_i y_i \equiv 1 \pmod{m_i}, not miyi1(modMi)m_i y_i \equiv 1 \pmod{M_i}.
  • Stopping before reducing the final answer is wrong because the solution should be written as xr(modM)x \equiv r \pmod{M} with 0r<M0 \le r < M when possible.
  • Assuming non-coprime systems never have solutions is wrong because they can be consistent when aiaj(modgcd(mi,mj))a_i \equiv a_j \pmod{\gcd(m_i,m_j)}.

Practice Questions

  1. 1 Solve the system x2(mod3)x \equiv 2 \pmod{3}, x3(mod5)x \equiv 3 \pmod{5}, and x2(mod7)x \equiv 2 \pmod{7}.
  2. 2 Solve the system x1(mod4)x \equiv 1 \pmod{4} and x4(mod9)x \equiv 4 \pmod{9}, and write the answer modulo 3636.
  3. 3 Find the modular inverse of 1010 modulo 1717, then use it to solve 10x6(mod17)10x \equiv 6 \pmod{17}.
  4. 4 Explain why the system x2(mod6)x \equiv 2 \pmod{6} and x5(mod9)x \equiv 5 \pmod{9} has no solution, using the greatest common divisor condition.