Category: Number Theory Level: 201
9 + 5 = 14 ≡ 2 (mod 12)
Counting mod 12 wraps around a circle of 12 spots, like a clock. Numbers that land on the same spot are congruent: they leave the same remainder after dividing by 12.
Put 0 to 11 around a circle. After 11 the count wraps back to 0, the way a clock goes from 11 back to 12. Mod 12 just means: count on this circle.
spots: 0, 1, 2, …, 11
Take 5 hops clockwise from 9. The hops pass 0 and land on 2. Nine o'clock plus five hours is two o'clock.
9 + 5 → 2
Write the second lap, 12 to 23, on an outer ring. 14 sits just outside 2. So 14 and 2 are the same spot on the circle.
14 = 1 × 12 + 2
Add a third lap. The spoke through 2 holds 2, 14, 26, and so on, plus −10 if you walk backward. They all leave remainder 2 after dividing by 12. That set is a congruence class.
… ≡ -10 ≡ 2 ≡ 14 ≡ 26 (mod 12)
Each spoke is its own class, so the integers split into exactly 12 classes. Two numbers are congruent when 12 divides their difference. For example, 24 and 0 share the top spoke.
a ≡ b (mod 12) ⇔ 12 divides a - b
cd svg-generator python3 -m svgmath render modular-clock --out /tmp/modular-clock
Source: svgmath/diagrams/modular.py