Calculus teaches how to use limits, derivatives and integrals. Real analysis asks why they work at all: what a real number is, what "gets arbitrarily close" means, and which hidden assumption makes the Intermediate Value Theorem or the convergence of ∑1/n2\sum 1/n^2 true. The answer, again and again, is one property of R\mathbb{R} that the rationals Q\mathbb{Q} lack: completeness, the fact that R\mathbb{R} has no gaps. This course rebuilds single-variable calculus on that one axiom, with proofs. It follows the standard undergraduate route of Abbott's Understanding Analysis, with Rudin's Principles of Mathematical Analysis, Bartle and Sherbert's Introduction to Real Analysis, Tao's Analysis I and Spivak's Calculus as parallel reading. This first post sets up the language of proof, the axioms of an ordered field, the supremum and the Axiom of Completeness, and its first consequences: the Archimedean property, density of Q\mathbb{Q}, the existence of 2\sqrt{2}, nested intervals, and the fact that R\mathbb{R} is uncountable.

Series map: 00 The Real Numbers & Completeness (this post) → 01 Sequences & Series → 02 Topology of ℝ & Continuity → 03 Differentiation & Taylor's Theorem → 04 The Riemann Integral → 05 Uniform Convergence & Power Series.


Learning Outcome

  • Read and write statements with the quantifiers "for all" (∀\forall) and "there exists" (∃\exists), and negate nested statements such as "for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 …" correctly.
  • Use the three core proof patterns — direct proof, proof by contradiction, and induction — and prove that 2\sqrt{2} is irrational.
  • List the ordered field axioms and prove the triangle inequality from them.
  • Define upper bound, supremum and infimum, and use the ε\varepsilon-characterization of the supremum.
  • State the Axiom of Completeness and explain why Q\mathbb{Q} fails it.
  • Prove the Archimedean property, the density of Q\mathbb{Q} in R\mathbb{R}, and the existence of 2\sqrt{2} in R\mathbb{R}.
  • State and prove the Nested Interval Property.
  • Show that Q\mathbb{Q} is countable and that R\mathbb{R} is uncountable (Cantor's diagonal argument), and describe the Cantor set.

Chapter 1 — Logic and proof

Analysis is written in a small, precise language. Most mistakes in a first analysis course are not mistakes about numbers; they are mistakes about quantifiers.

Terminology

  • Statement — a sentence that is either true or false, e.g. "77 is prime".
  • Implication "P⇒QP \Rightarrow Q" — "if PP then QQ". It is false only when PP is true and QQ is false.
  • Converse of P⇒QP \Rightarrow Q — the statement Q⇒PQ \Rightarrow P. It is a different statement and may be false.
  • Contrapositive of P⇒QP \Rightarrow Q — the statement ¬Q⇒¬P\neg Q \Rightarrow \neg P. It is logically equivalent to the original.
  • Universal quantifier ∀\forall — "for all". Existential quantifier ∃\exists — "there exists (at least one)".
  • Counterexample — one specific object that shows a "for all" statement is false.

Negating quantified statements

The two rules are:

¬(∀x, P(x))  ⟺  ∃x, ¬P(x),¬(∃x, P(x))  ⟺  ∀x, ¬P(x).\neg\big(\forall x,\ P(x)\big) \iff \exists x,\ \neg P(x), \qquad \neg\big(\exists x,\ P(x)\big) \iff \forall x,\ \neg P(x).

To negate a nested statement, move the ¬\neg from left to right, flipping every quantifier it passes, and negate the final condition. The definition of "the sequence (an)(a_n) converges to aa" (see Real Analysis 01) is

∀ε>0  ∃N∈N  ∀n≥N:  ∣an−a∣<ε.\forall \varepsilon > 0\ \ \exists N \in \mathbb{N}\ \ \forall n \ge N:\ \ \lvert a_n - a \rvert < \varepsilon.

Its negation, "(an)(a_n) does not converge to aa", is

∃ε>0  ∀N∈N  ∃n≥N:  ∣an−a∣≥ε.\exists \varepsilon > 0\ \ \forall N \in \mathbb{N}\ \ \exists n \ge N:\ \ \lvert a_n - a \rvert \ge \varepsilon.

In words: there is one fixed tolerance ε\varepsilon such that, however far out you go, some later term is still at least ε\varepsilon away from aa.

The same mechanical rule applies to continuity (see Real Analysis 02). "ff is continuous at cc" is ∀ε>0 ∃δ>0 ∀x: ∣x−c∣<δ⇒∣f(x)−f(c)∣<ε\forall \varepsilon > 0\ \exists \delta > 0\ \forall x:\ \lvert x - c\rvert < \delta \Rightarrow \lvert f(x) - f(c)\rvert < \varepsilon. Its negation is

∃ε>0  ∀δ>0  ∃x:  ∣x−c∣<δ  and  ∣f(x)−f(c)∣≥ε.\exists \varepsilon > 0\ \ \forall \delta > 0\ \ \exists x:\ \ \lvert x - c \rvert < \delta \ \text{ and } \ \lvert f(x) - f(c) \rvert \ge \varepsilon.

Note that the negation of an implication A⇒BA \Rightarrow B is "AA and not BB", not another implication.

Watch out: the order of quantifiers matters. "∀x ∃y: y>x\forall x\ \exists y:\ y > x" (every real number has a larger one) is true in R\mathbb{R}. "∃y ∀x: y>x\exists y\ \forall x:\ y > x" (one number is larger than all of them) is false. Swapping ∀\forall and ∃\exists changes the meaning completely. In analysis the classic example is uniform continuity (Real Analysis 02), which differs from continuity only by the position of one quantifier.

Three proof patterns

Direct proof. Assume the hypothesis, reach the conclusion by valid steps. Example: if mm and nn are even, m+nm + n is even. Write m=2am = 2a, n=2bn = 2b; then m+n=2(a+b)m + n = 2(a + b).

Contrapositive and contradiction. To prove P⇒QP \Rightarrow Q you may prove ¬Q⇒¬P\neg Q \Rightarrow \neg P instead. In a proof by contradiction you assume the statement is false and derive something impossible. Example: if n2n^2 is even, then nn is even. Contrapositive: if nn is odd, n=2k+1n = 2k + 1, then n2=4k2+4k+1=2(2k2+2k)+1n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1 is odd.

Induction. To prove P(n)P(n) for all n∈N={1,2,3,… }n \in \mathbb{N} = \{1, 2, 3, \dots\}, prove the base case P(1)P(1) and the inductive step P(n)⇒P(n+1)P(n) \Rightarrow P(n+1). This works because of the well-ordering principle: every nonempty subset of N\mathbb{N} has a least element (if PP failed somewhere, look at the least failure).

Example (Bernoulli's inequality). For every x≥−1x \ge -1 and every n∈Nn \in \mathbb{N}, (1+x)n≥1+nx(1 + x)^n \ge 1 + nx.

Proof. For n=1n = 1 both sides equal 1+x1 + x. Suppose (1+x)n≥1+nx(1+x)^n \ge 1 + nx. Since 1+x≥01 + x \ge 0, multiplying both sides by 1+x1 + x keeps the inequality:

(1+x)n+1≥(1+nx)(1+x)=1+(n+1)x+nx2≥1+(n+1)x,(1+x)^{n+1} \ge (1 + nx)(1 + x) = 1 + (n+1)x + nx^2 \ge 1 + (n+1)x,

because nx2≥0nx^2 \ge 0. ■\blacksquare

The hypothesis x≥−1x \ge -1 is used exactly once, to multiply an inequality by a non-negative number. Bernoulli's inequality is the standard tool for showing rn→0r^n \to 0 when ∣r∣<1\lvert r \rvert < 1 (Real Analysis 01).

The square root of 2 is irrational

Theorem. There is no rational number rr with r2=2r^2 = 2.

Proof. Suppose, for contradiction, that r=p/qr = p/q with integers p,qp, q, q≠0q \ne 0, and r2=2r^2 = 2. Cancel common factors, so that pp and qq are not both even. Then p2=2q2p^2 = 2q^2, so p2p^2 is even, and by the contrapositive example above pp is even: p=2kp = 2k. Substituting, 4k2=2q24k^2 = 2q^2, so q2=2k2q^2 = 2k^2 is even, and qq is even. Now pp and qq are both even, contradicting the choice of p/qp/q in lowest terms. ■\blacksquare

This is the first sign that Q\mathbb{Q} has gaps: the rationals whose square is less than 22 creep up towards a point that is not there.


Chapter 2 — Ordered fields and absolute value

Terminology

  • Field — a set FF with two operations ++ and ⋅\cdot satisfying the field axioms below.
  • Ordered field — a field with a relation << satisfying the order axioms below.
  • Absolute value — ∣x∣=x\lvert x \rvert = x if x≥0x \ge 0 and ∣x∣=−x\lvert x \rvert = -x if x<0x < 0.
  • Distance between xx and yy — the number ∣x−y∣\lvert x - y \rvert.

The axioms

A field satisfies, for all x,y,zx, y, z:

Axiom Addition Multiplication
Closure x+y∈Fx + y \in F xy∈Fxy \in F
Associative (x+y)+z=x+(y+z)(x+y)+z = x+(y+z) (xy)z=x(yz)(xy)z = x(yz)
Commutative x+y=y+xx + y = y + x xy=yxxy = yx
Identity x+0=xx + 0 = x 1⋅x=x1 \cdot x = x, with 1≠01 \ne 0
Inverse some −x-x has x+(−x)=0x + (-x) = 0 if x≠0x \ne 0, some x−1x^{-1} has xx−1=1x x^{-1} = 1
Distributive x(y+z)=xy+xzx(y+z) = xy + xz (links the two operations)

An ordered field also has a relation << such that:

  1. Trichotomy: for all x,yx, y exactly one of x<yx < y, x=yx = y, y<xy < x holds.
  2. Transitivity: x<yx < y and y<zy < z imply x<zx < z.
  3. Addition: x<yx < y implies x+z<y+zx + z < y + z.
  4. Multiplication: x<yx < y and 0<z0 < z imply xz<yzxz < yz.

Everything in high-school algebra follows. For example, x2≥0x^2 \ge 0 for all xx, and 0<10 < 1 (since 1=121 = 1^2 and 1≠01 \ne 0). If x<yx < y and z<0z < 0 then yz<xzyz < xz: multiplying by a negative number flips an inequality.

Both Q\mathbb{Q} and R\mathbb{R} are ordered fields. So these axioms cannot be what distinguishes them; Chapter 3 adds the one axiom that does.

The triangle inequality

Three facts about absolute value, all checked by cases on the signs: ∣xy∣=∣x∣∣y∣\lvert xy \rvert = \lvert x \rvert \lvert y \rvert; −∣x∣≤x≤∣x∣-\lvert x \rvert \le x \le \lvert x \rvert; and for a≥0a \ge 0, ∣x∣≤a  ⟺  −a≤x≤a\lvert x \rvert \le a \iff -a \le x \le a.

Theorem (triangle inequality). For all real x,yx, y: ∣x+y∣≤∣x∣+∣y∣\lvert x + y \rvert \le \lvert x \rvert + \lvert y \rvert.

Proof. Add −∣x∣≤x≤∣x∣-\lvert x \rvert \le x \le \lvert x \rvert and −∣y∣≤y≤∣y∣-\lvert y \rvert \le y \le \lvert y \rvert:

−(∣x∣+∣y∣)≤x+y≤∣x∣+∣y∣.-(\lvert x \rvert + \lvert y \rvert) \le x + y \le \lvert x \rvert + \lvert y \rvert.

By the third fact with a=∣x∣+∣y∣a = \lvert x \rvert + \lvert y \rvert, this says ∣x+y∣≤∣x∣+∣y∣\lvert x + y \rvert \le \lvert x \rvert + \lvert y \rvert. ■\blacksquare

Two forms are used constantly:

  • Distance form: ∣a−b∣≤∣a−c∣+∣c−b∣\lvert a - b \rvert \le \lvert a - c \rvert + \lvert c - b \rvert (put x=a−cx = a - c, y=c−by = c - b). Going from aa to bb via cc is never shorter.
  • Reverse triangle inequality: ∣∣x∣−∣y∣∣≤∣x−y∣\big\lvert \lvert x \rvert - \lvert y \rvert \big\rvert \le \lvert x - y \rvert. (From ∣x∣=∣(x−y)+y∣≤∣x−y∣+∣y∣\lvert x \rvert = \lvert (x - y) + y \rvert \le \lvert x - y \rvert + \lvert y \rvert, and the same with xx and yy swapped.)

Trick: almost every ε\varepsilon proof in this course is "add and subtract a middle term, then use the triangle inequality". When you see ∣anbn−ab∣\lvert a_n b_n - ab \rvert, write it as ∣anbn−anb+anb−ab∣\lvert a_n b_n - a_n b + a_n b - ab \rvert and split.

Proving that two numbers are equal

Lemma. Two real numbers aa and bb are equal if and only if for every ε>0\varepsilon > 0, ∣a−b∣<ε\lvert a - b \rvert < \varepsilon.

Proof. If a=ba = b then ∣a−b∣=0<ε\lvert a - b \rvert = 0 < \varepsilon. Conversely, suppose a≠ba \ne b. Then ε0=∣a−b∣>0\varepsilon_0 = \lvert a - b \rvert > 0, and ∣a−b∣<ε0\lvert a - b \rvert < \varepsilon_0 is false. ■\blacksquare

This is how analysis proves equalities: not by computing both sides, but by showing their distance is smaller than any positive tolerance.


Chapter 3 — Supremum, infimum and completeness

Terminology

  • Upper bound — bb is an upper bound of A⊆RA \subseteq \mathbb{R} if a≤ba \le b for every a∈Aa \in A. AA is bounded above if it has one.
  • Lower bound, bounded below — the same with ≥\ge. Bounded means bounded above and below.
  • Supremum (least upper bound) — s=sup⁡As = \sup A if (i) ss is an upper bound of AA, and (ii) s≤bs \le b for every upper bound bb of AA.
  • Infimum (greatest lower bound) — inf⁡A\inf A, defined the same way with the inequalities reversed.
  • Maximum — an element of AA that is an upper bound of AA. A set may have a supremum but no maximum.

A supremum is unique when it exists: if s1s_1 and s2s_2 are both least upper bounds, then s1≤s2s_1 \le s_2 and s2≤s1s_2 \le s_1.

Examples

Set AA sup⁡A\sup A Attained (a max)? inf⁡A\inf A
[0,1][0, 1] 11 yes 00
(0,1)(0, 1) 11 no 00
{1−1/n:n∈N}\{1 - 1/n : n \in \mathbb{N}\} 11 no 00 (a min)
{1/n:n∈N}\{1/n : n \in \mathbb{N}\} 11 yes 00 (not a min)
N\mathbb{N} none (not bounded above) — 11

For A={1−1/n}A = \{1 - 1/n\}: 11 is an upper bound since 1/n>01/n > 0. If b<1b < 1, the Archimedean property (Chapter 4) gives nn with 1/n<1−b1/n < 1 - b, so 1−1/n>b1 - 1/n > b and bb is not an upper bound. For example, b=0.85b = 0.85 is beaten by 1−17=67≈0.8571 - \tfrac17 = \tfrac67 \approx 0.857 (and n=7n = 7 is the first index that works, since 1−16≈0.8331 - \tfrac16 \approx 0.833). Hence sup⁡A=1\sup A = 1, and 1∉A1 \notin A.

The epsilon characterization

Lemma. Let ss be an upper bound of AA. Then s=sup⁡As = \sup A if and only if for every ε>0\varepsilon > 0 there is some a∈Aa \in A with s−ε<as - \varepsilon < a.

Proof. (⇒\Rightarrow) Let ε>0\varepsilon > 0. Since s−ε<ss - \varepsilon < s and ss is the least upper bound, s−εs - \varepsilon is not an upper bound. So some a∈Aa \in A has a>s−εa > s - \varepsilon.

(⇐\Leftarrow) Let bb be any upper bound with b<sb < s. Put ε=s−b>0\varepsilon = s - b > 0. By hypothesis some a∈Aa \in A has a>s−ε=ba > s - \varepsilon = b, contradicting that bb is an upper bound. So every upper bound bb satisfies b≥sb \ge s, and s=sup⁡As = \sup A. ■\blacksquare

In pictures: nothing in AA lies to the right of ss, but every window (s−ε,s](s - \varepsilon, s], however narrow, contains a point of AA.

Two number lines. Top: the set of numbers 1 minus 1 over n, with its supremum s equal to 1 marked as the least upper bound, other upper bounds to its right, and the window from s minus epsilon to s, which always contains a point of the set, so s minus epsilon is not an upper bound. Bottom: the rationals whose square is below 2 bunch up towards a gap at the square root of 2, so inside the rationals the set has no least upper bound

The Axiom of Completeness

Axiom of Completeness (least upper bound property). Every nonempty set of real numbers that is bounded above has a supremum in R\mathbb{R}.

R\mathbb{R} is defined to be an ordered field that satisfies this axiom. (Such a field exists and is unique up to an order-preserving isomorphism; the standard constructions use Dedekind cuts, as in Rudin Chapter 1, or Cauchy sequences of rationals, as in Tao Chapter 5. This course takes the axiom as the starting point, as Abbott does.)

The axiom for infima follows. If AA is nonempty and bounded below, then −A={−a:a∈A}-A = \{-a : a \in A\} is nonempty and bounded above, and inf⁡A=−sup⁡(−A)\inf A = -\sup(-A).

Why Q\mathbb{Q} fails the axiom. Let S={r∈Q:r2<2}S = \{r \in \mathbb{Q} : r^2 < 2\}. It is nonempty (1∈S1 \in S) and bounded above by 22. Suppose it had a least upper bound ss in Q\mathbb{Q}. The argument in Chapter 4 (existence of 2\sqrt{2}) shows that s2<2s^2 < 2 and s2>2s^2 > 2 are both impossible, so s2=2s^2 = 2; but no rational squares to 22. So SS has no supremum in Q\mathbb{Q}: the rationals have a hole exactly where 2\sqrt{2} should be. Concretely, 1,1.4,1.41,1.414,…1, 1.4, 1.41, 1.414, \ldots are in SS (their squares are below 22; for example 1.4142=1.9993961.414^2 = 1.999396), while 1.5,1.42,1.415,…1.5, 1.42, 1.415, \ldots are rational upper bounds (1.4152=2.0022251.415^2 = 2.002225). Every rational upper bound can be improved, and the two lists close in on a point that Q\mathbb{Q} does not contain.

Working with suprema

Two small results, each proved with the lemma above, are used often.

  • Shift: for c∈Rc \in \mathbb{R}, sup⁡(A+c)=sup⁡A+c\sup(A + c) = \sup A + c, where A+c={a+c:a∈A}A + c = \{a + c : a \in A\}. (If s=sup⁡As = \sup A, then s+cs + c is an upper bound of A+cA + c, and for each ε\varepsilon some a>s−εa > s - \varepsilon gives a+c>(s+c)−εa + c > (s + c) - \varepsilon.)
  • Order: if A⊆BA \subseteq B, AA is nonempty and BB is bounded above, then sup⁡A≤sup⁡B\sup A \le \sup B. (Every upper bound of BB is an upper bound of AA.)

Common pitfall: assuming sup⁡A∈A\sup A \in A. The supremum of (0,1)(0,1) is 11, which is not in the set. Proofs that pick "the largest element of AA" are wrong unless AA is finite or known to have a maximum.


Chapter 4 — First consequences of completeness

The Archimedean property

Theorem (Archimedean property).
(i) For every x∈Rx \in \mathbb{R} there is n∈Nn \in \mathbb{N} with n>xn > x.
(ii) For every y>0y > 0 there is n∈Nn \in \mathbb{N} with 1/n<y1/n < y.

Proof. (i) Suppose not: then xx is an upper bound of N\mathbb{N}, so by completeness α=sup⁡N\alpha = \sup \mathbb{N} exists. Then α−1\alpha - 1 is not an upper bound, so some n∈Nn \in \mathbb{N} has n>α−1n > \alpha - 1. But then n+1>αn + 1 > \alpha and n+1∈Nn + 1 \in \mathbb{N}, contradicting that α\alpha is an upper bound of N\mathbb{N}.
(ii) Apply (i) to x=1/yx = 1/y: some n>1/yn > 1/y, so 1/n<y1/n < y. ■\blacksquare

This property looks obvious, yet the proof needs completeness: there are ordered fields (for example suitably ordered fields of rational functions) with "infinitely large" elements, where it fails.

Density of the rationals

Theorem (density of Q\mathbb{Q}). For all real a<ba < b there is a rational rr with a<r<ba < r < b.

Proof. By the Archimedean property choose n∈Nn \in \mathbb{N} with 1/n<b−a1/n < b - a. Let mm be the least integer with m>nam > na (it exists by the Archimedean property and well-ordering), so m−1≤na<mm - 1 \le na < m. Then a<m/na < m/n, and

m≤na+1<na+n(b−a)=nb,m \le na + 1 < na + n(b - a) = nb,

using 1<n(b−a)1 < n(b - a). So a<m/n<ba < m/n < b. ■\blacksquare

The idea: steps of size 1/n1/n are shorter than the interval, so one of the points m/nm/n must land inside.

Corollary. The irrationals are dense too: between any a<ba < b there is an irrational number. (Find a rational r≠0r \ne 0 with a/2<r<b/2a/\sqrt{2} < r < b/\sqrt{2}; then r2r\sqrt{2} is irrational and lies in (a,b)(a, b).)

Existence of the square root of 2

Theorem. There is α∈R\alpha \in \mathbb{R} with α2=2\alpha^2 = 2.

Proof sketch. Let T={t∈R:t2<2}T = \{t \in \mathbb{R} : t^2 < 2\}. It is nonempty (1∈T1 \in T) and bounded above by 22 (if t>2t > 2 then t2>4t^2 > 4). Let α=sup⁡T\alpha = \sup T; note α≥1\alpha \ge 1. Show that the other two cases of trichotomy are impossible.

Case α2<2\alpha^2 < 2. For n∈Nn \in \mathbb{N},

(α+1n)2=α2+2αn+1n2≤α2+2α+1n.\left(\alpha + \tfrac{1}{n}\right)^2 = \alpha^2 + \frac{2\alpha}{n} + \frac{1}{n^2} \le \alpha^2 + \frac{2\alpha + 1}{n}.

Choose nn with 1n<2−α22α+1\frac{1}{n} < \frac{2 - \alpha^2}{2\alpha + 1} (Archimedean property). Then (α+1/n)2<2(\alpha + 1/n)^2 < 2, so α+1/n∈T\alpha + 1/n \in T, contradicting that α\alpha is an upper bound.

Case α2>2\alpha^2 > 2. Now (α−1n)2>α2−2αn\left(\alpha - \tfrac{1}{n}\right)^2 > \alpha^2 - \frac{2\alpha}{n}. Choose nn with 1n<α2−22α\frac{1}{n} < \frac{\alpha^2 - 2}{2\alpha}; then (α−1/n)2>2(\alpha - 1/n)^2 > 2, and α−1/n>0\alpha - 1/n > 0. Any t∈Tt \in T with t>α−1/n>0t > \alpha - 1/n > 0 would have t2>(α−1/n)2>2t^2 > (\alpha - 1/n)^2 > 2, which is impossible. So α−1/n\alpha - 1/n is an upper bound of TT smaller than α\alpha — a contradiction.

So α2=2\alpha^2 = 2. ■\blacksquare

The same argument, with Q\mathbb{Q} in place of R\mathbb{R}, is the proof that {r∈Q:r2<2}\{r \in \mathbb{Q} : r^2 < 2\} has no supremum in Q\mathbb{Q}: its supremum would have to square to 22. With more algebra it gives nn-th roots of every positive real.

The Nested Interval Property

Theorem (Nested Interval Property). For each n∈Nn \in \mathbb{N} let In=[an,bn]I_n = [a_n, b_n] be a closed bounded interval, with I1⊇I2⊇I3⊇⋯I_1 \supseteq I_2 \supseteq I_3 \supseteq \cdots. Then ⋂n=1∞In≠∅\bigcap_{n=1}^\infty I_n \ne \emptyset.

Proof. Nesting means a1≤a2≤⋯a_1 \le a_2 \le \cdots and ⋯≤b2≤b1\cdots \le b_2 \le b_1, and an≤bma_n \le b_m for all n,mn, m (with k=max⁡(n,m)k = \max(n,m): an≤ak≤bk≤bma_n \le a_k \le b_k \le b_m). So the set A={an:n∈N}A = \{a_n : n \in \mathbb{N}\} is nonempty and bounded above by every bmb_m. Let x=sup⁡Ax = \sup A. Then an≤xa_n \le x for all nn (upper bound) and x≤bmx \le b_m for all mm (each bmb_m is an upper bound and xx is the least). So x∈Inx \in I_n for every nn. ■\blacksquare

If in addition the lengths bn−anb_n - a_n shrink to 00, the intersection is exactly one point.

Watch out: both hypotheses are needed. The open intervals (0,1/n)(0, 1/n) are nested but their intersection is empty (any x>0x > 0 is excluded once 1/n<x1/n < x). The closed but unbounded intervals [n,∞)[n, \infty) are nested with empty intersection too. And in Q\mathbb{Q} the property fails: intervals of rationals closing in on 2\sqrt{2} have no common rational point.

Together with the Archimedean property, the Nested Interval Property is equivalent to the Axiom of Completeness. It is the version used in bisection arguments (Bolzano–Weierstrass in Real Analysis 01, the Intermediate Value Theorem in Real Analysis 02).


Chapter 5 — Countable and uncountable sets

Completeness makes R\mathbb{R} enormously larger than Q\mathbb{Q}, even though both are dense. Cardinality makes "larger" precise.

Terminology

  • Function f:A→Bf : A \to B — a rule assigning to each a∈Aa \in A one element f(a)∈Bf(a) \in B.
  • One-to-one (injective) — f(a1)=f(a2)f(a_1) = f(a_2) implies a1=a2a_1 = a_2.
  • Onto (surjective) — every b∈Bb \in B equals f(a)f(a) for some aa.
  • Bijection — one-to-one and onto. AA and BB have the same cardinality, written A∼BA \sim B, if a bijection A→BA \to B exists.
  • Countable — A∼NA \sim \mathbb{N} (an infinite list a1,a2,a3,…a_1, a_2, a_3, \dots with every element appearing exactly once). Uncountable — infinite and not countable.

The rationals are countable

First, Z\mathbb{Z} is countable: the list 0,1,−1,2,−2,3,−3,…0, 1, -1, 2, -2, 3, -3, \dots is the bijection f:N→Zf : \mathbb{N} \to \mathbb{Z} with f(n)=(n−1)/2f(n) = (n-1)/2 for odd nn and f(n)=−n/2f(n) = -n/2 for even nn.

Theorem. Q\mathbb{Q} is countable.

Proof. For each n∈Nn \in \mathbb{N} let AnA_n be the set of rationals that can be written as ±p/q\pm p/q in lowest terms with integers p≥0p \ge 0, q≥1q \ge 1 and p+q=np + q = n. For example A1={0}A_1 = \{0\}, A2={1,−1}A_2 = \{1, -1\}, A3={1/2,−1/2,2,−2}A_3 = \{1/2, -1/2, 2, -2\}. Each AnA_n is finite, the AnA_n are disjoint, and every rational lies in exactly one of them. List A1A_1, then A2A_2, then A3A_3, and so on. This list contains every rational exactly once, so it is a bijection with N\mathbb{N}. ■\blacksquare

The reals are uncountable

Theorem (Cantor, 1874; diagonal argument 1891). The interval (0,1)(0, 1), and hence R\mathbb{R}, is uncountable.

Proof. Every x∈(0,1)x \in (0,1) has a decimal expansion x=0.d1d2d3…x = 0.d_1 d_2 d_3 \ldots. It is unique if expansions ending in an infinite string of 99s are excluded (so 0.4999…0.4999\ldots is written 0.5000…0.5000\ldots). Suppose f:N→(0,1)f : \mathbb{N} \to (0,1) were onto, and write

f(1)=0. a11 a12 a13 a14…f(2)=0. a21 a22 a23 a24…f(3)=0. a31 a32 a33 a34…  ⋮\begin{aligned} f(1) &= 0.\,a_{11}\, a_{12}\, a_{13}\, a_{14} \ldots \\ f(2) &= 0.\,a_{21}\, a_{22}\, a_{23}\, a_{24} \ldots \\ f(3) &= 0.\,a_{31}\, a_{32}\, a_{33}\, a_{34} \ldots \\ &\ \ \vdots \end{aligned}

Define x=0.b1b2b3…x = 0.b_1 b_2 b_3 \ldots by bn=2b_n = 2 if ann≠2a_{nn} \ne 2 and bn=3b_n = 3 if ann=2a_{nn} = 2. This xx lies in (0,1)(0,1), its expansion has no 99s (so it is the unique allowed one), and it differs from f(n)f(n) in the nn-th digit for every nn. So x≠f(n)x \ne f(n) for all nn, and ff is not onto. ■\blacksquare

Since (0,1)∼R(0,1) \sim \mathbb{R} (for example via x↦tan⁡(πx−π/2)x \mapsto \tan(\pi x - \pi/2)), R\mathbb{R} is uncountable. Consequences:

  • The irrationals R∖Q\mathbb{R} \setminus \mathbb{Q} are uncountable (if they were countable, R\mathbb{R} would be a union of two countable sets, which is countable).
  • Almost all real numbers are irrational, even though the rationals are dense. Density is about where points are; cardinality is about how many.

Common pitfall: "the diagonal number might equal some f(n)f(n) with a different expansion". That is exactly why the proof uses the digits 22 and 33 only and excludes trailing 99s: the number xx has only one decimal expansion, so differing in a digit really means being a different number.

The Cantor set

Start with C0=[0,1]C_0 = [0,1]. Remove the open middle third to get C1=[0,13]∪[23,1]C_1 = [0, \tfrac13] \cup [\tfrac23, 1]. Remove the open middle third of each piece to get C2C_2, a union of 44 intervals of length 19\tfrac19. In general CnC_n is a union of 2n2^n closed intervals of length 3−n3^{-n}. The Cantor set is C=⋂n=0∞CnC = \bigcap_{n=0}^\infty C_n.

  • Length removed: at step kk you remove 2k−12^{k-1} intervals of length 3−k3^{-k}, so the total is ∑k=1∞2k−1/3k=1\sum_{k=1}^\infty 2^{k-1}/3^k = 1. The Cantor set has "length zero".
  • Many points survive: 00, 11, 13\tfrac13, 23\tfrac23 and every endpoint stay forever. So does 14\tfrac14, which is never an endpoint: in base 33, 14=0.020202…3\tfrac14 = 0.020202\ldots_3, since ∑k=1∞2/9k=2/8=1/4\sum_{k=1}^\infty 2/9^k = 2/8 = 1/4.
  • Uncountable: x∈Cx \in C exactly when xx has a base-33 expansion using only the digits 00 and 22. Replacing each 22 by 11 and reading the result in base 22 maps CC onto [0,1][0,1], so CC is uncountable.

The Cantor set is the standard example of a set that is "small" in length but "large" in cardinality. It returns in Real Analysis 02 as a closed, compact set that contains no interval.


Practice Exercises

1. Write the negation of: "for every M>0M > 0 there is N∈NN \in \mathbb{N} such that for all n≥Nn \ge N, an>Ma_n > M" (the definition of an→∞a_n \to \infty).

Solution

"There is M>0M > 0 such that for every N∈NN \in \mathbb{N} there is n≥Nn \ge N with an≤Ma_n \le M." In words: there is a level MM at or below which infinitely many terms stay.

2. Prove by induction that 1+2+⋯+n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2} for all n∈Nn \in \mathbb{N}.

Solution

Base: 1=1⋅221 = \frac{1 \cdot 2}{2}. Step: if 1+⋯+n=n(n+1)21 + \cdots + n = \frac{n(n+1)}{2}, then 1+⋯+n+(n+1)=n(n+1)2+(n+1)=(n+1)(n+2)21 + \cdots + n + (n + 1) = \frac{n(n+1)}{2} + (n+1) = \frac{(n+1)(n+2)}{2}, which is the formula for n+1n + 1.

3. Prove that 3\sqrt{3} is irrational.

Solution

First, if 33 divides n2n^2 then 33 divides nn: otherwise n=3k±1n = 3k \pm 1 and n2=9k2±6k+1n^2 = 9k^2 \pm 6k + 1 leaves remainder 11 on division by 33. Now suppose 3=p/q\sqrt{3} = p/q in lowest terms. Then p2=3q2p^2 = 3q^2, so 33 divides pp; write p=3kp = 3k. Then 9k2=3q29k^2 = 3q^2, so q2=3k2q^2 = 3k^2 and 33 divides qq. Both divisible by 33 contradicts lowest terms.

4. Find sup⁡A\sup A and inf⁡A\inf A for A={nn+1:n∈N}A = \left\{ \frac{n}{n+1} : n \in \mathbb{N} \right\} and prove your answer for the supremum.

Solution

inf⁡A=12\inf A = \frac12 (the minimum, at n=1n = 1, since nn+1=1−1n+1\frac{n}{n+1} = 1 - \frac{1}{n+1} increases with nn). sup⁡A=1\sup A = 1: it is an upper bound since nn+1<1\frac{n}{n+1} < 1. Given ε>0\varepsilon > 0, choose nn with 1n+1<ε\frac{1}{n+1} < \varepsilon (Archimedean); then nn+1=1−1n+1>1−ε\frac{n}{n+1} = 1 - \frac{1}{n+1} > 1 - \varepsilon. By the ε\varepsilon-characterization, sup⁡A=1\sup A = 1. It is not attained.

5. Let A,BA, B be nonempty and bounded above, and A+B={a+b:a∈A,b∈B}A + B = \{a + b : a \in A, b \in B\}. Prove sup⁡(A+B)=sup⁡A+sup⁡B\sup(A + B) = \sup A + \sup B.

Solution

Let s=sup⁡As = \sup A, t=sup⁡Bt = \sup B. For a∈Aa \in A, b∈Bb \in B: a+b≤s+ta + b \le s + t, so s+ts + t is an upper bound. Given ε>0\varepsilon > 0, pick a>s−ε/2a > s - \varepsilon/2 and b>t−ε/2b > t - \varepsilon/2; then a+b>(s+t)−εa + b > (s + t) - \varepsilon. By the ε\varepsilon-characterization, sup⁡(A+B)=s+t\sup(A + B) = s + t.

6. Show that the intervals In=(0,1/n]I_n = (0, 1/n] are nested but have empty intersection. Which hypothesis of the Nested Interval Property fails?

Solution

1/(n+1)<1/n1/(n+1) < 1/n gives In+1⊆InI_{n+1} \subseteq I_n. If x≤0x \le 0, x∉I1x \notin I_1. If x>0x > 0, choose nn with 1/n<x1/n < x (Archimedean); then x∉Inx \notin I_n. So the intersection is empty. The intervals are not closed (the left endpoint 00 is missing).

7. Show that the set of all finite subsets of N\mathbb{N} is countable, but the set P(N)\mathcal{P}(\mathbb{N}) of all subsets of N\mathbb{N} is not.

Solution

Finite subsets: for each nn, the subsets of {1,…,n}\{1, \dots, n\} form a finite collection (2n2^n sets), and every finite subset of N\mathbb{N} belongs to one of these collections. List the first collection, then the new sets of the second, and so on; this lists every finite subset exactly once. All subsets: suppose f:N→P(N)f : \mathbb{N} \to \mathcal{P}(\mathbb{N}) were onto. Let B={n:n∉f(n)}B = \{n : n \notin f(n)\}. If B=f(m)B = f(m), then m∈B  ⟺  m∉f(m)=Bm \in B \iff m \notin f(m) = B, a contradiction. (This is Cantor's theorem, the same diagonal idea.)


Cheat-sheet

Idea Statement Used for
Negation flip each quantifier, negate the final condition "does not converge", "not continuous"
Triangle inequality ∣x+y∣≤∣x∣+∣y∣\lvert x + y\rvert \le \lvert x\rvert + \lvert y\rvert splitting every ε\varepsilon estimate
Reverse triangle ∣∣x∣−∣y∣∣≤∣x−y∣\big\lvert \lvert x\rvert - \lvert y\rvert\big\rvert \le \lvert x - y\rvert lower bounds on ∣an∣\lvert a_n \rvert
Equality lemma a=ba = b iff ∣a−b∣<ε\lvert a - b\rvert < \varepsilon for all ε>0\varepsilon > 0 proving limits are unique
Supremum least upper bound; may not be in the set defining limits, integrals
ε\varepsilon-test upper bound ss, and some a>s−εa > s - \varepsilon for each ε\varepsilon every sup computation
Completeness nonempty + bounded above gives a sup in R\mathbb{R} the one axiom Q\mathbb{Q} lacks
Archimedean N\mathbb{N} unbounded; 1/n<y1/n < y for some nn choosing NN in limit proofs
Density a rational (and an irrational) in every (a,b)(a,b) Dirichlet function, approximation
Nested intervals closed, bounded, nested: nonempty intersection bisection proofs
Countable N\mathbb{N}, Z\mathbb{Z}, Q\mathbb{Q} listing arguments
Uncountable R\mathbb{R}, (0,1)(0,1), irrationals, Cantor set diagonal argument

What's next

Real Analysis 01 uses the Axiom of Completeness to study sequences and series: the ε\varepsilon–NN definition of a limit with an explicit NN, the Monotone Convergence Theorem (a supremum in disguise), Bolzano–Weierstrass (nested intervals in disguise), Cauchy sequences, and the convergence tests for infinite series, including why rearranging a series can change its sum.


References

  • Stephen Abbott, Understanding Analysis, 2nd edition, Springer (Undergraduate Texts in Mathematics), 2015 — Chapter 1 (the model for this post).
  • Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976 — Chapter 1 (ordered fields, construction of R\mathbb{R} by Dedekind cuts) and Chapter 2 (countable sets, the Cantor set).
  • Robert G. Bartle and Donald R. Sherbert, Introduction to Real Analysis, 4th edition, Wiley, 2011 — Chapters 1–2.
  • Terence Tao, Analysis I, 4th edition, Springer (Texts and Readings in Mathematics), 2022 — Chapters 2–5 (from the natural numbers to the construction of R\mathbb{R}).
  • Michael Spivak, Calculus, 4th edition, Publish or Perish, 2008 — Chapters 1–2 and 8 (least upper bounds).
  • MIT OpenCourseWare, 18.100A Real Analysis, Fall 2020 (Casey Rodriguez), lecture notes: https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/

Note: this post is in progress. Planned additions: a short construction of R\mathbb{R} by Dedekind cuts; a proof that the Nested Interval Property plus the Archimedean property implies completeness; and the Schröder–Bernstein theorem.