Remainders and modular thinking
If it is am now, what time will it be hours later? The trick is not to track each hour but to remove all the complete -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 and , the remainder of divided by is the integer with such that
for some quotient . Examples: remainder , so . We write this as
"" is read " is congruent to modulo " and it means and leave the same remainder on division by , equivalently, is a multiple of .
Why this matters. Many real-life cycles are modular:
- Clocks repeat every or hours.
- Calendars repeat every days for the days-of-week pattern.
- Months repeat every .
- Compass directions repeat every .
To answer "what day will it be days from Monday?", compute remainder . Two days after Monday is Wednesday.
Operations. Addition and multiplication respect remainders:
- If and , then .
- Similarly for multiplication.
So you can replace any number by its remainder before combining. To find , replace each: , . So .
Last digit problems. "Find the last digit of ." This is a mod- question. Last digits of are , then the pattern repeats every . remainder , so ends in the same digit as , i.e. .
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- rule. Why does it work? Because , so a digit in any place contributes . Hence the number is congruent (mod ) to its digit sum. Same trick proves the divisibility-by- rule.
Worked examples
Example 1. Today is Wednesday. What day of the week will it be days from today?
- remainder .
- Counting days from Wednesday: Thu, Fri, Sat, Sun.
- Answer: Sunday.
Example 2. Find the remainder when is divided by .
- Digit sum: . Digit sum again: .
- So remainder is .
Example 3. Find the last digit of .
- Last digits of are , cycle of length .
- remainder .
- Answer: same last digit as , which is .
Example 4. A clock now shows pm. What will it show hours later?
- remainder .
- hours, i.e., am the next morning.
Try it yourself
- Find the remainder when is divided by .
- Today is Friday. What day will it be after days?
- Find the last digit of .
- Find the last digit of .
- Compute using the digit-sum trick.
- A clock at am , what time is it hours later?
- Find the remainder when is divided by .
- Show that if then .
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.