The Number Zoo
This is an article that aims to step through the history of constructing the real numbers. If you’re not a mathematician, real numbers are a set which might well encompass all the numbers you have ever heard of. Zero is a real number, as are , , , , and so on.
We’re going to start from the numbers that everyone knows (yes, even newborn babies) and build up to the really abstract ones which are totally unknown outside mathematical circles. Along the way, we’ll see the motivation between new constructions and sets, and show how we might define them formally.
This explainer is intended to be fairly accessible to people without a formal background in maths, though some of the terms or notation might be unfamiliar.
The Natural Numbers
The natural numbers are the numbers we use to count things. They start at (or , depending on who you ask), and they just keep going up: , , , , and so on forever.
We will denote this by : the subscript makes it clear that we are including zero. Formally, is a set of numbers: an infinite collection of all of them. We say that a number is in the set by writing something like .
You might think that it would be hard to define this set formally, since you’d need to say infinitely many things about it. In fact, we can define it with only two simple rules (called axioms)!
- : there is a natural number zero.
- : the arrow means “implies”, so this is saying that if we have any natural number, we can add one to get another natural number.
These two rules, part of the so-called Peano axioms (though I’m simplifying them a bit), are enough to generate all the natural numbers. We have by the first axiom, and then we have by the second axiom, and have by the second axiom again, and so on.
The natural numbers are entirely intuitive, and they represent actual collections of things in the real world. For example, the natural numbers can describe the number of sheep in your field. You can also do addition and multiplication with them: if you have sheep and get more sheep, then you end up with sheep!
You can even do subtraction! If you have sheep and lose of them, then you end up with sheep. But if you want to give away , you end up with an impossibility!
We’ve now reached something that the natural numbers are not always capable of: subtracting two numbers. For this to always be possible, we have to start including more numbers: the negative numbers…
The Integers
To handle subtraction properly, we need to introduce negative numbers. The resulting number system is called the integers, written (from the German word “Zahlen”, meaning numbers).
How can we construct these negative numbers? Well, we can think about a bank account. If you have dollars and spend , you end up owing the bank dollars. We write this as . The minus sign indicates a debt: a quantity that would need to be added to get back to zero.
Formally, we can construct from by considering pairs of natural numbers , where we think of this pair as representing the result of “”. For example:
- represents
- represents
- represents
Of course, many different pairs represent the same integer: and both represent , since . We say that two pairs are equivalent if they represent the same integer.
Then, the integers are defined to be the set of pairs in , where pairs and are considered to be “the same” if they are equivalent: that is, if .
The integers give us a complete system for addition, subtraction, and multiplication. If you have a debt of dollars and get another debt of dollars, your total debt is dollars. We can write this equation as . If you multiply a debt of by , you get a debt of : we write this equation as .
But what about division? Well, if you split a debt of dollars equally between people, each person owes dollars: . But what if you try to split dollars between people? Or split a debt of dollar between people? For this, we need to introduce fractions…
The Rational Numbers
The rational numbers, written , are what we get when we allow division. A rational number is any number that can be written as a fraction (or ) where and are integers and .
Note: if we allowed , we’d be trying to divide by zero, which doesn’t make sense!
Just like we saw with the pairs of natural numbers that represented integers, many different fractions can represent the same rational number. For example, and and all represent the same number. We say these fractions are equivalent if they represent the same number. More precisely, and are equivalent if .
The rational numbers give us a complete system for addition, subtraction, multiplication, and division (by anything apart from zero). They let us precisely represent any number that can be expressed as a ratio of integers. This includes:
- All integers (for example, )
- Simple fractions like or
- Repeating decimals like or
But what about numbers like ? This is the number which, when multiplied by itself, gives . We can approximate it with rational numbers: . But no matter how many decimal places we write down, we’ll never get it exactly right. In fact, we can prove that cannot be written as a fraction of integers at all!
Suppose , where this fraction is in lowest terms: we cannot reduce it. Then . But then must be an even number, since is obviously even. This means is even, since an odd number squared is odd. But then divides by 4, so divides by 2, so then is also even. But then both and are even: we could have halve them both to reduce the fraction! So the fraction couldn’t have been in lowest terms, and so .
To handle numbers like , we need to introduce the algebraic numbers…
The Algebraic Numbers
The algebraic numbers, written , are what we get when we allow solutions to polynomial equations. A polynomial equation looks like this:
where all the are integers. An algebraic number is any solution to such an equation.
For example:
- is algebraic because it satisfies
- is algebraic because it satisfies
- The golden ratio is algebraic because it satisfies
- Every rational number is algebraic because it satisfies
Some of these numbers can be constructed with a ruler and compass (like ), and some cannot (like ). The ones that can be constructed with ruler and compass are called constructible numbers, which are a special subset of the algebraic numbers.
Unlike the rational numbers, which you can always write as a decimal that either terminates or repeats, algebraic numbers can have decimal expansions that go on forever without repeating. For example, goes on forever, without ever falling into a nice periodic pattern.
Now, surely we have every number? In fact, we still don’t. In fact, not only are we still missing some numbers, we’re missing almost every number. What could this possibly mean? To truly understand this, we’re going to have to learn about something called countability.
Countability
What do we mean when we say a set of numbers is “countable”? Loosely, a set is countable if we can list all of its elements. It’s fine if the list goes on forever, but the list really does have to eventually hit every number in the set.
For example, the natural numbers are countable. We can list them as:
Obviously, the list will never end, but that’s fine: for any number you can think of, the list will eventually get there! Even one trillion will appear in our list at some point.
Interestingly, the integers are also countable! We can list them by alternating positive and negative:
This list will also hit every integer! This means the set of integers is countable. An interesting corollary of this is that the set of integers, far from being “twice as big” as the set of natural numbers, is actually the same size! How can this be? Well, our notion of things in the finite world being the same size is when we can pair up elements. For example, the sets:
are the same size, because we can pair with , with itself, with , and with . This works in the infinite case too! “Listing” numbers in a set is a special case of pairing them with the elements in : the first element in the list is paired with , the second element is paired with , and so on.
Saying a set is countable, then, is saying it has the same size as the natural numbers: the elements in the set can be paired with the numbers , , , and so on.
Even the rational numbers are countable, though proving this requires a clever trick. We can arrange all fractions in an infinite grid:
and then zigzag through this grid to list them all (skipping duplicates like which equals ). This list eventually hits all the rational numbers, so the set of rationals must be countable!
Less obviously, the set of algebraic numbers is also countable. But in fact, we can prove that the set of real numbers is not countable, which means that we must have missed some.
The Real Numbers
Real numbers are just numbers with any decimal expansion whatsoever. There does not need to be any pattern, or repetition, or any other structure. How can we formally construct these real numbers? Richard Dedekind’s approach was to define them using cuts in the rational numbers. The idea is that every real number divides the rational numbers into two pieces: those that are less than it, and those that are greater than it.
For example, consider . We can’t write this as a ratio of integers, but we can describe it perfectly by defining it to be the unique number that divides the rational numbers into:
- positive rational numbers whose square is greater than (like or )”
- other rational numbers, like negative ones or those whose square is less than (like , or )
This division of the rational numbers is called a Dedekind cut. Every real number corresponds to such a cut, and every such cut corresponds to a real number! We can even do arithmetic with these cuts in a natural way.
This construction might seem abstract, but it gives us a precise way to handle any real number, even ones with decimal expansions that go on forever without any pattern at all.
Uncountability of the Reals
Georg Cantor proved that the set of real numbers was uncountable in 1891, using a famous diagonal argument.
Suppose that the set of real numbers was countable. Then, we can list them all. Let’s try to list all the real numbers between and (if we can’t even list these, we certainly can’t list all real numbers!). Our list might start:
Now here’s the clever part: we’re going to construct a new number that isn’t on our list! We’ll do this by looking at the diagonal (hence “diagonal argument”): the first digit of the first number, the second digit of the second number, and so on. In this case, that’s
We’ll make our new number by changing each of these digits. Let’s say we change each digit by adding (and if we hit , we wrap around to ). So our new number starts and goes on forever.
This new number must be different from every number in our list:
- It differs from the first number in the first decimal place
- It differs from the second number in the second decimal place
- It differs from the third number in the third decimal place
and so on forever. Thus the number cannot possibly be in any position on our list. But this number is definitely a real number between and ! So our list wasn’t complete after all. In fact, no matter what list we try to make, we can always use this diagonal trick to find a number that’s not on it.
This proves that the real numbers are uncountable - they cannot be put in a one-to-one correspondence with the natural numbers. The set is fundamentally larger than , , , or even !
In fact, since the algebraic numbers are countable and the reals are not, the former has measure zero in the latter. That is, “almost all” real numbers are not algebraic. Numbers that aren’t algebraic are called transcendental numbers: these cannot be the solution to any polynomial equation with integer coefficients, no matter how complicated. The most famous examples are and .
However, despite almost all numbers being transcendental, we know very few of them (few enough to fit on a single Wikipedia page) and proving that a given number is transcendental is typically very difficult. Even more surprisingly, most of these known transcendental numbers fall inside the countable set of computable numbers – meaning we can calculate them to any desired precision. For example, there is a simple algorithm to calculate to decimal places, a property which does not hold for most real numbers!
Putting It Together: The Number Zoo
This means we can put together our hierarchy of numbers! Each successive level includes all the levels above, as well as some new numbers.
- The natural numbers , like , , , and .
- The integers , including negative numbers like .
- The rational numbers , including fractions like and .
- The constructible numbers, including certain irrational numbers like .
- The algebraic numbers , including many more irrational numbers like and .
- The computable numbers, including most famous non-algebraic numbers like and .
- The real numbers , including all the other numbers, even Chaitin’s constant.