The Maths Behind Everyday Life
The story, the formula and a worked example — see exactly where this maths shows up in the world around you.
The hidden digit that catches typos
The last number on every barcode exists only to tell when the others are wrong.
Every product barcode ends in a "check digit". It carries no product information at all. Its only job is to be mathematically consistent with the digits before it, so a scanner can instantly spot a misread or a mistyped number.
A weighted sum that must land on a round number
In a 13-digit barcode, the digits are multiplied alternately by 1 and 3 and added up. The check digit is chosen so the grand total is a multiple of 10. If a scan does not divide cleanly by 10, something was read wrong.
Finding the missing digit
Take the first 12 digits 4 0 0 6 3 8 1 3 3 3 9 3 and work out what the 13th must be.
Check digit for 400638133393?
- 1
Weighted sum (×1, ×3 alternating)
- 2
Next multiple of 10
- 3
Check digit
The barcode must end in 1 for the total (90) to be divisible by 10.
The check digit is 1 — any single mistyped digit breaks the divisibility and is caught instantly.
The takeaway
Check digits use modular arithmetic to police themselves. The same idea guards credit-card numbers, ISBNs and bank accounts — a tiny bit of maths that quietly prevents millions of errors.