Analysis lecture notes

David Pierce

January 8, 2003

I first write these notes while preparing to give lectures on analysis (in METU’s course Math 271, year 2002/3, fall semester). Later I edit. However, some mistakes and inconsistencies may remain.

1 Fields

1.1 Definition of a field

A commutative (or abelian) group is a structure

(G, ∗,ˆ , e)

—where ∗ is a binary, ˆ a unary, and e a nullary operation—satisfying:

• ∀x ∀y x ∗ y = y ∗ x [commutativity],

• ∀x ∀y ∀z x ∗ (y ∗ z) = x ∗ y ∗ x [associativity],

• ∀x e ∗ x = x [identity element],

• ∀x x ∗ x̂ = e [inverses].

A field is a structure

(F, +, −, ·, 0, 1)

where F \ {0} is also equipped with ^{−1} such that

• (F, +, −, 0) and (F \ {0}, ·,^{−1}, 1) are commutative groups, and

• ∀x ∀y ∀z x · (y · z) = x · y + x · z [distributivity].

Exercise 1. Prove that a field satisfies:

∀x ∀y (xy = 0 → x = 0 ∨ y = 0) [no zero-divisors].

The set ℝ of real numbers is a field (when equipped with the usual operations).

1.2 Functions into a field

We shall be interested in functions from arbitrary sets into ℝ. Say S is a set, and f, g : S → ℝ are functions. Then we can use the field-operations to form new functions:

• f + g : x ↦ f(x) + g(x),

• &c.

Exercise 2. Let A be the set of all functions from S to ℝ. Which properties of fields does A have? For example, does it have no zero-divisors?

1.3 Polynomial and rational functions

Let X be a variable; we define

ℝ[X]

to be the set of polynomials in X with coefficients in ℝ. So a typical element of ℝ[X] is

a_{0} + a_{1}X + a_{2}X^{2} + ⋯ + a_{n}X^{n},

that is,

∑_{k=0}^{n} a_{k}X^{k},

where a_{k} ∈ ℝ. Any member f of ℝ[X] determines a function from ℝ to itself, namely

x ↦ f(x) : ℝ → ℝ.

In particular, X is the identity-function x ↦ x : ℝ → ℝ. Then ℝ[X] is the smallest set of functions from ℝ to itself that contains the identity-function and is closed under the field-operations induced from ℝ.

Note that the identity-function is not the multiplicative identity 1 or the additive identity 0. Also, in this definition, multiplicative inversion is not a fieldoperation. (It is an operation on the set of non-zero elements of a field.)

Say f ∈ ℝ[X]. What can we say about the set

{x ∈ ℝ : f(x) = 0}?

It is a consequence of the field-axioms that this set is finite (and is no bigger than the degree of f). Let 1/f be the function x ↦ f(x)^{−1}. Then 1/f is defined at all but finitely many points of ℝ.

The function 1/f is the multiplicative inverse of f (not the functional inverse, f^{−1}, which may not even exist). We can form the function g/f whenever g ∈ ℝ[X]. The set of all such functions is

ℝ(X),

the field of rational functions in X over ℝ.

1.4 Subfields

A field (F, +, −, ·, 0, 1) is a sub-field of a field (G, ⊕, ⊖, ⊙, 0′, 1′) if F ⊆ G, and

• x ⊕ y = x + y for all x and y in F,

• &c.

Then ℚ is a sub-field of ℝ; in fact, ℚ is the smallest sub-field of ℝ. Also, ℝ is a sub-field of ℂ; but ℤ/pℤ is not a sub-field of ℚ (or ℝ, or ℂ).

Each element a of ℝ can be considered as the function

x ↦ a : ℝ → ℝ.

In this way, ℝ is a sub-field of ℝ(X). Also, ℝ(X) is the smallest field that contains the identity-function and includes ℝ as a sub-field.

1.5 Ordered fields

An ordered field is a field with a binary relation ⩽ satisfying:

• ∀x x ⩽ x,

• ∀x ∀y (x ⩽ y ∧ y ⩽ x → x = y),

• ∀x ∀y ∀z (x ⩽ y ∧ y ⩽ z → x ⩽ z),

• ∀x ∀y (x ⩽ y ∨ y ⩽ x),

• ∀x ∀y ∀z (x ⩽ y → x + z ⩽ y + z),

• ∀x ∀y ∀z (x ⩽ y ∧ 0 ⩽ z → xz ⩽ yz).

Then ℝ is an ordered field. So is every subfield of ℝ, such as ℚ.

In an alternative definition, a field is ordered if it has a subset P that is closed under + and · such that the whole field is the disjoint union

{x : −x ∈ P } ⊔ {0} ⊔ P.

Then we write x < y just in case y − x ∈ P. The set P is the set of positive elements of the field.

Exercise 3. Prove the equivalence of the definitions.

1.6 Convexity and bounds

A set A in space is called convex if, for all points P and Q in A, the line segment joining P and Q lies within A.

A subset A of an ordered field K is convex if K satisfies

∀x ∀y ∀z (x ∈ A ∧ y ∈ A ∧ x ⩽ z ⩽ y → z ∈ A).

An upper bound for A is an element b of K such that

∀x (x ∈ A → x ⩽ b).

Likewise, lower bound. A set is bounded if it has an upper and a lower bound.

Exercise 4. An ordered field has exactly one convex subset that has no upper or lower bound. What is it?

An ordered field has intervals of nine kinds:

\begin{matrix}(−∞, b) & (−∞, b] & (−∞, ∞) \\ (a, b) & (a, b] & (a, ∞) \\ [a, b) & [a, b] & [a, ∞) \end{matrix}

where a < b. Here (−∞, b) = {x : x < b}, &c.; a square bracket means the corresponding end-point is contained in the interval.

Exercise 5. Prove that every interval is convex.

1.7 Completeness

An ordered field is complete if every subset with an upper bound has a least upper bound, also called a supremum. If it exists, the supremum of A is denoted

sup A.

We postulate that ℝ is complete, that is, ℝ is a complete ordered field.

An infimum is a greatest lower bound. The infimum of A, if it exists, is denoted

inf A.

Exercise 6. In ℝ, every convex set with at least two members is an interval. (This is not true in ℚ.)

Exercise 7. Here, P is the set of positive elements of ℝ.

(1) If ab ∈ P, what can you conclude about a and b?

(2) Write P as an interval.

(3) Prove that P is closed under x ↦ x^{−1}.

(4) Let f be a non-zero polynomial whose non-zero coefficients are positive. Show that P is closed under x ↦ f(x).

(5) If f ∈ ℝ[X], and P is closed under x ↦ f(x), can you conclude that f ∈ P [X]?

Exercise 8. Prove that, in a complete ordered field, all sets with lower bounds have infima.

1.8 Triangle inequalities

On any ordered field, we define the absolute-value function

x ↦ |x|

by the rule

|x| = \begin{cases}x, & if x ⩾ 0; \\ −x, & if x < 0. \end{cases}

Then

∀x ∀y (|x| ⩽ y ↔ −y ⩽ x ⩽ y).

Hence the triangle-inequality:

|x + y| ⩽ |x| + |y|

and the variants

||x| − |y|| ⩽ |x − y| ⩽ |x| + |y| .

Exercise 9. Prove the triangle-inequality (and variants).

1.9 The natural numbers

The set ℕ of natural numbers can be defined as the smallest subset of ℝ that contains 0 and that contains x + 1 whenever it contains x. (Any intersection of subsets with this property continues to have this property; so ℕ is the intersection of all subsets of ℝ with this property.)

Therefore, proof by induction works in ℕ: if A ⊆ ℕ, and 0 ∈ A, and x + 1 ∈ A whenever x ∈ A, then A = ℕ.

Exercise 10. Prove that ℕ is well-ordered, that is, every non-empty subset of ℕ has a least element.

The definition of ℕ works for any ordered field. (Why not a non-ordered field?)

1.10 Archimedean ordered fields

An ordered field is called Archimedean if ℕ has no upper bound in the field.

Theorem. ℝ is Archimedean.

Proof. Suppose A is a subset of ℕ with an upper bound in ℝ. Then A has a supremum. In particular, sup A − 1 is not an upper bound for A. Therefore

sup A − 1 < n

for some n in A. Hence sup A < n + 1, so n + 1 ∈ ℕ \ A. Thus A ≠ ℕ.

In short, every subset of ℕ with an upper bound is a proper subset of ℕ. So the whole set ℕ has no upper bound.

Exercise 11. Make ℝ(X) into a non-Archimedean ordered field such that

a ⩽ X

for all a in ℝ.

1.11 The integers

We can define the set ℤ of integers to be the set

{x ∈ ℝ : −x ∈ ℕ} ∪ ℕ.

Note that 0 is in both sets. The set ℤ is closed under + and − and ·.

Lemma. For every x in ℝ there is a unique integer n such that

x − 1 < n ⩽ x.

Proof. The numbers x and −x are not upper bounds for ℤ; hence also x is not a lower bound for ℤ. So let k be an integer such that k ⩽ x, and let

A = {m ∈ ℕ : k + m ⩽ x}.

Then 0 ∈ A, but A ≠ ℕ, so there is m in A such that m+1 ∉ A. Then k +m+1 is the desired integer n. There cannot be two such integers, since their difference would be a natural number between 0 and 1.

We can now define the greatest-integer function

x ↦ ⌊x⌋ : ℝ → ℤ

so that

x − 1 < ⌊x⌋ ⩽ x.

1.12 The rational numbers

The set ℚ of rational numbers is

{x ∈ ℝ : xy ∈ ℤ for some positive integer y}.

This is a field. Rational numbers exist in any ordered field.

Lemma. In an Archimedean ordered field, if

0 ⩽ x ⩽ r

for all positive rational numbers r, then x = 0.

Proof. For every positive x, there is a natural number n such that 1/x < n and therefore 1/n < x.

1.13 Open and closed sets

A subset A of ℝ is called open if, for every x in A, there is a positive real number ε such that

(x − ε, x + ε) ⊆ A.

A subset of ℝ is closed if its complement is open.

Exercise 12. The intervals (−∞, ∞), (−∞, b), (a, b) and (a, ∞) are open. The intervals (−∞, ∞), (−∞, b], [a, b] and [a, ∞) are closed. The set {a} is closed.

Lemma. If A is a closed subset of ℝ with an upper bound, then

sup A ∈ A.

Proof. Suppose b is an upper bound of A, but b ∉ A. Since A is closed, the set ℝ \ A is open. Therefore

(b − ε, b + ε) ⊆ ℝ \ A

for some positive ε. Hence b − ε is an upper bound for A. (The reason is that we have

A ⊆ (−∞, b],

but also

A ⊆ ℝ \ (b − ε, b + ε),

so

A ⊆ (−∞, b] \ (b − ε, b + ε) = (−∞, b − ε],

which means b − ε is an upper bound for A.) Thus b is not sup A. That is, no upper bound of A that is not in A is sup A; but sup A is an upper bound of A; therefore sup A is in A.

1.14 Sequences of sets

A sequence is a function on ℕ. A function n ↦ a_{n} : ℕ → S may also be written (a_{n} : n ∈ ℕ) or (a_{n})_{n} or just (a_{n}).

Theorem. Suppose (F_{n} : n ∈ ℕ) is a sequence of non-empty bounded closed subsets of ℝ such that

F_{n+1} ⊆ F_{n}

for all n in ℕ. Then

⋂_{n∈ℕ} F_{n} ≠ ∅.

Proof. Since F_{n} is bounded and empty, sup F_{n} exists; and sup F_{n} ∈ F_{n} by the last lemma, since F_{n} is closed. Then the set

{sup F_{n} : n ∈ ℕ}

is a subset of F_{0}, so it is bounded below by any lower bound of F_{0}. Hence this set of suprema has an infimum, say L. I claim that L ∈ F_{n} for each n in ℕ. To prove this, since F_{n} is closed, it is enough to show that

F_{n} ∩ (L − ε, L + ε) ≠ ∅

whenever ε > 0. But by definition of L, for each positive ε, there is m in ℕ such that

L ⩽ sup F_{m} < L + ε.

Let k = max{m, n}; then

L ⩽ sup F_{k} ⩽ sup F_{m} < L + ε

and sup F_{k} ∈ F_{k} ⊆ F_{n}. Therefore sup F_{k} ∈ F_{n} ∩ (L − ε, L + ε).

The sets F_{n} of the Theorem can be called nested, because each includes the next.

Example. Let F_{n} = {x ∈ ℝ : |x^{2} − 2| ⩽ 1/n}. Then each F_{n} is non-empty, closed and bounded, and F_{n+1} ⊆ F_{n}, so

⋂_{n∈ℕ} F_{n} ≠ ∅.

In fact, the intersection is {±√2}.

Exercise 13. The Theorem puts four conditions on the sequence of nested sets F_{n}: each F_{n} must

(1) be non-empty,

(2) be closed,

(3) have an upper bound, and

(4) have a lower bound.

Show that each of these conditions is necessary (that is, if any one of them is removed, then the theorem cannot be proved).

Note that the theorem is true in any complete ordered field. The next theorem gives an alternative definition for complete.

Theorem. Suppose K is an Archimedean ordered field, and suppose that

⋂_{n∈ℕ}[a_{n}, b_{n}] ≠ ∅

whenever ([a_{n}, b_{n}] : n ∈ ℕ) is a sequence of nested closed intervals of K. Then K is a complete ordered field.

Proof. Let C be a subset of K with element a and upper bound b. We shall recursively define a nested sequence ([a_{n}, b_{n}] : n ∈ ℕ) in the following way. First,

[a_{0}, b_{0}] = [a, b].

Then [a_{0}, b_{0}] contains a member of C and an upper bound of C. Suppose [a_{k}, b_{k}] has been defined and contains a point of C and an upper bound of C. Then one of the intervals

[a_{k}, \frac{a_{k} + b_{k}}{2} ] , [\frac{a_{k} + b_{k}}{2} , b_{k}]

has the same property (why?). Let [a_{k+1}, b_{k+1}] be this interval. If both intervals have this property, then we can just define

[a_{k+1}, b_{k+1}] = [a_{k}, \frac{a_{k} + b_{k}}{2} ] .

By assumption, there is some c in ⋂_{n∈ℕ}[a_{n}, b_{n}]. Then c is an upper bound of C (why?), and no upper bound of C is less than c (why?). Therefore c = sup C.

Exercise 14. Supply the missing details in the proof of the last theorem.

1.15 Different treatments of the real numbers

We have treated ℝ axiomatically. That is, we have written down

• axioms for fields,

• additional axioms for ordered fields, and finally

• the completeness axiom for fields.

Then we have declared that ℝ is a complete ordered field.

The alternative approach is constructive. Here, one starts with ℕ—as given by axioms, namely

• 0 ≠ n + 1 for any n in ℕ,

• ∀x ∀y (x + 1 = y + 1 → x = y), and

• for all subsets A of ℕ, if 0 ∈ A, and n + 1 ∈ A whenever n ∈ A, then A = ℕ.

Then, using ℕ, one defines ℤ and the Archimedean ordered field ℚ. Finally, it is possible to define an ordered field-structure on the set of all convex open subsets of ℚ that have upper but not lower bounds. The result is a complete ordered field, and ℝ can be defined to be this field.

Again, we are taking the axiomatic approach to ℝ, and not the constructive approach. But we shall see presently why the constructive approach works.

A subset A of an ordered field K is called dense in K if every interval of K contains an element of A.

Lemma. ℚ is dense in ℝ.

Proof. It is enough to show that if a, b ∈ ℝ and a < b, then a < c < b for some c in ℚ. But since a < b, we have 0 < b − a. From an earlier lemma, since ℝ is Archimedean, we conclude that some positive rational number r satisfies r < b − a. We may assume (why?) that r = 2/n for some natural number n. Then nb − na > 2. Therefore

na < ⌊nb⌋ − 1 < ⌊nb⌋ ⩽ nb

(why?). Finally, a < (⌊nb⌋ − 1)/n < b, and (⌊nb⌋ − 1)/n ∈ ℚ.

Theorem. There is a one-to-one correspondence between:

• real numbers, and

• convex open subsets of ℚ that are bounded above, but not below.

Proof. The correspondence is given by the function

x ↦ {r ∈ ℚ : r < x}

(why?).

Exercise 15. Supply the details in the proof of the last theorem.

(If A is a convex subset of ℚ with an upper but not a lower bound, then the pair (A, ℚ \ A) is called a cut. It was Dedekind who first defined the real numbers in terms of cuts.)

1.16 Topology of the real numbers

Topology is the study of open and closed sets as such.

Theorem. ℝ and ∅ are open subsets of ℝ. If A and B are open subsets of ℝ, then so is A ∩ B. If {U_{i} : i ∈ I} is a family of open subsets of ℝ, then the union

⋃_{i∈I} U_{i}

is open.

Proof. It is trivial that ℝ and ∅ are open. If A and B are open, and x ∈ A ∩ B, then x ∈ A and x ∈ B, so there are positive reals ε_{A} and ε_{B} such that

(x − ε_{S}, x + ε_{S}) ⊆ S

when S ∈ {A, B}. Let ε = min{ε_{A}, ε_{B}}; then

(x − ε, x + ε) ⊆ A ∩ B.

Thus A ∩ B is open. Finally, if U_{i} is open for each i in the index-set I, and x ∈ ⋃_{i∈I} U_{i}, then x ∈ U_{i} for some i in I, so (x − ε, x + ε) ⊆ U_{i}, and therefore

(x − ε, x + ε) ⊆ ⋃_{i∈I} U_{i}.

Therefore ⋃_{i∈I} U_{i} is open.

Exercise 16. Prove that:

• ℝ and ∅ are closed subsets of ℝ;

• if A and B are closed subsets of ℝ, then so is A ∪ B;

• if {F_{i} : i ∈ I} is a family of closed subsets of ℝ, then the intersection

⋂_{i∈I} F_{i}

is closed.

An arbitrary intersection of open sets may not be open:

Example. ⋂_{n∈ℕ} (−\frac{1}{n + 1}, \frac{1}{n + 1}) = \{0\}.

Exercise 17. Show that the only subsets of ℝ that are both open and closed are ∅ and ℝ itself.

(The exercise shows that ℝ is connected.)

1.17 The Cantor set

By definition, a non-empty open subset of ℝ includes an open interval. Does a non-empty closed set include a closed interval?

No. Every set {x} is closed; hence (by an exercise) every finite set is closed. The infinite set ℤ is closed; so is the infinite bounded set

\{0\} ∪ \{\frac{1}{n + 1} : n ∈ ℕ\}.

But none of these sets includes an interval.

We can obtain a ‘large’ bounded closed set that includes no intervals in the following way. Start with a closed interval. Remove an open interval, so two closed intervals remain. Remove an open interval from each of these, and continue. In the end, no interval can remain.

More precisely, we define the Cantor set as the intersection

⋂_{n∈ℕ} F_{n},

where

F_{0} = [0, 1] ,

F_{1} = [0, \frac{1}{3}] ∪ [\frac{2}{3}, 1] ,

F_{2} = [0, \frac{1}{9}] ∪ [\frac{2}{9}, \frac{1}{3}] ∪ [\frac{2}{3}, \frac{7}{9}] ∪ [\frac{8}{9}, 1] ,

and so on.

How can we make the words ‘and so on’ precise? We want F_{0} to be [0, 1], and we want each F_{n} to be the disjoint union of 2^{n} intervals of length 1/3^{n}. If [a, b] is one of these intervals, then

[a, \frac{1}{3}(2a + b)] and [\frac{1}{3}(a + 2b), b]

should be among the intervals that make up F_{n+1}.

Then in fact we can define

F_{n} = ⋃ \{[∑_{i<n} \frac{2e_{i}}{3^{1+i}} , ∑_{i<n} \frac{2e_{i}}{3^{1+i}} + \frac{1}{3^{n}} ] : e_{0}, …, e_{n−1} ∈ \{0, 1\}\} .

Exercise 18. Show that, under our definition, F_{n} meets the desired conditions. Then show that the Cantor set is closed, but none of its subsets is an interval.

1.18 Binary expansions

Let 2^{ℕ} stand for the set of sequences (a_{n} : n ∈ ℕ) such that a_{n} ∈ {0, 1} in each case.

Theorem. For each real number x in the interval [0, 2) there is a unique sequence (a_{n}) in 2^{ℕ} such that

x ∈ [∑_{k=0}^{n} \frac{a_{k}}{2^{k}} , ∑_{k=0}^{n} \frac{a_{k}}{2^{k}} + \frac{1}{2^{n}} )  (1)

for each n in ℕ, and for each n there is k such that k > n and a_{k} = 0. In fact, x is the unique real number that satisfies (1) in each case. Conversely, suppose (a_{n} : n ∈ ℕ) is an element of 2^{ℕ} such that, for all n, there is k such that k > n and a_{k} ≠ 0. Then there is a real number x satisfying (1) in each case.

Proof. Define (a_{n}) recursively, as in the proof that an Archimedean ordered field is complete if every sequence of nested bounded closed intervals has non-empty intersection. So, we first define

a_{0} = \begin{cases}0, & if x ∈ [0, 1); \\ 1, & if x ∈ [1, 2). \end{cases}

Then x ∈ [a_{0}, a_{0} + 1). Suppose a_{k} have been chosen when k ⩽ n so that

x ∈ [a_{0} + \frac{a_{1}}{2} + \frac{a_{2}}{2^{2}} + ⋯ + \frac{a_{n}}{2^{n}} , a_{0} + \frac{a_{1}}{2} + \frac{a_{2}}{2^{2}} + ⋯ + \frac{a_{n} + 1}{2^{n}}) .

Write b_{n} for ∑_{k=0}^{n} a_{k}/2^{k}; so x ∈ [b_{n}, b_{n} + 1/2^{n}). Then define

a_{n+1} = \begin{cases}0, & if x ∈ [b_{n}, b_{n} + 1/2^{n+1}); \\ 1, & if x ∈ [b_{n} + 1/2^{n+1}, b_{n} + 1/2^{n}). \end{cases}

By recursion, a_{n} is defined for all n in ℕ. Also, x is the unique member of the intersection

⋂_{n∈ℕ} [∑_{k=0}^{n} \frac{a_{k}}{2^{k}} , ∑_{k=0}^{n} \frac{a_{k}}{2^{k}} + \frac{1}{2^{n}} )

(why?). The converse holds as well (why?).

Exercise 19. Complete the last proof.

With x and a_{n} as in the theorem, we can write

x = ∑_{n∈ℕ} \frac{a_{n}}{2^{n}} .

Example. By the high-school rule for the sum of a geometric series, we have

∑_{n∈ℕ} \frac{1}{4^{n}} = \frac{1}{1 − \frac{1}{4}} = \frac{4}{3}.

We haven’t formally proved this rule. However, we can show by induction that

\frac{4}{3} − ∑_{k=0}^{n} \frac{1}{4^{k}} = \frac{1}{3 · 4^{n}}

for each n in ℕ. Hence

\frac{4}{3} ∈ [∑_{k=0}^{n} \frac{1}{4^{k}} + \frac{1}{4 · 4^{n}} , ∑_{k=0}^{n} \frac{1}{4^{k}} + \frac{1}{2 · 4^{n}} ) .

Note that 1/4^{k} = 1/2^{2k} + 0/2^{2k+1}. So define

a_{j} = \begin{cases}1, & if j is even; \\ 0, & if j is odd. \end{cases}

Then

\frac{4}{3} ∈ [ ∑_{j=0}^{2n+1} \frac{a_{j}}{2^{j}} , ∑_{j=0}^{2n+1} \frac{a_{j}}{2^{j}} + \frac{1}{2^{2n+1}} ) ⊆ [∑_{j=0}^{2n} \frac{a_{j}}{2^{j}} , ∑_{j=0}^{2n} \frac{a_{j}}{2^{j}} + \frac{1}{2^{2n}} ) .

By the theorem, we have

\frac{4}{3} = ∑_{j∈ℕ} \frac{a_{j}}{2^{j}} .

Exercise 20. Give the proof by induction mentioned in the example. More generally, prove

\frac{x}{x − 1} − ∑_{k=0}^{n} \frac{1}{x^{n}} = \frac{1}{(x − 1)x^{n}}

when x is not 0 or 1.

In general, if b is an integer greater than 1, then for each x in [0, b) there is a sequence (c_{n} : n ∈ ℕ) of elements of {0, 1, 2, …, b − 1} such that x can be written as the infinite sum

∑_{n∈ℕ} \frac{c_{n}}{b^{n}} .

If b = 10, then we get the usual decimal expansion

c_{0}.c_{1}c_{2}c_{3} …

of a number in [0, 10).

1.19 Cardinality

The Cantor set is large in the sense that it is uncountable.

Two sets A and B have the same cardinality, or are equipollent, if there is a bijection from A to B. In this case we write

A ≈ B.

If there is an injection from C to D, we write

C ≼ D;

if also C and D are not equipollent, then we write

C ≺ D.

Theorem. A ≺ 𝒫(A).

Proof. The map x ↦ {x} : A → 𝒫(A) is an injection, so A ≼ 𝒫(A). Suppose f : A → 𝒫(A) is an injection. Let

B = {x ∈ A : x ∉ f(x)}.

If x ∈ B, then x ∉ f(x), so B ≠ f(x). If x ∈ A \ B, then x ∈ f(x), so B ≠ f(x). Thus B is not in the range of f, so f is not a bijection.

Theorem (Schröder–Bernstein). A ≼ B ∧ B ≼ A ⟹ A ≈ B.

A set A is called countable if

A ≼ ℕ,

and uncountable if ℕ ≺ A. It is a consequence of the Axiom of Choice of set theory that every set is countable or uncountable in this sense.

Theorem. ℤ and ℚ are countable.

Proof. By the Schröder–Bernstein theorem, since ℕ ⊆ ℤ ⊆ ℚ, it is enough to show that ℚ ≼ ℤ ≼ ℕ. The function

n ↦ 2 |n| + \frac{n + |n|}{2 |n|} : ℤ → ℕ

January 8, 2003, Analysis notes 13

is injective, so ℤ ≼ ℕ. Let

p_{0}, p_{1}, p_{2}, …

be the list of prime numbers. Each rational number x can be written

±\frac{p_{0}^{a_{0}} · p_{1}^{a_{1}} ⋯ p_{k−1}^{a_{k−1}}}{p_{0}^{b_{0}} · p_{1}^{b_{1}} ⋯ p_{k−1}^{b_{k−1}}} ,

for some k in ℕ, where the a_{i} and b_{i} are in ℕ, and

a_{i}b_{i} = 0

in each case. Then define f(x) to be

±p_{0}^{a_{0}} · p_{1}^{b_{0}} · p_{2}^{a_{1}} · p_{3}^{b_{1}} ⋯ p_{2k−2}^{a_{k−1}} · p_{2k−1}^{b_{k−1}}.

The function f is an injection from ℚ to ℤ, so ℚ ≼ ℤ. Lemma. 𝒫(ℕ) ≈ 2^{ℕ}. Proof. If A ⊆ ℕ, let χ_{A} be the function

n ↦ \begin{cases}1, & if n ∈ A; \\ 0, & if n ∉ A \end{cases}

mapping ℕ into {0, 1}. Then the function

A ↦ χ_{A} : 𝒫(ℕ) → 2^{ℕ}

is a bijection. Lemma. The Cantor set is equipollent with 2^{ℕ}. Proof. Let f be the function from 2^{ℕ} to ℝ such that f(e_{n} : n ∈ ℕ) is the unique element of the intersection

⋂_{n∈ℕ} [∑_{i<n} \frac{2e_{i}}{3^{1+i}} , ∑_{i<n} \frac{2e_{i}}{3^{1+i}} + \frac{1}{3^{n}} ] .

Then f is injective, and its range is the Cantor set. Hence the Cantor set, and therefore ℝ itself, are uncountable. Theorem. ℝ ≈ 𝒫(ℕ). Proof. We have 2^{ℕ} ≼ ℝ by the last lemma. Also, [0, 2) ≼ 2^{ℕ} by the last section. But the function f on ℝ given by

f(x) = \begin{cases}1/(x + 1), if 0 ⩽ x; \\ (2x − 1)/(x − 1), if x < 0 \end{cases}

is a bijection between ℝ and (0, 2) (why?); so ℝ ≼ [0, 2). All together, we have

ℝ ≼ 2^{ℕ} ≼ ℝ,

so R ≈ 2^{ℕ} by the Schröder–Bernstein theorem. Exercise 21. Answer the ‘why’ in the last proof, without using calculus.

1.20 Supplementary exercises

Here are some supplementary exercises.

Exercise A. Prove that definition by recursion is valid. That is, if S is a set, and b ∈ S, and f : ℕ × S → S is a function, then there is a unique sequence (a_{n} : n ∈ ℕ) such that:

• a_{0} = b, and

• a_{n+1} = f(n, a_{n}) for all n in ℕ.

Exercise B. By recursion, define the powers x^{n}, where n ∈ ℕ and x is in a field.

Exercise C. Define n! by recursion.

Exercise D. Prove that x^{n+1} − y^{n+1} = (x − y) ∑_{k=0}^{n} x^{n−k}y^{k} for all n in ℕ and all x and y in a field.

Exercise E. Prove that the set ℝ \ ℚ of irrational numbers is dense in ℝ.

Exercise F. Prove that if x < 0, then there is no real number y such that y^{2} = x.

Exercise G. Prove that for every positive real number x there is a unique positive real number y such that y^{2} = x. (The number y is then denoted √x.)

Exercise H. If n is a positive integer, and √n is not an integer, then √n is irrational.

Exercise I. Let (F_{n} : n ∈ ℕ) be the Fibonacci sequence, defined recursively by:

• F_{0} = F_{1} = 1, and

• F_{n+2} = F_{n} + F_{n+1}.

Let ϕ_{0} and ϕ_{1} be the roots of the polynomial X^{2} − X − 1 = 0. Show that ϕ_{1} = −1/ϕ_{0}, and show that

F_{n} = \frac{ϕ_{0}^{n+1} − ϕ_{1}^{n+1}}{ϕ_{0} − ϕ_{1}} .

Exercise J. Find the extrema of the following subsets of ℝ:

• {11^{a} + 13^{b} : a, b ∈ ℤ ∧ a, b < 0};

• {x : x^{2} − x + 1 < 0};

• {x : (x − 17)(x − 3)(x + 1)(x − 19) < 0}.

Exercise K. If A and B are subsets of ℝ bounded above, and are bounded below by 0, prove that {ab : a ∈ A ∧ b ∈ B} is bounded above, with supremum sup A sup B.

2 Metric spaces

2.1 Euclidean spaces

If n ∈ ℕ, we can define ℝ^{n} to be the set of all ordered n-tuples

(a_{0}, …, a_{n−1}),

where a_{i} ∈ ℝ in each case. Otherwise, ℝ^{n} can be described as the Cartesian product

\underbrace{ℝ × ⋯ × ℝ}_{n} .

The n-tuple (a_{0}, …, a_{n−1}) can be abbreviated a; it might be called a point of ℝ^{n}, or a vector in ℝ^{n}. Then the structure

(ℝ^{n}, +, −, 0)

is a commutative group, where:

• a + b = (a_{0} + b_{0}, …, a_{n−1} + b_{n−1});

• −a = (−a_{0}, …, −a_{n−1});

• 0 = (0, …, 0).

(Note that ℝ^{1} = ℝ, and ℝ^{0} = {∅}.) Each vector a in ℝ^{n} has a norm or length, namely

√ ∑_{i<n} a_{i}^{2}.

Since a sum of squares of real numbers is always non-negative, the norm is well-defined. The norm of a is denoted

∥a∥ .

The distance from point a to point b is the norm

∥b − a∥ .

This terminology is reasonable, since:

• the distance from a to b is the same as the distance from b to a (so we can speak of the distance between two points);

• the distance between distinct points is positive, while the distance between a point and itself is 0;

• the distance from a to b is no greater than the the distance from a to c plus the distance from c to b.

The first two of these facts are clear from the definition. To prove the last fact, we first define the dot-product on ℝ^{n} by the rule

a · b = \frac{∥a + b∥^{2} − ∥a∥^{2} − ∥b∥^{2}}{2} .

Also, any r in ℝ determines an operation x ↦ rx : ℝ^{n} → ℝ^{n}, where

rx = (rx_{0}, …, rx_{n−1}).

In this context, elements of ℝ are scalars, and rx can be called a scalar multiple of x.

Lemma. Suppose x, y ∈ ℝ^{n} and r ∈ ℝ. Then:

(1) ∥rx∥ = |r| ∥x∥;

(2) x · y = ∑_{i<n} x_{i}y_{i};

(3) (rx) · y = r(x · y).

Exercise 22. Prove the lemma.

Lemma (Cauchy–Bunyakovski–Schwartz inequality). For all a and b in ℝ^{n} we have

|a · b| ⩽ ∥a∥ ∥b∥ ,

with equality holding just in case one of a and b is a scalar multiple of the other.

Proof. The equation

∥xa + b∥^{2} = 0  (2)

has at most one solution x (why?). For all scalars x we have

∥xa + b∥^{2} = x^{2} ∥a∥^{2} + 2xa · b + ∥b∥^{2} .

The right member of this equation is a quadratic polynomial in x; its discriminant, D, is not positive, so

(a · b)^{2} ⩽ ∥a∥^{2} ∥b∥^{2}

and therefore

|a · b| ⩽ ∥a∥ ∥b∥ .

If equation (2) does have a solution, then D = 0, so the last inequality is an equality; if (2) has no solution, then the inequality is strict.

Exercise 23. Supply the missing detail(s) in the proof.

Theorem (triangle inequality). ∥a + b∥ ⩽ ∥a∥ + ∥b∥ for all vectors a and b of ℝ^{n}.

Proof. By the C–B–S inequality, we get

∥a + b∥^{2} = ∥a∥^{2} + 2a · b + ∥b∥^{2} ⩽ ∥a∥^{2} + 2 ∥a∥ ∥b∥ + ∥b∥^{2} = (∥a∥ + ∥b∥)^{2},

hence the claim.

In the theorem, if we simultaneously replace a with a − c, and b with c − b, we get

∥a − b∥ ⩽ ∥a − c∥ + ∥c − b∥ .

So we have a good notion of distance in ℝ^{n}. We may refer to ℝ^{n} as Euclidean n-space, because of the following.

Exercise 24. Two vectors a and b are called orthogonal if a · b = 0; in this case we may write

a ⊥ b.

Prove the ‘Pythagorean Theorem’ for ℝ^{n}, namely:

a ⊥ b ⟺ ∥a + b∥^{2} = ∥a∥^{2} + ∥b∥^{2} .

2.2 The Euclidean topology

The open ball at a point a of ℝ^{n} with radius ε in (0, ∞) is the set

{x ∈ ℝ^{n} : ∥x − a∥ < ε},

which may be denoted

B(a; ε).

Example. If a ∈ ℝ, then B(a, ε) = (a − ε, a + ε).

Suppose a ∈ E ⊆ ℝ^{n}. Then E is called a neighborhood of a if

B(a; ε) ⊆ E

for some positive ε. In this case, a is called an interior point of E. A subset of ℝ^{n} is open if it is a neighborhood of each of its points, that is, each of its points is an interior point. The complement of an open set is closed.

Our terminology is not ambiguous:

Lemma. Open balls are open.

Proof. Suppose x ∈ B(a; ε). Let ε′ = ε − ∥x − a∥; this is positive. If u ∈ B(x; ε′), then

∥u − a∥ ⩽ ∥u − x∥ + ∥x − a∥ ⩽ ε′ + ∥x − a∥ = ε

by the triangle inequality, so u ∈ B(a; ε). Thus B(x; ε′) ⊆ B(a; ε). Therefore an open ball is a neighborhood of all of its points.

Our earlier general statements about open and closed sets in ℝ are true in ℝ^{n}:

Theorem. In ℝ^{n}, both ∅ and ℝ^{n} are open; finite intersections of open subsets are open; arbitrary unions of open sets are open.

Exercise 25. Prove the theorem.

A point a is a cluster point (or accumulation point) of a set E if every neighborhood of a contains a point of E \ {a}.

Example. The set {1/(n + 1) : n ∈ ℕ} has exactly one cluster point, 0.

Lemma. A subset of ℝ^{n} is closed if and only if it contains all of its cluster points.

Proof. Let A be a subset of ℝ^{n}. The following statements are equivalent:

• The set A is closed.

• The complement ℝ^{n} \ A is a neighborhood of each of its points.

• No point of the complement of A is a cluster point of A.

• Every cluster point of A is in A.

This proves the claim.

2.3 Bolzano–Weierstraß Theorem

An open interval in ℝ^{n} is a Cartesian product

I_{0} × ⋯ × I_{n−1},

where the I_{i} are open intervals of ℝ. If each I_{i} is (a_{i}, b_{i}), then the product I_{0} × ⋯ × I_{n−1} might be denoted

(a, b).

Closed intervals of ℝ^{n} are defined similarly.

Lemma. Open intervals in ℝ are open sets; closed intervals are closed. Every open set is a union of open balls. Every open set is a union of open intervals.

Exercise 26. Prove the lemma.

Lemma. For each i less than n, suppose (I_{m}^{(i)} : m ∈ ℕ) is a sequence of bounded closed intervals in ℝ. Then

⋂_{m∈ℕ} I_{m}^{(0)} × ⋯ × I_{m}^{(n−1)} ≠ ∅.

Proof. Each intersection ⋂_{m∈ℕ} I_{m}^{(i)} contains an element a_{i} by an earlier theorem; hence the intersection of the Cartesian products contains (a_{0}, …, a_{n−1}).

A set is bounded if it is included in some open ball.

Theorem (Bolzano–Weierstraß). Every bounded infinite subset of ℝ^{n} has an cluster point.

Proof. Suppose A is an infinite subset of B(a; r). Let b be the tuple

(a_{0} − r, …, a_{n−1} − r),

and let r = (r, …, r). Then A ⊆ [b, b + 2r].

Let us also write I_{0} for the interval [b, b + 2r]. Then I_{0} is the product of closed intervals in ℝ of equal length. By halving these intervals of ℝ, we can subdivide I_{0} into 2^{n} intervals, thus:

I_{0} = ⋃{I^{(e_{0},...,e_{n−1})} : e_{0}, …, e_{n−1} ∈ {0, 1}},

where

I^{(e_{0},...,e_{n−1})} = [b_{0} + e_{0}r, b_{0} + (e_{0} + 1)r] × ⋯ × [b_{n−1} + e_{n−1}r, b_{n−1} + (e_{n−1} + 1)r].

One of these must contain infinitely many elements of A. Call this interval I_{1}, and continue the process.

We get a sequence (I_{k} : k ∈ ℕ) of closed bounded intervals of ℝ^{n}, each containing infinitely many points of A. Also I_{k} is the product of intervals of length 2r/2^{k}. The intersection of the intervals I_{k} contains a point c by the last lemma.

The point c is a cluster point of A. Indeed, if ε > 0, let k be large enough that 2r√n/2^{k} < ε. (Why is this possible?) Then

I_{k} ⊆ B(c; ε)

(why?), so the latter interval contains a point of A.

Exercise 27. Supply the details.

2.4 Cantor Intersection Theorem

Lemma. If a is a cluster point of E, then every neighborhood of a contains infinitely many points of E.

Proof. Suppose U is a neighborhood of a, and

U ∩ (E \ {a}) = {b_{0}, …, b_{n−1}}.

Let ε = min{∥b_{0} − a∥ , …, ∥b_{n−1} − a∥}. Then U ∩ B(a; ε) is a neighborhood of a that contains no points of E distinct from a; so a is not a cluster point of E.

An application of the Bolzano–Weierstraß theorem is:

Theorem (Cantor Intersection). Suppose (F_{n} : n ∈ ℕ) is a sequence of bounded non-empty closed subsets of ℝ^{n} such that

F_{n+1} ⊆ F_{n}

in each case. Then ⋂_{n∈ℕ} F_{n} ≠ ∅.

Proof. If some F_{n} is finite, then ⋂_{n∈ℕ} F_{n} ≠ ∅ (why?). So suppose that each F_{n} is infinite. Then there is a sequence (x_{n} : n ∈ ℕ) of distinct points such that x_{n} ∈ F_{n} for each n. (If x_{n} have been chosen for all n less than k, then choose x_{k} from F_{k} \ {x_{n} : n < k}.) As a bounded infinite set, {x_{n} : n ∈ ℕ} has a cluster point, x. Also, each F_{k} contains all but finitely many points of {x_{n} : n ∈ ℕ}. Hence, by the Lemma, each neighborhood of x contains infinitely many points of F_{k}, so x ∈ F_{k} since F_{k} is closed. Therefore x ∈ ⋂_{n∈ℕ} F_{n}.

2.5 Compactness

An open covering of a subset E of ℝ^{n} is a set {U_{i} : i ∈ I} of open subsets of ℝ^{n} such that

E ⊆ ⋃_{i∈I} U_{i}.

A sub-cover of an open covering of E is a subset of the covering that is also an open covering of E. The set E is called compact if every open covering of E has a finite sub-cover.

It is generally straightforward to show that a set is not compact:

Example. Let F be the set

{(1/(n + 1), 2) : n ∈ ℕ}

of intervals in ℝ. Then F is an open covering of (0, 1], and any infinite subset of F is a sub-cover; but no finite subset is a sub-cover. Therefore (0, 1] is not compact. The set F does not cover [0, 1]. The set F ∪{(−ε, ε)} does cover [0, 1], and so does the finite subset

{(−ε, ε), (1/(n + 1), 2)},

provided n + 1 > 1/ε.

Lemma. All compact subsets of ℝ^{n} are closed and bounded.

Proof. If A is an unbounded subset of ℝ^{n}, then {B(0; k + 1) : k ∈ ℕ} is an open covering of A with no finite sub-cover. If C is a non-closed subset of ℝ^{n}, then C has a cluster point b that is not in C. Hence {{x ∈ ℝ^{n} : ∥x − b∥ ⩾ 1/(n + 1)} : n ∈ ℕ} is an open covering of C with no finite sub-cover.

Theorem (Heine–Borel). Closed and bounded subsets of ℝ^{n} are compact.

Proof. If possible, say E is a closed bounded subset of ℝ^{n}, and F is an infinite open covering of E with no finite sub-cover. As in the proof of the Bolzano– Weierstraß Theorem, E is included in a closed bounded interval I_{0} that is a product of intervals of length 2r for some positive r. Subdivide I_{0} into 2^{n} subintervals, each a product of intervals of length r. Then F covers the intersection of A with each of these, so for at least one of them—say I_{1}—the intersection A ∩ I_{1} is not covered by a finite subset of F. Now sub-divide I_{1} in the same way, and continue. We get a nested sequence (I_{k} : k ∈ ℕ) of closed bounded intervals. Each intersection A ∩ I_{k} is non-empty and closed, so there is a point b in A ∩ ⋂_{k∈ℕ} I_{k} by the Cantor Intersection Theorem.

Now, b ∈ U for some U in F. Since U is open, we have B(b; ε) ⊆ U for some positive ε. Hence I_{k} ⊆ U if k is large enough. Then {U} is a finite covering of A ∩ I_{k}, contrary to our choice of I_{k}. Therefore, if E is closed and bounded, it must be compact.

A collection {F_{i} : i ∈ I} of subsets of ℝ^{n} has the finite intersection property (or f.i.p.) if

⋂_{i∈I_{0}} F_{i} ≠ ∅

whenever I_{0} is a finite subset of I.

Theorem. Let A be a subset of ℝ^{n}. The following statements are equivalent.

(1) A is compact.

(2) A is closed and bounded.

(3) Every collection of closed subsets of A with the finite intersection property has non-empty intersection.

(4) Every infinite subset of A has a cluster point in A.

Exercise 28. Prove the theorem.

2.6 Metric spaces

Some of our definitions are made, and some of our theorems are true, in a more general setting. A set M is called a metric space if it is equipped with a function d : M × M → [0, ∞) such that, for all a, b and c in M, we have:

(1) d(a, b) = d(b, a);

(2) d(a, b) = 0 ⟺ a = b;

(3) d(a, c) ⩽ d(a, b) + d(b, c).

The function d is then called a metric, and d(a, b) is the distance between a and b (with respect to d).

More than one metric can be defined on the same set:

Exercise 29. Let d : ℝ^{2} × ℝ^{2} → [0, ∞) be the function defined by the rule

d((x, y), (x′, y′)) = |x − x′| + |y − y′| .

Prove that d is a metric on ℝ^{2}. (This is called the taxi-cab metric by people who are thinking of cities like New York, whose streets form a rectangular grid.)

Then open balls, and therefore neighborhoods, interior points, open and closed sets and cluster points, can be defined just as before.

Theorem. Let (M, d) be a metric space. Then ∅ and M are open; intersections of finitely many open sets are open; and unions of arbitrarily many open sets are open. A subset of M is closed if and only if it contains all of its cluster points.

Exercise 30. Prove the theorem.

The definition of a bounded set also makes sense in an arbitrary metric space. However, the proof of the Bolzano–Weierstraß Theorem requires more than that ℝ^{n} is a metric space:

Exercise 31. (ℚ, d) is obviously a metric space when d is the usual Euclidean distance (d(a, b) = |a − b|). Show that {x ∈ ℚ : x^{2} < 2} is a bounded infinite subset of ℚ that does not have a cluster point.

The definition of a compact set makes sense in any metric space. We can prove this much:

Theorem. A metric space is compact if and only if every infinite subset has a cluster point.

Proof. [I didn’t do this in class.] Let (M, d) be a metric space. Suppose first that M has an infinite subset A with no cluster point. Then every element x of M has an open neighborhood U_{x} that contains only finitely many points of A. Therefore {U_{x} : x ∈ A} is an open covering of M, but the union of any finite subset of this contains only finitely many points of A, and this is not M. Therefore (M, d) is not compact.

Suppose conversely that every infinite subset of A does have a cluster point. Then for each positive ε there is a finite set {x_{0}, …, x_{n−1}} such that A = ⋃_{i<n} B(x_{i}; ε). (Otherwise, for some positive ε, an infinite set can be constructed such that d(x, y) ⩾ ε for all distinct members x and y; this set has no cluster point.)

Suppose E is a collection of open subsets of A such that no finite subset of E covers A. We shall show ⋃ E ≠ A.

Now, A is covered by finitely many balls B(x; 1); so one of these—say B(a_{0}; 1)— is not covered by any finite subset of E. By recursion, we get a sequence (a_{n} : n ∈ ℕ) of elements of M such that

a_{n+1} ∈ B(a_{n}; 2^{−n}),

and B(a_{n}; 2^{−n}) is not covered by any finite subset of E. If the set {a_{n} : n ∈ ℕ} is infinite, then it has a cluster point a. (If the set is finite, let a be such that a = a_{n} for infinitely many values of n.) If U is an open neighborhood of a, then a ∈ B(a; ε) ⊆ U for some positive ε. Let N be large enough that 2^{−N} ⩽ ε/2. Now, B(a; ε/2) contains infinitely many points of {a_{n} : n ∈ ℕ}, if this set is infinite; in any case, for some n in ℕ, we have n ⩾ N and B(a_{n}; 2^{−n}) ⊆ U. Therefore U ∉ E. That is, E contains no neighborhood of a. Therefore a ∉ ⋃ E.

2.7 Supplement

A subset of a metric space is dense (in that space) if every open set contains a point of the subset. Recall that ℚ is dense in ℝ.

Exercise 32. Show that ℚ^{n} is dense in ℝ^{n}.

Exercise 33. Let x ∈ ℝ^{n}, and let U be a neighborhood of x. Then there is a point u of ℚ^{n}, and there is a positive rational number r, such that x ∈ B(u; r) ⊆ U.

A consequence is:

Theorem (Lindelöf Covering). If A ⊆ ℝ^{n}. and {U_{i} : i ∈ I} is an open covering of A, then the index-set I has a countable subset J such that {U_{i} : i ∈ I} covers A.

Exercise 34. Suppose S ⊆ ℝ^{n}, and for every x in S there is a positive δ such that S ∩ B(x; δ) is a countable set. Prove that S is countable.

Exercise 35. Suppose A ⊆ ℝ^{n}. A point x of ℝ^{n} is called a condensation point of A if A ∩ B(x; ε) is uncountable for every positive ε. Prove that if A is uncountable, then A has a condensation point. (You can use the preceeding exercise, or you can mimic the proof of the Bolzano–Weierstraß Theorem.)

3 Limits

3.1 Definitions and abstract properties

Let us work in a metric space (M, d). If A ⊆ M, and b ∈ M, we shall say that b is an adherent point of A if b ∈ A or else b is a cluster point of A.

Recall that a sequence (a_{n} : n ∈ ℕ) is technically a function on ℕ; the range of the function is the set {a_{n} : n ∈ ℕ}. Say that this range is included in M, and that it has an adherent point b. Then for every neighborhood U of b, and for every N in ℕ, there is m in ℕ such that m ⩾ N and

a_{m} ∈ U.  (3)

Suppose that for every neighborhood U of b there is N in ℕ such that (3) holds whenever m ⩾ N. Then b is a limit of the sequence; one also says that the sequence converges to b, and one writes

lim_{n→∞} a_{n} = b.

So limits of sequences are adherent points of their ranges; but the converse need not be the case.

Lemma. If a sequence has a limit, then no other point is a limit of the sequence or a cluster point of the range of the sequence.

Proof. Suppose (a_{n} : n ∈ ℕ) converges to b, and c ≠ b. Let ε = d(b, c)/2, and let N be such that a_{m} ∈ B(b, ε) whenever m ⩾ N. Then a_{m} ∉ B(c, ε) when m ⩾ N. Therefore c is not a limit of (a_{n} : n ∈ ℕ). Neither is c a cluster point of {a_{n} : n ∈ ℕ}, since B(c, ε) contains only finitely many of its points.

Example. The sequence ((−1)^{n} + 1/(n + 1) : n ∈ ℕ) has two cluster points, namely ±1, and therefore has no limit.

A cluster point is the limit of something. A sequence (a_{n}) of real numbers is strictly increasing if

m < n ⟹ a_{m} < a_{n}

for all m and n in ℕ. In particular, the identity-sequence (n : n ∈ ℕ) is strictly increasing. If (a_{n}) is an arbitrary sequence, and f is a strictly increasing sequence of natural numbers, then the composition (a_{f(i)} : i ∈ ℕ) is a subsequence of (a_{n}). In particular, a sequence is a sub-sequence of itself.

Lemma. Suppose {a_{n} : n ∈ ℕ} is a subset of, and b is a point of, a metric space.

• If b is a cluster point of {a_{n} : n ∈ ℕ}, then some subsequence of (a_{n} : n ∈ ℕ) converges to b.

• If b is a limit of (a_{n} : n ∈ ℕ) then every subsequence of (a_{n} : n ∈ ℕ) converges to b.

Proof. Suppose b is a cluster point of {a_{n} : n ∈ ℕ}. Define a strictly increasing function f : ℕ → ℕ recursively as follows. Let f(0) = 0. If f(n) has been defined, let f(n+1) be a number m such that m > f(n) and a_{m} ∈ B(b; 1/(n+1)). Then (a_{f(n)} : n ∈ ℕ) converges to b. Indeed, if r ∈ ℕ and r ⩾ 1/ε, then a_{f(r)} ∈ B(b; 1/r) ⊆ B(b; ε).

Suppose b is a limit of (a_{n} : n ∈ ℕ), and f : ℕ → ℕ is a strictly increasing function. If U is a neighborhood of b, then there is N in ℕ such that, whenever m ⩾ N, we have a_{m} ∈ U and in particular a_{f(m)} ∈ U (since f(m) ⩾ m). Thus (a_{f(n)} : n ∈ ℕ) has limit b.

An adherent point of {a_{n} : n ∈ ℕ} need not be a limit of any sub-sequence of (a_{n}). The limit of a sub-sequence need not be a cluster point of the range of the original sequence.

Examples. Every element of {1/(n + 1) : n ∈ ℕ} is an adherent point, but the sequence (1/(n + 1) : n ∈ ℕ) converges to 0, and therefore no sub-sequence converges to any other limit. The sequence ((−1)^{n}+(1+(−1)^{n})/(n+1) : n ∈ ℕ), composed with n ↦ 2n + 1, yields the sub-sequence (−1 : n ∈ ℕ), which converges to −1; but −1 is not a cluster point of {(−1)^{n} + (1 + (−1)^{n})/(n + 1) : n ∈ ℕ}.

Say f is a function from M to ℝ, and b ∈ M, and L ∈ ℝ. We say L is the limit of f at b, and write

lim_{b} f = lim_{x→b} f(x) = L,

if for every positive ε there is a neighborhood U of b such that

|f(x) − L| < ε

whenever x ∈ U \ {b}.

Theorem. The following are equivalent:

• lim_{b} f = L.

• lim_{n→∞} f(a_{n}) = L whenever (a_{n}) is a sequence in M \ {b} that converges to b.

Lemma. Convergent sequences are bounded.

Proof. Suppose lim_{n→∞} a_{n} = a. For some N, if n ⩾ N, then a_{n} ∈ B(a; 1). Let r = max{d(a, a_{i}) : i < N}. Then a_{n} ∈ B(a; r + 1) for all n.

3.2 Convergence in Euclidean spaces

Convergence in ℝ^{k} can be referred to convergence in ℝ. In this context, we may understand an element a of ℝ^{k} to be (a^{(0)}, …, a^{(k−1)}).

Lemma. Suppose (a_{n} : n ∈ ℕ) is a sequence in ℝ^{k}, and b ∈ ℝ^{k}. Then (a_{n} : n ∈ ℕ) converges to b if and only if each sequence (a_{n}^{(i)} : n ∈ ℕ) converges to b^{(i)}.

Proof. Say c ∈ ℝ^{k}. If ∥c∥ < ε, then |c^{(i)}| < ε. Conversely, if |c^{(i)}| < ε/√k in each case, then ∥c∥ < ε.

Theorem. Suppose (a_{n}) and (b_{n}) are sequences in ℝ^{k}, and (r_{n}) is a sequence in ℝ. Assume that

lim_{n→∞} a_{n} = a; lim_{n→∞} b_{n} = b; lim_{n→∞} r_{n} = r.

Then:

(1) lim_{n→∞}(a_{n} + b_{n}) exists, and is a + b;

(2) lim_{n→∞} r_{n}a_{n} exists, and is ra;

(3) if r ≠ 0, then lim_{n→∞} r_{n}^{−1}a_{n} exists, and is r^{−1}a.

Proof. By the last lemma, we may assume k = 1. Let ε > 0.

If n is large enough, then |a − a_{n}| < ε/2 and |b = b_{n}| < ε/2, and therefore |(a + b) − (a_{n} + b_{n})| ⩽ |a − a_{n}| + |b − b_{n}| ⩽ ε.

For the second part, we have

|ra − r_{n}a_{n}| = |ra − r_{n}a + r_{n}a − r_{n}a_{n}|
⩽ |ra − r_{n}a| + |r_{n}a − r_{n}a_{n}|
= |a| |r − r_{n}| + |r_{n}| |r_{n}a − r_{n}a_{n}| .

Since (r_{n}) is bounded, there is s such that |r_{n}| ⩽ s for all n. Let n be so large that |r − r_{n}| < ε/2(1 + |a|) and |r_{n}a − r_{n}a_{n}| < ε/2s; then |ra − r_{n}a_{n}| < ε.

For the last part, it is enough to show that lim_{n→∞} r_{n}^{−1} = r^{−1}, if r ≠ 0. But if r ≠ 0, then

|\frac{1}{r} − \frac{1}{r_{n}} | = |\frac{r_{n} − r}{rr_{n}} | ⩽ 2\frac{|r_{n} − r|}{|r|^{2}},

provided n is large enough that |r − r_{n}| ⩽ |r| /2 and consequently |r| /2 < |r_{n}|. Now require n also to be large enough that |r_{n} − r| < |r|^{2}ε/2.

Exercise 36. In each of the following cases, determine whether the sequence

(\frac{∑_{i=0}^{k} a_{i}n^{i}}{∑_{j=0}^{ℓ} b_{j}n^{j}} : n ∈ ℕ)

has a limit; find the limit if it exists. Here the a_{i} and b_{j} are real numbers, and a_{k} and b_{ℓ} are not zero.

(1) k < ℓ.

(2) k = ℓ.

(3) k > ℓ.

3.3 Monotone sequences

A sequence (a_{n}) of real numbers is increasing if a_{n} ⩽ a_{n+1} for all n.

Exercise 37. Prove that, if (a_{n}) is increasing, then a_{m} ⩽ a_{n} whenever m ⩽ n.

A decreasing sequence has the obvious definition. A sequence is monotone if it is either increasing or decreasing.

Examples. The sequences (2n) and (−3n^{2}) are monotone, the first increasing, the second decreasing. The sequence (n + (−1)^{n}) is not monotone.

Theorem (Monotone Convergence). A bounded increasing sequence converges to the supremum of its range.

Proof. Suppose sup{a_{n} : n ∈ ℕ} = b. Then for all positive ε, b − ε is not an upper bound for the set, so b − ε < a_{N} for some N. If (a_{n}) is increasing, then b − ε < a_{n}, and therefore 0 < b − a_{n} < ε, whenever n ⩾ N.

Example. Say 0 < a < 2b. Define (a_{n}) recursively by a_{0} = a and a_{n+1} = a_{n}/2 + b. Then, by induction, a_{n} < 2b and a_{n} < a_{n+1} for all n. So lim_{n→∞} a_{n} exists; say it is c. This is also the limit of a_{n}/2 + b, so c = c/2 + b, whence c = 2b.

3.4 Completeness

In a space with metric d, a sequence (a_{n}) is called Cauchy if for all positive ε there is N such that

d(a_{m}, a_{n}) < ε

whenever m, n > N.

Lemma. Every convergent sequence is a Cauchy sequence.

Proof. Suppose lim_{n→∞} a_{n} = b. If ε > 0, let N be such that

m ⩾ N ⟹ d(a_{m}, b) < \frac{ε}{2}.

Then

m, n ⩾ N ⟹ d(a_{m}, b), d(a_{n}, b) < \frac{ε}{2}
⟹ d(a_{m}, a_{n}) ⩽ d(a_{m}, b) + d(a_{n}, b) < ε,

so (a_{n}) is Cauchy.

Example. The sequence (1/n) is a sequence in (0, 1) with the usual metric; it converges in ℝ to 0, so it is Cauchy—but not convergent—in (0, 1).

Lemma. Every Cauchy sequence is bounded, and if some subsequence converges, then the whole sequence converges to the same limit.

Proof. Say (a_{n}) is Cauchy. Let N be such that

m, n ⩾ N ⟹ d(a_{m}, a_{n}) < 1.

Let r = max{d(a_{m}, a_{N}) : m < N}. Then a_{m} ∈ B(a_{N}; r + 1) for all m, so (a_{n}) is bounded. Also, suppose f : ℕ → ℕ is strictly increasing, and lim_{n→∞} a_{f(n)} = b. If ε > 0, let M and M′ be such that

m ⩾ M ⟹ d(a_{m}, b) < \frac{ε}{2},
m, n ⩾ M′ ⟹ d(a_{n}, a_{m}) < \frac{ε}{2}.

Now let m = f(max{M, M′}). Then m ⩾ M and m ⩾ M′ (why?). Therefore

n ⩾ M′ ⟹ d(a_{n}, b) ⩽ d(a_{n}, a_{m}) + d(a_{m}, b) < ε.

Therefore (a_{n}) converges to b.

Exercise 38. If f : ℕ → ℕ is strictly increasing, prove by induction that f(n) ⩾ n for all n in ℕ.

A metric space is complete if every Cauchy sequence in the space converges.

Theorem. ℝ^{k} is complete.

Proof. Let (a_{n}) be a Cauchy sequence in ℝ^{k}. Then {a_{n}} is bounded. If this set is finite, then it converges (why?). If this set is infinite, then it has a cluster point by the Bolzano–Weierstraß Theorem. In this case, (a_{n}) has a convergent subsequence, by an earlier lemma, so the sequence itself converges, by the preceding lemma.

Exercise 39. Supply the missing detail in the proof.

So ℝ is complete in two senses: as an ordered field, and as a metric space.

Exercise 40. Let K be a subfield of ℝ; so K is an ordered field, and K inherits a metric from ℝ. Prove that K is complete as an ordered field ⟺ it is complete as a metric space.

With the usual metric, ℚ is not complete. Are other metrics on ℚ possible? Besides the trivial metric, there is a metric for each prime p. Indeed, every non-zero rational number can be written as

\frac{a}{b}p^{n}

for some integers a, b and n, where p does not divide a or b, and n is unique. Then we define a new absolute value on ℚ by

|\frac{a}{b}p^{n}|_{p} = \frac{1}{p^{n}}

and |0|_{p} = 0. Finally, define a metric d_{p} by

d_{p}(x, y) = |x − y|_{p} .

Exercise 41. Prove that d_{p} is in fact a metric.

Here, d_{p} is the p-adic metric. With this metric, ℚ is a subfield and a subspace of a field called ℚ_{p}, which is complete as a metric space; the study of this field is p-adic analysis. We shall not pursue it here.

Theorem. Every compact metric space is complete.

Proof. The proof that ℝ^{k} is complete is really a proof that a metric space is complete, provided that every bounded infinite subset has a cluster point. This is a property of compact metric spaces, by an earlier theorem.

4 Continuity

4.1 Definitions and basic properties

The most general sort of function that we might be interested in is a function from one metric space, say (M_{0}, d_{0}), to another, say (M_{1}, d_{1}). Let f be such a function. If x_{i} ∈ M_{i}, then the expression

lim_{x→x_{0}} f(x) = x_{1}

has the obvious meaning. If M_{1} is one of the spaces ℝ^{k}, then we have theorems about limits of sums and scalar multiples of functions, theorems corresponding to the theorems about sequences.

We shall say that f : M_{0} → M_{1} is continuous at x_{0} if

lim_{x→x_{0}} f(x) = f(x_{0}).

If A ⊆ M_{0}, then f is continuous on A if it is continuous at every point of A. Finally, f is continuous, simply, if it is continuous on M_{0}.

The following is proved like the earlier theorem about limits of functions and sequences.

Lemma. A function f : M_{0} → M_{1} is continuous if and only if lim_{n→∞} f(x_{n}) exists, and is

f( lim_{n→∞} x_{n}),

whenever (x_{n} : n ∈ ℕ) is a convergent sequence in M_{0}.

Theorem. Continuity is preserved under composition.

Proof. Let (M_{i}, d_{i}) be metric spaces (i < 3), let f : M_{0} → M_{1} be continuous at a, and let g : M_{1} → M_{2} be continuous at f(a). We shall show that g ∘ f is continuous at a. Let U be a neighborhood of g(f(a)). Then f(a) has a neighborhood V such that

x ∈ V ⟹ f(x) ∈ U.

Then also a has a neighborhood W such that

y ∈ W ⟹ f(y) ∈ V ⟹ g(f(y)) ∈ U,

which means g ∘ f is continuous at a.

4.2 Functions into Euclidean spaces

If i < k, then there is a coordinate map,

a ⟼ a_{i} : ℝ^{k} → ℝ,

which we may denote π_{i}. (If k = 1, then π_{0} is just the identity-function on ℝ.)

Theorem. The projection-maps π_{i} are continuous.

Proof. If a ∈ ℝ^{k}, and x ∈ (a; ε), then |a_{i}, x_{i}| < ε.

Theorem. A function f into ℝ^{k} is continuous if and only if the compositions π_{i} ∘ f are continuous.

Proof. The ‘only-if’ part follows from the last two theorems. For the ‘if’ part, if x is in the domain of f, and ε > 0, then for each i less than k, there is a neighborhood U_{i} of x such that

y ∈ U_{i} ⟹ |π_{i} ∘ f(y) − π_{i} ∘ f(x)| < ε/√k.

Let U be the intersection of the U_{i}. Then U is a neighborhood of x, and

y ∈ U ⟹ f(y) ∈ B(f(x); ε).

This completes the proof.

Theorem. Let f and g be continuous functions into ℝ^{k}, and h be a continous function into ℝ, all defined on the same metric space. Then f + g and h · f are continuous; so is 1/h wherever h is not 0.

Exercise 42. Prove the theorem.

4.3 Topology

A function f : A → B induces the functions

X ↦ {f(x) : x ∈ X} : 𝒫(A) → 𝒫(B),
Y ↦ {x ∈ A : f(x) ∈ Y } : 𝒫(B) → 𝒫(A).

These are denoted f and f^{−1} respectively. Here f(X) is the image of X, and f^{−1}Y is the inverse image of Y, under f.

Lemma. If f : A → B is a function, then f(f^{−1}(Y)) ⊆ Y for all subsets Y of B; also, f^{−1}(Y^{c}) = (f^{−1}(Y))^{c}.

Theorem. The following are equivalent statements about a function between metric spaces:

(1) The function is continuous.

(2) Under the function, inverse images of open sets are open.

(3) Under the function, inverse images of closed sets are closed.

Proof. Say f : M_{0} → M_{1} is a function of metric spaces.

(1) ⟹ (2). Suppose f is continuous. Let Y be an open subset of M_{1}. If x ∈ f^{−1}(Y), then f(x) ∈ Y, so x has a neighborhood U such that

y ∈ U ⟹ f(y) ∈ Y.

Therefore U ⊆ f^{−1}(Y), so f^{−1}(Y) is a neighborhood of x. Thus f^{−1}(Y) is a neighborhood of all of its points, so it is open.

(2) ⟹ (1). Suppose f^{−1} takes open sets to open sets. If x ∈ M_{0}, and U is an open neighborhood of f(x), then

y ∈ f^{−1}(U) ⟹ f(y) ∈ U

by the last lemma. But f^{−1}(U) is a neighborhood of x (since it contains x and is open). Thus f is continuous at x.

(2) ⟺ (3). Clear by the lemma.

4.4 Continuous functions on compact sets

Theorem. Under a continuous function, the image of a compact set is compact.

Exercise 43. Prove the theorem.

Theorem. If f : M → ℝ is continuous, and M is compact, then f attains a minimum and a maximum value.

Proof. f(M) is compact, hence closed and bounded; so f(M) contains its extrema.

4.5 Additional exercises

(1) If x ∈ ℝ, does lim_{n→∞} \frac{x^{n}}{n!} exist?

(2) What about lim_{n→∞}(\sqrt{n^{2} + 1} − n)?

(3) Define sequences (a_{n}) and (b_{n}) by:

• a_{0} = 3 and b_{0} = 2.

• a_{n}, b_{n} ∈ ℤ.

• a_{n+1} + b_{n+1}√2 = (a_{n} + b_{n}√2)^{2}. Prove that a_{n}^{2} − 2b_{n}^{2} = 1, and then that lim_{n→∞} \frac{a_{n}}{b_{n}} = √2.

(4) Prove that every sequence in a compact space has a convergent subsequence.

(5) Prove that complete subspaces of metric spaces are closed, and that closed subsets of complete spaces are complete.

(6) If f : ℝ^{2} → ℝ, and lim_{(0,0)} f exists, and lim_{y→0} f(x, y) exists for each x, then lim_{x→0}(lim_{y→0} f(x, y)) = lim_{(0,0)} f.

(7) Define f(x, y) = \begin{cases}\frac{x^{2} − y^{2}}{x^{2} + y^{2}} , & if (x, y) ≠ (0, 0); \\ 0, & if (x, y) = (0, 0). \end{cases} Find lim_{y→0} f(x, y). What

can you conclude about lim_{(0,0)}?

(8) If f : ℝ^{k} → ℝ is continuous at a, show that each function

x ↦ f(a_{0}, …, a_{n−1}, x, a_{n+1}, …, a_{n−1}) : ℝ → ℝ

is continuous at a_{i}. Is the converse true?

(9) If f : ℝ^{k} → ℝ is continuous, show that {a ∈ ℝ^{k} : f(a) = 0} is closed.

(10) If f : ℝ → ℝ is continuous at 1, and f(1) = 1, and f(x + y) = f(x) + f(y) for all x and y in ℝ, show that f(x) = x for all x in ℝ.

(11) Discuss the continuity of the following functions:

(a) f(x) = \begin{cases}0, & if x is irrational; \\ 1, & if x is rational. \end{cases}

(b) x ↦ xf(x).

(c) g(x) = \begin{cases}0, & if x is irrational; \\ \frac{1}{n}, & if x = \frac{m}{n}, where gcd(m, n) = 1 and n > 0. \end{cases}

(d) h(x) = \begin{cases}0, & if x = 0; \\ sin \frac{1}{x}, & if x ≠ 0. \end{cases}

(e) x ↦ xh(x).

(12) If f ∘ f is continuous, must f be continuous?

(13) Suppose f : [0, 1] → ℝ is continous, and

g(x) = \begin{cases}f(x), & if x = 0; \\ max_{[0,x]} f, & if x ∈ (0, 1]. \end{cases}

Show that g is continous.

4.6 Connectedness

Lemma. If f : ℝ → ℝ is function continuous at a, and f(a) > 0, then there is a positive δ such that

|a − x| < δ ⟹ f(x) > 0

for all x in ℝ.

Theorem (Bolzano). If f : [a, b] → ℝ is continuous, and f(a)f(b) < 0, then f(x) = 0 for some x in (a, b).

Corollary (Intermediate Value). If f : [a, b] → ℝ is continuous, and c is between f(a) and f(b), then f(x) = c for some x in (a, b).

Exercise 44. Prove the lemma, theorem and corollary.

In fact the Intermediate Value Theorem will follow also from the following considerations.

Lemma. Every open subset of ℝ is a disjoint union of open intervals.

Proof. Say U is an open subset of ℝ. If x ∈ U, let U_{x} = (a, b), where

a = inf{y ∈ U : [y, x] ⊆ U};
b = sup{z ∈ U : [x, z] ⊆ U}.

Note that a and b are well-defined elements of ℝ \ U, and U_{x} ⊆ U (why?). Also, if y ∈ U, and U_{x} ∩ U_{y} ≠ ∅, then U_{x} = U_{y} (why?). Hence U = ⋃{U_{x} : x ∈ U}, and the union is disjoint (in the sense that two elements of {U_{x} : x ∈ U} are either disjoint or equal).

Exercise 45. Supply the details of the proof.

A union of two or more disjoint open intervals should be called disconnected; but a disjoint union like (0, 1] ∪ (1, 2) is the connected set (0, 2). A precise definition agreeing with these ideas is the following.

Definition. A subset X of a metric space is connected if, whenever A_{0} and A_{1} are disjoint open sets, and X ⊆ A_{0} ∪ A_{1}, then X ⊆ A_{i} for some i. A set that is not connected is disconnected.

Lemma. Open intervals of ℝ are connected. If X is a connected subset of ℝ, and a < b, and a, b ∈ X, then [a, b] ⊆ X.

Exercise 46. Prove the lemma.

Theorem. The continuous image of a connected set is connected.

Proof. Suppose f is a continuous function, and f(X) is disconnected. Then X ⊆ A ∪ B, where A and B are disjoint open sets, and X ∩ A and X ∩ B are non-empty. Then X is a subset of the disjoint union f^{−1}(A) ∪ f^{−1}(B), but X is not a subset of f^{−1}(A) or of f^{−1}(B); so X is disconnected.

Corollary (I.V.T. for continuous real-valued functions). Suppose f is a continuous real-valued function on a connected set X. If a < b, and a, b ∈ f(X), then [a, b] ⊆ f(X).

Exercise 47. Prove the corollary.

An alternative approach to connectedness is the following.

A function is called two-valued if its image is a set of size 2 or less. One may then suppose that the image is a subset of {0, 1}. Every metric on this set determines the same open sets; indeed, every subset of {0, 1} will be open. So it makes sense to speak of a continous two-valued function.

Theorem. A subset X of a metric space is connected if and only if every continuous two-valued function on X is constant.

Proof. If X is connected, and f : X → {0, 1} is continuous, then f(X) is connected, so f(X) has at most one element. If X is not connected, so that X ⊆ A ∪ B, where A and B are disjoint open sets, each having non-empty intersection with X, then the function f : X → {0, 1} given by

f(x) = \begin{cases}0, & if x ∈ X ∩ A; \\ 1, & if x ∈ X ∩ B \end{cases}

is continuous (why?), and its range is (all of) {0, 1}.

Exercise 48. Supply the missing detail in the proof.

Exercise 49. Prove that a metric space (M, d) is connected if and only if the only subsets of M that are clopen (closed and open) are ∅ and M. Explain why [0, 1] ∪ [2, 3] is disconnected, even though it has no subsets that are both open and closed.

4.7 Uniform continuity and convergence

To say that a function f : M_{0} → M_{1} is continuous means, symbolically,

(∀x ∈ M_{0})(∀ε > 0)(∃δ > 0)(∀y ∈ M_{0})(y ∈ B(x; δ) → f(y) ∈ B(f(x); ε)).

One adjustment of the quantifiers makes no logical difference:

(∀ε > 0)(∀x ∈ M_{0})(∃δ > 0)(∀y ∈ M_{0})(y ∈ B(x; δ) → f(y) ∈ B(f(x); ε)).

A further adjustment makes a logical change, and gives us a new definition.

Definition. A function f : M_{0} → M_{1} is uniformly continuous if

(∀ε > 0)(∃δ > 0)(∀x ∈ M_{0})(∀y ∈ M_{0})(y ∈ B(x; δ) → f(y) ∈ B(f(x); ε)).

(The implication could also be written d_{0}(x, y) < δ → d_{1}(f(x), f(y)) < ε. ) For continuous functions in general, the delta depends on x. In uniformly continuous functions, one delta works for all x (though delta still depends on epsilon). It should be clear that uniformly continuous functions are indeed continuous.

Examples 4.1. (1) Let f : (0, 1] → ℝ be x ↦ 1/x. If δ > 0, let x = δ. Then B(x, δ) = (0, 2δ), so f(B(x, δ)) = (1/δ, ∞); in particular, no ball includes this image. So f is not uniformly continuous.

(2) Let g : ℝ → ℝ be x ↦ x^{2}. If δ > 0, let x = 1/δ. Then x + δ/2 ∈ B(x; δ), but g(x+δ/2)−g(x) > 1, so g(x+δ/2) ∉ B(g(x); 1). So g is not uniformly continuous.

Theorem. Continuous functions on compact sets are uniformly continuous.

Proof. Suppose f : M_{0} → M_{1} is continuous, and M_{0} is compact. Say ε > 0. (We have to find δ.) For each x in M_{0} there is δ_{x} such that

y ∈ B(x; 2δ_{x}) ⟹ f(y) ∈ B(f(x); ε/2).

By compactness, M_{0} is covered by some collection {B(x(i); δ_{x(i)}) : i ∈ I}, where I is finite. Let δ be the least of the δ_{x(i)}. Say x ∈ M_{0}, and y ∈ B(x, δ). But x ∈ B(x(i); δ) for some i in I; so y ∈ B(x(i), 2δ) by the triangle inequality. Hence f(x), f(y) ∈ B(f(x(i)), ε/2), so f(y) ∈ B(f(x), ε), again by the triangle inequality.

4.8 Uniform convergence

Suppose f and f_{n} are functions from M_{0} to M_{1} such that

f(x) = lim_{n→∞} f_{n}(x)

for each x in M_{0}. Suppose the f_{n} are continuous. Then f is continuous if and only if

lim_{y→x} lim_{n→∞} f_{n}(y) = lim_{n→∞} lim_{y→x} f_{n}(y).

Example. Let f_{n} be x ↦ x^{n}/(1 + x^{n}) : [0, ∞] → ℝ. Then

lim_{n→∞} f_{n}(x) = \begin{cases}0, & if 0 ⩽ x < 1; \\ 1/2, & if x = 1; \\ 1, & if 1 < x. \end{cases}

The f_{n} are continuous; their limit is not.

That a sequence of functions f_{n} : M_{0} → M_{1} converges to f (that is, f_{n} → f) means

(∀ε > 0)(∀x ∈ M_{0})(∃N)(∀m ∈ ℕ)(m ⩾ N → f_{n}(x) ∈ B(f(x); ε)).

We say that the sequence converges uniformly to f if

(∀ε > 0)(∃N)(∀x ∈ M_{0})(∀m ∈ ℕ)(m ⩾ N → f_{n}(x) ∈ B(f(x); ε)).

Theorem. Continuity is preserved under uniform convergence.

Proof. Say functions f_{n} : M_{0} → M_{1} are continuous and converge uniformly to f. Let a ∈ M and ε > 0. We have to find a positive δ such that

x ∈ B(a; δ) ⟹ f(x) ∈ B(f(a); ε).

Now,

d_{1}(f(x), f(a)) ⩽ d_{1}(f(x), f_{m}(x)) + d_{1}(f_{m}(x), f_{m}(a)) + d_{1}(f_{m}(a), f(a)).

By uniform convergence, there is m large enough that for all z in M_{0} we have d_{1}(f(z), f_{m}(z)) < ε/3. By continuity of f_{m} at a, there is a positive δ such that

x ∈ B(a; δ) ⟹ f_{m}(x) ∈ B(f_{m}(a); ε/3.

This δ is as desired.

Say f_{n} → f, and all functions are continuous. The convergence need not be uniform.

Example. f_{n}(x) = \begin{cases}nx, & if 0 ⩽ x ⩽ 1/n; \\ 2 − nx, & if 1/n < x ⩽ 2/n; \\ 0, & if 2/n < x. \end{cases}

Theorem. If a sequence of continuous real-valued functions f_{n} on a compact space M converges to a continuous limit f, and f_{n+1}(x) ⩽ f_{n}(x) for all x in M, then the convergence is uniform.

Exercise 50. Prove the theorem. Why is compactness needed?

4.9 Contractions and fixed points

Let f be a function from a metric space (M, d) to itself. A point P in M is a fixed point of f if f(P) = P. The function f is a contraction if there is some α (called the contraction constant in [0, 1) such that

d(f(x), f(y) ⩽ αd(x, y)

for all x and y in M.

Exercise 51. Prove that contractions are uniformly continuous.

Theorem. Contractions on complete spaces have unique fixed points.

Proof. Say f : M → M is a contraction with constant α. Let a ∈ M. Define a sequence of points a_{n} by a_{0} = a and a_{n+1} = f(a_{n}). Then

d(a_{n+2}, a_{n+1}) ⩽ αd(a_{n+1}, a_{n})

so the sequence is Cauchy (why?); hence it has a limit, b. This is a fixed point (why?), and is the only possible fixed point (why?).

Exercise 52. Supply the details of the proof.

5 Differentiation

Definition. If U ⊆ ℝ, and c is an interior point of U, then a function f : U → ℝ is differentiable at c, with derivative f′(c) at c, if the limit

lim_{x→c} \frac{f(x) − f(c)}{x − c}

exists and is f′(c).

Lemma. With notation as in the definition, f is differentiable at c if and only if, for some d, the function

x ⟼ \begin{cases}\frac{f(x) − f(c)}{x − c}, & if x ∈ U \ \{c\}; \\ d, & if x = c \end{cases}

is continuous at c; in this case, d = f′(c).

Proof. Obvious.

The function of the lemma can be called f_{c}^{∗}. [I did not use this notation fully in class.]

Theorem. Differentiability implies continuity.

Proof. Say f is differentiable at c. Then f_{c}^{∗} is continuous at c, hence so is

x ↦ (x − c)f_{c}^{∗}(x) + f(c),

which is f.

Theorem. The class of functions differentiable at a point is closed under addition, additive inversion and multiplication. Moreover,

• (−f)′(c) = −f′(c),

• f + g)′(c) = f′(c) + g′(c),

• (fg)′(c) = f′(c)g(c) + f(c)g′(c).

The class of functions differentiable and non-zero at a point is closed under multiplicative inversion, and

(\frac{1}{f} )′ (c) = \frac{−f′(c)}{f(c)^{2}}.

Hence also

(\frac{f}{g} )′ (c) = \frac{f′(c)g(c) − f(c)g′(c)}{g(c)^{2}}.

Constant functions have derivative 0, and the identity-function x ↦ x has derivative 1 (everywhere). Hence all polynomial functions have derivatives (everywhere), and rational functions have derivatives where they are defined.

Exercise 53. Prove the theorem.

Theorem (Chain Rule). Differentiability is preserved under composition. If f is differentiable at c, and g is differentiable at f(c), then g ∘ f is differentiable at c, and

(g ∘ f)′(c) = g′(f(c)) · f′(c).

Proof. The function x ↦ g_{f(c)}^{∗}(f(x)) · f_{c}^{∗}(x) is continuous at c; but this function is (g ∘ f)_{c}^{∗} and has value g′(f(c)) · f′(c) at c.

Exercise 54. Supply the details of the proof.

If f is invertible, and (f^{−1})′(f(c)) exists, then it is 1/f′(c). Why? Apply the Chain Rule to f^{−1} ∘ f or f ∘ f^{−1}.

Exercise 55. If f is continuous and invertible on an interval I, then f^{−1} is continuous on f(I).

Theorem. If f is continuous and invertible on an open interval I, and f′(c) is defined and non-zero for some c in I, then f^{−1} is differentiable at f(c).

Proof. In this case, 1/f_{c}^{∗} is continuous at c, hence 1/f_{c}^{∗} ∘ f^{−1} is continuous at f(c); but the latter function is (f^{−1})_{f(c)}^{∗}.

There are invertible functions f with non-zero derivative at c such that f^{−1} is not differentiable at f(c). By the theorem, such functions must not be continuous on any neighborhood of c.

Contents

1 Fields 1 1.1 Definition of a field . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Functions into a field . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 Polynomial and rational functions . . . . . . . . . . . . . . . . . 2 1.4 Subfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.5 Ordered fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.6 Convexity and bounds . . . . . . . . . . . . . . . . . . . . . . . . 3 1.7 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.8 Triangle inequalities . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9 The natural numbers . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.10 Archimedean ordered fields . . . . . . . . . . . . . . . . . . . . . 5 1.11 The integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.12 The rational numbers . . . . . . . . . . . . . . . . . . . . . . . . 6 1.13 Open and closed sets . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.14 Sequences of sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.15 Different treatments of the real numbers . . . . . . . . . . . . . . 8 1.16 Topology of the real numbers . . . . . . . . . . . . . . . . . . . . 9 1.17 The Cantor set . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.18 Binary expansions . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.19 Cardinality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.20 Supplementary exercises . . . . . . . . . . . . . . . . . . . . . . . 14

2 Metric spaces 15 2.1 Euclidean spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 The Euclidean topology . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Bolzano–Weierstraß Theorem . . . . . . . . . . . . . . . . . . . . 18 2.4 Cantor Intersection Theorem . . . . . . . . . . . . . . . . . . . . 19 2.5 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.6 Metric spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.7 Supplement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3 Limits 22 3.1 Definitions and abstract properties . . . . . . . . . . . . . . . . . 22 3.2 Convergence in Euclidean spaces . . . . . . . . . . . . . . . . . . 23 3.3 Monotone sequences . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4 Continuity 26

4.1 Definitions and basic properties . . . . . . . . . . . . . . . . . . . 26 4.2 Functions into Euclidean spaces . . . . . . . . . . . . . . . . . . . 27 4.3 Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4 Continuous functions on compact sets . . . . . . . . . . . . . . . 28 4.5 Additional exercises . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.6 Connectedness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.7 Uniform continuity and convergence . . . . . . . . . . . . . . . . 31 4.8 Uniform convergence . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.9 Contractions and fixed points . . . . . . . . . . . . . . . . . . . . 33

5 Differentiation 33