Maths IA · Algebra and functions · topic 9 of 97
Check digits: how do barcodes catch mistakes? · IB Maths IA idea: guide, sample graph and step-by-step plan
prove it, then test itEvery barcode ends in a digit that checks the others. Swap two digits and the scanner usually shouts, but sometimes it stays quiet. You're going to prove exactly when it stays quiet.
- ✓ you like proving that something is always true
- ✓ you want a topic where the maths is hidden inside everyday objects
- ✓ you enjoy finding the case that breaks a rule
The big idea
A check digit is chosen so that a weighted sum of all the digits fits a rule, for example a multiple of 10 or of 11. Barcodes, book numbers and bank accounts all work this way. A mistake is caught when it breaks the rule. For a single wrong digit and for two neighbouring digits swapped, you can say exactly when the sum changes, using nothing more than remainders. The weights and the modulus decide everything. Some schemes catch every swap of neighbours and some miss a whole family of them. Prove which is which, test your claims on numbers you generate yourself (never real ones), and work out how often each scheme misses an error when the mistakes are random.
Make it yours: pick one twist
Copying a classic won't show your choices. Pick one of these (or invent your own) and your IA becomes yours.
Swipe for more twists →
Show that changing one digit, or swapping two neighbours, always changes the weighted sum modulo 11.
→ A proof about remainders. Explain why 11 matters: what goes wrong if the modulus is 10 or 12?Show which neighbour swaps leave the weighted sum modulo 10 unchanged when the weights are 1 and 3.
→ A short proof gives a list of digit pairs. Count them and say what share of swaps they are.Work through the doubling-and-adding check used on payment cards, with numbers you invent, and find its blind spots.
→ A rule with a conditional step. You must prove what it catches, not only try examples.Generate valid codes for each scheme, make random mistakes and count how many are caught.
→ A probability result to set against your proofs. Where they disagree, one of them is wrong.Choose new weights and a modulus and show your scheme catches more swaps, then say what it costs.
→ An optimisation with trade-offs: length, ease of use and which errors people really make.Study the 97 check used for bank account numbers: write the rule and test its detection rate.
→ Big numbers and remainders. The prime gives strong guarantees, which you can prove.Your Maths IA research question: run the check
which scheme? which mistake?Write your own question first. Then make sure it ticks every box:
- Names the scheme or schemes and the kinds of mistake you will test: one wrong digit, a swap or something else.
- Says which results you will prove and which you will check by simulation, and how many codes you will test.
- Defines the modulus and every weight, so someone can rebuild a valid code from your page.
- Uses made-up or self-generated numbers only. No real card, account or ID numbers appear anywhere.
- Says what a 'miss' means and how the rate is measured, over which errors.
The set-up
Multiply each digit by its weight, add them up and ask whether the total fits the rule. Draw the scheme you study, with made-up digits.
How your Maths IA could be laid out
The usual order for a topic like this, what each part needs to show, and roughly how much of your 12 to 20 pages it takes. The words are all yours.
Where check digits are used, which schemes you will study and which mistakes you expect them to catch.
What 'mod' means, how remainders add and multiply, and why a prime modulus helps. Every rule you use is stated.
The weights, the rule, how the check digit is found, and two worked examples with made-up numbers.
A proof for a single wrong digit and for a swap of neighbours, step by step.
The blind spots as a list or a grid, with the reason, and a count of how many there are.
Your code or spreadsheet, the number of codes tested and a table of detection rates next to your proofs.
Back to your aim: what each scheme catches and misses, with numbers.
Which mistakes people really make, which you did not test, and whether stronger schemes would be worth the cost. Say which limit matters most.
Where each scheme's rules came from.
What your Maths IA graph could look like
mark 10, 11 and 97A made-up result to show the form of a strong graph, not the answer: the share of swaps of neighbours caught by a weighted check against how large the modulus is. Yours will look different. example only
- A good graph here compares your formula for the miss rate with a simulation. Plot both.
- Axis labels say what is being counted: a percentage of errors, and the modulus as a plain number.
- Mark the moduli the real schemes use: 10, 11 and 97.
- Plot the simulated points. If they sit off the curve, work out why before you write the conclusion.
- Another graph to consider: misses against the kind of error, one bar for each scheme.
The maths in action
worked through, not sketched!The graph above was a sketch with made-up numbers. This figure works the idea through from the model itself, so you can see what a finished figure looks like. The source line under it says where every number comes from.
Your game plan
Tick steps off as you go. We'll remember on this device.
0 of 10 done
- Read and predictLook at the check digit on a book or a pack. Before calculating, guess which kinds of mistake it catches.
- Learn the remainder rulesPractise remainders until you can state and use the rules for adding and multiplying them. Say which you will use.
- Work one code by handTake one scheme and compute the check digit of a made-up number by hand. Check it against the rule.
- Trial run (1 lesson)Write code or a spreadsheet to compute check digits and test whether a changed number is caught. Compare with your hand work on three numbers.
- Prove the catchesProve that a single wrong digit is always caught and find the condition for a swap of neighbours to be caught.
- Find the missesList the swaps that slip through, and prove the list is complete, not just that your examples work.
- SimulateGenerate many valid codes, apply random mistakes and count what is caught. Compare each rate with your proof.
- Go further, with a reasonCompare two schemes, or design your own and test it. HL: say why your choice of modulus and weights makes the proofs work.
- Reflect as you goAfter every result, write one line on what it means for a shop or a bank, and what you assumed. These lines become your evaluation.
- Cut, check, then sendCheck every proof is complete, every table has labelled rows and columns and the conclusion answers your aim. Then send your teacher one draft.
The maths you'll use
- Remainders and weighted sums – Write the rule as and use that remainders add and multiply to find how a change moves the sum.
- Proof by direct argument – Show a change cannot be a multiple of 11 for , so every single error is caught.
- Counting cases – Count the digit pairs with a multiple of 10, giving the 10 swaps EAN-13 misses of 90.
- Probability – Treat random errors as equally likely, find detection rates as fractions of cases and compare with simulation.
- Technology – A short program or spreadsheet that builds valid codes, introduces errors and counts catches.
Key equations
Syllabus links
- 1.6Simple deductive proof
- 1.15Proof by induction, contradiction and counterexampleHL
- 4.5Basic probability and expected frequency
- 4.6Venn and tree diagrams, combined events
- 1.6Approximation, bounds and percentage error
- 4.5Basic probability and expected frequency
- 4.6Venn and tree diagrams, conditional probability
Read up first
Data and sources to start from
Codes you generate yourself with a program, plus the published rule for each scheme. Use made-up numbers only.
References to cite
- GS1. (2026). Check digit calculator and barcode specifications. https://www.gs1.org/
- International ISBN Agency. (2026). ISBN users' manual. https://www.isbn-international.org/
- Gallian, J. A. (1991). The mathematics of identification numbers. The College Mathematics Journal, 22(3), 194-202.
Cite what you actually use, in your own format, and say where each number came from.
Traps to avoid in this Maths IA
made-up numbers only- Testing a few examples and calling it a proof. Show the argument works for every digit.
- Using a modulus that is not prime and not saying what that costs.
- Using a real card, account or ID number in the working. Generate your own numbers.
- Forgetting that the weights depend on position, and counting positions from the wrong end.
- Reporting a detection rate with no sample size or no definition of which errors were tried.
- Treating every mistake as equally likely when real typing errors are not.
More Maths IA ideas like this
RSA: why can nobody read your messages?●●●
The birthday problem: how safe are hash codes?●●○
Number bases: which base stores information best?●○○
Repeating decimals: what is the pattern in the digits?●●●
This guide shows how a topic like this is usually approached. It is not an IA. Your question, choices, data, analysis and words must be your own: change something, tell your teacher where the idea came from, and follow your school's rules on outside help.