In short

The set of numbers you know was built up in layers. Counting things gave the natural numbers. Recording nothing gave zero. Subtracting freely gave the negatives. Sharing unevenly gave the fractions. And measuring lengths like the diagonal of a square gave the irrationals. All of them, taken together, form the real numbers — and they fit perfectly on a single straight line, with one number for every point and one point for every number.

Count the mangoes in a basket. Three. That number is doing something specific: it is matching a thing in your head — three — with a thing in the world. If there had been one more mango, you would have said four. If there had been one fewer, two. The number is keeping track of how many.

Now try the same trick on something that isn't a basket of mangoes. How tall are you? Maybe one hundred and sixty-three centimetres — but not exactly. Some number that is more than 163 and less than 164, somewhere in between. Counting is the wrong tool here. You are measuring, not counting, and measuring needs a different kind of number.

The history of numbers is the history of running into something the old numbers couldn't say, and inventing a new kind of number to say it. Each layer of the number system was forced into existence by a question the previous layer couldn't answer. This article walks through those layers in order, and ends at the picture that holds them all: a single straight line, with every number — counting, zero, negative, fractional, and otherwise — sitting at exactly one point on it.

Counting: the natural numbers

The first numbers are the ones you learned as a child: 1, 2, 3, 4, 5, \dots. They go on forever — there is no biggest one — and they have one job: to count discrete things. Three friends. Seven days in a week. One hundred runs.

These are the natural numbers, written \mathbb{N}. In some books \mathbb{N} starts at 1; in others it starts at 0. This article will say \mathbb{N} = \{1, 2, 3, \dots\} and treat 0 as a separate next step, because that is what historically happened — humans counted things for tens of thousands of years before they had a symbol for no things at all.

You can add two natural numbers and get a natural number: 3 + 4 = 7. You can multiply them: 3 \times 4 = 12. So far, the naturals are doing fine.

The trouble starts when you try to subtract. What is 3 - 3? There is no natural number for "no mangoes." What is 3 - 5? There is no natural number for "two fewer mangoes than you have." The set is too small to be closed under subtraction. To fix it, you have to add something.

Zero, and the whole numbers

The first patch is to add a single new symbol, 0, meaning nothing. This gives the whole numbers:

\mathbb{W} = \{0, 1, 2, 3, \dots\}

Easy to write. Hard to invent. The idea that nothing deserves its own number — that you need a symbol for the absence of things, and that this symbol should obey arithmetic — was a major intellectual leap. Brahmagupta, an Indian mathematician writing around 628 CE, was the first to lay down the formal arithmetic rules for zero in his Brahmasphutasiddhanta: a + 0 = a, a - 0 = a, a \times 0 = 0, and so on. He even tried to handle division by zero, and got most of it right. The number system you use today rests on that step.

Now 3 - 3 = 0 has an answer. But 3 - 5 still doesn't.

Negatives, and the integers

To handle 3 - 5, you need numbers smaller than zero. Mirror the natural numbers across zero: for every positive number, invent a negative counterpart, written with a minus sign in front. This gives the integers:

\mathbb{Z} = \{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}

The symbol \mathbb{Z} comes from a German word meaning numbers.

Negatives feel strange the first time you meet them. How can you have less than nothing? The answer is that negatives don't represent amounts of stuff; they represent signed quantities. You don't owe negative two rupees of debt — you owe two rupees, which is recorded as a balance of -2. You don't have negative three steps — you took three steps in the opposite direction, recorded as -3. The negative sign is an arrow saying the other way.

With integers, 3 - 5 = -2 has an answer. Subtraction is now closed: any integer minus any integer is an integer.

But division still isn't. What is 7 \div 4? There is no integer that, multiplied by 4, gives 7. The closest you can do is one with three left over — and "left over" isn't a number, it is a remainder. To divide cleanly, you need another extension.

Fractions, and the rational numbers

Take an integer p and a non-zero integer q, and write \dfrac{p}{q}. The result is a rational numberrational not in the sense of sensible, but in the sense of ratio. The set of all such fractions is

\mathbb{Q} = \left\{ \dfrac{p}{q} \;\middle|\; p, q \in \mathbb{Z}, \; q \neq 0 \right\}

The symbol \mathbb{Q} comes from quotient.

Several different fractions can name the same rational number: \dfrac{1}{2} and \dfrac{2}{4} and \dfrac{50}{100} are all the same number, just written with different scales. Every rational has a lowest-terms form where the top and bottom share no common factor — for \dfrac{50}{100}, that form is \dfrac{1}{2}.

Rationals include the integers, because every integer n can be written as \dfrac{n}{1}. They include 7 \div 4 = \dfrac{7}{4}. They include -\dfrac{3}{5} and \dfrac{0}{8} = 0. Division by anything except zero is now closed.

What rationals look like as decimals

Every rational number has a decimal expansion. To find it, do long division. Two things can happen.

Case 1: the division ends. You divide, you carry, you eventually hit a remainder of zero, and the decimal stops.

\dfrac{1}{4} = 0.25 \qquad \dfrac{3}{8} = 0.375 \qquad \dfrac{7}{20} = 0.35

These are terminating decimals.

Case 2: the division never ends, but it eventually starts repeating a fixed block of digits.

\dfrac{1}{3} = 0.3333\dots \qquad \dfrac{1}{7} = 0.142857\,142857\,142857\dots \qquad \dfrac{5}{11} = 0.4545\dots

These are recurring decimals. The repeating block is sometimes shown with a bar overhead: 0.\overline{3}, 0.\overline{142857}, 0.\overline{45}.

Why are these the only two possibilities? Think about the long-division process. At every step, you write down a digit and you carry a remainder — some integer between 0 and q - 1. There are only q possible remainders. Once the same remainder shows up a second time, the digits from that point on must repeat exactly the same pattern that came before, because long division is deterministic. So one of two things has to happen first: either you hit a remainder of 0 (and the decimal stops), or you hit a remainder you have seen before (and the digits start cycling). There is no third option.

This is the first deep theorem of number systems: a decimal represents a rational number exactly when it terminates or eventually repeats. The other direction — that any terminating or repeating decimal can be written as a fraction — is the content of Example 1 below.

The picture below shows what each of these options looks like in practice. Two rational decimals (one that stops, one that repeats), and one decimal that does neither — a sneak preview of what comes next in this article.

Three decimal expansions: terminating, repeating, and never settlingThree rows comparing how rational decimals always either terminate or repeat, while irrational decimals do neither. One quarter is zero point two five and stops. One third is zero point three repeating forever. The square root of two is one point four one four two one three five six dot dot dot, with no repeating pattern.1 / 4 =0.25stops cleanly — terminatinga block of one digit recurs1 / 3 =0.3333333…repeats forever — recurring√2 =1.41421356…no block ever repeats —the digits never settle
The two rational decimals end the only two ways rationals can: $\dfrac{1}{4}$ stops at the second decimal place, and $\dfrac{1}{3}$ falls into a one-digit cycle that runs forever. The third row is $\sqrt{2}$ — a decimal that does neither. It is what an irrational number looks like when you try to write it down.

But what about a decimal that never terminates and never repeats? Could such a thing even exist?

The diagonal of the square

Draw a square whose sides are exactly 1 unit long. Now draw the diagonal from one corner to the opposite corner.

How long is the diagonal? By the Pythagorean theorem, if a right triangle has two legs of length 1, the hypotenuse has length \sqrt{1^2 + 1^2} = \sqrt{2}.

So \sqrt{2} is a real, physical length. You can hold a ruler against the diagonal and measure it. It is somewhere a little bigger than 1.4. There clearly is a number describing how long that diagonal is.

Question: is \sqrt{2} a rational number? Is there some pair of integers p and q — maybe huge ones, but integers — such that \dfrac{p}{q} = \sqrt{2}?

The answer is no. There is no such pair of integers, anywhere, no matter how large. And the proof of this is one of the most famous arguments in mathematics. It is short, and it is worth seeing in full.

Suppose, just for the sake of argument, that \sqrt{2} is rational. Then you can write

\sqrt{2} = \dfrac{p}{q}

where p and q are integers and the fraction is in lowest terms — that is, p and q share no common factor.

Square both sides:

2 = \dfrac{p^2}{q^2} \qquad \Longrightarrow \qquad p^2 = 2 q^2.

The right-hand side is two times an integer, so p^2 is even. If p^2 is even, then p itself is even, because the square of an odd number is always odd. So p = 2k for some integer k.

Substitute back:

(2k)^2 = 2 q^2 \qquad \Longrightarrow \qquad 4k^2 = 2 q^2 \qquad \Longrightarrow \qquad q^2 = 2 k^2.

Now q^2 is also even, so q is also even.

But this is impossible: you started by saying p and q had no common factor, and now you have shown that they are both even, which means they share a factor of 2. The two statements cannot both be true. The only assumption that can be wrong is the very first one — that \sqrt{2} could be written as a fraction at all.

So \sqrt{2} is not a rational number. There is a perfectly real, perfectly measurable length — the diagonal of a unit square — that cannot be written as any ratio of integers, no matter how clever you are.

Irrationals, and the real numbers

A number that is not rational is called irrational. The name is unfortunate — it makes irrationals sound unreasonable or strange — but it just means not a ratio.

\sqrt{2} is one example. There are many more. \sqrt{3}, \sqrt{5}, and indeed the square root of any positive integer that isn't a perfect square. The number \pi \approx 3.14159\dots that gives the circumference of a circle in terms of its diameter. The number e \approx 2.71828\dots that turns up in growth, decay, and compound interest. None of these are fractions. Their decimal expansions go on forever and never settle into a repeating pattern.

The real numbers, written \mathbb{R}, are everything: rationals and irrationals together. Every length you can measure, every position on a continuous scale, every value a smoothly changing quantity can take — all of these are real numbers.

The full hierarchy nests cleanly:

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

Each new layer contains everything from the previous layer and adds the things that were missing. The picture below is the entire story of this article in one image.

The number systems nested inside one anotherFive rounded rectangles nested concentrically. The outermost is the real numbers; inside it sits the rationals; inside that the integers; inside that the whole numbers; and at the centre the natural numbers. The band of each rectangle that lies outside its inner neighbour is labelled with example numbers that belong to that layer but not the inner one — irrational numbers like square root of two, pi, e, and phi in the outermost band, then proper fractions in the next, then the negative integers, then zero by itself, and finally the natural numbers one through five at the centre.ℝ — Real numbersℚ — Rationalsℤ — IntegersW — Whole numbersℕ — Naturals1 2 3 4 50−3 −2 −1−7/2 1/2 3/8 0.25√2 π e φ
Each layer of the number system contains everything from the layer inside it, and adds the things that the inner layer was missing. The naturals sit at the centre. The whole numbers add zero. The integers add the negatives. The rationals add the fractions. And the reals add the irrationals — the numbers that fill the gaps that fractions leave behind.

The number line

There is a single picture that holds all of this. Draw a horizontal straight line. Pick a point on it and call it 0. Pick another point to the right and call it 1. The distance from 0 to 1 is now your unit. Everything else is forced.

The integers are evenly spaced: 1 is one unit to the right of 0, 2 is one unit to the right of 1, and so on. The negatives are evenly spaced going the other way: -1 is one unit to the left of 0, -2 is two units to the left, and so on.

Each rational \dfrac{p}{q} sits at exactly one point. To find \dfrac{3}{4}, take the segment from 0 to 1, divide it into four equal pieces, and walk three of them to the right. To find -\dfrac{7}{2}, walk seven half-segments to the left of 0.

The irrationals fit in the gaps — real gaps that the rationals leave behind, even though there are infinitely many rationals. \sqrt{2} sits at one specific point a little past 1.4. \pi sits at one specific point a little past 3.14. Neither point is occupied by any rational number.

The deep claim, which you can take on trust for now: every point on the line is exactly one real number, and every real number is exactly one point on the line. No gaps, no ambiguity, no double-counting. This is what makes the real numbers the right setting for measurement.

The picture below shows four points of four different kinds — an integer, a rational, and two irrationals — sitting peacefully on the same line. They look the same. They are all just points. The line does not care which kind of number you are.

An integer, a rational, and two irrationals on the same number lineA horizontal number line marked from negative three to four with integer ticks. Four points are highlighted in red: an integer at negative two, the rational one half between zero and one, the irrational square root of two just past one point four, and the irrational pi just past three. All four kinds of number sit at definite positions on the same line.−3−2−101234−2integer1/2rational√2irrationalπirrational
An integer ($-2$), a rational ($\dfrac{1}{2}$), and two irrationals ($\sqrt{2}$ and $\pi$) — all four sitting at exact, distinct positions on a single number line. From the line's perspective, they are just points. The labels are the only thing telling you which kind of number each one is.

You can also try this directly. Drag the red point along the line below — it follows your finger to whatever real number you pick. The readout shows your position to six decimal places, and the second line shows how far you are from \sqrt{2}. You can get arbitrarily close to \sqrt{2} but, no matter how carefully you drag, that distance never quite hits zero, because \sqrt{2} is not a number your dragging can land on by accident — it is one specific point in the gap between rationals.

Drag a point along the number lineAn interactive number line from zero to five with integer ticks and a marker at the irrational number square root of two near one point four one four. A red point can be dragged left and right along the line. Two readouts above the line show the current position to six decimal places and the absolute distance from square root of two.012345√2↔ drag the red point
Drag the red point. The first readout shows where you are; the second shows how far you are from $\sqrt{2}$. With patience you can get the distance below $0.0001$, then below $0.000001$ — and you could keep going forever without ever making it exactly zero.

Worked examples

Two examples to make this concrete. The first shows how to convert a recurring decimal back into a fraction — proving that a repeating pattern, no matter how long the period, is rational. The second shows how to construct an irrational length on the number line, using a ruler and a compass, with no decimal arithmetic at all.

Example 1: convert $0.272727\dots$ to a fraction

The decimal 0.272727\dots keeps repeating the block 27. By the theorem above, it must be a rational number. The trick is to use a little algebra to subtract the repeating tail away.

Step 1. Give the decimal a name.

x = 0.272727\dots

Why: you cannot manipulate "the decimal 0.272727\dots" directly, but you can manipulate x. Naming the unknown is the first move in any algebra problem.

Step 2. Multiply by a power of 10 that shifts the repeating block past the decimal point.

The block is two digits long, so multiply by 100:

100 x = 27.272727\dots

Why: you want a second copy of the decimal that has the same repeating tail. Shifting by exactly the length of the repeating block lines the tails up perfectly.

Step 3. Subtract the original from the shifted version.

100x - x = 27.272727\dots - 0.272727\dots
99 x = 27

Why: the two decimals have identical tails after the shift, so subtracting cancels the entire infinite mess in one step. Everything to the right of the decimal point disappears, leaving only an integer on the right-hand side.

Step 4. Solve for x.

x = \dfrac{27}{99} = \dfrac{3}{11}

Why: ordinary algebra. The fraction simplifies because 27 and 99 share a common factor of 9.

Result: 0.272727\dots = \dfrac{3}{11}.

The fraction three over eleven on the number line between zero and oneA horizontal number line from zero to one with major tick marks at zero, one half, and one, and minor tick marks at every tenth. The point three over eleven, which equals zero point two seven two seven recurring, is marked with a red dot just before the three tenths position.01/213/11 = 0.2727…
The fraction $\dfrac{3}{11}$ sits at exactly $0.272727\dots$ on the number line, just before the three-tenths mark. The infinite decimal and the simple fraction are the same point — two different names for one number.

The trick generalises. Given any recurring decimal with a repeating block of length n, multiplying by 10^n shifts the tail by exactly one period, and the subtraction wipes the tail out. So every recurring decimal is the ratio of two integers — it must be rational. That is the converse direction of the theorem from earlier.

Now turn the problem around. Instead of starting with a decimal and finding a fraction, start with a length and find where it goes on the number line. If the length is rational, no surprise — count off the right number of equal pieces. But what if the length is irrational? You cannot write it as a fraction. You cannot count off pieces. You need a geometric construction.

Example 2: place $\sqrt{2}$ on the number line

You want to find the exact point on the number line that corresponds to \sqrt{2}. You cannot use a decimal, because \sqrt{2}'s decimal expansion goes on forever without ever repeating. You need a construction that picks out the point directly.

Step 1. Build a unit square sitting on the number line.

Mark the points 0, 1, and 2 on the line. Above the segment from 0 to 1, draw a square with sides of length 1. The square's corners are at (0,0), (1,0), (1,1), and (0,1) — the bottom edge sits flat on the number line.

Why: you want to manufacture a length of exactly \sqrt{2}. Pythagoras gives you a way to do that geometrically with nothing but a ruler.

Step 2. Draw the diagonal of the square from (0, 0) to (1, 1).

By the Pythagorean theorem, the length of this diagonal is

\sqrt{1^2 + 1^2} = \sqrt{2}.

Why: this diagonal is a line segment of length \sqrt{2}, sitting right there on the page. You have built the irrational number out of two ordinary integer-length sides.

Step 3. Swing the diagonal down onto the number line.

Place the point of a compass at (0, 0). Set the compass radius equal to the length of the diagonal — that is, to \sqrt{2}. Swing an arc from the top corner (1, 1) downward until it hits the number line.

Why: a circle is the set of all points at one fixed distance from a centre. By spinning the diagonal around the corner (0, 0), you carry its length onto the number line without ever computing a single decimal digit.

Step 4. Read off the location.

The arc meets the number line at exactly one point. By construction, that point is the same distance from 0 as the diagonal was — namely \sqrt{2}, which numerically is about 1.41421\dots. So the point on the number line is at exactly \sqrt{2}.

Result: The point at \sqrt{2} on the number line is the foot of the arc swung from (1,1) with the diagonal as radius.

Constructing the square root of two on the number line using a unit squareA horizontal number line at the bottom with marks at zero, one, and two. Above the segment from zero to one sits a unit square with its diagonal drawn in red. A red arc, centred at zero with radius equal to the diagonal, sweeps from the top right corner of the square down to the number line, landing at the point square root of two, just past one point four. When the figure first scrolls into view, the arc draws itself from corner to landing point and the endpoint dot and label fade in as the arc finishes.012√2unit square√2 ≈ 1.4142…
The unit square sits on the number line between $0$ and $1$. Its diagonal — red, of length $\sqrt{2}$ by the Pythagorean theorem — is swept around the bottom-left corner with a compass and lands on the number line at the point $\sqrt{2}$. Watch the arc swing as you scroll the figure into view. The endpoint is exact, even though no decimal could ever write it out in full.

Look at what just happened. With a ruler and a compass — no calculator, no decimals — you found the precise spot where an irrational number lives. The same construction works for \sqrt{3} (start from a 1-by-\sqrt{2} rectangle), for \sqrt{5} (start from a 1-by-2 rectangle), and so on. Geometry gives you a way to handle irrational lengths that decimal arithmetic cannot.

Absolute value

One more idea before the deeper section: the absolute value, also called the modulus.

The absolute value of a real number x, written |x|, is the distance from x to 0 on the number line. Distance is always non-negative, so the absolute value is always non-negative.

Absolute value

For any real number x,

|x| \;=\; \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}

Reading the definition: if x is already non-negative, |x| leaves it alone. If x is negative, |x| flips the sign, turning it positive. Either way, the result is non-negative.

A few quick values:

|7| = 7 \qquad |-7| = 7 \qquad |0| = 0 \qquad \left|-3.14\right| = 3.14

The geometric reading is the more useful one. |x| is the distance from 0 to x on the number line. More generally, |x - y| is the distance from x to y — the gap between them, always counted as a positive number, no matter which is bigger. So |5 - 3| = 2 and |3 - 5| = |{-2}| = 2. The order didn't matter. Distance has no direction.

That is the version of "absolute value" to keep in your head. Not "remove the minus sign." Distance.

Common confusions

A few things that students reliably trip on the first time they meet number systems.

Going deeper

If you came here to know what the layers of numbers are and how they fit together, you have it — counting, then zero, then negatives, then fractions, then the things in the gaps, all on one line. The rest of this article is for readers who want the rigorous version, the historical thread, and a hint at where this gets strange.

Density of the rationals — and why it isn't enough

The rationals are dense on the number line. Pick any two distinct rationals — even ones very close together, like \dfrac{1}{1000000} and \dfrac{1}{999999}. There is always another rational between them. (Take their average: it is a fraction whose numerator and denominator are computable from the two given ones, so it is also rational, and it sits exactly in the middle.)

So between any two rationals, however close, there is a third rational. And between those two, a fourth. And between those two, a fifth. The rationals are packed into the number line with no smallest gap.

You might think this means the rationals fill the line completely. They do not. Density and completeness are two different properties.

Here is the picture. You showed above that \sqrt{2} is irrational and that it sits at a specific point on the number line. That point is not a rational. Yet it has rationals arbitrarily close to it on both sides — 1.41,\; 1.414,\; 1.4142,\; 1.41421,\; \dots from below, and 1.42,\; 1.415,\; 1.4143,\; 1.41422,\; \dots from above. The rationals get arbitrarily close to \sqrt{2} without ever actually reaching it.

You can watch the trap close around \sqrt{2} by zooming in. Each interval below has rational endpoints. Each is narrower than the one before. Each still contains \sqrt{2}. And you could keep going forever without the rational endpoints ever pinning \sqrt{2} down.

Nested rational intervals all containing the square root of twoThree horizontal interval bars stacked vertically, each narrower than the one above. The top spans one point four to one point five. The middle is a zoomed view of the segment from one point four one four to one point four one five. The bottom is a further zoom into one point four one four two to one point four one four three. Square root of two is marked with a vertical red bar inside each interval, at its true position. Dashed lines connect each interval to the next, showing how square root of two stays trapped inside ever-narrower rational intervals without ever lying on a rational endpoint.1.41.5√21.4141.415√21.41421.4143√2…and you can keep going forever.
Three nested rational intervals, each containing $\sqrt{2}$ at its true position. The top interval is $[1.4, 1.5]$. The middle is a zoom into $[1.414, 1.415]$. The bottom is a further zoom into $[1.4142, 1.4143]$. The dashed lines are the "zoom in" connectors. No matter how many more rows you draw, the rational endpoints can squeeze closer to $\sqrt{2}$, but they cannot land on it.

You can do the zooming yourself. The number line below is centred on \sqrt{2}. Click the + button on the right to zoom in by a factor of 5, or - to zoom out. The black ticks are the rationals at the current zoom level. The red bar is \sqrt{2}. Watch what happens to it as you zoom — the rational ticks rearrange around it, but it never lands on one.

A live zoomable number line centred on √2An interactive number line centred on the irrational number square root of two. The reader can click a plus button to zoom in by a factor of five, or a minus button to zoom out. As they zoom in, the rational tick marks become labelled with more decimal places, but the centre marker for square root of two never lands on a tick — it always sits in the gap between two rational ticks. The current viewing window is shown below the line in monospace.
A live number line centred on $\sqrt{2}$. Each click of $+$ zooms in by $5\times$. After ten clicks the rational ticks are spaced $10^{-7}$ apart and the labels show seven decimal places — and $\sqrt{2}$ is *still* sitting in the gap between two of them. There is no zoom level at which it ever lands on a tick. That is what *irrational* really means.

So the rationals leave a hole at the point \sqrt{2} — a hole with rationals crowding around it from both sides but no rational sitting inside. There is one such hole at every irrational. Plugging all those holes is what the irrationals do. Together, the rationals and irrationals make a line with no holes left. That property is called completeness, and it is the single most important thing about the real numbers. The article on Real Numbers — Properties walks through what it really means and why it matters.

The Sulba Sutras' approximation of \sqrt{2}

You cannot write \sqrt{2} exactly as a fraction. But you can write down a fraction that is very close to it.

Around 800 BCE, the Indian mathematicians who composed the Sulba Sutras — manuals for constructing fire altars, where geometry was needed for ritual precision — wrote down this approximation:

\sqrt{2} \;\approx\; 1 + \dfrac{1}{3} + \dfrac{1}{3 \cdot 4} - \dfrac{1}{3 \cdot 4 \cdot 34}

Compute it. The first three terms give 1 + 0.3333\dots + 0.0833\dots = 1.41666\dots. Subtract \dfrac{1}{408} = 0.00245\dots and you get 1.41421568\dots.

The actual value of \sqrt{2} is 1.41421356\dots. The Sulba Sutras' approximation is correct to five decimal places — off by about two parts in a million. The authors had no calculators, no decimal notation, and no algebra in the modern sense. They had a need to build square altars accurately, and they figured out how to manufacture this fraction.

It is the kind of result that should change how you think about the history of mathematics — and about how much can be done with how little.

A teaser: the rationals are countable, but the reals are not

One last thing, just as a marker for later. You might think "there must be way more rationals than integers, because between any two integers there are infinitely many rationals." That intuition is wrong. The rationals can be put into a one-to-one correspondence with the natural numbers — there are exactly as many rationals as counting numbers. Both sets are called countably infinite.

But the real numbers cannot be put into such a correspondence. There are strictly more real numbers than there are natural numbers, in a precise sense that can be made rigorous. The irrationals account for almost all of the excess. In a way you will see in a much later article, almost every real number is irrational — the rationals you grew up with are a vanishingly thin scattering inside a much vaster sea.

That is a strange thing to say, but it is true. The kind of numbers you have known all your life — counting numbers and fractions — turn out to be the rare exception, not the rule.

Where this leads next

The number line is the foundation everything else in mathematics is built on. The articles below take it in different directions.