The real numbers

You probably have a good intuition about the natural numbers (\mathbb N). Just count: 0,1,2,0, 1, 2, \ldots. You also know how ++ and ×\times work on \mathbb N very well. From there defining the integers (\mathbb Z) and then the rationals (\mathbb Q) is quite natural: it’d be great if we could reverse ++ and ×\times, and defining \mathbb Q is how we do that.1

Getting from \mathbb N to \mathbb Q was not hard. But where on earth do the reals (\mathbb R) come from?

Wrong answers only

We’re going to work backwards a little. We’ll touch on natural ideas that edge closer to the real numbers, then shine a spotlight on why the rationals are lacking (and how they naturally lead into the reals), and then finally revisit some of these topics with our newfound understanding of the reals.

At the same time I will reference the reals without explaining what they are yet. Sorry about that, but it helps to be able to say “this idea doesn’t perfectly match the final answer” even if we don’t know what the final answer is yet.

Algebraic numbers

You might think we’d like to invent the real numbers because we want 2\sqrt 2 to exist, or more precisely, we want x2=2x^2 = 2 to have a solution. Not entirely. There are two problems with \mathbb R: it contains too many numbers and at the same time too few.

Let’s take our desire of 2\sqrt 2’s existence to the extreme. We want roots for all rational polynomials: this necessarily implies the Fundamental Theorem of Algebra holds, i.e. that we can factor every polynomial into the form k(xq1)(xq2)(xqn)k(x - q_1)(x - q_2)\cdots (x - q_n) where all qiq_i are rational.

Actually, the set of real numbers that are solutions to a rational polynomial are called the algebraic numbers (¯\overline{\mathbb Q}). Algebraic numbers are countable (because polynomials are countable) yet the reals are uncountable. By the way, the algebraic numbers are “enough” in this setting: the Fundamental Theorem of Algebra holds for ¯\overline{\mathbb Q}. There is no reason to go “beyond” ¯\overline{\mathbb Q}.

So there are real numbers that are not algebraic. The real numbers are, in one sense, more than the algebraic numbers. So ensuring roots to all polynomials could not possibly be the rationale.

At the same time there is no solution for x2+1=0x^2 + 1 = 0 in \mathbb R. So the algebraic numbers contain too many numbers, that is they contain complex numbers.

Cauchy sequences

I’d like to be able to write an infinite sequence of digits, like 3.14153.1415\ldots, and still have that be a number.

Yeah, this is pretty close. One of the official reasons for defining real numbers is so that this sequence of digits is some real number. (It’s a bit more general than that, but it is close!)

I want Intermediate Value Theorem to work

Yes! For the Intermediate Value Theorem we need continuity, which doesn’t do much for integers. A concept of continuity does exist for rationals and works reasonably well. But actually the intermediate value theorem fails for rationals.

Here is an example: consider the function f(x)=0f(x) = 0 if x2<2x^2 < 2 and f(x)=1f(x) = 1 if x2>2x^2 > 2 where ff sends rationals to rationals. This is continuous: if you know δ\delta-ϵ\epsilon proofs you can check this yourself, and if you don’t you can take my word for it. (In the reals this is discontinuous only at 2\sqrt 2 and since 2\sqrt 2 doesn’t exist it is now continuous!) Clearly we have f(0)=0f(0) = 0 and f(2)=1f(2) = 1, but we have no xx satisfying f(x)=12f(x) = \frac 12. Ouch.

The same goes for many other theorems like Mean Value Theorem. All these things where we need “something in between” fail on \mathbb Q!

So why is \mathbb Q lacking?

Consider the set S={x2<2x}S = \{x^2 < 2 \mid x \in \mathbb Q\}. You can easily bound this set from above. For instance, every element in SS is less than 22.

But is there a least upper bound? No. No matter what upper bound you give me, I can always give you a smaller one. If you give me 22, I will give you 1.51.5. And then you can give me 1.451.45. And so on and so forth: we can keep one-upping each other.

Obviously if we took the reals for this set we’d have a least upper bound: 2\sqrt 2. But we want something more general. And in fact the following is true:

Given any non-empty set SS \subseteq \mathbb R bounded from above, SS has a least upper bound supS\sup S.

By “least upper bound”, we mean given any upper bound bb for SS, we have bsupSb \geq \sup S. Also we’d obviously like for \mathbb R to contain \mathbb Q.

Constructing the reals

But we cannot just will \mathbb R into existence. We actually need to prove it exists somehow. Here is the construction:

Dedekind Cuts. A Dedekind Cut is a non-empty set AA \subsetneq \mathbb Q satisfying two properties: - AA contains no largest element. - If aAa \in A and b\Ab \in \mathbb Q \setminus A then a<ba < b.

Intuitively, we cut the rational number line in half. All points to the left are in AA; all points to the right are not in AA. Of course, this point at which we cut the rationals is not necessarily a rational. We cannot even rigorously define such a point (if we could, no reason to bother with Dedekind Cuts): we can only reason in terms of the elements of AA.

Here is the kicker. These Dedekind Cuts are our real numbers. They don’t merely represent real numbers. They are, under the hood, what we are referring to when we say “real number”. Now it is important to note there are other ways to define the real numbers such that they satisfy the properties we want them to. And it turns out these notions of the real numbers are all equivalent (formally they are isomorphic). This is well outside the scope of this post, but for now we take this definition of the reals and run with it.

Recall our wishlist: we wanted a least upper bound property and we wanted \mathbb R \supset \mathbb Q. Implicit in this wishlist is a notion of order (i.e. \leq), a notion of addition, and a notion of multiplication. Furthermore they have to be consistent with the respective notions from \mathbb Q. Let’s get down to defining and checking these.

What are rational numbers in the reals?

A rational number qq, represented as a real, is simply {xx<q}\{x \in \mathbb Q \mid x < q\}. It is easy to check this is a Dedekind Cut.

Ordering

We say A1A2A_1 \leq_{\mathbb R} A_2 if and only if A1A2A_1 \subseteq A_2. It is easy to check that q1q2A1A2q_1 \leq_{\mathbb Q} q_2 \iff A_1 \leq_{\mathbb R} A_2, where A1A_1 and A2A_2 are the reals associated with q1q_1 and q2q_2.

Also we always have at least one of A1A2A_1 \leq A_2 or A2A1A_2 \leq A_1, and when both are true A1=A2A_1 = A_2. (When people say \mathbb R is a complete ordered field, this is what they mean by “complete ordered”.)

Addition

We say A1+A2={a1+a2a1A1,a2A2}A_1 + A_2 = \{a_1 + a_2 \mid a_1 \in A_1, a_2 \in A_2\}. We can check this is a Dedekind cut and it preserves ordering the same way addition does in the rationals.

Also we may define the additive inverse: A={qqA}-A = \{q \in \mathbb Q \mid -q \not \in A\} where qq is not the minimal element in \A\mathbb Q \setminus A.

Multiplication

This is a bit more annoying. First we have to define positive and negative reals in the obvious way. (Remember reals are cuts and comparison with 00 is through subset comparison.) For positive reals we define A1×A2={a1×a2a1>0,a1A1,a2>0,a2A2}{qq0}A_1 \times A_2 = \{a_1 \times a_2 \mid a_1 > 0, a_1 \in A_1, a_2 > 0, a_2 \in A_2 \} \cup \{q \mid q \leq 0\}. If A1A_1 is negative and A2A_2 is positive then A1×A2=((A1)×A2)A_1 \times A_2 = -((-A_1) \times A_2). There are more cases that I cannot be bothered to list here because they provide no further instructive value.

Right answers only

The details above are not particularly important. Here is what matters: \mathbb R is a superset of \mathbb Q that preserves ordering, addition, and multiplication. Furthermore, it gains the least upper bound property (“any non-empty set bounded from above has a least upper bound”). Through that it gains some other properties.

Cauchy sequences

The terms in the sequence (an)=3,3.1,3.14,3.141,3.1415,(a_n) = 3, 3.1, 3.14, 3.141, 3.1415, \ldots eventually get arbitrarily close to each other. Formally, for any ϵ>0\epsilon > 0, there is some kk such that for all n,m>kn, m > k, |anam|<ϵ|a_n - a_m| < \epsilon. (Any sequence satisfying this condition is called a Cauchy sequence.) If we consider (an)(a_n) as a sequence of rationals, it doesn’t converge to anything. We know this because it converges to π\pi in the reals, which is not a rational number, and limits are unique in the reals. (This is not obvious and requires proof, but here we take it for granted.)

So there are rational Cauchy sequences that do not have a limit. This is the other sense in which the rationals were lacking. The reals, however, do not have this problem. Any Cauchy sequence in the reals also converges to a real number.

The Intermediate Value Theorem

The full proof in all its detail is in Section 1.6 of Charles Pugh’s Real Mathematical Analysis.

Formally, the Intermediate Value Theorem states

Let ff be a continuous function on [a,b][a, b] and suppose f(a)f(b)f(a) \leq f(b). If f(a)kf(b)f(a) \leq k \leq f(b) then there is some acba \leq c \leq b such that f(c)=kf(c) = k.

Continuity is defined with the usual δ\delta-ϵ\epsilon criteria: if you don’t know them and are curious you may easily Google it.

This is true in the reals, and the proof fully uses the least upper bound property. The proof also relies on the facts that continuous functions on a closed interval of \mathbb R are bounded: because it is longer we do not reproduce it here. We just take it for granted. It is proven in a very similar fashion.

Let V(x)V(x) be the set of values taken by f(t)f(t) for atxa \leq t \leq x; in set notation, V(x)={f(t)atx}V(x) = \{f(t) \mid a \leq t \leq x\}. Obviously each V(x)V(x) is non-empty and we took for granted that V(x)V(x) was bounded, so V(x)V(x) has a least upper bound; let it be supV(x)\sup V(x). Set X={x[a,b]supV(x)k}X = \{x \in [a, b] \mid \sup V(x) \leq k \}. Clearly XX is non-empty as aXa \in X and XX is bounded from above by bb. We claim supX=c\sup X = c.

We may use the δ\delta-ϵ\epsilon condition of continuity to show that f(c)<kf(c) < k and f(c)>kf(c) > k both lead to contradictions. Very informally, continuity tells us that if f(c)<kf(c) < k, then there’s some dd slightly larger than cc such that f(d)<kf(d) < k as well (and also f(t)<kf(t) < k for all ctdc \leq t \leq d). Likewise for f(c)>kf(c) > k. So we must have f(c)=kf(c) = k.


  1. In more technical terms, \mathbb Q is a field: we have a ++ and ×\times operation, an identity with ++ (i.e. 00), an identity with ×\times (i.e. 11), and additive/multiplicative inverses. Actually, \mathbb Q is the smallest field containing \mathbb N.↩︎