Modular arithmetic
Also known as: clock arithmetic, arithmetic of remainders
Modular arithmetic is a system of arithmetic that works with remainders: two numbers are congruent mod n if they leave the same remainder when divided by n. It is written a ≡ b (mod n) and underlies much of number theory.
Modular arithmetic is arithmetic on remainders. Fix a positive integer n, called the modulus; two integers a and b are congruent modulo n, written a ≡ b (mod n), when they leave the same remainder upon division by n — equivalently, when n divides a − b. For example, 17 ≡ 5 (mod 12), because both leave remainder 5 when divided by 12.
The everyday model is a clock, which is why modular arithmetic is nicknamed clock arithmetic. Nine hours after 8 o'clock is 5 o'clock: 8 + 9 = 17 ≡ 5 (mod 12). The numbers wrap around at the modulus instead of growing without bound, and only the remainder matters.
What makes the system powerful is that congruences respect addition, subtraction, and multiplication: if a ≡ b (mod n), then a + c ≡ b + c, and ac ≡ bc (mod n). This lets you reduce numbers before computing. To find the units digit of 7¹⁰⁰, work mod 10: powers of 7 cycle 7, 9, 3, 1, so 7¹⁰⁰ ≡ 1 (mod 10) — the units digit is 1. The same idea drives divisibility rules, remainder problems, and cryptography.
Modular arithmetic is a staple of competition math. The AMC 8, AMC 10, and AMC 12 all feature problems on remainders, cyclic patterns in powers and digits, and congruence manipulations, and it pairs naturally with prime factorization and Diophantine equations in the number theory portion of those exams.
Key takeaways
- a ≡ b (mod n) means a and b leave the same remainder when divided by n, i.e., n divides a − b.
- Modular arithmetic wraps numbers around at the modulus, like hours on a clock.
- Congruences can be added, subtracted, and multiplied, allowing large computations to be reduced to small remainders.
- AMC 8, 10, and 12 problems use modular arithmetic for remainders, units digits, and cyclic patterns.
