This section is not complete.

Any help would be appreciated! Just submit a Pull Request on GitHub.

Overview

Modular arithmetic is the mathematics of remainders. When you divide 17 by 5, the remainder is 2, so we write 17≡2(mod5)17 \equiv 2 \pmod{5}. This notation and its rules let you simplify enormous computations by working only with remainders.

Key Ideas

  • a≡b(modm)a \equiv b \pmod{m} means m∣(a−b)m \mid (a - b), i.e., aa and bb leave the same remainder when divided by mm.
  • You can add, subtract, and multiply congruences: if a≡ba \equiv b and c≡d(modm)c \equiv d \pmod{m}, then a+c≡b+da+c \equiv b+d and ac≡bd(modm)ac \equiv bd \pmod{m}.
  • Reduce before computing: 97×103(mod10)97 \times 103 \pmod{10} becomes 7×3=21≡1(mod10)7 \times 3 = 21 \equiv 1 \pmod{10}.
  • Common moduli on AMC 8: 2 (parity), 3, 5, 9, 10.

Core Skills

Reducing Large Numbers

210=1024≡4(mod10)2^{10} = 1024 \equiv 4 \pmod{10}.

Remainder Chains

Compute 7100(mod5)7^{100} \pmod{5} by first noting 7≡2(mod5)7 \equiv 2 \pmod{5}, then track powers of 2 mod 5.

Divisibility via Modular Arithmetic

A number is divisible by 9 iff its digit sum is ≡0(mod9)\equiv 0 \pmod{9}.

Worked Example

What is the remainder when 3203^{20} is divided by 5?

31≡33^1 \equiv 3, 32≡43^2 \equiv 4, 33≡23^3 \equiv 2, 34≡1(mod5)3^4 \equiv 1 \pmod{5}. The cycle length is 4. Since 20=4×520 = 4 \times 5, we get 320≡1(mod5)3^{20} \equiv 1 \pmod{5}.

Practice Problems

StatusSourceProblem NameDifficultyTags
Mastering AMC 8Medium
Show TagsModular Arithmetic
Mastering AMC 8Medium
Show TagsModular Arithmetic
Mastering AMC 8Medium
Show TagsModular Arithmetic
Mastering AMC 8Medium
Show TagsModular Arithmetic
Mastering AMC 8Medium
Show TagsModular Arithmetic

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.