Math Lab
Home/Class VIII/Ch 5/Remainders and modular thinking

Remainders and modular thinking

If it is 99 am now, what time will it be 5050 hours later? The trick is not to track each hour but to remove all the complete 2424-hour days. The answer comes from a remainder. This is the heart of modular arithmetic , the maths of "what's left over".

Concept

For positive integers aa and mm, the remainder of aa divided by mm is the integer rr with 0r<m0 \le r < m such that

a=qm+ra = qm + r

for some quotient qq. Examples: 17÷5=317 \div 5 = 3 remainder 22, so 17=3(5)+217 = 3(5) + 2. We write this as

172(mod5).17 \equiv 2 \pmod{5}.

"ab(modm)a \equiv b \pmod m" is read "aa is congruent to bb modulo mm" and it means aa and bb leave the same remainder on division by mm , equivalently, aba - b is a multiple of mm.

Why this matters. Many real-life cycles are modular:

  • Clocks repeat every 1212 or 2424 hours.
  • Calendars repeat every 77 days for the days-of-week pattern.
  • Months repeat every 1212.
  • Compass directions repeat every 360360^\circ.

To answer "what day will it be 100100 days from Monday?", compute 100÷7=14100 \div 7 = 14 remainder 22. Two days after Monday is Wednesday.

Operations. Addition and multiplication respect remainders:

  • If aa(modm)a \equiv a' \pmod m and bb(modm)b \equiv b' \pmod m, then a+ba+b(modm)a + b \equiv a' + b' \pmod m.
  • Similarly for multiplication.

So you can replace any number by its remainder before combining. To find 46×38(mod9)46 \times 38 \pmod 9, replace each: 46146 \equiv 1, 38238 \equiv 2. So 46×381×2=2(mod9)46 \times 38 \equiv 1 \times 2 = 2 \pmod 9.

Last digit problems. "Find the last digit of 71007^{100}." This is a mod-1010 question. Last digits of 71,72,73,747^1, 7^2, 7^3, 7^4 are 7,9,3,17, 9, 3, 1 , then the pattern repeats every 44. 100÷4=25100 \div 4 = 25 remainder 00, so 71007^{100} ends in the same digit as 747^4, i.e. 11.

Check digits. Phone numbers, credit cards, and Aadhaar numbers include a final "check digit" computed by a modular formula. If you mistype a digit, the check fails. Computers use this billions of times a day.

Casting out nines. Recall the divisibility-by-99 rule. Why does it work? Because 101(mod9)10 \equiv 1 \pmod 9, so a digit dd in any place contributes d10kd(mod9)d \cdot 10^k \equiv d \pmod 9. Hence the number is congruent (mod 99) to its digit sum. Same trick proves the divisibility-by-33 rule.

Worked examples

Example 1. Today is Wednesday. What day of the week will it be 200200 days from today?

  • 200÷7=28200 \div 7 = 28 remainder 44.
  • Counting 44 days from Wednesday: Thu, Fri, Sat, Sun.
  • Answer: Sunday.

Example 2. Find the remainder when 2,345,6782{,}345{,}678 is divided by 99.

  • Digit sum: 2+3+4+5+6+7+8=352+3+4+5+6+7+8 = 35. Digit sum again: 3+5=83+5 = 8.
  • So remainder is 88.

Example 3. Find the last digit of 3503^{50}.

  • Last digits of 31,32,33,343^1, 3^2, 3^3, 3^4 are 3,9,7,13, 9, 7, 1 , cycle of length 44.
  • 50÷4=1250 \div 4 = 12 remainder 22.
  • Answer: same last digit as 323^2, which is 99.

Example 4. A clock now shows 77 pm. What will it show 250250 hours later?

  • 250÷24=10250 \div 24 = 10 remainder 1010.
  • 7+10=177 + 10 = 17 hours, i.e., 55 am the next morning.

Try it yourself

  1. Find the remainder when 9393 is divided by 77.
  2. Today is Friday. What day will it be after 10001000 days?
  3. Find the last digit of 2302^{30}.
  4. Find the last digit of 9999^{99}.
  5. Compute 123×124(mod9)123 \times 124 \pmod 9 using the digit-sum trick.
  6. A clock at 1010 am , what time is it 4,0004{,}000 hours later?
  7. Find the remainder when 1!+2!+3!+4!++10!1! + 2! + 3! + 4! + \dots + 10! is divided by 55.
  8. Show that if ab(modm)a \equiv b \pmod m then a2b2(modm)a^2 \equiv b^2 \pmod m.

Activity / Insight

Test a check digit. Take an Aadhaar number (your own or a sample one) and look up its check-digit formula. Apply it to all digits except the last and verify that you recover the last digit. Now change one digit anywhere in the number and reapply , the check should fail. This is modular arithmetic protecting your identity.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Remainders and modular thinking
5 questions · pick the best answer
Q1

Remainder when 9797 is divided by 55

Q2

Today is Sunday. After 5050 days it will be

Q3

Last digit of 4204^{20}

Q4

25?(mod6)25 \equiv ? \pmod 6

Q5

If a3(mod7)a \equiv 3 \pmod 7 and b4(mod7)b \equiv 4 \pmod 7, then ab?(mod7)ab \equiv ? \pmod 7