2.5.1 · D2Number Theory (Intermediate)

Visual walkthrough — Divisibility rules — 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 (with proofs where possible)

2,477 words11 min readBack to topic

This page proves one central idea and shows that every divisibility rule in the parent note falls out of it. The idea:

We build every symbol from scratch. If you have never seen "" or a place-value expansion, start at line one — you will be fine.


Step 1 — What a number really is (place value)

WHAT. Take the number . It is not four separate digits sitting side by side; it is a sum:

Reading the annotation: the digit is how many of that block you have, and the power of ten () is how big each block is. The tiny raised number (the exponent) just counts how many tens are multiplied: , and (zero tens multiplied = the block of size one).

WHY. Every trick below works by attacking the blocks one at a time. So we must first see a number as a tower of blocks, not as a single lump.

PICTURE. Each block is a coloured bar whose height is its power of ten; the digit on top says how many copies to count.

We write a general number with digits as where is the units digit (rightmost), the tens digit, and so on. The subscript is just the block's floor number. See Place Value System for more on this expansion.


Step 2 — The one new tool: "remainder-speak" (mod)

WHAT. When we divide by , the only thing that matters for divisibility is the remainder — what is left over. We write and read it aloud as: " leaves the same remainder as when divided by ." The symbol (three bars) means "same remainder", not "equal". The in brackets names the divisor we are dividing by.

Examples, term by term: because (the bold is the leftover). And because divides evenly, leftover .

WHY THIS TOOL AND NOT PLAIN DIVISION? Plain division asks "how many times?" — a big, annoying question. Remainder-speak asks only "what's left over?" — a small question with answers . And the magic rule we will lean on:

This is exactly what lets us throw away the huge powers of ten and keep only their tiny leftovers. (Deep background: Modular Arithmetic.)

PICTURE. A number line coiled into a clock with marks: dividing by just asks where on the clock you land.


Step 3 — What each power of ten leaves behind

WHAT. The rules differ only because leaves different remainders under different divisors. Compute once for each :

Reading one: because , so its leftover is "one short of a full 11", which we allow to be written as (a negative leftover is fine — it means "just below zero on the clock").

WHY. By the swap rule, once I know , I instantly know every higher power: Each big block collapses to a tiny number . That is the entire trick.

PICTURE. Three clocks (for , , ) showing where lands: on , on , and one step before .


Step 4 — The "kills everything but the tail" family (2, 5, 10, 4, 8)

WHAT. When , the swap rule turns every block that contains at least one factor of ten into : Only the units digit survives. This is exactly the rule for , , and .

For and the tool is slightly stronger: , but a higher power is: So for everything from up dies, leaving the last two digits; for everything from up dies, leaving the last three digits.

WHY. These divisors () are built only from the primes and — the same primes hiding inside . So a big enough power of ten swallows them whole and vanishes. Nothing about the front digits can matter.

PICTURE. The digit tower with the tall blocks greyed out (dead), and only the surviving tail highlighted — a wider tail for a bigger -power.


Step 5 — The "add the digits" family (3 and 9)

WHAT. Here . Since for every exponent, every power of ten collapses to : The right side is just the sum of the digits. So is divisible by (or ) exactly when its digit sum is.

WHY ? Because , and is a multiple of both and . So a ten is "one more than a clean multiple" — every ten leaks exactly of remainder. Stack of them and they leak ; add up all the leaks and you get the digit sum. This is the heart of Casting Out Nines.

PICTURE. Each block of ten "leaking" one unit into a collection bucket; the bucket's total is the digit sum.


Step 6 — The "alternating sum" rule (11)

WHAT. Now . Raising to powers flips sign each step: So the swap rule gives That right side is the alternating sum of the digits, starting from the units with a plus.

WHY the flip? A ten is one short of (), so each ten leaks . Two tens multiplied () leak — one short, then short again, overshoots back to . The signs must alternate; a plain sum (the classic mistake) would be wrong here.

PICTURE. The digit blocks coloured by sign — green , red — alternating from the right.


Step 7 — The trickiest: the rule for 7

WHAT. For , ten leaves — no clean , no . So we cannot just read digits off. Instead, split the number at its last digit: where is the units digit and is everything else (the number with its last digit chopped off). We claim:

WHY (each algebra move justified). Start from and swap : We want to undo the coefficient so stands alone. The number that cancels a mod is , because — this is the modular inverse of (deep dive: Modular Arithmetic). Multiply through by : Multiplying by a number coprime to can't create or destroy divisibility, so . Finally (since ), giving the friendlier That is why we subtract twice the last digit — the subtraction is forced by the algebra, not a choice.

PICTURE. The number sliced into , an arrow pulling out, doubling it, and subtracting it back from .


Step 8 — Composite divisors: 6 (the "both at once" case)

WHAT. is not a fresh idea; it is . A number is divisible by iff it is divisible by and by — never just one.

WHY. and share no common factor (, see GCD and LCM). When two divisors are coprime, passing both tests forces divisibility by their product — this is the smallest Chinese Remainder Theorem case. If instead you had and (which share a factor ), you could not just multiply them — an important edge case to remember.

PICTURE. Two sieves stacked — one catching evens, one catching multiples of ; only numbers passing both drop through to "multiple of 6".


Step 9 — Degenerate & edge cases (never skipped)

PICTURE. A tiny gallery of these corner cases, each ticked to show the rule still fires correctly.


The one-picture summary

Every rule is the same machine: expand the number into digit-blocks, replace each by its leftover , and read off what survives. The divisor only decides what leaves behind.

Recall Feynman retelling — say it to a friend with no math words

A number is a little tower: each digit sits on a block whose height is When you ask "does divide it?", you don't care about the tower's full weight — only the leftover after sharing into piles of . And here's the gift: the tower is a sum, and leftovers of a sum are the sum of leftovers, so I can replace each giant block by the tiny scrap it leaves. For , , : every block of ten or bigger leaves nothing, so only the last digit talks. For and : bigger chunks (, ) leave nothing, so the last two or three digits talk. For and : every ten leaves exactly one, so all the leftovers just pile up into the digit sum. For : every ten leaves minus one, and minus-one flips sign each floor up, so I alternate plus and minus down the digits. For : ten leaves , which is annoying, so I do a little algebra — chop the last digit, double it, subtract — and that undoes the awkward . For : it's just and together, and because they share no factor, passing both tests is enough. One machine, ten faces. The face changes only because leaves a different scrap behind each time.

Recall Reveal checks

Why can we replace by its remainder? ::: Because remainders of a sum/product equal the sum/product of remainders (the swap rule of modular arithmetic). Why does the 11-rule alternate signs? ::: Because , and flips between and . Why subtract twice the last digit for 7 (not add)? ::: Multiplying by the inverse forces ; subtraction comes from . Why is "divisible by 6 = 2 or 3" wrong? ::: 6 needs BOTH; means both together are required (CRT), e.g. 15 fails.


Related tools: Modular Arithmetic · Place Value System · Casting Out Nines · Chinese Remainder Theorem · GCD and LCM · Fermat's Little Theorem