Big Maths Ideas · Beta
Modular arithmetic
Wrap numbers around a clock and investigate when division has an inverse.
Choose a modulus and select a clock position for a. Change b to add or multiply.
Adding b wraps around the clock and always permutes its positions.
- Result residue
- 2
- gcd(b, n)
- 3
- Multiplicative inverse of b
- None
All residues under this rule
| a | Result |
|---|---|
| 0 | 9 |
| 1 | 10 |
| 2 | 11 |
| 3 | 0 |
| 4 | 1 |
| 5 | 2 |
| 6 | 3 |
| 7 | 4 |
| 8 | 5 |
| 9 | 6 |
| 10 | 7 |
| 11 | 8 |
Residues run from 0 to n − 1. Modular division means multiplying by an inverse; an inverse exists exactly when gcd(b, n) = 1.
Read more about this idea
Cornell Maths: modular inversesPredict, test and explain
Step 1 of 3
Predict
Does 4 have a multiplicative inverse modulo 12?
Explore and compare
Choose the investigation above. Predict what will change before you move a control.
Try it in the simulation. Change one thing at a time.
Notes and saved values stay in this tab. They disappear when you reload.
Hints, self-check and connections
Try a self-check
Fixed values, separate from the diagram controls.
Does 4 have a multiplicative inverse modulo 12?
Hint
An inverse exists exactly when the multiplier and modulus are coprime.
Reveal answer
gcd(4, 12) = 4. Multiplication by 4 repeats residues, so it cannot be undone uniquely.
Build an explanation
Hint 1
An inverse exists exactly when the multiplier and modulus are coprime.
Hint 2
gcd(4, 12) = 4. Multiplication by 4 repeats residues, so it cannot be undone uniquely.
Hint 3
Compare the result with the model, then explain why it occurs.
Worked example
This example uses fixed values, separate from the diagram controls.
Find the inverse of 5 modulo 12.
- Multiply 5 × 5 = 25.
- 25 leaves remainder 1 when divided by 12.
- So multiplication by 5 undoes itself.
Answer: 5.
Connect this idea
Watch out: gcd(4, 12) = 4. Multiplication by 4 repeats residues, so it cannot be undone uniquely.