Modular arithmetic basics
Working modulo n means caring only about remainders on division by n. Addition and multiplication respect this, so you may reduce at any point — which is what keeps numbers small. The classic applications are clock arithmetic, checking divisibility, and computing last digits, where "mod 10" turns an enormous power into a short cycle.
✓ Unlimited questions · marked criterion by criterion · no card needed
Method: how to approach it
The order below is what examiners expect to see, and each step carries its own marks.
- Reduce to the canonical remainderEvery integer is congruent to exactly one of 0, 1, …, n−1. Reduce early and often.
- Add and multiply componentwiseIf a ≡ a′ and b ≡ b′ then a + b ≡ a′ + b′ and ab ≡ a′b′. Reduce after each operation.
- Handle negatives by adding n−3 mod 7 is 4, not −3. Answers should be in the canonical range unless stated otherwise.
- Find the cycle for powersCompute successive powers until a value repeats; the exponent then reduces modulo the cycle length.
Worked example
Find the last digit of 7²⁰²⁵.
- The last digit is the value mod 10.
- Powers of 7 mod 10: 7, 49 ≡ 9, 63 ≡ 3, 21 ≡ 1, then the cycle repeats with length 4.
- 2025 = 4·506 + 1, so 7²⁰²⁵ ≡ 7¹ (mod 10).
- Which is 7.
Answer. The last digit of 7²⁰²⁵ is 7.
Where marks get dropped
These are the specific errors that cost credit on modular arithmetic basics questions — QED's rubric penalises each of them separately.
- Reducing the exponent modulo n. Exponents reduce modulo the cycle length (or φ(n) when the base is coprime to n), never modulo n itself.
- Cancelling a common factor that shares a divisor with n. 2a ≡ 2b (mod 6) does not give a ≡ b (mod 6).
- Leaving a negative remainder. Add n until the answer is in {0, …, n−1}.
Practise this until it is automatic
Unlimited fresh questions
QED generates new modular arithmetic basics problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.
Marked like an examiner
Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.
Answer in real notation
A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.
Saved to your library
Every question you generate is kept and re-takeable as a timed exam, and your Algebra mastery is tracked so you know when this is exam-ready.
Modular arithmetic basics — frequently asked questions
How do I compute a large power mod n by hand?
Repeated squaring: express the exponent in binary and square-and-reduce at each step. This turns hundreds of multiplications into a handful.
Why does modular arithmetic work?
Because congruence mod n is compatible with + and ×, so the remainders form a ring ℤ/nℤ and ordinary algebra applies within it.
Where is it used?
Check digits (ISBN, IBAN), hashing, cryptography (RSA is modular exponentiation), and any wraparound counter in software.
The rest of Algebra
Foundational algebra to close prerequisite gaps. Each subtopic below has its own method, worked example and mark-losing traps.
- 1Manipulating & simplifying expressions
- 2Exponent & fraction rules
- 3Factoring & polynomials
- 4Solving linear & quadratic equations
- 5Inequalities & absolute value
- 6Logarithms & exponentials
- 7Summation notation Σ & telescoping
- 8Sets of numbers ℕ, ℤ, ℚ, ℝ
- 9Modular arithmetic basics
- 10Systems of two equations & substitution
- 11Rational expressions & partial fractions
- 12Arithmetic & geometric sequences and series
- 13Function notation, domain & reading a graph
Ready to make modular arithmetic basics exam-proof?
Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.
Start practising free →