Book 2A

© 2026 Neckpinch · www.neckpinch.com · All rights reserved.

Course 2Book 2A: Numbers, Limits and the IntegralChapter 4

The Real Numbers

Completing ℚ with Cauchy sequences: the least upper bound property and the idea of completion.

66 min read · Updated Oct 20, 2026

Read with Tao, Analysis I, chapter "The real numbers" (Cauchy sequences, equivalent Cauchy sequences, the construction of the reals, ordering, the least upper bound property, real exponentiation part I).

In this chapter · 13 sections
  1. 4.1Approximations, ancient and modern
  2. 4.2Cauchy sequences
  3. 4.3When two sequences approximate the same number
  4. 4.4The real numbers
  5. 4.4.1Arithmetic
  6. 4.5Order
  7. 4.6The least upper bound property
  8. 4.7Working with suprema
  9. 4.8Square roots and n-th roots exist
  10. 4.9Decimal expansions
  11. 4.10Completion
  12. 4.11Computers don't use real numbers
  13. 4.12History: two ways to fill the gaps
  14. 4.13Exercises
  15. ↗Free resources

The rationals are dense, but 2A.3 Integers and Rationals found a hole in them at 2\sqrt 2. There are rationals whose squares come as close to 22 as you like, yet none whose square is 22. This chapter fills every such hole at once and builds the real numbers R\mathbb{R}.

The idea is simple to say. A real number is what an endless process of better and better rational approximations is approximating. The work is in making that precise without referring to the thing being approximated, which doesn't exist yet. The answer combines the two tools of the last two chapters: sequences that settle down (Cauchy sequences), and the quotient construction, so that two processes approximating "the same number" count as the same real.

This construction is called completion. It is the single most reused construction in this guidebook, so the chapter ends by naming it explicitly. The function spaces in which the heat equation and Ricci flow are solved (3A.3 The Lebesgue Integral, 4A.10 Sobolev Spaces) are built in exactly the same way.

By the end of this chapter you will be able to:

  • define Cauchy sequences and equivalent sequences of rationals, and test examples;
  • explain how the real numbers are constructed and why the operations are well defined;
  • prove that the operations and the order on R\mathbb{R} are well defined, and that R\mathbb{R} is an ordered field;
  • state and prove the least upper bound property, compute suprema and infima with the ε\varepsilon-characterisation, and use it to show that 2\sqrt 2, and every nn-th root, exists;
  • explain how decimal expansions name real numbers, and why 0.999…=10.999\ldots = 1;
  • explain what "completion" means and recognise it later;
  • explain why the numbers inside a computer are not real numbers, with a documented case where the difference mattered.

Approximations, ancient and modern

People computed with irrational quantities long before anyone could say what they were. They did it the only way possible: with rational approximations good enough for the task.

In the world Data √2 on a clay tablet

The Babylonian tablet known as YBC 7289, in the Yale Babylonian Collection and dated to roughly 1800–1600 BCE, shows a square with its diagonals. Along a diagonal is written, in base-60 notation, the number 1;24,51,101;24,51,10, meaning

1+2460+51602+10603=3054721600=1.41421296…1 + \frac{24}{60} + \frac{51}{60^2} + \frac{10}{60^3} = \frac{30547}{21600} = 1.41421296\ldots

The true value is 2=1.41421356…\sqrt 2 = 1.41421356\ldots, so the scribe's figure is correct to about six decimal places, an error of less than one part in two million. It is the closest approximation to 2\sqrt 2 possible with three sexagesimal places after the point.

How might such an approximation be found? One method, which may well be the one the scribes used (the tablets don't say), is divide and average. If xx is a guess for 2\sqrt 2 that is too big, then 2/x2/x is too small, and their average is a better guess:

xn+1=12(xn+2xn).x_{n+1} = \frac12\Big(x_n + \frac{2}{x_n}\Big).

Starting from x0=2x_0 = 2:

x1=32,x2=1712,x3=577408,x4=665857470832.x_1 = \tfrac32,\qquad x_2 = \tfrac{17}{12},\qquad x_3 = \tfrac{577}{408},\qquad x_4 = \tfrac{665857}{470832}.

Every one of these is rational, and their squares minus 22 are 14\tfrac14, about 0.00690.0069, about 0.0000060.000006, and about 0.00000000000450.0000000000045. The number of correct digits roughly doubles at each step. This is Newton's method for the equation x2−2=0x^2 - 2 = 0 (Figure 4.1), and Newton iteration is still one of the standard ways software computes square roots and reciprocals.

Figure 4.1. Divide-and-average is Newton's method: follow the tangent to y=x2−2y = x^2 - 2 down to the axis. From x0=2x_0 = 2 the tangents land at 32\tfrac32, then 1712\tfrac{17}{12}, then 577408\tfrac{577}{408}, each rational and each closer to the crossing point, which is not rational.

The sequence x0,x1,x2,…x_0, x_1, x_2, \dots is a sequence of rational numbers that "wants" to converge, but there is no rational number for it to converge to. The construction of the reals takes that literally: the real number 2\sqrt 2 will be (the class of) this sequence. Two things have to be made precise first: what it means for a sequence to want to converge without mentioning its limit, and when two such sequences want to converge to the same place.

Cauchy sequences

A sequence of rationals is a function n↦ann \mapsto a_n from the natural numbers (or from the naturals at least some starting index) to Q\mathbb{Q}. We write it (an)n=0∞(a_n)_{n=0}^\infty, or just (an)(a_n).

The obvious definition of convergence, "ana_n gets close to LL", needs the limit LL. The trick, due to Cauchy, is to ask only that the terms get close to each other.

Definition 4.1 Cauchy sequence

A sequence of rationals (an)(a_n) is a Cauchy sequence if for every rational ε>0\varepsilon > 0 there is an NN such that ∣an−am∣≤ε|a_n - a_m| \leq \varepsilon for all n,m≥Nn, m \geq N.

In words: however small a tolerance you name, from some point on, all the terms are within that tolerance of each other. Tao builds this up in two steps, calling a sequence ε\varepsilon-steady if all its terms are ε\varepsilon-close, and eventually ε\varepsilon-steady if all terms from some point on are. A Cauchy sequence is then one that is eventually ε\varepsilon-steady for every ε>0\varepsilon > 0.

Example 4.2 Which sequences are Cauchy?
  • Decimal truncations. Let ana_n be 2\sqrt 2 truncated to nn decimal places: 1,1.4,1.41,1.414,…1, 1.4, 1.41, 1.414, \dots. (These are rational numbers, computable without knowing 2\sqrt 2 exists: ana_n is the largest number with nn decimal places whose square is less than 22.) For n,m≥Nn, m \geq N the two truncations agree in the first NN decimals, so ∣an−am∣≤10−N|a_n - a_m| \leq 10^{-N}. Given ε\varepsilon, choose NN with 10−N≤ε10^{-N} \leq \varepsilon. Cauchy.
  • an=1/na_n = 1/n (for n≥1n \geq 1). For n,m≥Nn, m \geq N, both terms lie in (0,1/N](0, 1/N], so they differ by at most 1/N1/N. Cauchy.
  • an=(−1)na_n = (-1)^n. Any two consecutive terms differ by 22, so the definition fails for ε=1\varepsilon = 1. Not Cauchy.
  • an=1+12+⋯+1na_n = 1 + \tfrac12 + \dots + \tfrac1n. Consecutive terms differ by only 1/n1/n, which tends to 00, so this sequence looks Cauchy. It isn't: a2m−am≥m⋅12m=12a_{2m} - a_m \geq m \cdot \tfrac{1}{2m} = \tfrac12 for every mm. Small consecutive differences are not enough; all pairs beyond NN must be close. (2A.7 Series returns to this, the harmonic series.)
Figure 4.2. Two Cauchy sequences of rationals: the decimal truncations of 2\sqrt 2 (from below) and the divide-and-average iterates (from above). Beyond each index NN, all later terms fit in a band whose width shrinks to 00. That is the Cauchy property. Neither sequence has a rational limit.

Newton's iterates are Cauchy as well, and the proof never mentions 2\sqrt 2, which is the point.

Proposition 4.3 The divide-and-average sequence is Cauchy

Let x0=2x_0 = 2 and xn+1=12(xn+2/xn)x_{n+1} = \tfrac12(x_n + 2/x_n). Then (xn)(x_n) is a Cauchy sequence of rationals.

Proof. Write en=xn2−2e_n = x_n^2 - 2. A direct computation gives

xn+12−2=14(xn2+4+4xn2)−2=(xn2−2)24xn2,soen+1=en24xn2.x_{n+1}^2 - 2 = \frac14\Big(x_n^2 + 4 + \frac{4}{x_n^2}\Big) - 2 = \frac{(x_n^2 - 2)^2}{4x_n^2}, \qquad\text{so}\qquad e_{n+1} = \frac{e_n^2}{4x_n^2}.

Since e0=2>0e_0 = 2 > 0, induction gives en>0e_n > 0 for all nn, so every xn2>2x_n^2 > 2, and hence xn>1x_n > 1. Then en+1≤en2/4e_{n+1} \leq e_n^2/4, and xn+1−xn=(2/xn−xn)/2=−en/(2xn)<0x_{n+1} - x_n = (2/x_n - x_n)/2 = -e_n/(2x_n) < 0: the sequence is decreasing.

Now let m≥nm \geq n. Since xm≤xnx_m \leq x_n and xm2>2x_m^2 > 2, we have xm>2/xm≥2/xnx_m > 2/x_m \geq 2/x_n. So xmx_m lies between 2/xn2/x_n and xnx_n, and

∣xn−xm∣≤xn−2xn=enxn≤en.|x_n - x_m| \leq x_n - \frac{2}{x_n} = \frac{e_n}{x_n} \leq e_n.

Finally e1=14e_1 = \tfrac14 and en+1≤en2/4e_{n+1} \leq e_n^2/4 force en≤4−ne_n \leq 4^{-n} for n≥1n \geq 1 (by induction: en+1≤4−2n/4≤4−(n+1)e_{n+1} \leq 4^{-2n}/4 \leq 4^{-(n+1)}). Given ε>0\varepsilon > 0, choose N≥1N \geq 1 with 4−N≤ε4^{-N} \leq \varepsilon; then ∣xn−xm∣≤ε|x_n - x_m| \leq \varepsilon for all m≥n≥Nm \geq n \geq N.

One property of Cauchy sequences is needed constantly.

Lemma 4.4 Cauchy sequences are bounded

If (an)(a_n) is Cauchy, there is a rational MM with ∣an∣≤M|a_n| \leq M for all nn.

Proof. Take ε=1\varepsilon = 1: there is NN with ∣an−aN∣≤1|a_n - a_N| \leq 1 for all n≥Nn \geq N, so ∣an∣≤∣aN∣+1|a_n| \leq |a_N| + 1 for those nn. The finitely many terms a0,…,aN−1a_0, \dots, a_{N-1} have a largest absolute value. Let MM be the larger of that and ∣aN∣+1|a_N| + 1.

When two sequences approximate the same number

The decimal truncations and the Newton iterates are different sequences, but they are approximating the same thing. The sequences 1,1,1,…1, 1, 1, \dots and 0.9,0.99,0.999,…0.9, 0.99, 0.999, \dots are different too, yet both "are" the number 11. We need an equivalence relation that identifies them.

Definition 4.5 Equivalent sequences

Two sequences of rationals (an)(a_n) and (bn)(b_n) are equivalent if for every rational ε>0\varepsilon > 0 there is an NN such that ∣an−bn∣≤ε|a_n - b_n| \leq \varepsilon for all n≥Nn \geq N.

So 0.9,0.99,0.999,…0.9, 0.99, 0.999, \dots is equivalent to the constant sequence 1,1,1,…1, 1, 1, \dots, because the difference at stage nn is 10−n10^{-n}. That is the precise content of the slogan 0.999…=10.999\ldots = 1: the two decimal expansions are different sequences in the same equivalence class.

Lemma 4.6 This is an equivalence relation

Equivalence of sequences is reflexive, symmetric and transitive.

Proof. Reflexivity and symmetry are immediate. For transitivity, suppose (an)∼(bn)(a_n) \sim (b_n) and (bn)∼(cn)(b_n) \sim (c_n), and let ε>0\varepsilon > 0. Apply the definitions with ε/2\varepsilon/2: there are N1N_1 and N2N_2 with ∣an−bn∣≤ε/2|a_n - b_n| \leq \varepsilon/2 for n≥N1n \geq N_1 and ∣bn−cn∣≤ε/2|b_n - c_n| \leq \varepsilon/2 for n≥N2n \geq N_2. For nn at least the larger of N1N_1 and N2N_2, the triangle inequality (2A.3 Integers and Rationals) gives ∣an−cn∣≤ε|a_n - c_n| \leq \varepsilon.

The "ε/2\varepsilon/2 trick" in this proof, splitting a tolerance between two steps and recombining with the triangle inequality, will be used hundreds of times in this guidebook. It is the rigorous version of the closeness computation in the rehearsal exercise of 2A.3 Integers and Rationals.

The real numbers

Definition 4.7 Real numbers

A real number is an expression LIM⁡n→∞an\operatorname{LIM}_{n\to\infty} a_n, where (an)(a_n) is a Cauchy sequence of rationals. Two real numbers LIM⁡an\operatorname{LIM} a_n and LIM⁡bn\operatorname{LIM} b_n are equal exactly when (an)(a_n) and (bn)(b_n) are equivalent. Formally, R\mathbb{R} is the set of Cauchy sequences of rationals modulo equivalence.

The notation LIM⁡\operatorname{LIM} (a "formal limit") is Tao's. It is a reminder that at this stage nothing converges to anything: LIM⁡an\operatorname{LIM} a_n is just a name for the class of (an)(a_n). In 2A.6 Sequences we will prove that ana_n really does converge to the real number LIM⁡an\operatorname{LIM} a_n, and then LIM⁡\operatorname{LIM} can be replaced by the ordinary lim⁡\lim.

The rationals sit inside the reals. A rational qq is identified with the constant sequence, LIM⁡q\operatorname{LIM} q. Two rationals are equal as reals exactly when they are equal as rationals, so nothing is lost. So 2\sqrt 2, if it exists, is LIM⁡xn\operatorname{LIM} x_n for the Newton sequence, and also LIM⁡\operatorname{LIM} of the decimal truncations, since those two sequences are equivalent (Exercise 4.28).

Arithmetic

Definition 4.8 Operations on reals
LIM⁡an+LIM⁡bn:=LIM⁡(an+bn),LIM⁡an×LIM⁡bn:=LIM⁡(anbn).\operatorname{LIM} a_n + \operatorname{LIM} b_n := \operatorname{LIM}(a_n + b_n), \qquad \operatorname{LIM} a_n \times \operatorname{LIM} b_n := \operatorname{LIM}(a_n b_n).

Two things must be checked, as for every definition on a quotient (2A.2 Sets, Functions and Equivalence). First, the right-hand sides must be Cauchy sequences, so that they define reals at all. Second, the operations must be well defined: replacing (an)(a_n) by an equivalent sequence must give an equivalent result.

Proposition 4.9 Addition of reals is well defined

If (an)(a_n) and (bn)(b_n) are Cauchy, then so is (an+bn)(a_n + b_n). If moreover (an)∼(an′)(a_n) \sim (a'_n), then (an+bn)∼(an′+bn)(a_n + b_n) \sim (a'_n + b_n).

Proof. Cauchy. Let ε>0\varepsilon > 0. Apply the Cauchy property of each sequence with tolerance ε/2\varepsilon/2: there are N1N_1, N2N_2 with ∣an−am∣≤ε/2|a_n - a_m| \leq \varepsilon/2 for n,m≥N1n, m \geq N_1 and ∣bn−bm∣≤ε/2|b_n - b_m| \leq \varepsilon/2 for n,m≥N2n, m \geq N_2. Let NN be the larger of N1N_1 and N2N_2. For n,m≥Nn, m \geq N, part (2) of the closeness proposition of 2A.3 Integers and Rationals (or just the triangle inequality) gives

∣(an+bn)−(am+bm)∣≤∣an−am∣+∣bn−bm∣≤ε.|(a_n + b_n) - (a_m + b_m)| \leq |a_n - a_m| + |b_n - b_m| \leq \varepsilon.

Well defined. (an+bn)−(an′+bn)=an−an′(a_n + b_n) - (a'_n + b_n) = a_n - a'_n, which is eventually at most ε\varepsilon in absolute value, because (an)∼(an′)(a_n) \sim (a'_n).

Notice the move "let NN be the larger of N1N_1 and N2N_2". Each hypothesis gives its own threshold, and we need a single index beyond which both hold. Since there are finitely many thresholds, the largest one works. You will make this move in almost every proof in the next three chapters.

Proposition 4.10 Multiplication of reals is well defined

If (an)(a_n) and (bn)(b_n) are Cauchy, then so is (anbn)(a_n b_n). If moreover (an)∼(an′)(a_n) \sim (a'_n), then (anbn)∼(an′bn)(a_n b_n) \sim (a'_n b_n).

Proof. The key identity is anbn−ambm=an(bn−bm)+bm(an−am)a_n b_n - a_m b_m = a_n(b_n - b_m) + b_m(a_n - a_m). By Lemma 4.4 there is MM with ∣an∣≤M|a_n| \leq M and ∣bn∣≤M|b_n| \leq M for all nn. Given ε\varepsilon, choose NN so that ∣an−am∣|a_n - a_m| and ∣bn−bm∣|b_n - b_m| are at most ε/(2M)\varepsilon/(2M) for n,m≥Nn, m \geq N. Then ∣anbn−ambm∣≤Mε2M+Mε2M=ε|a_n b_n - a_m b_m| \leq M\frac{\varepsilon}{2M} + M\frac{\varepsilon}{2M} = \varepsilon.

For well-definedness, anbn−an′bn=(an−an′)bna_n b_n - a'_n b_n = (a_n - a'_n)b_n, and ∣bn∣≤M|b_n| \leq M; choose NN with ∣an−an′∣≤ε/M|a_n - a'_n| \leq \varepsilon/M for n≥Nn \geq N.

Notice why boundedness was needed: a product is close to another product only if the factors that are not being compared are under control. This "split the difference, bound the other factor" step is the template for every product estimate in analysis, including the estimates for Ricci flow, where curvature is multiplied by curvature (11A.2 How Curvature Evolves).

Negation is −LIM⁡an=LIM⁡(−an)-\operatorname{LIM} a_n = \operatorname{LIM}(-a_n), and subtraction is x−y=x+(−y)x - y = x + (-y). (Negation is well defined because ∣(−an)−(−an′)∣=∣an−an′∣|(-a_n) - (-a'_n)| = |a_n - a'_n|.) The laws of arithmetic (commutativity, associativity, distributivity) hold because they hold term by term for rationals. For example, to prove x(y+z)=xy+xzx(y + z) = xy + xz, write x=LIM⁡anx = \operatorname{LIM} a_n, y=LIM⁡bny = \operatorname{LIM} b_n, z=LIM⁡cnz = \operatorname{LIM} c_n. By the definitions,

x(y+z)=LIM⁡(an(bn+cn))andxy+xz=LIM⁡(anbn+ancn).x(y + z) = \operatorname{LIM}\big(a_n(b_n + c_n)\big) \qquad\text{and}\qquad xy + xz = \operatorname{LIM}(a_n b_n + a_n c_n).

The two sequences are not just equivalent but identical, term by term, by distributivity in Q\mathbb{Q}. This is the recipe of 2A.3 Integers and Rationals once more: choose representatives, compute, and use the laws of the level below.

Reciprocals need one more idea. If x=LIM⁡anx = \operatorname{LIM} a_n is not zero, some terms ana_n may still be zero, so LIM⁡(1/an)\operatorname{LIM}(1/a_n) makes no sense as written. The way out is to choose a better representative.

Lemma 4.11 Nonzero reals are bounded away from zero

If x≠0x \neq 0, then x=LIM⁡anx = \operatorname{LIM} a_n for some Cauchy sequence (an)(a_n) and some rational c>0c > 0 with ∣an∣≥c|a_n| \geq c for every nn.

Proof. Take any representative (bn)(b_n). Since x≠0x \neq 0, (bn)(b_n) is not equivalent to the zero sequence, so there is some ε0>0\varepsilon_0 > 0 such that ∣bn∣>ε0|b_n| > \varepsilon_0 for infinitely many nn. Choose NN with ∣bn−bm∣≤ε0/2|b_n - b_m| \leq \varepsilon_0/2 for n,m≥Nn, m \geq N, and then some n0≥Nn_0 \geq N with ∣bn0∣>ε0|b_{n_0}| > \varepsilon_0. For every n≥Nn \geq N, ∣bn∣≥∣bn0∣−ε0/2>ε0/2|b_n| \geq |b_{n_0}| - \varepsilon_0/2 > \varepsilon_0/2. Now let an=bNa_n = b_N for n<Nn < N and an=bna_n = b_n for n≥Nn \geq N. This sequence is equivalent to (bn)(b_n) (they agree from NN on), and ∣an∣≥ε0/2=:c|a_n| \geq \varepsilon_0/2 =: c for every nn.

For such a representative, (1/an)(1/a_n) is Cauchy, because ∣1/an−1/am∣=∣am−an∣/∣anam∣≤∣an−am∣/c2|1/a_n - 1/a_m| = |a_m - a_n|/|a_n a_m| \leq |a_n - a_m|/c^2. Define x−1:=LIM⁡(1/an)x^{-1} := \operatorname{LIM}(1/a_n). It doesn't depend on the representative chosen (Exercise 4.29), and x⋅x−1=1x \cdot x^{-1} = 1.

Proposition 4.12 R\mathbb{R} is a field

With these operations, the real numbers satisfy all the laws of a field, and the inclusion Q⊆R\mathbb{Q} \subseteq \mathbb{R} respects addition and multiplication.

Proof. The laws that involve only ++, ×\times and −- hold term by term, as above. The zero is LIM⁡0\operatorname{LIM} 0, and x+(−x)=LIM⁡(an−an)=LIM⁡0x + (-x) = \operatorname{LIM}(a_n - a_n) = \operatorname{LIM} 0. The one is LIM⁡1\operatorname{LIM} 1. For reciprocals, let x≠0x \neq 0 and choose a representative with ∣an∣≥c>0|a_n| \geq c > 0 (Lemma 4.11). Then x⋅x−1=LIM⁡(an⋅1an)=LIM⁡1=1x \cdot x^{-1} = \operatorname{LIM}(a_n \cdot \tfrac{1}{a_n}) = \operatorname{LIM} 1 = 1. Finally, for rationals p,qp, q, LIM⁡p+LIM⁡q=LIM⁡(p+q)\operatorname{LIM} p + \operatorname{LIM} q = \operatorname{LIM}(p + q) and LIM⁡p×LIM⁡q=LIM⁡(pq)\operatorname{LIM} p \times \operatorname{LIM} q = \operatorname{LIM}(pq), by the definitions applied to constant sequences.

Example 4.13 Arithmetic with formal limits

Let x=LIM⁡xnx = \operatorname{LIM} x_n be the Newton sequence for 2\sqrt 2. Then x+1=LIM⁡(xn+1)x + 1 = \operatorname{LIM}(x_n + 1), which is the sequence 3,52,2912,…3, \tfrac52, \tfrac{29}{12}, \dots, and x⋅x=LIM⁡(xn2)x \cdot x = \operatorname{LIM}(x_n^2). In the proof of Proposition 4.3 we showed xn2−2=en≤4−nx_n^2 - 2 = e_n \leq 4^{-n} for n≥1n \geq 1, so (xn2)(x_n^2) is equivalent to the constant sequence 22. Hence x⋅x=2x \cdot x = 2 in R\mathbb{R}. We have already proved, without any theorem about suprema, that 22 has a square root in R\mathbb{R}: it is the class of the Newton sequence. The least upper bound property below gives a second proof that works for every equation of this kind at once.

Order

Definition 4.14 Positive reals; order

A real number xx is positive if x=LIM⁡anx = \operatorname{LIM} a_n for a Cauchy sequence with an≥ca_n \geq c for every nn, for some rational c>0c > 0, and negative if −x-x is positive. Write x>yx > y if x−yx - y is positive.

The definition asks for one representative that stays above a positive rational. Other representatives of the same real may dip below zero for a while (change finitely many terms of a positive sequence and you get an equivalent one). What can't happen is that some representative is eventually above c>0c > 0 and another equivalent one is eventually below −c′-c', because their difference would then stay at least c+c′c + c', so they wouldn't be equivalent.

Proposition 4.15 Trichotomy and order

Every real number is exactly one of positive, zero or negative. With this order, R\mathbb{R} is an ordered field, and its order agrees with the order of Q\mathbb{Q} on rationals.

Proof. At least one. Let x≠0x \neq 0. By Lemma 4.11, x=LIM⁡anx = \operatorname{LIM} a_n with ∣an∣≥c>0|a_n| \geq c > 0 for all nn. Choose NN with ∣an−am∣≤c|a_n - a_m| \leq c for n,m≥Nn, m \geq N. If aN≥ca_N \geq c, then for n≥Nn \geq N, an≥aN−c≥0a_n \geq a_N - c \geq 0, and since ∣an∣≥c|a_n| \geq c this forces an≥ca_n \geq c. Similarly, if aN≤−ca_N \leq -c, then an≤−ca_n \leq -c for all n≥Nn \geq N. So the sequence is eventually ≥c\geq c or eventually ≤−c\leq -c. Changing the finitely many terms before NN to cc (or to −c-c) gives an equivalent sequence that is ≥c\geq c (or ≤−c\leq -c) for every nn. So xx is positive or negative.

At most one. Zero is not positive: if LIM⁡0=LIM⁡an\operatorname{LIM} 0 = \operatorname{LIM} a_n with an≥c>0a_n \geq c > 0 for every nn, then ∣an−0∣≥c|a_n - 0| \geq c for every nn, so (an)(a_n) is not equivalent to (0)(0). And xx can't be both positive and negative: if x=LIM⁡anx = \operatorname{LIM} a_n with an≥ca_n \geq c, and −x=LIM⁡bn-x = \operatorname{LIM} b_n with bn≥c′b_n \geq c', then x=LIM⁡(−bn)x = \operatorname{LIM}(-b_n) too, and ∣an−(−bn)∣=an+bn≥c+c′|a_n - (-b_n)| = a_n + b_n \geq c + c' for every nn, so the two representatives of xx are not equivalent, a contradiction.

Ordered field. If x=LIM⁡anx = \operatorname{LIM} a_n and y=LIM⁡bny = \operatorname{LIM} b_n with an≥ca_n \geq c and bn≥c′b_n \geq c' for all nn, then an+bn≥c+c′a_n + b_n \geq c + c' and anbn≥cc′a_n b_n \geq cc', so x+yx + y and xyxy are positive. As in 2A.3 Integers and Rationals, every order law follows from "sums and products of positive numbers are positive".

Agreement with Q\mathbb{Q}. A positive rational qq is LIM⁡q\operatorname{LIM} q with q≥q>0q \geq q > 0, so it is positive as a real. A negative rational is the negative of a positive one, and 00 is 00. So the real sign of a rational is its rational sign.

The next lemma is small but used everywhere: inequalities that hold for every term of a sequence survive in the formal limit, provided they are non-strict.

Lemma 4.16 Non-strict inequalities pass to the limit

Let (an)(a_n) be a Cauchy sequence of rationals and x=LIM⁡anx = \operatorname{LIM} a_n. If an≤Ma_n \leq M for every nn (with MM real or rational), then x≤Mx \leq M. If an≥ma_n \geq m for every nn, then x≥mx \geq m.

Proof. Take MM rational first, and suppose x>Mx > M. Then x−M=LIM⁡(an−M)x - M = \operatorname{LIM}(a_n - M) is positive, so it has a representative (bn)(b_n) with bn≥c>0b_n \geq c > 0 for every nn. Since (bn)∼(an−M)(b_n) \sim (a_n - M), there is NN with ∣bn−(an−M)∣≤c/2|b_n - (a_n - M)| \leq c/2 for n≥Nn \geq N, and then an−M≥bn−c/2≥c/2>0a_n - M \geq b_n - c/2 \geq c/2 > 0. This contradicts an≤Ma_n \leq M. For real MM, see Exercise 4.31. The second statement is the first applied to (−an)(-a_n).

The strict version is false: an=1/na_n = 1/n satisfies an>0a_n > 0 for every n≥1n \geq 1, but LIM⁡1/n=0\operatorname{LIM} 1/n = 0. This is the formal-limit version of something you will see again in 2A.6 Sequences: limits preserve ≤\leq, but turn << into ≤\leq.

Absolute value and distance on R\mathbb{R} are defined as for Q\mathbb{Q}, and the triangle inequality carries over. Two properties connect R\mathbb{R} to the rationals it was built from.

Proposition 4.17 Archimedean property; density of Q\mathbb{Q} in R\mathbb{R}
  1. For every real xx there is a natural number N>xN > x. For every real ε>0\varepsilon > 0 there is a natural number nn with 1/n<ε1/n < \varepsilon.
  2. Between any two reals x<yx < y there is a rational qq with x<q<yx < q < y.

Proof. (1) Write x=LIM⁡anx = \operatorname{LIM} a_n. The sequence is bounded by some rational MM (Lemma 4.4), so x≤Mx \leq M by Lemma 4.16; by 2A.3 Integers and Rationals there is a natural number N>MN > M. The second statement follows from the first applied to 1/ε1/\varepsilon.

(2) By (1) choose nn with 1/n<y−x1/n < y - x. Then the rationals k/nk/n, for integers kk, are spaced less than y−xy - x apart. Let kk be the smallest integer with k/n>xk/n > x (it exists by (1) and well-ordering). Then (k−1)/n≤x(k-1)/n \leq x, so k/n≤x+1/n<yk/n \leq x + 1/n < y.

So every real number can be approximated by rationals to any accuracy. This is what makes the reals usable in practice: in any computation, a real can be replaced by a rational close enough to it.

The least upper bound property

The defining feature of R\mathbb{R}, the property Q\mathbb{Q} lacks, can be stated without sequences at all.

Definition 4.18 Upper bounds and suprema

Let EE be a set of reals. A real MM is an upper bound for EE if x≤Mx \leq M for every x∈Ex \in E. A real SS is a least upper bound, or supremum, of EE, written sup⁡E\sup E, if SS is an upper bound for EE and S≤MS \leq M for every upper bound MM of EE.

A set has at most one supremum (if SS and S′S' are both least upper bounds, then S≤S′S \leq S' and S′≤SS' \leq S). The supremum need not belong to the set: sup⁡{x:x<1}=1\sup\{x : x < 1\} = 1.

Theorem 4.19 The least upper bound property

Every nonempty set of real numbers that has an upper bound has a least upper bound.

Proof (By bisection). Let EE be nonempty, x0∈Ex_0 \in E, and MM an upper bound. We build the supremum as the formal limit of a Cauchy sequence of rationals, by repeatedly halving an interval that contains it.

Fix a positive integer nn. Among the rationals k/nk/n with kk an integer, some are upper bounds for EE (those at least MM) and some aren't (those below x0x_0). By well-ordering, there is a smallest integer KnK_n such that Kn/nK_n/n is an upper bound. Let sn=Kn/ns_n = K_n/n. So sns_n is an upper bound, but sn−1/ns_n - 1/n is not.

Claim: (sn)(s_n) is Cauchy. For n,m≥Nn, m \geq N: sns_n is an upper bound and sm−1/ms_m - 1/m is not, so some element of EE exceeds sm−1/ms_m - 1/m, and that element is at most sns_n. Hence sm−1/m<sns_m - 1/m < s_n. By symmetry sn−1/n<sms_n - 1/n < s_m. So ∣sn−sm∣<max⁡(1/n,1/m)≤1/N|s_n - s_m| < \max(1/n, 1/m) \leq 1/N.

Let S=LIM⁡snS = \operatorname{LIM} s_n. SS is an upper bound: if some x∈Ex \in E had x>Sx > S, then since sn−S→0s_n - S \to 0 (Exercise 4.32) we would get sn<xs_n < x for large nn, contradicting that sns_n is an upper bound. SS is the least: if M′M' were an upper bound with M′<SM' < S, then for large nn, sn−1/n>M′s_n - 1/n > M' (since sn−1/ns_n - 1/n also converges to SS), so sn−1/ns_n - 1/n would be an upper bound, contradicting the choice of KnK_n.

Figure 4.3. Finding the supremum: on grids of spacing 1/n1/n, take the smallest grid point that is still an upper bound. Each such point is within 1/n1/n of the boundary of EE, so they form a Cauchy sequence, and its formal limit is sup⁡E\sup E.

Over the rationals the theorem fails. The set E={q∈Q:q2<2}E = \{q \in \mathbb{Q} : q^2 < 2\} has rational upper bounds (22, 32\tfrac32, 1712\tfrac{17}{12}, …), but no least rational upper bound, since any rational upper bound uu has u2>2u^2 > 2 (it can't be 22 by 2A.3 Integers and Rationals), and then the divide-and-average step produces a smaller one. The least upper bound property is precisely the statement that the reals have no gaps.

Working with suprema

The definition of the supremum quantifies over all upper bounds, which is awkward to check directly. In practice one uses an equivalent form that quantifies over a tolerance instead. It is the most-used fact about suprema, and it is the form in which the least upper bound property enters the proofs of 2A.6 Sequences and 2A.9 Continuous Functions.

Proposition 4.20 The ε-characterisation of the supremum

Let EE be a nonempty set of reals and SS a real number. Then S=sup⁡ES = \sup E if and only if both:

  1. SS is an upper bound: x≤Sx \leq S for every x∈Ex \in E; and
  2. nothing smaller is: for every ε>0\varepsilon > 0 there is some x∈Ex \in E with x>S−εx > S - \varepsilon.

Proof. Suppose S=sup⁡ES = \sup E. Then (1) holds by definition. For (2), let ε>0\varepsilon > 0. The number S−εS - \varepsilon is less than SS, so it is not an upper bound (otherwise SS, the least upper bound, would be at most S−εS - \varepsilon). Not being an upper bound means precisely that some x∈Ex \in E has x>S−εx > S - \varepsilon.

Suppose (1) and (2). SS is an upper bound. Let MM be any upper bound, and suppose M<SM < S. Take ε=S−M>0\varepsilon = S - M > 0. By (2) some x∈Ex \in E has x>S−ε=Mx > S - \varepsilon = M, contradicting that MM is an upper bound. So S≤MS \leq M for every upper bound MM, and SS is the least one.

Read (2) as: you can get as close to SS from below as you like while staying inside EE. Together with (1), it pins SS down as the place where EE "ends".

Figure 4.4. The supremum SS of EE: nothing in EE lies to its right, and every interval (S−ε,S](S - \varepsilon, S], however short, contains a point of EE.
Example 4.21 Computing suprema and infima

(a) E={1−1n:n=1,2,3,… }={0,12,23,34,… }E = \{1 - \tfrac1n : n = 1, 2, 3, \dots\} = \{0, \tfrac12, \tfrac23, \tfrac34, \dots\}. Claim: sup⁡E=1\sup E = 1. (1) Every element is 1−1n<11 - \tfrac1n < 1. (2) Given ε>0\varepsilon > 0, choose nn with 1n<ε\tfrac1n < \varepsilon (Archimedean property, Proposition 4.17); then 1−1n>1−ε1 - \tfrac1n > 1 - \varepsilon. Note that 1∉E1 \notin E: the supremum is not a maximum.

(b) The infimum inf⁡E\inf E of a set is its greatest lower bound, defined like the supremum with the inequalities reversed (Exercise 4.33). For F={1n:n≥1}F = \{\tfrac1n : n \geq 1\}, inf⁡F=0\inf F = 0: every element is positive, and for every ε>0\varepsilon > 0 some 1n<0+ε\tfrac1n < 0 + \varepsilon. Again 0∉F0 \notin F.

(c) G=[0,1]={x:0≤x≤1}G = [0, 1] = \{x : 0 \leq x \leq 1\}. Here sup⁡G=1\sup G = 1 and it is in the set. When the supremum belongs to the set it is called the maximum, max⁡G\max G.

(d) H={x∈R:x2<2}H = \{x \in \mathbb{R} : x^2 < 2\}. Then sup⁡H=2\sup H = \sqrt 2 and inf⁡H=−2\inf H = -\sqrt 2, neither in HH. (This uses that 2\sqrt 2 exists, proved next.)

Careful A supremum is not always a maximum

Every finite nonempty set has a maximum, and it is easy to slip into thinking of sup⁡E\sup E as "the largest element of EE". It is the smallest number that is ≥\geq every element, and it may not be in EE at all, as in (a), (b) and (d) above. Many arguments in analysis fail exactly here: if you need an element of EE equal to sup⁡E\sup E, you usually can't have one, but by Proposition 4.20 you can always have one within ε\varepsilon of it. Taking those elements for ε=1,12,13,…\varepsilon = 1, \tfrac12, \tfrac13, \dots gives a sequence in EE converging to sup⁡E\sup E, which is how 2A.9 Continuous Functions proves that continuous functions attain their maxima.

Two further remarks. First, the hypotheses of Theorem 4.19 are both needed. The empty set has every real as an upper bound and so no least one, and N\mathbb{N} has no upper bound in R\mathbb{R} at all (Archimedean property). In 2A.6 Sequences the symbols ±∞\pm\infty are added so that every set has a supremum, with sup⁡∅=−∞\sup \varnothing = -\infty and sup⁡N=+∞\sup \mathbb{N} = +\infty. Second, suprema interact simply with arithmetic: sup⁡(E+c)=sup⁡E+c\sup(E + c) = \sup E + c, sup⁡(cE)=csup⁡E\sup(cE) = c \sup E for c>0c > 0, and sup⁡(−E)=−inf⁡E\sup(-E) = -\inf E (Exercise 4.35).

Square roots and n-th roots exist

Theorem 4.22 Square roots exist

There is a unique positive real number xx with x2=2x^2 = 2. More generally, for every real y≥0y \geq 0 and positive integer nn there is a unique real x≥0x \geq 0 with xn=yx^n = y, written y1/ny^{1/n}.

Proof (For √2). Let E={x∈R:x≥0 and x2<2}E = \{x \in \mathbb{R} : x \geq 0 \text{ and } x^2 < 2\}. It contains 11 and is bounded above by 22 (if x>2x > 2 then x2>4x^2 > 4). Let s=sup⁡Es = \sup E; then 1≤s≤21 \leq s \leq 2. We rule out s2<2s^2 < 2 and s2>2s^2 > 2.

If s2<2s^2 < 2: for 0<δ<10 < \delta < 1, (s+δ)2=s2+2sδ+δ2≤s2+5δ(s + \delta)^2 = s^2 + 2s\delta + \delta^2 \leq s^2 + 5\delta, using s≤2s \leq 2 and δ2<δ\delta^2 < \delta. Choosing δ\delta with 5δ<2−s25\delta < 2 - s^2 gives (s+δ)2<2(s + \delta)^2 < 2, so s+δ∈Es + \delta \in E, contradicting that ss is an upper bound.

If s2>2s^2 > 2: for 0<δ<s0 < \delta < s, (s−δ)2≥s2−2sδ≥s2−4δ(s - \delta)^2 \geq s^2 - 2s\delta \geq s^2 - 4\delta. Choosing δ\delta with 4δ<s2−24\delta < s^2 - 2 gives (s−δ)2>2(s - \delta)^2 > 2, so every x∈Ex \in E satisfies x<s−δx < s - \delta (since x2<2<(s−δ)2x^2 < 2 < (s-\delta)^2), making s−δs - \delta a smaller upper bound, a contradiction.

So s2=2s^2 = 2. Uniqueness: if 0≤x<y0 \leq x < y then x2<y2x^2 < y^2, so two different non-negative reals can't have the same square.

The proof for nn-th roots is the same argument, with one extra tool to replace the expansion of (s±δ)2(s \pm \delta)^2.

Lemma 4.23 How much a power can change

If 0≤a≤b0 \leq a \leq b and n≥1n \geq 1, then 0≤bn−an≤n bn−1(b−a)0 \leq b^n - a^n \leq n\,b^{n-1}(b - a).

Proof. Multiply out to check the factorisation bn−an=(b−a)(bn−1+bn−2a+⋯+b an−2+an−1)b^n - a^n = (b - a)(b^{n-1} + b^{n-2}a + \cdots + b\,a^{n-2} + a^{n-1}); the terms telescope. The second factor has nn terms, each between 00 and bn−1b^{n-1} because 0≤a≤b0 \leq a \leq b. So it lies between 00 and nbn−1n b^{n-1}, and multiplying by b−a≥0b - a \geq 0 gives the claim.

Proof (Theorem, for n-th roots). Let y≥0y \geq 0, n≥1n \geq 1, and E={z∈R:z≥0 and zn≤y}E = \{z \in \mathbb{R} : z \geq 0 \text{ and } z^n \leq y\}. It contains 00. It is bounded above by B=max⁡(1,y)B = \max(1, y): if z>Bz > B then z>1z > 1, so zn≥z>yz^n \geq z > y. Let s=sup⁡Es = \sup E, so 0≤s≤B0 \leq s \leq B.

If sn<ys^n < y: for 0<δ≤10 < \delta \leq 1, Lemma 4.23 with a=sa = s, b=s+δb = s + \delta gives (s+δ)n≤sn+n(s+1)n−1δ(s + \delta)^n \leq s^n + n(s + 1)^{n-1}\delta. Choose δ\delta so small that n(s+1)n−1δ<y−snn(s + 1)^{n-1}\delta < y - s^n. Then (s+δ)n<y(s + \delta)^n < y, so s+δ∈Es + \delta \in E, contradicting that ss is an upper bound.

If sn>ys^n > y: then s>0s > 0. For 0<δ<s0 < \delta < s, Lemma 4.23 with a=s−δa = s - \delta, b=sb = s gives (s−δ)n≥sn−nsn−1δ(s - \delta)^n \geq s^n - n s^{n-1}\delta. Choose δ\delta with nsn−1δ<sn−yn s^{n-1}\delta < s^n - y. Then (s−δ)n>y(s - \delta)^n > y. Every z∈Ez \in E has zn≤y<(s−δ)nz^n \leq y < (s - \delta)^n, so z<s−δz < s - \delta (if z≥s−δ≥0z \geq s - \delta \geq 0 then zn≥(s−δ)nz^n \geq (s - \delta)^n). So s−δs - \delta is an upper bound smaller than ss, a contradiction.

Hence sn=ys^n = y. Uniqueness: if 0≤x<x′0 \leq x < x' then xn<x′nx^n < x'^n (by induction, as in 2A.3 Integers and Rationals), so at most one non-negative real has nn-th power yy.

Notice the shape of the argument, because it is the template for every "a solution exists" proof based on suprema. Define the candidate as the supremum of the set of points that are "not yet too big". Then rule out the two wrong answers: if the candidate fell short, you could go a little further; if it overshot, you could stop a little earlier. Both use an estimate of how much the function can change over a small step, here Lemma 4.23. The intermediate value theorem (2A.9 Continuous Functions) has exactly this proof.

Proposition 4.24 Laws of roots

Let x,y>0x, y > 0 and n,m≥1n, m \geq 1. Then:

  1. if x<yx < y then x1/n<y1/nx^{1/n} < y^{1/n};
  2. (xy)1/n=x1/ny1/n(xy)^{1/n} = x^{1/n}y^{1/n};
  3. (x1/n)1/m=x1/(nm)(x^{1/n})^{1/m} = x^{1/(nm)};
  4. if x>1x > 1 then x1/n>1x^{1/n} > 1, and if x<1x < 1 then x1/n<1x^{1/n} < 1.

Proof. Each follows from uniqueness: to show a non-negative number rr is z1/kz^{1/k}, it is enough to check rk=zr^k = z. (1) If x1/n≥y1/nx^{1/n} \geq y^{1/n} then, raising to the nn-th power, x≥yx \geq y; contrapositive. (2) (x1/ny1/n)n=(x1/n)n(y1/n)n=xy(x^{1/n}y^{1/n})^n = (x^{1/n})^n (y^{1/n})^n = xy. (3) ((x1/n)1/m)nm=(((x1/n)1/m)m)n=(x1/n)n=x\big((x^{1/n})^{1/m}\big)^{nm} = \Big(\big((x^{1/n})^{1/m}\big)^m\Big)^n = (x^{1/n})^n = x. (4) is (1) with y=1y = 1 or x=1x = 1, since 11/n=11^{1/n} = 1.

With nn-th roots in hand, rational powers yp/q:=(y1/q)py^{p/q} := (y^{1/q})^p are defined for y>0y > 0, and the usual laws hold (Exercise 4.34). Powers with irrational exponents, such as 222^{\sqrt 2}, need limits and are defined in 2A.6 Sequences (Tao's "real exponentiation, part II").

Decimal expansions

In everyday life a real number is its decimal expansion. This section connects that picture to the construction, and shows why the construction did not simply define a real number as an infinite decimal.

Proposition 4.25 Integer parts of reals

For every real xx there is a unique integer nn with n≤x<n+1n \leq x < n + 1, written ⌊x⌋\lfloor x \rfloor.

Proof. By the Archimedean property (Proposition 4.17) there are integers above xx and integers below xx (apply it to xx and to −x-x). Among the integers kk with k>xk > x, there is a smallest: shifting by a fixed integer below xx turns them into a nonempty set of natural numbers, which has a least element (2A.1 The Natural Numbers). Call it n+1n + 1. Then n+1>xn + 1 > x and, by minimality, n≤xn \leq x. Uniqueness is as for rationals (2A.3 Integers and Rationals).

Proposition 4.26 Every real is the formal limit of its decimal truncations

Let x≥0x \geq 0 be real, and for each nn let dn=⌊10nx⌋/10nd_n = \lfloor 10^n x \rfloor / 10^n, the truncation of xx to nn decimal places. Then

dn≤x<dn+10−n,d0≤d1≤d2≤⋯ ,d_n \leq x < d_n + 10^{-n}, \qquad d_0 \leq d_1 \leq d_2 \leq \cdots,

the sequence (dn)(d_n) is Cauchy, and x=LIM⁡dnx = \operatorname{LIM} d_n.

Proof. The first inequality is ⌊10nx⌋≤10nx<⌊10nx⌋+1\lfloor 10^n x \rfloor \leq 10^n x < \lfloor 10^n x \rfloor + 1, divided by 10n10^n. For monotonicity, 10⌊10nx⌋10\lfloor 10^n x \rfloor is an integer at most 10n+1x10^{n+1}x, so it is at most ⌊10n+1x⌋\lfloor 10^{n+1} x \rfloor; dividing by 10n+110^{n+1} gives dn≤dn+1d_n \leq d_{n+1}. For m≥nm \geq n, both dnd_n and dmd_m lie in [dn,dn+10−n)[d_n, d_n + 10^{-n}), since dn≤dm≤x<dn+10−nd_n \leq d_m \leq x < d_n + 10^{-n}, so ∣dn−dm∣<10−n|d_n - d_m| < 10^{-n}: the sequence is Cauchy. Finally 0≤x−dn<10−n0 \leq x - d_n < 10^{-n} for every nn, so by Lemma 4.16 (applied to the Cauchy sequence (dm)(d_m) with nn fixed, using dn≤dm≤dn+10−nd_n \leq d_m \leq d_n + 10^{-n} for m≥nm \geq n, after replacing the finitely many terms with m<nm < n by dnd_n, which doesn't change the formal limit) the real LIM⁡dm\operatorname{LIM} d_m lies in [dn,dn+10−n][d_n, d_n + 10^{-n}] along with xx. Two reals that lie in a common interval of length 10−n10^{-n} for every nn differ by at most 10−n10^{-n} for every nn, so by the Archimedean property they are equal.

The digits are dn−dn−1d_n - d_{n-1}, multiplied by 10n10^n, and each is one of 0,1,…,90, 1, \dots, 9 (Exercise 4.37). So every non-negative real has a decimal expansion, and the expansion determines the real.

Why not define real numbers as infinite decimals, then? Two reasons, both instructive.

  • Some reals have two expansions. 1.000…1.000\ldots and 0.999…0.999\ldots are the same real number: their truncations differ by 10−n10^{-n}, which tends to zero, so they are equivalent Cauchy sequences. Any decimal definition must identify such pairs, which is a quotient construction anyway, but a fiddly one, because it only affects expansions ending in repeated nines.
  • Arithmetic with decimals needs carries from infinitely far away. To find the first digit of 0.333…+0.666…0.333\ldots + 0.666\ldots, you must know whether a carry will ever arrive from the right, and that depends on all the digits. With Cauchy sequences, addition is term by term and needs no carries.

Base 10 is also arbitrary. The construction in this chapter uses no base at all, and the same real numbers have binary expansions, which is what computers approximate (Figure 4.6).

Completion

The idea Completion

The construction in this chapter has a shape that recurs again and again:

  1. Start with a space that has a notion of distance but has holes: here Q\mathbb{Q} with ∣x−y∣|x - y|.
  2. Take the sequences that "want to converge": the Cauchy sequences.
  3. Identify two of them when their distance tends to zero.
  4. The resulting quotient is a complete space, one in which every Cauchy sequence converges, and it contains the original space as a dense subset.

This is called the completion. The reals are the completion of the rationals.

That last property, completeness, is proved in 2A.6 Sequences: every Cauchy sequence of real numbers converges to a real number. Completing a second time produces nothing new. Completeness is what makes existence theorems possible, because to show something exists, it is enough to build a sequence of better and better approximations and check that it is Cauchy. The approximations needn't converge to anything you can write down.

Figure 4.5. The same construction twice. Top: the rationals completed to the reals (this chapter). Bottom, a preview: smooth functions, completed with respect to an energy distance, give a Sobolev space (4A.10 Sobolev Spaces), the setting in which the PDE of later courses are solved.
Where this goes Where completion returns

Computers don't use real numbers

The real numbers are an idealisation: infinitely many digits, infinitely precise. Machines can't store them. What computers use instead is a finite set of rationals, the floating-point numbers, standardised as IEEE 754.1 First published in 1985 and revised since. Almost all hardware today implements its "binary64" (double-precision) format. A double-precision number has a 53-bit binary significand and an exponent: numbers of the form ±m×2e\pm m \times 2^e with mm an integer below 2532^{53}.

That finite set lacks almost every property of this chapter:

  • It isn't closed under arithmetic. The exact sum or product of two floating-point numbers is usually not a floating-point number, so the machine rounds.
  • Familiar decimals aren't representable. 110\tfrac{1}{10} has the infinite binary expansion 0.0001100110011…0.0001100110011\ldots, so the number stored for 0.1 is 360287970189639736028797018963968\tfrac{3602879701896397}{36028797018963968}, which exceeds 110\tfrac{1}{10} by about 5.6×10−185.6 \times 10^{-18}. As a result 0.1 + 0.2 evaluates to 0.30000000000000004.
  • Addition isn't associative. In double precision, (0.1 + 0.2) + 0.3 gives 0.6000000000000001, but 0.1 + (0.2 + 0.3) gives 0.6.
  • It isn't complete, and has no least upper bounds in general. The numbers are spaced unevenly, closer near 00 and further apart for large values (Figure 4.6).
Figure 4.6. A toy floating-point system (4-bit significand): the representable numbers are rationals, spaced uniformly within each power-of-two range and twice as far apart in the next. The decimal 0.10.1 falls between two representable neighbours, 12128=0.09375\tfrac{12}{128} = 0.09375 and 13128=0.1015625\tfrac{13}{128} = 0.1015625, so the machine must round. Real double precision has 53 bits, but the picture is the same.

Numerical analysts manage these errors carefully, and usually they are harmless. The classic case where they were not shows how a tiny representation error can grow with time.

In the world Data The Patriot missile at Dhahran, 1991

On 25 February 1991, during the Gulf War, a Patriot air-defence battery at Dhahran, Saudi Arabia, failed to track and intercept an incoming Scud missile. The Scud hit an Army barracks and killed 28 American soldiers. A report by the US General Accounting Office (GAO/IMTEC-92-26, February 1992) traced the failure to time-keeping arithmetic. The system's clock counted time in tenths of a second as an integer. To be used in tracking calculations, that count had to be converted to seconds, a real number, in a computer whose registers were only 24 bits long. The conversion lost precision, and the error was proportional to how long the system had been running. The battery had been operating continuously for about 100 hours, and by then the error had moved the "range gate", the region where the radar looked for the target, so far that the Scud was outside it.

The mechanism, analysed by Robert Skeel (SIAM News, 1992), is that 110\tfrac{1}{10} has no finite binary expansion, so the constant 110\tfrac{1}{10} held in the register was chopped. The stored value was short of 110\tfrac{1}{10} by about 9.54×10−89.54 \times 10^{-8}. After 100100 hours, that is 3,600,0003{,}600{,}000 tenths of a second, the accumulated error is

3,600,000×9.54×10−8≈0.343 seconds,3{,}600{,}000 \times 9.54 \times 10^{-8} \approx 0.343 \text{ seconds},

which matches the GAO's figure of 0.34330.3433 seconds. A Scud travels at roughly Mach 5, and the GAO computed a shift in the range gate of about 687 metres. Israeli users had noticed the drift after 8 hours of operation, and the Army had prepared corrected software. It reached Dhahran on 26 February, the day after the attack.

Figure 4.7. Timing error and range-gate shift against hours of continuous operation, from the table in Appendix II of the GAO report. The error grows linearly, by about 0.00340.0034 seconds per hour, because the same chopped constant 110\tfrac{1}{10} is used at every tick. Beyond about 20 hours the target falls outside the range gate.

The lesson for this guidebook is not about computers. It is that a quantity known only to within a tolerance, multiplied by a large number, can produce a large error. Every estimate in analysis tracks exactly this: how errors in the inputs, multiplied by the sizes of other quantities, combine in the output. Proposition 4.10 did it in miniature, with the bound MM on the other factor.

History: two ways to fill the gaps

History Cuts and sequences

By the 1860s the rigorous foundations of calculus rested on the real numbers, which were still undefined. Within a few years several definitions appeared. Charles Méray (1869) and Georg Cantor (1872) defined reals through sequences of rationals that converge "among themselves", the construction in this chapter. Richard Dedekind's Stetigkeit und irrationale Zahlen ("Continuity and irrational numbers", 1872) took a different route: a real number is a cut, a way of splitting the rationals into a lower set and an upper set, with every element of the lower set less than every element of the upper set. The cut at 2\sqrt 2 puts every rational whose square is less than 22 (or which is negative) below, and the rest above. Dedekind's approach makes the least upper bound property almost immediate, while Cantor's makes completeness and the link to approximation natural. Both give the same real numbers, in the sense of Remark 4.27.

Remark 4.27 The reals are unique

Any two complete ordered fields can be matched up by a bijection that respects addition, multiplication and order. So, as with the natural numbers (2A.1 The Natural Numbers), it makes sense to speak of the real numbers, however they are built. From now on we use only the properties: R\mathbb{R} is an ordered field with the least upper bound property, containing Q\mathbb{Q} as a dense subset.

Recall Where we stand

The real numbers are the completion of the rationals: Cauchy sequences of rationals, identified when their difference tends to zero. They form an ordered field in which the rationals are dense and every bounded nonempty set has a least upper bound. Square roots and rational powers exist. The next chapter, 2A.5 Quantifiers and the Shape of a Proof, gives the quantifier sentences of this chapter ("for every ε\varepsilon there is an NN …") a chapter of their own, because from now on every definition is written in them.

Exercises

Exercise 4.28 Two names for √2

Show that the decimal truncations of 2\sqrt 2 and the Newton sequence of Proposition 4.3 are equivalent Cauchy sequences. (Define the truncations as in Example 4.2, without assuming 2\sqrt 2 exists.)

Hint

Let dnd_n be the truncation and xnx_n the Newton iterate. Both satisfy a squeeze: dn2<2<(dn+10−n)2d_n^2 < 2 < (d_n + 10^{-n})^2 and xn2>2x_n^2 > 2. Show 0<xn−dn≤(xn−2/xn)+10−n0 < x_n - d_n \leq (x_n - 2/x_n) + 10^{-n}, using that 2/xn2/x_n is less than any number whose square exceeds 22.

Solution

Both sequences are Cauchy (Example 4.2, Proposition 4.3). All quantities are positive rationals. Since dn2<2<xn2d_n^2 < 2 < x_n^2, we have dn<xnd_n < x_n. Next, 2/xn<dn+10−n2/x_n < d_n + 10^{-n}: if u,v>0u, v > 0 with u2>2u^2 > 2 and v2>2v^2 > 2, then uv>2uv > 2, so 2/v<u2/v < u. Apply this with u=dn+10−nu = d_n + 10^{-n}, v=xnv = x_n. Hence

0<xn−dn=(xn−2xn)+(2xn−dn)<enxn+10−n≤4−n+10−n0 < x_n - d_n = \Big(x_n - \frac{2}{x_n}\Big) + \Big(\frac{2}{x_n} - d_n\Big) < \frac{e_n}{x_n} + 10^{-n} \leq 4^{-n} + 10^{-n}

for n≥1n \geq 1, using the bound en≤4−ne_n \leq 4^{-n} and xn>1x_n > 1 from the proof of Proposition 4.3. Given ε>0\varepsilon > 0, choose NN with 4−N+10−N≤ε4^{-N} + 10^{-N} \leq \varepsilon; then ∣xn−dn∣≤ε|x_n - d_n| \leq \varepsilon for n≥Nn \geq N.

Exercise 4.29 Reciprocals are well defined

Suppose (an)(a_n) and (an′)(a'_n) are equivalent Cauchy sequences, both bounded away from zero (∣an∣,∣an′∣≥c>0|a_n|, |a'_n| \geq c > 0). Show that (1/an)(1/a_n) and (1/an′)(1/a'_n) are equivalent.

Solution

∣1/an−1/an′∣=∣an′−an∣/∣anan′∣≤∣an′−an∣/c2|1/a_n - 1/a'_n| = |a'_n - a_n|/|a_n a'_n| \leq |a'_n - a_n|/c^2. Given ε\varepsilon, choose NN with ∣an−an′∣≤c2ε|a_n - a'_n| \leq c^2 \varepsilon for n≥Nn \geq N.

Exercise 4.30 Eventually one sign

Let (an)(a_n) be Cauchy with ∣an∣≥c>0|a_n| \geq c > 0 for every nn. Show that from some point on, either all an≥ca_n \geq c or all an≤−ca_n \leq -c. Use this to complete the proof of Proposition 4.15.

Solution

Choose NN with ∣an−am∣<2c|a_n - a_m| < 2c for n,m≥Nn, m \geq N. For n≥Nn \geq N, each ana_n is either ≥c\geq c or ≤−c\leq -c, and two terms on opposite sides would differ by at least 2c2c. So all ana_n with n≥Nn \geq N are on the same side as aNa_N. The proof of Proposition 4.15 above uses the same idea with tolerance cc.

Exercise 4.31 Comparing with a real bound

Complete the proof of Lemma 4.16 when MM is real: if an≤Ma_n \leq M for every nn but x=LIM⁡an>Mx = \operatorname{LIM} a_n > M, use density (Proposition 4.17) to find a rational qq with M<q<xM < q < x, and apply the rational case.

Solution

With M<q<xM < q < x and qq rational, every an≤M<qa_n \leq M < q, so the rational case gives x≤qx \leq q, contradicting q<xq < x.

Exercise 4.32 Terms approach their formal limit

Let (an)(a_n) be a Cauchy sequence of rationals and x=LIM⁡anx = \operatorname{LIM} a_n. Show that for every rational ε>0\varepsilon > 0 there is NN with ∣an−x∣≤ε|a_n - x| \leq \varepsilon for all n≥Nn \geq N, where ∣an−x∣|a_n - x| is computed in R\mathbb{R}. This is the statement that the sequence converges to its own formal limit, used in the proof of Theorem 4.19.

Hint

an−xa_n - x is the real number LIM⁡m→∞(an−am)\operatorname{LIM}_{m \to \infty}(a_n - a_m), with nn fixed. For n≥Nn \geq N, all its terms with m≥Nm \geq N lie in [−ε,ε][-\varepsilon, \varepsilon].

Solution

Given ε>0\varepsilon > 0, choose NN with ∣an−am∣≤ε|a_n - a_m| \leq \varepsilon for n,m≥Nn, m \geq N. Fix n≥Nn \geq N. The real number an−xa_n - x is LIM⁡m(an−am)\operatorname{LIM}_m (a_n - a_m). Changing finitely many terms doesn't change a formal limit, so we may replace the terms with m<Nm < N by 00; then every term lies in [−ε,ε][-\varepsilon, \varepsilon]. By Lemma 4.16, −ε≤an−x≤ε-\varepsilon \leq a_n - x \leq \varepsilon, that is, ∣an−x∣≤ε|a_n - x| \leq \varepsilon.

Exercise 4.33 Infima

Define the infimum (greatest lower bound) of a set, and prove that every nonempty set of reals with a lower bound has one, by applying Theorem 4.19 to −E={−x:x∈E}-E = \{-x : x \in E\}.

Solution

A real mm is a lower bound for EE if m≤xm \leq x for every x∈Ex \in E, and II is the infimum, inf⁡E\inf E, if it is a lower bound and I≥mI \geq m for every lower bound mm. Now mm is a lower bound for EE exactly when −m-m is an upper bound for −E-E, since m≤x  ⟺  −x≤−mm \leq x \iff -x \leq -m. If EE is nonempty with a lower bound, −E-E is nonempty with an upper bound, so it has a supremum SS. Then −S-S is a lower bound for EE, and for any lower bound mm of EE, −m-m is an upper bound for −E-E, so S≤−mS \leq -m, that is, m≤−Sm \leq -S. So inf⁡E=−sup⁡(−E)\inf E = -\sup(-E). The ε\varepsilon-characterisation becomes: I=inf⁡EI = \inf E if and only if II is a lower bound and for every ε>0\varepsilon > 0 some x∈Ex \in E has x<I+εx < I + \varepsilon.

Exercise 4.34 Rational powers

Show that if y>0y > 0 and p/q=p′/q′p/q = p'/q' (positive integers q,q′q, q'), then (y1/q)p=(y1/q′)p′(y^{1/q})^p = (y^{1/q'})^{p'}, so yp/qy^{p/q} is well defined. Then show yr+s=yrysy^{r + s} = y^r y^s for rational r,sr, s.

Solution

Let u=(y1/q)pu = (y^{1/q})^p and v=(y1/q′)p′v = (y^{1/q'})^{p'}; both are positive. Using integer powers (2A.3 Integers and Rationals) and pq′=p′qpq' = p'q: uqq′=(y1/q)pqq′=((y1/q)q)pq′=ypq′u^{qq'} = (y^{1/q})^{pqq'} = \big((y^{1/q})^q\big)^{pq'} = y^{pq'}, and vqq′=((y1/q′)q′)p′q=yp′q=ypq′v^{qq'} = \big((y^{1/q'})^{q'}\big)^{p'q} = y^{p'q} = y^{pq'}. Two positive reals with the same qq′qq'-th power are equal (uniqueness of roots), so u=vu = v.

For the sum law, write r=p/qr = p/q and s=p′/qs = p'/q over a common denominator qq. Then yrys=(y1/q)p(y1/q)p′=(y1/q)p+p′=y(p+p′)/q=yr+sy^r y^s = (y^{1/q})^p (y^{1/q})^{p'} = (y^{1/q})^{p + p'} = y^{(p + p')/q} = y^{r+s}, using the law for integer powers.

Exercise 4.35 Suprema and arithmetic

Let EE be nonempty and bounded above, and cc real. Prove, using Proposition 4.20: (a) sup⁡(E+c)=sup⁡E+c\sup(E + c) = \sup E + c, where E+c={x+c:x∈E}E + c = \{x + c : x \in E\}; (b) sup⁡(cE)=csup⁡E\sup(cE) = c \sup E for c>0c > 0; (c) sup⁡(−E)=−inf⁡E\sup(-E) = -\inf E if EE is bounded below. (d) For nonempty bounded-above AA and BB, sup⁡(A+B)=sup⁡A+sup⁡B\sup(A + B) = \sup A + \sup B, where A+B={a+b:a∈A,b∈B}A + B = \{a + b : a \in A, b \in B\}.

Solution

(a) Let S=sup⁡ES = \sup E. Every x+c≤S+cx + c \leq S + c. Given ε\varepsilon, some x>S−εx > S - \varepsilon, so x+c>(S+c)−εx + c > (S + c) - \varepsilon. (b) Every cx≤cScx \leq cS. Given ε\varepsilon, some x>S−ε/cx > S - \varepsilon/c, so cx>cS−εcx > cS - \varepsilon. (c) This is Exercise 4.33 read backwards. (d) Let S=sup⁡AS = \sup A, T=sup⁡BT = \sup B. Every a+b≤S+Ta + b \leq S + T. Given ε\varepsilon, choose a>S−ε/2a > S - \varepsilon/2 and b>T−ε/2b > T - \varepsilon/2; then a+b>S+T−εa + b > S + T - \varepsilon. (The ε/2\varepsilon/2 trick again.)

Exercise 4.36 Irrationals are dense too

Show that between any two reals x<yx < y there is an irrational number. (Apply density of Q\mathbb{Q} to x/2<y/2x/\sqrt 2 < y/\sqrt 2.)

Solution

By Proposition 4.17 there is a rational qq with x/2<q<y/2x/\sqrt2 < q < y/\sqrt2, and we may take q≠0q \neq 0 (if the interval contains 00, apply density again to (0,y/2)(0, y/\sqrt 2)). Then x<q2<yx < q\sqrt 2 < y, and q2q\sqrt 2 is irrational: if it were a rational rr, then 2=r/q\sqrt 2 = r/q would be rational.

Exercise 4.37 Digits

With dnd_n as in Proposition 4.26, show that 10n(dn−dn−1)10^n(d_n - d_{n-1}) is an integer between 00 and 99. Then find the decimal truncations d0,…,d3d_0, \dots, d_3 of x=17x = \tfrac{1}{7} and of x=2x = \sqrt 2 (using 1.4142<2<1.41521.414^2 < 2 < 1.415^2).

Solution

10n(dn−dn−1)=⌊10nx⌋−10⌊10n−1x⌋10^n(d_n - d_{n-1}) = \lfloor 10^n x \rfloor - 10\lfloor 10^{n-1}x\rfloor is an integer, and it is ≥0\geq 0 by the monotonicity in Proposition 4.26. It is at most 99: ⌊10nx⌋≤10nx<10(⌊10n−1x⌋+1)\lfloor 10^n x \rfloor \leq 10^n x < 10(\lfloor 10^{n-1}x \rfloor + 1), so ⌊10nx⌋<10⌊10n−1x⌋+10\lfloor 10^n x \rfloor < 10\lfloor 10^{n-1} x\rfloor + 10, and an integer below that is at most 10⌊10n−1x⌋+910\lfloor 10^{n-1} x\rfloor + 9. For 17=0.142857…\tfrac17 = 0.142857\ldots: 0,0.1,0.14,0.1420, 0.1, 0.14, 0.142. For 2\sqrt 2: 1,1.4,1.41,1.4141, 1.4, 1.41, 1.414.

Exercise 4.38 Floating point, by hand

In a toy decimal system that keeps only 3 significant digits and rounds to nearest, compute (1000+0.4)+0.4(1000 + 0.4) + 0.4 and 1000+(0.4+0.4)1000 + (0.4 + 0.4). Explain why adding many small numbers to a large one, one at a time, can lose all of them, and why summing small numbers first helps. (2A.7 Series returns to this with Kahan's compensated summation.)

Solution

1000+0.4=1000.41000 + 0.4 = 1000.4 rounds to 10001000, and then 1000+0.41000 + 0.4 rounds to 10001000 again. But 0.4+0.4=0.80.4 + 0.4 = 0.8, and 1000+0.8=1000.81000 + 0.8 = 1000.8 rounds to 10011001. Each small addend on its own is below half the spacing of representable numbers near 10001000 (which is 11 here), so it is rounded away. Combined first, they cross the threshold.

Exercise 4.39 Rehearsal: an error that grows with time

The Patriot error was δ≈9.54×10−8\delta \approx 9.54 \times 10^{-8} seconds per tick, at 1010 ticks per second. (a) Find the time error after TT hours, and check it against the GAO's 0.02750.0275 seconds at 8 hours. (b) If the range gate tolerated a shift equal to 50 percent of its size, and the GAO estimated that this was reached at about 20 hours, how long a run would a register with twice as many bits (about 2−242^{-24} times the error per tick) have tolerated? (c) The same arithmetic, "small error per step × number of steps", governs the accuracy of numerical solutions of differential equations. 2B.10 Ordinary Differential Equations makes it precise with Gronwall's inequality, where the errors can also be amplified at every step.

Solution

(a) 36,000 T×9.54×10−8≈0.00343 T36{,}000\,T \times 9.54 \times 10^{-8} \approx 0.00343\,T seconds; at T=8T = 8 this is 0.02750.0275. (b) The error per tick scales by 2−242^{-24}, so the tolerable run time scales by 224≈1.7×1072^{24} \approx 1.7 \times 10^7, from 2020 hours to roughly 3.4×1083.4 \times 10^8 hours, about 38,00038{,}000 years.

Free resources for this chapter

Chosen for what this chapter covers, and all free to read or watch. Where a lecture covers more than this chapter, the minutes to watch are given, and the link starts there when it can. Links checked Nov 6, 2026.

Read

Watch 4 lectures and talks

© 2026 Neckpinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.