Skip to content

Modular Arithmetic

Mathematics Grade 8 Difficulty 2/5

Beginning of the lesson

Modular Arithmetic: The Mathematics of Remainders

What is Modular Arithmetic?

Modular arithmetic is a system of arithmetic where numbers "wrap around" after reaching a certain value, called the modulus. Think of it like a clock — after 12, we go back to 1!

Formal Definition: For integers $a$, $b$, and a positive integer $n$, we say:

$$a \equiv b \pmod{n}$$
which reads "$a$ is congruent to $b$ modulo $n$" if and only if $n$ divides $(a - b)$. Equivalently, $a$ and $b$ have the same remainder when divided by $n$.
Real-World Examples
  • 🕐 Clocks: mod 12
  • 📅 Days of the week: mod 7
  • 📆 Months: mod 12
  • 🔐 Cryptography (RSA encryption)
  • 📊 ISBN/barcode check digits

🕐 The Clock Analogy

Imagine a clock that only shows hours 0 through 11 (we use 0 instead of 12 for mathematical convenience). If it's currently 9 o'clock and we add 5 hours, we don't get 14 o'clock — we get 2 o'clock!

Mathematically: $9 + 5 = 14$, and $14 \equiv 2 \pmod{12}$ because $14 \div 12 = 1$ remainder $2$.

Drag the slider to add hours to 9 o'clock and see how the clock wraps around!

Interactive visualization — available in the full lesson

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 139
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers