Pages

Saturday, 3 February 2018

What's a number? 2 - really

After mastering (or at least being exposed to) the arithmetic of natural numbers, we go beyond, to rational and even irrational numbers. But again, we usually do this without any real discussion of what they are. We just absorb the notion that a fraction or an infinite decimal expansion mean something, or that asking for a quantity whose square is \(2\) is a sane thing to do.
The journey from the natural numbers to the reals is full of interesting scenery, and the destination has a depth and richness that you can spend lifetimes investigating without ever doing more than scratch the surface. I'm only going to sketch the process here, pointing out some of the more interesting sights on the way, but missing the calculations that justify it. If you haven't seen this before, I hope you'll get at least a rough idea of what's going on. If you have, maybe you'll get a new insight or perspective on it.

How should they behave?

Just as with the natural numbers, we look at the behaviour of the numbers that we have some intuition for, and demand that whatever the real numbers are, they should obey the same rules. In particular, we want to be able to add, subtract, multiply and divide with all the usual associative, commutative and distributive properties. We also want to be able to compare numbers, so we want to be sure that given any \(a\) and \(b\) exactly one of \(a \lt b\), \(a=b\) or \(a \gt b\) is true, and inequalities have to behave nicely, in the sense that we can add anything to both sides of an inequality, or multiply both sides by any positive number.

Something to take away.

Equipped with only the natural numbers \(\mathbb{N}\) (realized through the von Neumann numbers) we can always multiply and add, but sometimes we can subtract, and sometimes we can't, depending on the numbers.
We say that if \(m,n \in \mathbb{N}\) then \(m \geq n\) if there is some \(x\ \in \mathbb{N}\) such that \(m=x+n\), and \(m \gt n\) if \(x \neq 0\). Then as long as \(m \ge n\) we can define \(m-n\) to be this \(x\).
The first step is to fit negative numbers into the picture so that we have a meaning for \(m-n\) when this is not the case.
A neat trick for this is to think about pairs of number \((m,n)\), and then think of two pairs of numbers \((m,n)\) and \((p,q)\) as equivalent when \[ m+q=p+n \] We see straight away that if \(m \geq n\) and \(p \geq q\) that this equivalence is saying that \(m-n = p-q\). We can think of any particular pair \((m,n)\) as representing the difference \(m-n\), and then we make the jump to say that this is also true if \(m \lt n\).
Now we lump the pairs together into groups of equivalent pairs, and call each of these an equivalence class. The set of all the equivalence classes is called \(\mathbb{Z}\), the set of integers.
This is a very powerful idea, so let's take a moment to look at it more carefully.
I'm saying that I think of the pair \((3,0)\) as representing the same object as \((4,1)\), \((5,2)\), \((6,3)\), or in fact any pair of the form \((n+3,n)\) for any natural number \(n\). They are all pairs of numbers where the first is \(3\) more than the second, and they all represent the number \(3\). Likewise, the pair \((0,3)\) represents the same object as \((1,4)\), \((2,5)\), \((3,6)\) or any pair of the form \((n,n+3)\) where \(n\) is a natural number. They are all pairs where the second number in the pair is \(3\) more than the first; they all represent the thing I want to call \(-3\). The only thing I care about it the difference between the first number in the pair and the second.
So we need to make sure that we can add and multiply these integer objects sensibly: that means we need to know how to add and multiply representatives in such a way that whichever representatives we choose to combine, the result is always a representative of the same collection.
This is a lot like what happens if we lump numbers together into odd and even. It doesn't matter which two odd numbers I add together, I always get an even number, so I can just say that odd plus odd equals even. Likewise, I can say what happens if I add or multiply any combination of odd and even; it doesn't matter just which numbers I pick, only whether they are odd or even.
I need to do the same thing with these pairs: it mustn't matter which representative pairs I pick to operate in, I must get a representative of the same resulting class.
Here's a way that works (using juxtaposition to denote multiplication):
  • \((m,n)+(p,q)=(m+p,n+q)\)
  • \((m,n)(p,q) = (mp+nq,mq+np)\)
If we do this, we can see that each element \(n\) of \(\mathbb{N}\) is represented by the pair \((n,0)\), and we've acquired a collection of negative numbers represented by pairs of the form \((0,n)\).
Why is this? Well, notice that \((n,0)+(0,n)=(n,n)\), which is equivalent to \((0,0)\), which is the representative of \(0\).
In particular we have a way of subtracting \((n,0)\) from \((m,0)\) when \(n \gt m\). We just see how to subtract \((n,0)\) from \((m,0)\) when \(n \lt m\), and insist that it still works. If \(n \lt m\) we just have \((m-n,0)\), which is equivalent to \((m,n)\) and then we use the same thing when \(n \gt m\). But we know that in this case \((m,n)\) is equivalent to \((0,n-m)\), which gives a meaning to the standard statement that if \(n \gt m\) then \(m-n = -(n-m)\).
We also keep the notion of order. Any pair is (equivalent to one) of the form \((n,0)\) for \(n \in \mathbb{N}\) or \((0,n)\) where \(n \in \mathbb{N}, n \neq 0\). We say that an integer is positive if it has a representative of the first form, and negative if it has one of the second form. Then all the usual rules about multiplying signs follow automatically.
I won't go through the check that all this works. If you want, you can see some more detail here.
Now that we have the set of integers, \(\mathbb{Z}\), I'll just use single letters \(m,n\) etc to represent individual integers: but bear in mind that each of these letters represents an equivalence class of pairs of natural numbers.

Be rational

Now we can add, subtract and multiply. But mostly we can't divide. We say that \(m / n = q\) if \(nq=m\), but there usually isn't such a \(q\): for example, there is nothing in \(\mathbb{N}\) we can multiply by \(2\) to get the answer \(5\).
But we can use the previous trick again. The last time, we considered pairs to be equivalent if they had the same difference. We can do just the same thing but now thinking of the pairs as ratios instead of differences. So we think about pairs of integers \((m,n)\) where \(m,n \in \mathbb{N}\) and \(n \neq 0\). We now think of \((m,n\) and \((p,q)\) as equivalent if \[ mq=np. \]
so for example, \((1,2)\), \((2,4)\), \((3,6)\) and so on are all equivalent. Of course, we all already know that \(\frac{1}{2}\), \(\frac{2}{4}\), and \(\frac{3}{6}\) are different ways of writing the same fraction; this is all finding a way to say that when we don't have any fractions yet, only integers.
We call the set of equivalence classes of these pairs \(\mathbb{Q}\), the set of rational numbers.
Something happens here that I find quite striking. In the previous section, we introduced solutions to an 'addition' problem, and got something where the addition rule was simple, but the multiplication one wasn't. This time, we introduce solutions to a 'multiplication' problem, and get a simple multiplication rule, but a complicated addition one.
We have
  • \((m,n)(p,q)=(mp,nq) \)
  • \((m,n)+(p,q) = (mq+np,nq) \)
It takes a while, but you can check that all the usual arithmetic rules work when you define multiplication this way.
So now if we have two rational numbers \((m,n)\) and \((p,q)\) we can see that the answer to the question 'what do I multiply \((p,q)\) by to get \((m,n)\)?' is \((mq,np)\) as long as \(p \neq 0\).
What's more, every rational can be represented by a pair of the form \((m,n)\) where \(n \gt 0\). Then we say that the rational number has the same sign (positive, zero, or negative) as \(m\) does. And then inequalities behave themselves: you can add the same thing to both sides or multiply both sides by a positive quantity.
So now we have a set of objects (rather complicated objects, to be sure) which contain the natural numbers we started. With these numbers, we can add, subtract, multiply and divide (as long as we don't try to divide by \(0\)).
Let's stop to look around.
By means of two algebraic steps - really the same trick applied twice, once for addition and once for multiplication - we have gone from the natural numbers \(\mathbb{N}\) to the rational numbers \(\mathbb{Q}\).
In the rational numbers, we have a well-behaved addition and multiplication. Both are associative and commutative and the multiplication distributes over addition. There is an additive identity, \(0\), and a multiplicative identity, \(1\). Every rational number has an additive inverse, and any non-zero rational number has a multiplicative inverse.
So algebraically, the rational numbers are as well-behaved as you could hope for.
What's more, they are nicely ordered: we know what it means for a rational number to be positive or negative, and inequalities behave themselves, by which I mean that they are preserved by addition of any rational number or multiplication by any positive one.
And yet they are unsatisfactory. If we draw an isosceles right triangle with two sides of length \(1\), then the length of the hypotenuse should give \(2\) when squared. Unfortunately, there is no rational number with this property. There are rational numbers whose square is less than \(2\), and those whose square is greater than \(2\), and we can get the square as close as we want to to \(2\), but we can't get it exactly.
And this isn't the only missing value. So what can we do about it?

Mind the gap

This step is rather different from the others. The others filled in algebraic holes - a lack of additive or multiplicative inverses. Now we have to fill in a different kind of hole - one where we seem to be able to get as close as we want to to some value, but the value itself is missing.
First, we recall what it means for a sequence of numbers, \(q_n\), to converge to a value, \(q\). This is captured by saying that given any tolerance, the sequence eventually strays no farther than that from the limit: in the standard mathematical symbols, \[ \forall \epsilon \gt 0, \exists N \in \mathbb{N} | n \gt N \Rightarrow |q_n-q| \lt \epsilon. \] But this isn't as helpful as we might hope, because it's the sequences that look as if they converge but don't which are the problem. Fortunately, Cauchy came up with a clever way of characterizing a sequence which looks as if it ought to converge. This is that given any tolerance, pairs of terms in the sequence are eventually within that tolerance of each other. This time we have \[ \forall \epsilon \gt 0, \exists N \in \mathbb{N} | m,n \gt N \Rightarrow |q_n-q_m| \lt \epsilon \] and a sequence which satisfies this criterion is called a Cauchy sequence.
And now, just as we constructed objects to solve equations of the form \(x+n=m\) and \(xn=m,\) we need to construct objects to act as the limit of a sequence which looks convergent.
Again, we do it by defining some equivalence classes, which will fill in the gaps in \(\mathbb{Q}\) and be the real numbers. To make these equivalence classes, we say that two Cauchy sequences \(q_n\) and \(r_n\) are equivalent if \(q_n - r_n \to 0\). Then the set of equivalence classes is \(\mathbb{R}\), the set of real numbers. This time the element \(q\) of \(\mathbb{Q}\) is represented in \(\mathbb{R}\) by the constant sequence all of whose terms are \(q\).
Now we have to define the sum and product of two real numbers. This is easy enough: if \(x_n\) represents the real number \(x\), and \(y_n\) the real number \(y\), then \[ x_n+y_n \text{ represents } x+y, \qquad x_n y_n \text{ represents } xy \] It takes some effort, but we can again show that all the algebra keeps working as before. We can add, subtract, multiply and divide (except by zero), and all the standard algebraic properties still hold.
What do we get from this?
For example, if \(m\) is a natural number, we can define a sequence \(x_n\) by \[ \begin{split} x_0 &= 1\\ x_{n+1} &= \frac{x_n}{2}+\frac{m}{2x_n} \mbox{ if } n \gt 0 \end{split} \] This sequence satisfies Cauchy's criterion, and if it has a limit, \(x\), that limit satisfies \(x^2=m\); so we certainly get square roots for all the natural numbers.
In fact, we get a lot more new numbers besides these.
Order is also simple to define: \(x \lt y\) if for all \(n\) sufficiently large, \(x_n \lt y_n\). And again, it takes some effort, but we can check that the order still works in the same way.
We're not done yet. This makes sure that every sequence of rationals that looks as if it should converge has a limit. When the limit is not itself a rational number, we call it irrational.
But there's a potential problem here. We've got a way of adding in to the number system all the limits of Cauchy sequences of rational numbers which don't have a rational limit. But maybe there are still gaps. Maybe there are Cauchy sequences of the real numbers we've just constructed that don't have a limit (in this set). How often do we have to repeat this process? Could it even be that no matter how often we do it, there are still Cauchy sequences that don't converge in the set of numbers we've created so far?
The good news is that this doesn't happen. Having carried out this process once, we don't have to do it again. The real numbers are complete in the sense that every sequence that looks convergent (i.e. every Cauchy sequence) actually does have a limit in the real numbers.

The end of the road

And now we have a set that we can feel reasonably happy to call real numbers. They can be added, subtracted, multiplied and divided (except by zero). The rational numbers, the integers, and the natural numbers all sit inside them in what seems like a sensible way. They are ordered in a way that talks nicely with the algebra. And finally, there are no gaps.
Unfortunately, the actual objects are very unwieldy. A real number is an equivalence class of Cauchy sequences of equivalence classes of rationals, rationals are equivalence classes of pairs of integers, integers are equivalence classes of pairs of natural numbers, and natural numbers are those sets we call von Neumann numbers. This is awful. How are we supposed to do anything with objects like that?
It would make our lives much easier if we had a result like the one for the Peano axioms: that any two sets satisfying those axioms are really the same set but differently labelled. Unfortunately that isn't true for the properties we have so far.
But it's nearly true. The structure we've created has the property that if \(r \in \mathbb{R}\), then there is some \(n \in \mathbb{N}\) such that \(n \gt r\). This is called the Archimedean property. And if we put that into the mix, then we do have the same uniqueness result as before. So the good news is that as with the natural numbers, we don't really care about the construction: what it does is to demonstrate that the algebraic, order, and completeness properties we want are satisfied by essentially one object. And now we can just work with the rules, without caring about what is 'inside' our real numbers: how they behave is all that matters, and we can describe that without caring about the insides.

Odds and Ends

Decimal representation

So, what does this have to do with the usual representation of a real number as in integer plus a (possibly neverending) decimal part?
We define \(m.d_1 d_2 d_3 \ldots \) to be the real number defined by the Cauchy sequence whose \(n\)th term is \[ m + \sum_{i=1}^N \frac{d_i}{10^i} \] In fact, this is one way of understanding what we mean by \[ m+\lim_{N \to \infty} \sum_{i=1}^N\frac{d_i}{10^i}. \] Not only does this always give a Cauchy sequence (relatively easy to prove), but for any real number there is a sequence of this form (not quite so easy). So the real numbers actually are the familiar decimal objects.
As an added bonus, now you can really understand why \(0.\dot{9}=1\): the Cauchy sequence \(0.9\), \(0.99\), \(0.999 \ldots\) is in the same equivalence class as the constant sequence \(1,1,1\ldots\), so the two are just different representations of the same real number, namely \(1\).

Levels of irrationality

There are two different types of irrational number, both of which are produced by this single construction. We say that a number is algebraic if it a root of a polynomial equation with integer coefficients. So all rational numbers are algebraic, and so also is \(\sqrt{m}\) for any natural number \(m\).
But there are also irrational numbers which are not the root of any such polynomial: \(\pi\) and \(e\) are the best known of these. These are called transcendental. Trying to understand these is the object of transcendental number theory. One surprising property of the transcendental numbers is that they are easier to approximate by rational numbers than the irrational algebraic numbers. (Easy to approximate has to do with how close you can get with a denominator of a given size.)

Alternative Routes

There's more than one way to this endpoint.
We could start with the strictly positive integers, and proceed via the positive rationals to the set of all rationals. This is slightly more elegant in that we don't have to worry about the denominator being zero when we build the rationals. On the other hand, we don't get the integers as a natural subset of the rationals this way.
Once we have the rationals, there are various ways of filling in the gaps, by using different characterizations of just what the gaps are, two of which are particularly worth mentions.
One is to consider ways of splitting up the rationals into sets \(L\) and \(U\) so that \(L\) and \(U\) between them contain all rationals, every element of \(L\) is less than every element of \(U\), and \(L\) has no greatest element. Then we introduce the irrational numbers as least elements of those sets \(U\) which do not have a least element. This construction is known as the Dedekind cut after the late nineteenth and early twentieth century mathematician Richard Dedekind, and the idea is based on that of Eudoxus, a 4th Century BCE Greek mathematician.
The other is to say that any set which has an upper bound (i.e. a number greater than every element of the set) has a least upper bound. The rationals don't have this property, but if we add in the required least upper bounds this has the same effect of introducing all the required irrationals.
But again, the important thing is that whichever route we choose, we arrive at the same endpoint. The details of the objects we finally end up with will differ, but since the properties are always the same, we don't need to know just what they are. How they behave really is all that matters.

Keep right on past the end of the road

This has been quite a journey. We've filled in two algebraic gaps and one analytic one. But we don't actually have to stop here. There are still some missing objects. We can't, for example, solve the equation \(x^2+1=0\) in \(\mathbb{R}\). And there are no gaps between the real numbers to put the solution in. We can fill in the gap by using a different kind of trick, and introducing the complex numbers. This almost works, but this time as well as gaining something, you lose something: there is no way of ordering the complex numbers in a way that plays nicely with the algebra. But that's another story.

Acknowledgement

Thanks to Colin Wright (@ColinTheMathmo) for helpful comments on an earlier version of this and Adam Atkinson for typo spotting.