Number Sets

Here is a secret that school rarely tells you: numbers were not all invented at once. They arrived in waves, thousands of years apart — and every wave was born the same way: people were happily using the numbers they had, until one day those numbers hit a wall, and somebody had to invent new ones.

Each wave didn't throw the old numbers away — it wrapped around them, like Russian dolls, each new set holding all the sets before it inside. Mathematicians gave the four dolls names and fancy letters: \mathbb{N}, \mathbb{Z}, \mathbb{Q} and \mathbb{R}. Let's meet them in the order history did.

Wave one — counting sheep: the naturals, \mathbb{N}

The natural numbers are the plain counting numbers: 1, 2, 3, 4, \dots going up forever. We write this family as \mathbb{N}N for natural, because they are the numbers nature hands you for free: they answer the question "how many?". Seven sheep, three siblings, twelve eggs. They are the very first numbers every human — and every civilisation — learns.

But try this with only \mathbb{N} in your toolbox: it's a freezing morning and the temperature drops five degrees below zero. Or you have 3 coins and you owe your friend 5. "How many?" has no answer here. The counting numbers have hit their wall.

Wave two — owing money: the integers, \mathbb{Z}

The integers stretch the counting numbers in both directions: they add zero and the negative numbers, giving \dots, -3, -2, -1, 0, 1, 2, 3, \dots We write this family as \mathbb{Z} — an odd letter for "integers", until you learn it comes from the German word Zahlen, which just means "numbers". (German mathematicians did a lot of the naming.)

Notice what did not happen: nobody deleted the counting numbers. 7 is still there, doing its job. Every natural number is automatically an integer — we have simply added a mirror-world of whole numbers on the cold side of zero, plus 0 itself standing at the door between them.

Now the wall moves. Split one chocolate bar fairly between two people. The answer is more than 0 and less than 1… and there is nothing between 0 and 1 in \mathbb{Z}. Whole numbers can't share.

Wave three — sharing pizza: the rationals, \mathbb{Q}

The rational numbers are every number you can write as a fraction of two integers — one integer on top, one (non-zero) on the bottom — like \frac{1}{2}, \frac{2}{5} or \frac{-7}{4}. We write this family as \mathbb{Q}, for quotient — the result of a division. The name "rational" has nothing to do with being sensible: it comes from ratio.

The rationals swallow a lot more than you might guess:

The rationals are also packed astonishingly tight: between any two of them, no matter how close, there is always another (their average, for a start — between \frac{1}{3} and \frac{1}{2} sits \frac{5}{12}). Surely a family this crowded fills the whole number line? For two thousand years, everyone thought so.

See how they nest

The families are nested, like boxes inside boxes: every natural number is an integer, and every integer is rational. Step through the diagram and watch the boxes grow from the inside out, then see where a few example numbers belong. A number always lives in its smallest home — and automatically in every bigger box around it. Ask "what is -2?" and the most precise answer is "an integer"; but it is also a perfectly good rational, because it sits inside the \mathbb{Q} box too.

In symbols, mathematicians write the nesting as \mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} — read the \subset as "sits inside". And as you're about to see, there is one more, even bigger box waiting to be drawn around all three.

Wave four — measuring a diagonal: the reals, \mathbb{R}

Draw a square with sides exactly 1 unit long, and measure its diagonal. By the Pythagorean theorem-style reasoning the Greeks loved, that diagonal has length \sqrt{2} — the number which, multiplied by itself, gives exactly 2. It's clearly a real, physical length: you can draw it with a ruler and pencil. So which fraction is it?

None. It can be proved — completely and forever — that no fraction of two integers squares to exactly 2. Not \frac{7}{5} (that squares to \frac{49}{25} = 1.96), not \frac{141}{100}, not any fraction with a billion digits on top and bottom. You can creep closer forever, but you can never land. We won't do the proof here — just know that it exists, it is short, and it is watertight. (Its scandalous history is in the story box below.)

Numbers like \sqrt{2} are called irrational — literally "not a ratio". As decimals they never stop and never fall into a repeating pattern: \sqrt{2} = 1.41421356\dots just keeps going, patternless, forever. The most famous irrational of all is \pi = 3.14159265\dots, the ratio of a circle's circumference to its diameter — computers have calculated trillions of its digits and no repetition has ever appeared (and we can prove none ever will).

Put the rationals and the irrationals together and you get the real numbers, written \mathbb{R}: every possible point on the number line, with no gaps at all. That completes the Russian dolls:

\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}

The rationals turned out to be full of invisible pinholes — \sqrt{2} marks one, \pi another — and the reals are what you get when every last pinhole is filled in.

The followers of Pythagoras, around 500 BC, were less a maths club and more a secretive brotherhood with a creed: "All is number" — and by "number" they meant whole numbers and their ratios. The whole universe, they believed, was built from fractions. Music seemed to agree with them: halve a string and it sings an octave higher; the sweetest harmonies come from ratios like \tfrac{3}{2} and \tfrac{4}{3}.

Then one of their own — legend names him Hippasus of Metapontum — proved that the diagonal of a unit square is no ratio at all. The rough idea: suppose \sqrt{2} were a fraction in lowest terms; a few lines of odd-and-even bookkeeping then force both the top and bottom to be even — which contradicts "lowest terms". So the assumption was impossible. A number existed that was not a ratio, and the brotherhood's creed was broken by its own logic.

The legend says they were at sea when he revealed it, and that his brothers threw him overboard to keep the secret drowned with him. Historians doubt the murder actually happened — but the story survived 2,500 years because it captures something true: the discovery genuinely horrified them. It's one of the few moments in history when a mathematical proof counted as a scandal.

Worked example: classify the line-up

Here's how a mathematician sorts numbers: find the smallest doll each one fits inside. Work from the inside out — is it a counting number? if not, is it a whole number? if not, is it a fraction of integers? if not, it's irrational. Let's run the full line-up: 7,\ -3,\ \tfrac{2}{5},\ \sqrt{2},\ 0.75,\ \pi.

One more, because it fools nearly everyone: 0.333\dots with the threes never ending. Never-ending decimals feel irrational — but the test is not "does it end?", it's "does it repeat?". This one repeats perfectly, and it is exactly \tfrac{1}{3}: rational. Compare \sqrt{2} = 1.41421356\dots, which never ends and never settles into any repeating block — that is what pushes a number out of \mathbb{Q}.

All six on one line

The nested boxes show membership; the number line shows position. Every one of our six numbers — natural, integer, rational, irrational — is just a point on the same line. Step through and watch each family claim its spots. The punchline comes at the end: the whole line, every point of it with no gaps, is \mathbb{R}.

Notice that \sqrt{2} and \pi look completely at home among the others. Irrational numbers aren't exotic or ghostly — they're ordinary points on the line. What's special is only that no fraction can name their exact address.

Three classic mistakes — check yourself against each one:

The blackboard-bold letters are a little tour of Europe. \mathbb{N} is the easy one — natural. \mathbb{Z} is German: Zahlen, "numbers", popularised by the German school of algebraists in the 1930s. \mathbb{Q} is usually credited to the Italian quoziente — "quotient", the answer to a division — chosen because R was already taken… by \mathbb{R}, the reals, so named (originally in French, nombres réels) to contrast with the so-called "imaginary" numbers you'll meet much later. The hollow double-strut style (\mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{R}) is called blackboard bold: lecturers couldn't write true boldface with chalk, so they doubled a stroke instead — and the chalk trick became the official notation, even in print.

See it explained

Ready for a second voice? Sal Khan sorts numbers into these same families — watch him run the inside-out test on each example and see if you can call the answer before he does.