AMC // 10
LEARN>NUMBER THEORY>MODULAR ARITHMETIC
// CONCEPT // NUMBER THEORY

MODULAR ARITHMETIC

Reasoning about remainders without doing the division.

The idea

We write ab(modn)a \equiv b \pmod{n} to mean "aa and bb have the same remainder when divided by nn." Equivalently, nn divides aba - b.

For example, 172(mod5)17 \equiv 2 \pmod{5} because 17=35+217 = 3\cdot 5 + 2.

Why it matters on AMC10

Many problems ask for a units digit, a remainder, or a divisibility property. Working mod 10 (units digit) or mod 9 (digit sum) turns ugly arithmetic into small-number arithmetic.

Rules you can use

Modular arithmetic respects addition, subtraction, and multiplication:

ab(modn)  and  cd(modn)    a+cb+d(modn)a \equiv b \pmod n \;\text{and}\; c \equiv d \pmod n \implies a + c \equiv b + d \pmod n and  acbd(modn).\text{and}\; a\cdot c \equiv b\cdot d \pmod n.

Division is trickier and only works if gcd(divisor,n)=1\gcd(\text{divisor}, n) = 1.

Worked example

What is the units digit of 720247^{2024}?

Work mod 10. The units digit of 7k7^k cycles: 7,9,3,1,7,9,3,1,7, 9, 3, 1, 7, 9, 3, 1, \ldots, with period 4. Since 2024=45062024 = 4 \cdot 506, we're at the end of a cycle, so 720241(mod10)7^{2024} \equiv 1 \pmod{10}. The units digit is 11.