Modular Arithmetic, Number Bases and Divisibility Tests | OCR B (MEI) A Level Further Maths notes

Free preview: Modular Arithmetic, Number Bases and Divisibility Tests

Congruence Modulo n

Year 1 (AS) for OCR A (8.02, in the AS Additional Pure list). Edexcel teaches it in Further Pure 2 (FP2 5.1 to 5.7), OCR B (MEI) in Further Pure with Technology (Y436); check your own specification for when.

Let's start with a clock. If it is 9 o'clock, then 5 hours later it is 2 o'clock, not 14 o'clock. The clock throws away whole 12s. Lots of questions only care about remainders: what day of the week it will be in 100 days, the last digit of a huge power, whether a number divides by 11. Modular arithmetic is the language for exactly that.

The definition

a≡b(modn)⟺n∣(a−b)

  • Read it as "a is congruent to b modulo n".
  • Same thing: a and b leave the same remainder when divided by n.
  • n is the modulus. The possible remainders 0, 1, ..., n − 1 are the residues.

A clock with the seven positions 0 to 6. Position 3 is highlighted, and a box explains that 3, 10, 17, 24 and also −4, −11 all land on 3, so 10 is congruent to 3 mod 7 because 10 − 3 = 7.

Following the diagram

  • Arithmetic mod 7 uses a clock with 7 positions, 0 to 6.
  • Counting up from 0, the numbers 3, 10, 17, 24, ... all land on 3, because each is 7 more than the last.
  • Counting backwards, −4 and −11 also land on 3. So −4≡3(mod7): check, −4−3=−7.
  • To reduce any number mod 7, find its position on this clock: the remainder.

The rules

If a≡b and c≡d(modn), then:

  • a+c≡b+d and a−c≡b−d
  • ac≡bd
  • ak≡bk for any positive integer k.
  • Why the product rule works: write a=b+jn and c=d+kn. Then ac=bd+n(bk+dj+jkn), which is bd plus a multiple of n.

💡 In plain words

  • You can reduce numbers at any stage of an addition, subtraction, multiplication or power. Swap any number for a smaller one with the same remainder.

👀 Watch me do it: find 38×45(mod7) without a calculator

What I writeWhy I do it
38=35+3≡3Reduce each factor first: subtract the biggest multiple of 7.
45=42+3≡3Same for 45.
38×45≡3×3=9≡2Multiply the small numbers, then reduce again.
Check: 1710=7×244+2.Reducing first gave the right remainder with tiny numbers.

📝 Here's the trap: no dividing

  • You cannot divide both sides of a congruence in general.
  • 6≡2(mod4), which is 2×3≡2×1, but 3≢1(mod4).
  • Dividing by k is safe only when hcf(k, n) = 1. Otherwise use an inverse (next page) or divide the modulus too.

Diagram: On the mod 4 clock, 6 and 2 land in the same place, so 6 2 4 is true.

What the picture shows

  • On the mod 4 clock, 6 and 2 land in the same place, so 6≡2(mod4) is true.
  • Wrong: dividing by 2 but keeping mod 4 claims 3≡1(mod4). On the clock, 3 and 1 land in different places, so it is false.
  • Right: 2 and 4 share the factor 2, so halve the modulus as well. On the mod 2 clock, 3 and 1 land in the same place: 3≡1(mod2).
  • Only divide straight through when the number is coprime to n.

✏️ YOUR TURN 1

Try this first:

(a) Is 47≡12(mod5)? (b) Give the residue of −20 mod 6. (c) Find 23×41(mod6) by reducing first.

Answer:

  • (a) 47−12=35=7×5, so yes.
  • (b) Add 6 until you are in range: −20, −14, −8, −2, 4. So −20≡4(mod6).
  • (c) 23≡5 and 41≡5, so the product is 25≡1. Check: 943=6×157+1.

Remainders of Big Powers and Inverses Mod n

What is the remainder when 3100 is divided by 7? That number has 48 digits, so no calculator will help. But remainders of powers go round in circles, and that makes it easy.

Method: find a power that is ±1

  1. Work out small powers of the base, reducing each time, until you hit 1 (or −1). Why: once a power is 1, the pattern repeats from there.
  2. Write the big exponent in terms of that power, with a remainder. Why: it is the division algorithm on the exponent.
  3. Use 1k=1 (or (−1)k=±1) to collapse it. Why: all the full cycles disappear.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in Number Theory

  1. The Division Algorithm, Euclid's Algorithm and Bézout's Identity
  2. Modular Arithmetic, Number Bases and Divisibility Tests
  3. Solving Linear Congruences and Fermat's Little Theorem

What's inside for this topic

3 teacher notes, 95 practice questions, 40 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: The Division Algorithm, Euclid's Algorithm and Bézout's Identity Next note: Solving Linear Congruences and Fermat's Little Theorem

Modular Arithmetic, Number Bases and Divisibility Tests on other exam boards

All OCR B (MEI) A Level Further Maths topics · A Level Further Maths