66
Metric spaces and some related concepts These notes describe some of the basic concepts related to metric spaces. They are intended to complement the textbook in courses (of mine) that involves analysis and proofs, either for reference, more details, or just extra reading. One reason why one would want to learn about metric spaces is that they are abundant. A metric space is just a set X , together with a distance function d that defines the distance d(x,y) between any two points x,y X . In concrete cases, X typically carries other structures. When discussing metric properties of X , these structures can be ignored. So it is not just about generality, but simplicity as well. If something can be proved by using just a few assumptions, why involve a dozen other things that are irrelevant? It just confuses the issues and complicates things unnecessarily. Most metric spaces that arise in “applications” are spaces of functions and/or subsets of normed vector spaces. This is why vectors and norms are covered here before metric spaces. Also, it is useful to have concrete examples ... 1. Sets and relations This section reviews some definitions involving sets, relations, and functions. It also in- troduces some notation that will be used later on. Make 100% sure that you know what a function is, and what Y X means for sets. We assume that the basic notations and facts from set theory are known. Recall that sets can be elements of other sets. To avoid a possible misunderstanding: “A is contained in B” means that A B, while “A is included in B” means that A B. We note that A A is always true, and A A always false. Recall also that {a,b} = {a}∪{b}, so {a,a} = {a}. Furthermore, since A B = B A for any sets, {a,b} = {b,a}. By contrast, for ordered pairs (a,b)= {{a}, {a,b}} we have (x,y)=(a,b) if and only if x = a and y = b. The empty set will be denoted by . The complement of a set A B is defined as B \ A = {b B : b A}. The power set of a set X , denoted by P (X ), is the collection (another word for “set”) of all subsets of X . If U⊂P (X ) is any collection of subsets of X , then the union and intersection of all sets U ∈U is defined as U ∈U U = x X : x U for some U ∈U , U ∈U U = x X : x U for all U ∈U . (1.1) Here, “x U for some U ∈U ” means “there exists U ∈U such that x U ”. We will need collections that contains too many sets to be enumerated. So you need to be familiar with the quantifiers “there exists” and “for all”. 1

Notes on Metric Spaces

Embed Size (px)

Citation preview

Page 1: Notes on Metric Spaces

Metric spaces and some related concepts

These notes describe some of the basic concepts related to metric spaces. They areintended to complement the textbook in courses (of mine) that involves analysis and proofs,either for reference, more details, or just extra reading.

One reason why one would want to learn about metric spaces is that they are abundant.A metric space is just a set X, together with a distance function d that defines the distanced(x, y) between any two points x, y ∈ X. In concrete cases, X typically carries otherstructures. When discussing metric properties of X, these structures can be ignored. So itis not just about generality, but simplicity as well. If something can be proved by using justa few assumptions, why involve a dozen other things that are irrelevant? It just confusesthe issues and complicates things unnecessarily.

Most metric spaces that arise in “applications” are spaces of functions and/or subsetsof normed vector spaces. This is why vectors and norms are covered here before metricspaces. Also, it is useful to have concrete examples . . .

1. Sets and relations

This section reviews some definitions involving sets, relations, and functions. It also in-troduces some notation that will be used later on. Make 100% sure that you know whata function is, and what Y X means for sets.

We assume that the basic notations and facts from set theory are known. Recall that setscan be elements of other sets. To avoid a possible misunderstanding: “A is contained inB” means that A ∈ B, while “A is included in B” means that A ⊂ B. We note thatA ⊂ A is always true, and A ∈ A always false. Recall also that {a, b} = {a} ∪ {b}, so{a, a} = {a}. Furthermore, since A∪B = B ∪A for any sets, {a, b} = {b, a}. By contrast,for ordered pairs (a, b) = {{a}, {a, b}} we have (x, y) = (a, b) if and only if x = a andy = b. The empty set will be denoted by ∅. The complement of a set A ⊂ B is defined asB \ A = {b ∈ B : b 6∈ A}. The power set of a set X, denoted by P(X), is the collection(another word for “set”) of all subsets of X.

If U ⊂ P(X) is any collection of subsets of X, then the union and intersection of all setsU ∈ U is defined as

U∈U

U ={x ∈ X : x ∈ U for some U ∈ U

},

U∈U

U ={x ∈ X : x ∈ U for all U ∈ U

}.

(1.1)

Here, “x ∈ U for some U ∈ U” means “there exists U ∈ U such that x ∈ U”. We will needcollections that contains too many sets to be enumerated. So you need to be familiar withthe quantifiers “there exists” and “for all”.

1

Page 2: Notes on Metric Spaces

2 HANS KOCH

Exercise 1. If U ⊂ P(X), convince yourself that

X \⋃

U∈U

U =⋂

U∈U

(X \ U) , X \⋂

U∈U

U =⋃

U∈U

(X \ U) . (1.2)

A collection of sets U ⊂ P(X) is said to be a partition ofX if it has the following properties.(1) Covering property: the union of all sets U ∈ U is X.(2) Mutual disjointness: for any U, V ∈ U , either U = V or U ∩ V = ∅.

If X and Y are two sets, then the Cartesian product X × Y denotes the set of all orderedpairs (x, y) with x ∈ X and y ∈ Y . A subset X × Y is also called a relation from X toY . If R is a relation from X to Y , then R−1 = {(y, x) ∈ Y ×X : (x, y) ∈ R} is a relationfrom Y to X. It is called the inverse relation of R. Given a subset U ⊂ X and a subsetV ⊂ Y , one defines the image of U under R, and the inverse image of V under R, as

R[U ] ={y ∈ Y : (x, y) ∈ R for some x ∈ U

},

R−1[V ] ={x ∈ X : (x, y) ∈ R for some y ∈ V

}.

(1.3)

The image R[X] is also called the range of R. If the range of R is Y then R is said to beonto. And R is said to be one-to-one if (x0, y) ∈ R and (x1, y) ∈ R implies x0 = x1.

Given a relation R, the statement (x, y) ∈ R is also written as “x R y”. For example, ifX = Y = {0, 1}, and if “≥” is the relation {(0, 0),(1, 0),(1, 1)} then we have 0 ≥ 0 and1 ≥ 0 and 1 ≥ 1. The inverse relation of “≥” is the relation “≤”= {(0, 0),(0, 1),(1, 1)}.

Let C be any set. A relation “≥” from C to C is said to be a total order relation on C ifthe following holds for all a, b, c ∈ C.

(1) a ≥ a. (reflexivity)(2) if a ≥ b and b ≥ a then a = b. (antisymmetry)(3) if a ≥ b and b ≥ c, then a ≥ c. (transitivity)(4) a ≥ b or b ≥ a. (totality)

(For a “partial order”, only the first 3 properties are required.) An element c ∈ C is saidto be maximal if c ≥ b for all b ∈ C. An element a ∈ C is said to be minimal if b ≥ afor all b ∈ C. Notice that, by antisymmetry, a totally ordered set can contain at most onemaximal element. If it does, then the maximal element is denoted by maxC. Similarly, atotally ordered set can contain at most one minimal element. If it does, then the minimalelement is denoted by minC.

A relation “∼” from C to C is said to be an equivalence relation on C if the followingholds for all a, b, c ∈ C.(1) a ∼ a. (reflexivity)(2) if a ∼ b then b ∼ a. (symmetry)(3) if a ∼ b and b ∼ c, then a ∼ c. (transitivity)

Page 3: Notes on Metric Spaces

3

To every equivalence relation on C one can associate a partition of C, and vice versa:

Exercise 2. Let “∼” be an equivalence relation on a given set C. The equivalence classof an element c ∈ C is the set c = {a ∈ C : a ∼ c}. Denote by U the collection of allequivalence classes c with c ∈ C. Show that U is a partition of C.

Exercise 3. Let U be a partition of a given set C. Define a relation “∼” on C as follows:a ∼ c if and only if there exists a set U ∈ U that contains both a and c. Show that “∼” isan equivalence relation on C.

A function (or map) from X to Y is a relation F ⊂ X × Y , with the property that forevery x ∈ X, there exists exactly one y ∈ Y such that (x, y) ∈ F . This element y is alsocalled the value of F at x, usually denoted by F (x), and sometimes by Fx. One also writesF : X → Y in place of F ⊂ X × Y . The composition of a function F : X → Y with afunction G : Y → Z is the function G ◦ F : X → Z defined by (G ◦ F )(x) = G(F (x)).The set of all functions from X to Y is denoted by Y X . If X = ∅ then the only functionfrom X to Y is the empty set, so Y ∅ = {∅}. If the inverse relation of F is also a function,then F is said to be invertible. An invertible function from X to Y is also called aone-to-one correspondence

Exercise 4. Show that a relation is a function if and only if the inverse relation isone-to-one and onto. (So a function is invertible if and only if it is one-to-one and onto.)

Remark 5. If no confusion can arise (about what X is), then a function F : X → Yis also denoted by x 7→ F (x). For example, if X = R, then x 7→ x2 denotes the function{(x, x2) : x ∈ R

}from R to R.

Remark 6. Sometimes, a function x 7→ Fx from X to Y is also called a family of pointsin Y , indexed by X.

A binary operation on a set X is a function F from X ×X to X. The value F ((x, y)) isalso written as “x F y”.

Example 7. Let N = {0, 1}. Then “+”= {((0, 0), 0),((0, 1), 1),((1, 0), 1),((1, 1), 0)} is abinary operation on N . For this operation we have 0+0 = 1+1 = 0 and 0+1 = 1+0 = 1.Or if “∗” is the binary operation {((0, 0), 0),((0, 1), 0),((1, 0), 0),((1, 1), 1)}, then we have0 ∗ 0 = 0 ∗ 1 = 1 ∗ 0 = 0 and 1 ∗ 1 = 1.

Problems 1

1. If X is any set, show that there exists a one-to-one correspondence between X × Xand X2, if we define 2 = {0, 1}.

2. If X is any set, show that there exists a one-to-one correspondence between P(X) and2X , if we define 2 = {0, 1}.

Page 4: Notes on Metric Spaces

4 HANS KOCH

3. Let f : X → Y be a function and A,B ⊂ Y . Show that if A and B are disjoint(meaning that A ∩B = ∅) then so are f−1[A] and f−1[B].

4. If f : X → Y is a function and V ⊂ Y , show that f−1[Y \ V ] = X \ f−1[V ]. Find anexample where f [X \ U ] 6= Y \ f [U ].

5. If X is any set, show that there is no function f : X → P(X) that is onto.Hint: Given any f : X → P(X), show that {x ∈ X : x 6∈ f(x)} is not in f [X].

2. Natural numbers

Although we are mainly interested in the real numbers, we cannot avoid using some prop-erties of the natural numbers. The convention used in these notes is that 0 is part of thenatural numbers.

By a model of the natural numbers we mean a triple (N,“+”,“∗”), where N is a set, andwhere “+” and “∗” are binary operations on N, subject to the following seven conditions(axioms).

(F1) Associativity: a+ (b+ c) = (a+ b) + c and a ∗ (b ∗ c) = (a ∗ b) ∗ c.(F2) Commutativity: a+ b = b+ a and a ∗ b = b ∗ a.(F3) Identity elements: There exists a unique number 0 (additive identity), and a number

1 6= 0 (multiplicative identity), such that 0+ d = d and 1 ∗ d = d, for every number d.

(F4) Distributivity: a ∗ (b+ c) = a ∗ b+ a ∗ c.

To be more precise, by “number” we mean an element of N, and the above conditions musthold for all numbers a, b, c. Notice that the triple (N ,“+”,“∗”) from Example 1.7 satisfiesthese axioms as well. To exclude trivial examples like these, we also impose the conditions

(N5) Unique predecessor: If a+ 1 = b+ 1 then a = b. And a+ 1 6= 0.

(N6) No zero products: If a ∗ b = 0 then a = 0 or b = 0.

Then one wants N to be as “small” as possible. One way to ensure this is by imposing

(N7) Principle of Mathematical Induction: If a set K ⊂ N contains the number 0, and if itcontains k + 1 for every k ∈ K, then K = N.

Exercise 1. Let f be the smallest (intersection of all) subset of N×N with the propertythat (0, 1) ∈ f , and that (k+1, (k+1)∗n) ∈ f whenever (k, n) ∈ f . Show that this definesa function f : N → N. The value f(n) is also called n-factorial and is denoted by n!.

The “standard model” of the natural numbers uses the following set N = {0, 1, 2, 3, . . .}.Given any set n, define its successor as n+ = n ∪ {n}. Starting with the empty set 0 = ∅,

Page 5: Notes on Metric Spaces

5

one then defines 1 = 0+ = {0} and 2 = 1+ = {0, 1} and 3 = 2+ = {0, 1, 2} etc. In thismodel, a number n ∈ N is the set n = {0, 1, 2, . . . , n− 1}.

Notation 2.1. Let U be any set and n = {0, 1, . . . , n − 1}. A function u : n → U fromn to U is uniquely determined by specifying all its values u(0),u(1), . . . ,u(n − 1). Sucha function is also called an ordered n-tuple of points in U and written as an ordered listu = (u0, u1, . . . , un−1), where uk = u(k).

Still using this model for the natural numbers: A set U is said to be finite if it is eitherempty (has 0 elements) or has n elements, for some nonzero n ∈ N. For U to have nelements means that there exists a one-to-one correspondence u : n→ U . In this case, wecan write U = {u0, u1, . . . , un−1}.

Remark 2. It is not hard to show that if U and V are finite, then so are U ∪ V andU × V and UV , and any subset of U .

Notation 2.2. If U is any set, a function u : N → U from N to U is uniquely de-termined by specifying all its values u(0),u(1),u(2), . . .. Such a function is also calleda U -valued sequence, or a sequence (of points) in U , and is written as an ordered listu = (u0, u1, u2, . . .), where uk = u(k).

A set U for which there exists a a one-to-one correspondence u : N → U is said to becountably infinite. In this case, we can write U = {u0, u1, u2, . . .}.

A set that is either finite or countably infinite is said to be countable. And a set that is notcountable is said to be uncountable or uncountably infinite. An example of an uncountableset is P(N), as Problem 1.5 shows.

Remark 3. One can show that if U and V are countable, then so are U ∪V and U ×V ,and any subset of U .

Problems 2

1. Determine the number of elements in the sets 3× 2 and 23.

2. Prove that every non-empty finite subset of a totally ordered set contains a maximalelement. Hint: The Principle of Mathematical Induction is needed for this.

3. Prove that if U and V are countable and W ⊂ U × V , then W is countable. Hint: Inthe case where W is infinite, if U = {u0, u1, u2, . . .} and V = {v0, v1, v2, . . .}, defineWn = {(uk, vm) : n ≤ k +m < n+ 1} and enumerate the points in

⋃n∈N

Wn.

Page 6: Notes on Metric Spaces

6 HANS KOCH

3. Real numbers

Most people are pretty familiar with the algebraic properties (addition and multiplication)of the real numbers. But 99% of the “real work” in analysis involves inequalities. Sopractice working with inequalities! And get comfortable with the sup (defined below).

Let R be a set, and let “+” and “∗” be binary operations on R. Later we will need anotherrelation “>”. In the axiomatic approach to the real numbers, one postulates what thequadruple (R,“+”,“∗”,“>”) has to satisfy in order to qualify as a real number system.The first postulate says that the triple (R,“+”,“∗”) has to be a “field”, which means thatit satisfies the properties (F1) . . . (F4) from the last section (for all a, b, c ∈ R), as well as

(F5) For every number a, there exists a number −a (additive inverse of a), such thata + (−a) = 0. For every number a 6= 0, there exists a number a−1 (multiplicativeinverse of a), such that a ∗ a−1 = 1.

By “number” we mean here an element of R. As usual, we define b − a = b + (−a), andb/a = b ∗ a−1 if a 6= 0. And to simplify notation, we will also write ab in place of a ∗ b.

A simple example of a field is given in Example 1.7. To eliminate such trivial examples,one postulates that there exists a relation “>” on R with the properties

(O1) For any a ∈ R, exactly one of a > 0, a = 0, 0 > a is true.

(O2) If a > 0 and b > 0 then a+ b > 0 and a ∗ b > 0.

(O3) If a > b then a+ c > b+ c, for any c ∈ R.

One calls a ∈ R positive if a > 0, and negative if 0 > a. As usual, we define a ≥ b asmeaning “a > b or a = b”. We will also write b < a in place of a > b, and b ≤ a in placeof a ≥ b.

Exercise 1. Show that “≥” defines a total order on R.

Exercise 2. Show that 1 > 0. If a > 0, show that −a < 0 and a−1 > 0. If a < 0, showthat −a > 0 and a−1 < 0.

Exercise 3. Let a and b be positive real numbers. Prove that if x > y then ax > ay.Prove that an < bn if and only if a < b.

Exercise 4. Assume n ∈ N and y ∈ R are positive. Show that {x ∈ R : xn < y} doesnot contain a maximum and {x ∈ R : x > 0 and xn > y} does not contain a minimum.Hint: vn − un = (v − u)

(vn−1 + vn−2u+ vn−3u2 + . . .+ vun−2 + un−1

).

Page 7: Notes on Metric Spaces

7

Definition 3.1. An interval is a subset I ⊂ R with the following property: If a ∈ I andb ∈ I and a < x < b, then x ∈ I.

Exercise 5. Show that R and [c,+∞) = {x ∈ R : x ≥ c} and (c,+∞) = {x ∈ R : x > c}and (−∞, c] = {x ∈ R : x ≤ c} and (−∞, c) = {x ∈ R : x < c} are intervals, for any c ∈ R.

Exercise 6. Let I and J be intervals. Show that I∩J is an interval. If I∩J is non-empty,show that I ∪ J is an interval.

Let N be the smallest subset of R that contains 0, and that contains k + 1 whenever itcontains k. This set satisfies the Principle of Mathematical Induction (N7). A proof byinduction shows that sums and products of numbers in N are again numbers in N. Fromthis one easily derives the properties required for the natural numbers (see Section 2). Bytaking all differences m−n with m,n ∈ N, one gets the set of integers Z. Then, by takingall quotientsm/n, withm ∈ Z and 0 6= n ∈ N, one ends up with the set of rational numbersQ. From the construction of Q it is then clear that (Q,“+”,“∗”,”>”) is an ordered field,in the sense that it satisfies all of the axioms listed so far.

Remark 7. The set Q is countable. To prove this, choose a representation q = m/n foreach q ∈ Q and collect the corresponding pairs (m,n) in a set Q ⊂ Z × N. It suffices toshow that this set Q is countable. See the Hint to Problem 2.3 on how to do this.

Definition 3.2. For a set A ⊂ R define Upper(A) = {x ∈ R : x ≥ a for all a ∈ A}. Anumber in Upper(A) is called an upper bound of A. We say that A is bounded above ifUpper(A) is non-empty. Similarly, define Lower(A) = {x ∈ R : x ≤ a for all a ∈ A}. Anumber in Lower(A) is called an lower bound of A. We say that A is bounded below ifLower(A) is non-empty.

Exercise 8. Show that Lower(A) = −Upper(−A) and Upper(A) = −Lower(−A), where−A is defined as A = {x ∈ R : −x ∈ A}.

The last axiom for a real number system is the following.

(C) Completeness: If a non-empty set A has an upper bound, then it has a least upperbound.

In other words, if the set of upper bounds Upper(A) is non-empty, then this set contains aminimum. This “least upper bound” is called the supremum of A and is denoted by supA.So we have supA = minUpper(A).

Exercise 9. Prove the Archimedean property: N is not bounded above.

Page 8: Notes on Metric Spaces

8 HANS KOCH

Exercise 10. Show that every interval (a, b) = (−∞, b)∩ (a,+∞) of diameter b− a > 1contains at least one integer. Hint: First show that A = {k ∈ Z : k ≤ b} is non-empty,and that supA is an integer.

Using Exercise 3.8, we see that if A has a lower bound, then the set of lower boundsLower(A) has a maximum. This “largest lower bound” is called the infimum of A and isdenoted by inf A. So we have inf A = maxLower(A).

Remark 11. Remember that sets of real numbers need not contain a minimum ormaximum. But if A does contains a maximum, then maxA is the smallest number inUpper(A), and thus supA = maxA. Similarly, if A contains a minimum, then minA isthe largest number in Lower(A), and thus inf A = minA. As seen in Problem 2.2, thisapplies e.g. when A is a non-empty finite set.

If you have never done the following exercise, do not skip it!

Exercise 12. Let U and V be two non-empty sets of real numbers, with the propertythat u ≤ v for every u ∈ U and every v ∈ V . Show that supU ≤ inf V .

Exercise 13. If 0 < x < 1, show that inf{xn : n ∈ N} = 0.

Definition 3.3. A set A ⊂ R is said to be bounded if it is both bounded above andbounded below. If A is bounded, the diameter of A is defined as diam(A) = supA− inf A.If not, A is said to have an infinite diameter.

Exercise 14. Let a < b. Show that all of the intervals [a, b] = (−∞, b] ∩ [a,+∞) and(a, b] = (−∞, b] ∩ (a,+∞) and [a, b) = (−∞, b) ∩ [a,+∞) and (a, b) = (−∞, b) ∩ (a,+∞)have diameter b− a.

Definition 3.4. Let X ⊂ R. A function f : X → R is said to be increasing if f(v) ≥ f(u)whenever and v ≥ u. f is said to be decreasing if f(u) ≥ f(v) whenever v ≥ u. Thequalifier strict is added if the same holds with “>” in place of “≥”.

Exercise 15. If n is a positive integer, show that x 7→ xn is strictly increasing on theinterval [0,+∞).

Exercise 16. Let f be a strictly increasing function on an interval I containing a < b,and let f(a) < y < f(b). Define x = supU , where U = {u ∈ I : f(u) < y}. Show thatx = inf V , where V = {v ∈ I : f(v) > y}.

Page 9: Notes on Metric Spaces

9

Exercise 17. Continuing the above, define d = sup{f(u) : u ∈ U} − inf{f(v) : v ∈ V }.We say that f has a jump at x if d > 0. Assume now that d > 0. Then, for any v ∈ V andany u ∈ U , we always have f(v)− f(u) ≥ d, no matter how small we choose v − u. Showthat this cannot happen for f(x) = xn with I = [0,+∞). See also Exercise 3.4.

Exercise 18. Show that every non-empty interval (a, b) contains at least one rationalnumber. Hint: To find such a rational number m/n, show first that there exists n ∈ N

such that n(b− a) > 1.

Applying the the result of Exercise 3.18 to N disjoint subintervals of (a, b), we see that(a, b) cannot contain fewer than N rational numbers. Since this holds for every N ∈ N,the interval (a, b) has to contain infinitely many rational numbers.

Exercise 19. Consider a sequence of intervals In = [an, bn] for n = 1, 2, 3, . . . that arenested, in the sense that I1 ⊃ I2 ⊃ I3 ⊃ . . .. Show that a = sup{a1, a2, . . .} is less than orequal to b = inf{b1, b2, . . .}, and that

⋂n∈N

In = [a, b].

Remark 20. Let y ∈ R and n ∈ N be positive. Exercise 3.17 shows that the numberx = sup{u ∈ R : un < y} satisfies xn = y. This allows one to define the n-th root functionx = y1/n. From there one defines ym/n =

(y1/n

)m.

Remark 21. A simple argument show that there is no rational number q that satisfiesq2 = 2. This implies e.g. that (Q,“+”,“∗”) does not satisfy the completeness axiom (C). Italso implies that there exist irrational (non-rational) numbers, with 21/2 being one of them.In fact, the rational numbers are heavily (!) outnumbered by the irrational numbers:

Theorem 3.5. Any interval [a0, b0] of positive diameter contains uncountably many realnumbers.

Proof. Assume for contradiction that I0 = [a0, b0] is countable, say I0 = {x0, x1, x2, . . .}.For n = 0, 1, 2, . . . do the following: Choose a subinterval In+1 ⊂ In of positive diameterthat does not contain the point xn . This yield a nested sequence of intervals I0 ⊃ I1 ⊃I2 ⊃ . . ., and we know from Exercise 3.19 that there exists a real number x that belongsto all of these intervals. By construction, we have x 6= xn for all n, which contradicts ourassumption that I0 = {x0, x1, x2, . . .}. Thus, I0 cannot be countable. QED

The following theorem about the exponential function will be proved later.

Theorem 3.6. There exists a function exp : R → R, satisfying exp(x+y) = exp(x) exp(y)for all x, y ∈ R. Furthermore,

∣∣exp(x)− 1− x∣∣ ≤ x2 whenever |x| ≤ 1

2 .

Page 10: Notes on Metric Spaces

10 HANS KOCH

Remark 22. Using these two properties of the function exp, one easily deduces that thefunction exp is strictly increasing and that its range is (0,+∞). In particular, exp : R →(0,+∞) is invertible. Its inverse ln : (0,+∞) → R is called the natural logarithm. Forx ∈ Q one can check that ax = exp

(x ln(a)

)whenever a > 0. For irrational x, we take this

as the definition of ax. In particular, exp(x) = ex with e = exp(1).

Problems 3

1. Show that Exercise 3.5 and Exercise 3.14 list all intervals and that the non-emptyones are all distinct.

2. Let s < 1. Prove by induction that (1− s)n ≥ 1− ns, for all n ∈ N.

3. Show that for every n ∈ N there exists c > 0 such that(1 + c

k+1

)n ≤ k+1k for all

positive integers k.

4. Let S be any set. Assume that u : S → R and v : S → R both have a bounded range.Show that w = u+v has a bounded range, and that supw[S] ≤ supu[S]+supv[S].

5. Prove the claims made in Remark 3.22. Hint: To prove that there are no jumps, usethat exp(u)− exp(v) = exp(v)[exp(u− v)− 1].

6. Let p > 0. Show that the natural logarithm and the function x 7→ xp are strictlyincreasing on (0,+∞).

7. Let x ∈ [0, 1]. Define p0 = 0, and pk = 12

(p2k−1 + x

)for k = 1, 2, 3, . . .. Show that

0 ≤ pk ≤ 1 for all k. Show that the sequence (p0, p1, p2, . . .) is increasing.Hint: Verify and use that

pk+1 − pk = 12 (pk + pk−1)(pk − pk−1) . (3.1)

8. In the above problem, write pk as Pk(x) to indicate the x-dependence. Show thateach Pk is an increasing function on [0, 1]. Combining this fact with (3.1), show thatPk+1 − Pk is also increasing on [0, 1] for each k.Remark: Summing over k shows that Pm − Pn is increasing whenever m > n.

9. The Binomial Theorem says essentially that(1 + x

n

)n=

∑nm=0 Cn,m

xm

m! , where

Cn,m = n−1n · n−2

n · · · n−m+1n , 0 ≤ m ≤ n . (3.2)

Define also Cn,m = 0 for n < m. Show that n 7→ Cn,m is an increasing sequence withvalues in [0, 1], and that sup{Cn,m : n ∈ N} = 1, for each m.Remark: Here, x0 = 1, and a product with no terms is 1.

Page 11: Notes on Metric Spaces

11

4. Complex numbers

The complex numbers can be defined in terms of the real numbers as follows. Denote byC the set of all ordered pairs z = (x, y) of real numbers x and y. (Not to be confused withintervals.) The first component x of z is called the real part of z. In symbols, Re(z) = x.The second component y of z is called the imaginary part of z. In symbols, Im(z) = y.On C, we define an addition and a multiplication by setting

(u, v) + (x, y) = (u+ x, v + y) , (u, v) ∗ (x, y) = (ux− vy, uy + vx) . (4.1)

It is straightforward to check that the properties (F1) . . . (F5) are satisfied. So the triple(C,“+”,“∗”) is a field. In particular, the additive and multiplicative identities are 0 = (0, 0)and 1 = (1, 0), respectively. For z = (x, y) the additive inverse is −z = (−x,−y), and if zis nonzero, then z−1 = (x/s,−y/s), where s = x2 + y2.

Notice that z = (x, y) can be written as z = (x, 0) + (0, y) = x1+ yi, where i = (0, 1).

Remark 1. It is also straightforward to check that the set of complex numbers of theform (x, 0), together with the operations defined in (4.1), and with the obvious relation“>”, satisfies all the axioms for the real numbers. Furthermore, (u, 0) ∗ (x, y) = u ∗ (x, y).So we could adopt a new model of R, namely the complex numbers of the form (x, 0).Then R becomes a subset of C, which is convenient. A sloppier way of achieving this is tosimply “identify” a real number x with the complex number (x, 0).

Exercise 2. Verify that i ∗ i = −1.

Notice that a2 ≥ 0 for any number a in an ordered field. So there cannot be a relation“>” on C that satisfies (O1),(O2),(O3). So when working with numbers that are allowedto be complex, do not write things like z < w, unless you state explicitly that z and w

are in fact real.

A zero of a function f : C → C is a number z ∈ C that satisfies f(z) = 0. A polynomialover C is a function P : C → C of the form P (z) = c0 + c1z+ c2z

2 + . . .+ cnzn, for some

n ∈ N and some “coefficients” c0, c1, . . . , cn ∈ C. A polynomial over R is defined similarly.The smallest d ∈ N such that cj = 0 for all j > d is called the degree of P and is denotedby deg(P ). A proof by induction shows that a polynomial of degree d > 0 has at most dzeros.

It is common in complex analysis to add an element “∞” to C. Then one defines z+∞ =∞+ z = ∞ and ∞/z = ∞ and z/∞ = 0 for all z ∈ C, as well as z ∗∞ = ∞∗ z = ∞ andz/0 = ∞ for all nonzero z ∈ C ∪ {∞}. Now . . .

Remark 3. The quotient z 7→ P (z)/Q(z) of two polynomials P and Q that have nocommon zeros defines a function R = P/Q from C → C ∪ {∞}. Such functions are called

Page 12: Notes on Metric Spaces

12 HANS KOCH

rational functions. One also defines R(∞) = ∞ if deg(P ) > deg(Q), or if Q is identically0. Otherwise one defines R(∞) = w, with w determined as follows:

Exercise 4. Let R = P/Q be a rational function, with P and Q having no commonzeros. Assume that deg(P ) ≤ deg(Q) and that Q is no identically 0. Show that thereexists a unique w ∈ C such that the following holds: For every ε > 0 there exists r > 0such that |R(z)−w| < ε whenever |z| > r. Hint: factor out zd both in the numerator anddenominator of P (z)/Q(z), where d = deg(Q).

Exercise 5. The complex conjugate of z = (x, y) is defined as z = (x,−y). Show thatz ∗ z = |z|2 and z+w = z+w and z ∗w = z ∗w, for all z,v ∈ C.

Just for completeness . . .

Theorem 4.1. The exponential function described in Theorem 3.6 extends to a functionExp : C → C, satisfying Exp(z+w) = Exp(z) ∗ Exp(w) for all z,w ∈ C. It also satisfiesExp(z) = Exp(z). Furthermore,

∣∣Exp(z)− 1− z∣∣ ≤ |z|2 whenever |z| ≤ 1

2 .

The proof will be given (later) as an exercise. To simplify notation, we write from now onz = x+ yi instead of z = x1+ yi, and zw instead of z ∗ w.

Remark 6. We will see later that Exp cannot be one-to-one. So Exp(v) = Exp(w) forsome complex numbers v 6= w. It follows that a = (v − w)i satisfies Exp(ai) = 1, andthus thus Exp(z + ai) = Exp(z) for every z ∈ C. In other words, Exp is periodic withperiod ai. Using the identities in Theorem 4.1 one finds that a is a real number. We mayassume that a > 0, since Exp(nai) = 1 for any integer n. The smallest a > 0 for whichExp(ai) = 1 is known as 2π. (There is a smallest, as we will see.)

Remark 7. One defines ez = Exp(z) and cos(z) = 12 [e

iz+e−iz] and sin(z) = 12i [e

iz−e−iz].The above implies that cos and sin are periodic with period 2π.

Problems 4

1. Show that∣∣Exp(z)

∣∣ = exp(Re(z)

)and [cos(z)]2 + [sin(z)]2 = 1, for all z ∈ C.

2. Show that Exp(πi) = −1 and Exp(12πi

)= i.

3. Show that 12 |z| ≤

∣∣Exp(z)− 1∣∣ ≤ 3

2 |z| whenever |z| ≤ 12 .

4. Given any w ∈ C, define fw : D → C by the equation fw(z) = z + wExp(−z) − 1,where D is the disk D =

{z ∈ C : |z| ≤ 1

8

}. Show that |f1(z)| ≤ 1

8 |z|, for all z ∈ D.Furthermore, if |w − 1| ≤ 1

24 , show that fw(z) ∈ D for all z ∈ D.

Page 13: Notes on Metric Spaces

13

5. Let en(z) =(1 + z

n

)n. Prove by induction that en(z) = 1 + z + z2rn(z) for some

function rn that satisfies |rn(z)| ≤ 1 whenever |z| ≤ 12 .

6. Let en(z) =(1 + z

n

)n. Prove that, for every z, w ∈ C and every ε > 0, there exists

N , such that∣∣en(z + w)en(−z)en(−w) − 1

∣∣ < ε whenever n > N . Hint: Writeen(z + w)en(−z)en(−w) as en(zn) and use the bound from Problem 4.5.

5. Functions and vectors

Roughly speaking, vectors are objects that can be added and multiplied by numbers,subject to certain rules. Do not think that vectors have to be n-tuples !!

In what follows, (F,“+”,“∗”) denotes either the fields of real numbers or the field of complexnumbers. Sometimes we will just write F in place of (F,“+”,“∗”).

The most prominent objects in analysis are functions.Recall how one adds real-valued and complex-valued functions:

Consider functions defined on a given non-empty set S, taking values in F. The sum u+v

of two functions u and u, and the product a ∗ u of a function u and a number a, aredefined by

(u+ v)(s) = u(s) + v(s) ,

(a ∗ u)(s) = a ∗ u(s) , for all s ∈ S .(5.1)

Remark 1. If one thinks of u(s) + v(s) and a ∗ u(s) as computations being carried out“at the point s”, then the function-operations u+v and a ∗u are just number-operations,carried out simultaneously at each point in S. The “computer” at s just works with thenumbers u(s), v(s) and a, using the rules that hold for numbers. So the properties belowshould not be too surprising.

The following properties are easily verified, using the field properties of F. Denoting(temporarily) by V the set of all functions from S to F, we have

(V1) Associativity of addition: (u+ v) +w = u+ (v+w), for all u,v,w ∈ V .

(V2) Commutativity of addition: u+ v = v+ u, for all u,v ∈ V .

(V3) Identity element of addition: There exists an element 0 ∈ V , called the zero element,such that v+ 0 = 0+ v = v, for all v ∈ V .

(V4) For all v ∈ V , there exists an element −v ∈ V , called the additive inverse of v, suchthat v+ (−v) = 0.

(V5) Distributivity with respect to addition in V : a∗ (u+v) = a∗u+a∗v, for all u,v ∈ Vand all numbers a.

Page 14: Notes on Metric Spaces

14 HANS KOCH

(V6) Distributivity with respect to number-addition: (a+ b)∗v = a∗v+ b∗v, for all v ∈ Vand all numbers a,b.

(V7) Associativity of number-multiplication: a ∗ (b ∗ v) = (ab) ∗ v, for all numbers a,b.

(V8) Identity element of number-multiplication: 1 ∗ v = v, for all v ∈ V .

The zero element referred to in (V3) is the constant function 0(s) = 0 for all s ∈ S, andthe additive inverse of v is the function (−v)(s) = −v(s) for all s ∈ S.

The above shows that the set FS of all functions v : S → F, with the operations definedin (5.1), is a vector space:

Definition 5.1. A vector space over F is a set V , together with a binary operation “+”on V , and a function “∗” from F × V to V , satisfying the properties (V1) . . . (V8). Theelements of V are also referred to as vectors in V . A vector space over R is also called areal vector space, and a vector space over C is also called a complex vector space.

In order to simplify notation, we will also write av in place of a ∗ v.

Example 2. The set FS of all functions from S to F is a vector space (over F). Remember!

Example 3. A trivial example of a vector space is the one-element set 1 = {0}, equippedwith the operations 0 + 0 = 0 and a ∗ 0 = 0. Notice that this vector space is R0.

Example 4. The simplest nontrivial real vector space is the set of real numbers R, withthe usual addition and multiplication. And the simplest nontrivial complex vector spaceis the set of complex numbers C, with the usual addition and multiplication.

Example 5. The next simple vector space is the space Rn of all functions from a nonzeron = {0, 1, . . . , n − 1} to R. Functions in the space are also called real n-vectors. In then-tuple Notation 2.1, the vector space operations (5.1) can be written as

(u0, u1, . . . , un−1) + (v0, v1, . . . , vn−1) = (u0 + v0, u1 + v1, . . . , un−1 + vn−1) ,

a(v0, v1, . . . , vn−1) = (av0, av1, . . . , avn−1) .(5.2)

The same notation us used for Cn and complex n-vectors.

For reference later on, we note that every n-vector u admits a representation

u = u0e0 + u1e1 + . . .+ un−1en−1 , (5.3)

Page 15: Notes on Metric Spaces

15

wheree0 = (1, 0, 0, . . . , 0, 0) ,

e1 = (0, 1, 0, . . . , 0, 0) ,

.... . .

en−1 = (0, 0, 0, . . . , 0, 1) .

(5.4)

Remark 6. As one learns in linear algebra, every vector space has a “dimension”, whichis either 0, 1, 2, 3, . . . or infinite. If S is any set, then the vector space RS of all functionsu : S → R has a dimension that is equal to the number of elements in S. In particular,Rn has dimension n, and RN is infinite-dimensional.

When verifying that the operations (5.1) make FS into a vector space, we only neededsums of function values u(s) + v(s), and products a ∗ u(s). Products of function valuesu(s) and v(s) are not needed! In the same way, one easily verifies the following

Theorem 5.2. Let S be any set andW any vector space. Then the setWS of all functionsfrom S to W , equipped with the operations (5.1), is a vector space.

Remark 7. The picture to keep in mind is the same as in Remark 5.1, except that the“computer at the point s” works now with vectors in W . The function-operations u + v

and a ∗ u are just W -operations, carried out simultaneously at each point in S.

Example 8. The space Wn for n ∈ N is analogous to the space Rn, except that thethe components uk of an n-tuple u = (u0, u1, . . . , un−1) are vectors in W . For example, ifW = RR then a vector in W 3 is a triple (u0, u1, u3) of functions u0, u1, u2 : R → R.

Example 9. The space WN is a space of sequences with components (values) in W . Inthe sequence Notation 2.2, the vector space operations (5.1) can be written as

(u0, u1, u2, . . .) + (v,v1, v2, . . .) = (u0 + v0, u1 + v1, u2 + v2, . . .) ,

a(v0, v1, v2, . . .) = (av0, av1, av2, . . .) .(5.5)

Example 10. If W = RR is the space of all real-valued functions on R, then WN is thespace of all sequences u = (u0, u1, u2, . . .) whose components are functions uk : R → R.

The following will be used in some exercises and examples.

Notation 5.3. The support of a sequence u = (u0, u1, u2, . . .) of points uk ∈ W is theset {k ∈ N : uk 6= 0}, where 0 denotes the zero vector in W . The set of all sequencesu : N →W whose support is finite is denoted by C00(N,W ).

Page 16: Notes on Metric Spaces

16 HANS KOCH

Exercise 11. Show that C00(N,W ) is a subspace of WN, in the following sense:

Definition 5.4. A subspace of a vector space V is a subset U of V that is closed underaddition and under multiplication by numbers. By this one means that if u and v belongto U , then so do u + v and av, for any number a. These two conditions guarantee thatU is itself a vector space: Namely, pick any u ∈ U and consider a ∗ u ∈ U . For a = 0 weget the zero vector 0, and for a = −1 we get −u. So (V3) and (V4) hold for U . The otherproperties among (V1) . . . (V8) hold for any vectors in V , including those in U .

Exercise 12. Let Uc = {u ∈ R2 : u0 + u1 = c}. Notice that, if u belongs to Uc, then0 ∗ u belongs to U0. Thus, Uc can be a subspace of R2 only if c = 0. Show that U0 isindeed a subspace of R2.

Just for completeness: certain functions can be multiplied . . .

Definition 5.5. Given a function c : S → F and a function u : S → W , where W is avector space over F, one defines the product c∗u : S →W by setting (c∗u)(s) = c(s)∗u(s)for all s ∈ S. Similarly, if c(s) 6= 0 for all s ∈ S, then u/c : S → W is defined by setting(u/c)(s) = [1/c(s)] ∗ u(s) for all s ∈ S.

Problems 5

1. Consider the vector space RS of all functions u : S → R, where S is any set. Givenany point s ∈ S, show that the set U = {u ∈ RS : u(s) = 0} is a subspace of RS .

2. Let U be a collection of subspaces of a given vector space V . Show that⋂

U∈U U is asubspace of V .

6. Notation for function spaces

This section can be skipped after glancing at its content. It is meant to be an easy-to-findplace for looking up the names of some function spaces. They appear mostly in examplesand some problems. Ignore at this point things that have not yet been defined!

A space named Name(A,B) contains all functions from A to B with certain properties:

• B(S,M). All f : S →M that are bounded.

• C(T,M). All f : T →M that are bounded and continuous.

• L(X,Y ). All f : X → Y that are continuous and linear.

• Σ(I, Y ). All f : I → Y that are piecewise linear.

Page 17: Notes on Metric Spaces

17

• C0(X,Y ). All f : X → Y that are continuous and satisfy limx→∞ f(x) = 0.

• C00(T, Y ). All f : T → Y that are continuous and have compact support.

• C00(N, Y ). All f : N → Y that have finite support.

Here, S can be any set, T a topological space, M a metric space, X and Y normed vectorspaces, and I an interval.

These spaces Name(A,B) have been chosen in examples since they are simple, and mostare just specializations of others. The norm (length function) or metric (distance function)for all these spaces is the same:

‖f‖∞ = sup{‖f(s)‖ : s ∈ S

}, (6.1)

d∞(f, g) = sup{d(f(s), g(s)

): s ∈ S

}. (6.2)

7. Norms

Roughly speaking, a norm is to vectors what the absolute value is to numbers: itmeasures the size (or length) of a vector. An important property of a norm is the triangleinequality.

Recall the definition of the absolute value of a real number x,

|x| ={x if x ≥ 0;−x, if x < 0.

(7.1)

A proof by cases shows that |xy| = |x||y| and |x| − |y| ≤ |x+ y| ≤ |x|+ |y|, for all x, y ∈ R.

Exercise 1. Define f(x) =(2x + 1)/(x2 − 2x + 1) for all x ∈ R. Prove that for every

ε > 0 there exists r > 0, such that |f(x)| < ε for all x ∈ R that satisfy |x| > r.Remark: If this exercise seems too difficult, acquire the necessary skills first (logic withquantifiers, inequalities) before continuing.

The absolute value of a complex number z = (x, y) is defined by |z| =√x2 + y2.

Exercise 2. Verify that |wz| = |w||z|, for all w, z ∈ C.

Definition 7.1. A subset A ⊂ F is said to be bounded if there exists a real number R > 0,such that |a| ≤ R for all a ∈ A. A function u : S → F is said to be bounded if its rangeu[S] is bounded.

Page 18: Notes on Metric Spaces

18 HANS KOCH

Exercise 3. Show that the function f : R → R defined in Exercise 7.1 is bounded.

Exercise 4. Prove that B(S,F) is a subspace of the vector space FS . In other words,show that if u : S → F and v : S → F are bounded, then so are u + v and av, for everynumber a.

Length-functions with properties similar to those of the absolute value also exist on Fn.The three most frequently used ones are

‖v‖1 = |v0|+ |v1|+ . . .+ |vn−1| ,‖v‖2 =

√|v0|2 + |v1|2 + . . .+ |vn−1|2 ,

‖v‖∞ = max{|v0|, |v1|, . . . , |vn−1|

}.

(7.2)

Exercise 5. Show that the functions v 7→ ‖v‖1 and v 7→ ‖v‖∞ define norms on Fn, inthe following sense:

Definition 7.2. A norm on a vector space V is a real-valued function v 7→ ‖v‖ that has theproperties (N1),(N2), and (N3) below. The pair

(V, ‖.‖

)is called a normed vector space.

(N1) ‖v‖ > 0 if v 6= 0.

(N2) ‖αv‖ = |α|‖v‖, for all vectors v and numbers α.

(N3) The triangle inequality: ‖u+ v‖ ≤ ‖u‖+ ‖v‖, for all vectors u and v.

Notice that property (N2), together with the fact that 0v = 0, implies that ‖0‖ = 0.

Remark 6. Setting u = w − v in the triangle inequality (N3), we obtain ‖w‖ ≤‖w− v‖+ ‖v‖, or equivalently, ‖w‖ − ‖v‖ ≤ ‖w− v‖. Replacing w by −v and v by −w,we also get ‖v‖ − ‖w‖ ≤ ‖w − v‖. Combining the two last inequalities, we obtain thefollowing “alternative version” of the triangle inequality

∣∣‖w‖ − ‖v‖∣∣ ≤ ‖w− v‖ . (7.3)

This inequality implies e.g. that if two vectors w and v are close together, in the sensethat w− v has a small norm, then their norms are also close.

Example 7. The function v 7→ ‖v‖2 defined in (7.2) clearly satisfies (N1) and (N2).

An explicit computation shows that ‖u‖22‖v‖22 − 14

(‖u + v‖22 − ‖u‖22 − ‖v‖22

)2is equal to∑n−1

i,j=0(uivj − ujvi)2 and thus nonnegative. This shows that (N3) is satisfied as well. The

Page 19: Notes on Metric Spaces

19

norm ‖.‖2 is called the Euclidean norm on Fn. If a complex number z = (x, y) is regardedas a vector in R2, then ‖z‖2 = |z|.

For an exercise involving the triangle inequality . . .

Definition 7.3. A subset X of a vector space V is said to be convex if for any two pointsx and y in X, the line segment

{(1− s)x+ sy : s ∈ [0, 1]

}is also included in X.

Exercise 8. Show that balls {v ∈ V : ‖v − u‖ < r} and {v ∈ V : ‖v − u‖ ≤ r} ina normed vector space V are convex. Here, u is any vector in V and r any positive realnumber.

Remark 9. The norms ‖.‖1 and ‖.‖2 are part of a family of norms

‖u‖p =(|u0|p + |u1|p + |u2|p + . . .

)1/p, 1 ≤ p <∞ , (7.4)

‖u‖∞ = sup{|u0|, |u1|, |u2|, . . .

}, (7.5)

defined both on Rn and on C00(N,F). If p is very large, then the sum the equation (7.4) is“dominated” by its largest term. This suggests (and it can be proved) that ‖u‖p becomes‖u‖∞ in the limit p→ ∞. These norms are commonly referred to as ℓp-norms.

Remark 10. Notice that the sup-norm (7.5) is well defined for any bounded sequence.The sequence space B(N,R), equipped with this sup-norm, is also denoted by ℓ∞.More generally, if S is any set, and if u : S → F is bounded, then the equation

‖u‖∞ = sup{|u(s)| : s ∈ S

}(7.6)

defines the so-called sup-norm on B(S,F).

Exercise 11. Show that (7.6) defines indeed a norm on B(S,F).

Problems 7

1. Draw the unit sphere S = {v ∈ R2 : ‖v‖p = 1} in the cases p = 1, 2,∞.

2. Let 1 ≤ p ≤ ∞. Show that, if the ℓp-norm of a n-vector u is small, then all itscomponents uk are small. More specifically, |uk| ≤ ‖u‖p for all k.

3. Let 1 ≤ p, q ≤ ∞ with 1p + 1

q = 1. Holder’s inequality says that

|u0v0|+ |u1v1|+ |u2v2|+ . . . ≤ ‖u‖p‖v‖q . (7.7)

Prove it in the case where p = ∞ and q = 1. Hint: Use that |uk| ≤ ‖u‖∞ for all k.

Page 20: Notes on Metric Spaces

20 HANS KOCH

4. Let X and Y be vector spaces. Let L : X → Y be linear map, that is, L(a ∗ u) =a ∗ L(u) and L(u+ v) = L(u) + L(v). Assume that L(u) = 0 only if u = 0. If ‖.‖Y

is a norm on Y , show that ‖u‖X = ‖L(u)‖Y defines a norm on X.

8. Equivalent norms

(This can be skipped on a first reading.)

Why consider different norms on the same space? Norms on a vector space V are usede.g. to define what it means for a sequence of vectors to converge, or for a function onV to be continuous. As we will see later, two different norms lead to different notionsof convergence and continuity (among many others), unless they are “equivalent”, in thefollowing sense.

Definition 8.1. Two norms ‖.‖ and ‖.‖′ on a vector space V are said to be equivalent ifthere exist constants C,C ′ > 0 such that for all v ∈ V ,

‖v‖ ≤ C‖v‖′ , ‖v‖′ ≤ C ′‖v‖ . (8.1)

Exercise 1. Show that this “equivalence” of norms on a given vector space V is anequivalence relation (as defined in Section 1) on the set of all possible norms on V .

The following exercise shows that, on the space Rn, all ℓp-norms are equivalent.

Exercise 2. Let n ∈ N and 1 ≤ p, q ≤ ∞ be fixed. Show that there exists a constant Csuch that ‖v‖p ≤ C‖v‖q for all vectors v ∈ Rn.Hint: In the definition of ‖v‖p, substitute the bound |vk| ≤ ‖v‖q from Problem 7.2.

Remark 3. On the space C00(N,R), the norms ‖.‖p are all mutually inequivalent!Here is a proof in just one case: Given any positive integer n, consider the sequenceu = (1, 1, . . . , 1, 0, 0, . . .

)whose first n values are 1, and the others 0. Then we have

‖u‖∞ = 1 and ‖u‖1 = n. Thus, ‖u‖1 = n‖u‖∞. Since n can be chosen arbitrarily large,we see that there cannot be any constant C such that ‖v‖1 ≤ C‖v‖∞ for all v ∈ C00(N,R).

Such inequivalence of norms is typical in infinite-dimensional spaces. A vector can betiny when measured with one norm, and huge (even infinite) when when measured withanother norm. Or some sequence of vectors can converge (as defined later) for one normand diverge for another. So the choice of norm is important. In practice, the choice isdetermined by the type of problem that is being investigated.

The same does not happen in finite dimensional spaces:

Page 21: Notes on Metric Spaces

21

Theorem 8.2. All norms on Rn are equivalent.

Here is the first “half” of the proof. The second half will be given later.

Proof. Let ‖.‖ be an arbitrary norm on Rn. Applying the triangle inequality to the sum(5.3), we obtain

‖u‖ ≤ |u0|‖e0‖+ |u1|‖e1‖+ . . .+ |un−1|‖en−1‖ ≤ C‖u‖∞ , (8.2)

for every vector u ∈ Rn, where C denotes the sum of all the n norms ‖ek‖.Later we will show that there exists a constant C ′ such that ‖u‖∞ ≤ C ′‖u‖ for

all u ∈ Rn. This implies that the norms ‖.‖ and ‖.‖∞ are equivalent. And since the“equivalence” of norms is transitive, as seen in Exercise 8.1, any two norms on Rn areequivalent. QED

9. Metric spaces

Roughly speaking, metric spaces are sets where one can tell the distance between anytwo elements. The triangle inequality plays an important role here. In some sense, thetheory of metric spaces is the study of the triangle inequality.

Recall that the distance between two (real or complex) numbers a and b is defined asd(a, b) = |a − b|. More generally, if V is any normed vector space, then the distancebetween two points u and v in V is defined as

d(u,v) = ‖u− v‖ . (9.1)

The following exercise shows that every normed vector space is also a metric space.

Exercise 1. The norm-properties (N1),(N2),(N3) imply that the distance function (9.1)has the properties (D1),(D2),(D3) below. Prove this.

Definition 9.1. A metric on a set X is a real-valued function d on X ×X that satisfiesthe conditions (D1),(D2), and (D3) below. The pair (X, d) is called a metric space.

(D1) d(x, y) = 0 if and only if x = y.

(D2) Symmetry: d(x, y) = d(x, y), for all x, y ∈ X.

(D3) The triangle inequality: d(x, z) ≤ d(x, y) + d(y, z), for all x, y, z ∈ X.

One basic property of a metric d, that follows directly from these three assumptions, isthat d takes no negative values. Namely, 0 = d(x, x) ≤ d(x, y) + d(y, x) = 2d(x, y).

Page 22: Notes on Metric Spaces

22 HANS KOCH

Remark 2. Notice how simple the assumptions (D1),(D2), and (D3) are! Two trivialconditions, plus the triangle inequality. Still, hidden in these assumptions are the realnumbers: the metric d is real-valued.

Remark 3. If it is clear what metric d is being used, we will simply write X instead of(X, d). If X is a normed vector space, then it is always assumed that the metric d is givenby (9.1), unless specified otherwise.

Remark 4. A metric space need not be a vector space! In fact, on any set X one candefine a metric d : X ×X → R, by setting d(x, x) = 0, and d(x, y) = 1 whenever x 6= y.This metric is called the discrete metric on X.

Exercise 5. If φ : H → X is a one-to-one function from a set H to a set X, and if d isa metric on X, show that d∗(u, v) = d

(φ(u), φ(v)

)defines a metric d∗ on H.

Exercise 6. Let X = R and define φ : R → X by the equation φ(s) = s1+|s| . According

to Exercise 9.5,d∗(u, v) =

∣∣φ(u)− φ(v)∣∣ (9.2)

defines a metric on R. Now include two additional elements ±∞ and set φ(±∞) = ±1.Show that (9.2) defines a metric on R ∪ {−∞,+∞}.

Exercise 7. Let S be a normed vector space. Define φ(s) = ‖s‖−2s for every s ∈ S withnorm ≥ 1. (Notice that φ(s) = s−1 in the case S = R.) According to Exercise 9.5,

d∗(u, v) =∥∥φ(u)− φ(v)

∥∥ (9.3)

defines a metric on H = {s ∈ S : ‖s‖ ≥ 1}. Now include an additional element ∞, anddefine φ(∞) = 0. Show that (9.3) defines a metric on H∗ = H ∪ {∞}.

Definition 8. Let B be a non-empty set in a metric space (X, d). If the set of distances{d(u, v) : u, v ∈ B} is bounded, then its supremum is called the diameter of B and isdenoted by diam(B). Otherwise, B is said to have an infinite diameter.

Example 9. Let (X, d) be a metric space. For every point y in X and every positivereal number r, define the ball of radius r in X, centered at y, to be the set

Br(y) ={x ∈ X : d(x, y) < r

}. (9.4)

If u and v are any two points in Br(x), then d(u, v) ≤ d(u, y) + d(y, v) ≤ r + r = 2r. Thisshows that the diameter of Br(y) is no larger than 2r.

Page 23: Notes on Metric Spaces

23

Definition 9.2. A set in a metric space X is called bounded if it is included in some ballBr(y). A function f : S → X is said to be bounded if its range f [S] is bounded.

Exercise 10. Show that a set is bounded if and only if it has a finite diameter.

Exercise 11. Show that R is bounded for the metric (9.2) but unbounded for the usualmetric d(x, y) = |x− y|.

Exercise 12. Let S be any set. If (Y, d) a metric space, show that (6.2) defines a metricon B(S, Y ). If

(Y, ‖.‖

)a normed vector space, show that B(S, Y ) is a vector space, and

that (6.1) defines a norm on this space.

Definition 9.3. A set in a metric space X is said to be totally bounded if it can be coveredby finitely many balls of radius r, for any given r > 0.

Here, “covered” means that the union of the balls include X. In general, total boundednessis much stronger than boundedness . . .

Exercise 13. Show that total boundedness implies boundedness. Show that in Rn theconverse holds as well.

Exercise 14. Consider the space (X, d), where X = {x0, x1, x2, . . .} is a countablyinfinite set, and where d is the discrete metric: d(xm, xn) = 1 for m 6= n. Show that thisspace is bounded, but not totally bounded.

Remark 15. Every subset of a metric space is itself metric space, in the following sense.If d is a metric on X, and if X0 is a subset of X, then d also defines a metric on X0 (byrestriction). In sloppy notation, (X0, d) is a subspace of (X, d).

Example 16. The distance function d(a, b) = |a− b| makes any set of real numbers intoa metric space. Similarly, the distance function (9.1) makes any subset of a normed vectorspace into a metric space. This simple fact is very useful!

Eventually, we want to study functions, continuity, sequences, convergence, etc. But firstone has to define what one means by a continuous function, or a convergent sequence, etc.Here, open sets play an important role.

Definition 9.4. A subset U of a metric space X is called open if for every point u ∈ Uthere exists a radius ε > 0, such that the ball Bε(u) is included in U .

Page 24: Notes on Metric Spaces

24 HANS KOCH

Remark 17. This definition applies also to normed vector spaces (which are metricspaces as well), including the spaces R and C. It is the one and only definition of opensets in all of these spaces. Forget any other “definition” that you may have heard!

Exercise 18. Assuming U and V are opens subsets of R, show that their Cartesianproduct U × V = {(u, v) : u ∈ U, v ∈ V } is an open subset of R2.

Example 19. The ball Br(y) is open. In order to prove this, let u be a fixed butarbitrary point in Br(y). Let δ = d(u, y) and ε = r−δ. Since δ < r, we have ε > 0. By thetriangle inequality, if x is any point in Bε(u), then d(x, y) ≤ d(x, u) + d(u, y) < ε+ δ = r,implying that x belongs to Br(y). So Bε(u) is a subset on Br(y). Since u ∈ Br(y) wasarbitrary, we conclude that Br(y) is open.

As a result, we will refer to the balls (9.4) as an open balls.

Example 20. The open balls in R are open intervals: Br(y) = (y − r, y + r). The openballs in C are open disks: Br(u+ vi) = {x+ yi ∈ C : (x− u)2 + (y − v)2 < r2}.

Important: Consider an open set U ⊂ X. By definition, for every u ∈ U there exists apositive real number ε(u) such that the open ball Bε(u)(u) is included in U . Clearly, everyx ∈ U belongs to at least one of these balls, namely Bε(x)(x). Conversely, every x ∈ Xthat belongs to one of the balls Bε(u)(u) also belongs to U , since U includes Bε(u)(u). Thisshows that

U =⋃

u∈U

Bε(u)(u) , (9.5)

and proves the

Theorem 9.5. In a metric space, every open set can be written as a union of open balls.

Problems 9

1. Show that if d0 and d1 are metrics on a set X, and if c0 and c1 are nonnegative realnumbers, not both zero, then d = c0d0 + c1d1 is also a metric on X.

2. If d is a metric on X, show that d′(x, y) = d(x,y)1+d(x,y) defines a metric d′ on X.

3. If p(z) = c0+ c1z+ c2z2+ . . .+ cmz

m is a non-constant polynomial, show that the set{z ∈ C : |p(z)| ≤ 1} is bounded in C.

4. Consider the space (X, d), where X is the interval X = [−1, 1] and d(x, y) = |x− y|.Describe the two balls B3(1) and B1(1) in terms of intervals. Notice that both areopen in the space (X, d), but the same sets are not open in the space (R, d).

Page 25: Notes on Metric Spaces

25

10. Properties of open sets

Roughly speaking, collecting all opens sets from a metric space, one gets a “bag” of setswith some nice properties. Interestingly, such a collection (a topology) is all one needs todefine many of the basic notions in analysis. How exactly it was obtained is irrelevant.

The following examples show that open sets behave differently under unions and intersec-tions.

Exercise 1. Let U be an arbitrary collection of open sets in a metric space X. Showthat the union of all sets U ∈ U is again an open set in X.

Exercise 2. Consider the open intervals In = (−1/n, 1/n) in R. Show that the inter-section of all these open intervals In is not an open subset of R. Compare this with thefollowing

Theorem 10.1. If U is any finite collection of open sets in a metric space X, then theintersection of all sets U ∈ U is again an open set in X.

Proof. By assumption, U = {U0, U1, . . . , Un−1} for some n, where each Uj is an open setin X. Denote by V the intersection of all these open sets. Let y be a fixed but arbitrarypoint in V . Then the following holds for each j: Since Uj is open, there exists a radiusεj > 0 such that the ball Bεj (y) is included in Uj . Now let ε be the smallest of the numbersε0, ε1, . . . , εn−1 . (Here we use that U is a finite collection!) Then Bε(y) is included in eachBεj (y) and thus in V . Since y ∈ V was arbitrary, this shows that V is open. QED

Exercise 3. Show that the “rectangle” {v ∈ Rn : |vj | < 1/j for all j} is open in Rn.

Remark 4. Contrary to what some may think, not every set that is defined via strictinequalities is open! Here is just one example:

Exercise 5. Consider the sequence space ℓ∞ described in Remark 7.10. Show that the“rectangle” {v ∈ ℓ∞ : |vj | < 1/j for all j} is not open in ℓ∞.

The results of Exercise 10.1 and Theorem 10.1 on open sets in metric spaces are summarizedin the properties (T2) and (T3) below. The property (T1) is a trivial consequence ofDefinition 9.4.

(T1) Both X and the empty set ∅ are open.

(T2) Any union of open sets is open.

Page 26: Notes on Metric Spaces

26 HANS KOCH

(T3) Any intersection of finitely many open sets is open.

These properties are sufficiently important to motivate the following

Definition 10.2. Let X be any set. A topology on X is a collection T of subsets of X,also referred to as open sets, that satisfies the properties (T1), (T2), and (T3) above. Thepair (X, T ) is called a topological space.

Given a point u ∈ X, any open set containing u is called an open neighborhood of u.

Exercise 6. Show that T ={∅, {a}, {b, c}, {a, b, c}

}is a topology on X = {a, b, c}.

Here, a, b, c are three distinct objects.

Remark 7. Notice that the definition of a topological space makes no reference to thereal numbers! In particular, there is no way of telling whether two points are close or farapart. Or to compare the size of two sets in different parts of X. But locally, there is a(partial) order relation, namely set-inclusion “⊂”. And this is all we really need here.

Remark 8. If it is clear what topology T is being used, then we will also write X insteadof (X, T ). If X comes already equipped with a metric, then it is always assumed that thetopology (definition of open sets) is the metric topology described in Definition 9.4. Thisincludes normed vector spaces, which come equipped with the metric (9.1).

Example 9. Two trivial topologies on a set X are the following. With the so-calledindiscrete topology T = {X, ∅}, the only open sets areX and ∅. With the discrete topologyT = P(X), every subset of X is considered open. This is the default topology on finitesets and on N.

Pretty much all topological spaces that are used in analysis have the following property,including all metric spaces (see the exercise below).

Definition 10.3. A topological space is said to have the Hausdorff property (or to be aHausdorff space) if for any two distinct points u and v in the space, there exists an openneighborhood U of u, and an open neighborhood V of v, such that U ∩ V = ∅.

Exercise 10. Show that metric spaces have the Hausdorff property. Hint: Take U =Br(u) and V = Br(v), with r = d(u, v)/3, and use the triangle inequality.

Definition 10.4. Let A be a subset of X. The interior of A, also denoted by A◦, is thelargest open subset of A. (This may be the empty set.)

Page 27: Notes on Metric Spaces

27

By “largest” open subset of A we mean the union of all open sets included in A. By theproperty (T2), this union is open.

Exercise 11. Determine the interior of each interval in Exercise 3.5 and Exercise 3.14.

Exercise 12. If A ⊂ R is countable, show that A◦ = ∅. Hint: See Theorem 3.5.

Definition 10.5. Two metrics d and d′ defined on a set X are said to be topologicallyequivalent if every ball Br(y) = {x ∈ X : d(x, y) < r} includes a ball Br′(y) = {x ∈ X :d′(x, y) < r′}, and vice versa. Here, r and r′ are meant to be positive.

Exercise 13. If d and d′ are two topologically equivalent metrics on a set X, showthat they define the same topologies; that is, any set U ⊂ X that is open with respectto the metric d is also open with respect to the metric d′, and vice versa. Hint: Use therepresentation (9.5) of open sets.

Exercise 14. If two norms ‖.‖ and ‖.‖′ on a vector space X are equivalent in the sense ofDefinition 8.1, show that the corresponding metrics d(x, y) = ‖x−y‖ and d′(x, y) = ‖x−y‖′are topologically equivalent. In addition, show that if A ⊂ X is bounded for the norm ‖.‖,then it is also bounded for the norm ‖.‖′, and vice versa.

Exercise 15. Show that d(x, y) = |x − y| and d∗(x, y) =∣∣ 1x − 1

y

∣∣ define topologically

equivalent metrics on X = [1,+∞). Notice that X is bounded for the metric d∗ but notfor the metric d.

Remark 16. As the above shows, the notion of boundedness is not preserved undertopological equivalence. It is a metric but not topological notion. (The same is true forthe notion of completeness that will be discussed later.)

In the remaining part of these notes, the symbol X and the word “space” always refer toa topological space, unless stated otherwise.

Problems 10

1. Check that the space (X, T ) described in Exercise 10.6 does not have the Hausdorffproperty.

2. Show that the square {(x1, x2) ∈ R2 : |x1|+ |x2| = 1} in R2 has an empty interior.

3. Show that the interior of the disk {z ∈ C : |z| ≤ r} is the open disk {z ∈ C : |z| < r}.

Page 28: Notes on Metric Spaces

28 HANS KOCH

11. Closed sets

Caution: Unlike with windows and doors, “closed” is not the same as “not open” !In the most frequently used spaces (including R), the vast majority of sets are neither opennor closed. And there can be sets that are both open and closed; among those are theentire space X and the empty set ∅.

Definition 11.1. A subset A of X is said to be closed if its complement X \A is open.

Exercise 1. Show that the ball {x ∈ X : d(x, y) ≤ r} in a metric space (X, d) is closed.

Exercise 2. Let A ⊂ R be closed, non-empty, and bounded above. Show that A containssupA.

Exercise 3. Consider the sequence space ℓ∞ described in Remark 7.10. Given any c ∈ R

and any j ∈ N, show that the cylinder Cj = {v ∈ ℓ∞ : |vj | ≤ c} is closed in ℓ∞.

Exercise 4. Prove that an arbitrary intersection of closed sets is closed, and that anyfinite union of closed sets is closed.

Exercise 5. Show that the “rectangle” {v ∈ ℓ∞ : |vj | ≤ 1/j for all j} is closed in ℓ∞.Remark: Compare this with Exercise 10.5.

Definition 11.2. Let A be a subset of X. The closure of A, also denoted by A, is thesmallest closed set including A. The boundary of A, also denoted by ∂A, is the intersectionof A with X \A.

By “smallest” closed set including A we mean the intersection of all closed sets includingA. As seen in Exercise 11.4, this intersection is closed.

Exercise 6. Show that ∂A = A \A◦.

Exercise 7. Show that the closure of the open ball {x ∈ X : ‖x‖ < 1} in a normedvector space X is the closed ball {x ∈ X : ‖x‖ ≤ 1}.

Exercise 8. Let A be a set in a metric space X with a finite diameter. Show that theclosure of A has the same diameter.Hint: Consider the sets B(a) = {x ∈ X : d(x, a) ≤ diam(A)} with a ∈ A.

Here is another property related to the notion of closure:

Page 29: Notes on Metric Spaces

29

Definition 11.3. A subset A of a topological space X is said to be dense (in X) if theclosure of A is X.

In other words, A is dense in X if every non-empty open set in X contains at least onepoint from A. In a metric space, this means that within any positive distance of anypoint in X one can find at least one point from A. In that sense every point in X can beapproximated to arbitrary precision by points in A.

Exercise 9. Show that Q is dense in R. Hint: See Exercise 3.18 and Theorem 3.5.

Dense sets can be extremely useful. A common strategy in analysis is to approximateobjects by simpler objects in a dense set. The “smaller” the dense set is, the better.

Definition 11.4. A space is said to be separable if it contains a countable dense set.

Lemma 11.5. A totally bounded metric space is separable.

Proof. Assume that X is totally bounded. Start with A = ∅. For n = 0, 1, 2, . . . do thefollowing: cover X with balls of radius 2−n and add the centers of these balls to the setA. Clearly, the resulting set A is countable and dense in X. QED

The following definition of “completeness” is non-standard, but as we will see later, it isequivalent to the standard definition.

Definition 11.6. A metric space X is said to be complete if every nested sequence B0 ⊃B1 ⊃ B2 ⊃ . . . of non-empty closed sets in X, with inf{diam(Bn) : n ∈ N} = 0, has anon-empty intersection

⋂n∈N

Bn.

Exercise 10. Show that the intersection⋂

n∈NBn cannot contain more than one point.

Exercise 11. Show that R is complete in the sense of Definition 11.6.

Problems 11

1. Show that circles {x+ yi ∈ C : x2 + y2 = r2} in C are closed.

2. Find a metric space (X, d) where the closure of some open ball {x ∈ X : d(x, a) < 1}is not the closed ball {x ∈ X : d(x, a) ≤ 1}.

3. Let A be a closed set in a metric space X. Assume that f : X → R maps open setsto open sets, and when restricted to A, takes a maximum value at some point x ∈ A.Show that x ∈ ∂A.

Page 30: Notes on Metric Spaces

30 HANS KOCH

4. Show that Rn is separable. Hint: Show that Qn is countable and dense in Rn.

5. Show that ℓ∞ is not separable. Hint: Assume for contradiction that {a0,a1,a2, . . .}is dense in ℓ∞. Consider the sequence b : N → R with b(k) = ak(k) + 1.

6. Show thatX = (0, 1), equipped with the usual metric d(x, y) = |x−y|, is not complete.

12. Limit points

Definition 12.1. Let A be a subset of X. A point x ∈ X is said to be a limit point of Aif every open neighborhood of x contains some point from A that is different from x.

Exercise 1. Show that if A is a subset of a metric space X, and if x is a limit point ofA, then every ball Br(x) contains infinitely many points from A.Hint: After finding one such point a 6= x, reduce r to d(a, x) and repeat . . .

It follows immediately from Definition 12.1 that if A is closed, then A contains all its limitpoints. (If A is closed, then every x outside A has an open neighborhood that contains nopoints from A, namely X \A.) For metric spaces, the converse is true as well:

Theorem 12.2. A set A in a metric space is closed if and only if it contains all its limitpoints.

Proof. As mentioned above, it suffices to prove the “if” part. Let A be any subset of Xthat contains all its limit points. The goal is to prove that A′ = X \A is open, which thenimplies that A is closed. So let x be any point in A′. Then x cannot be a limit point ofA. Thus, there exists an open neighborhood of x that does not contain any point fromA. Being open, this neighborhood has to include some open ball Br(x), and this ball isentirely included in A′. Since this holds for any x ∈ A′, it follows that A′ is open. QED

Exercise 2. Show that the closure of a set A in a metric space is the set A, togetherwith all limit points of A.

Definition 12.3. Let a = (a0, a1, a2, . . .) be a sequence in a topological space. We saythat the sequence a is infinite if its range A = {a0, a1, a2, . . .} is an infinite set. And by alimit point of a we mean a limit point of A.

The following will be extended by one more item in the next section.

Lemma 12.4. For a metric space X, the following are equivalent.

Page 31: Notes on Metric Spaces

31

(a) Every infinite sequence in X has a limit point.

(b) X is totally bounded and complete.

Proof. First, assume that X is totally bounded and complete. Let (a0, a1, a2, . . .) bea sequence in X such that the set A0 = {a0, a1, a2, . . .} is infinite. Let X0 = X. Forn = 1, 2, 3, . . . we do the following: Cover Xn−1 with finitely many balls of radius 2−n.Among them, pick a ball Xn such that the set An = An−1 ∩Xn is infinite. Then removesome point from An and name it bn−1. The end result is a sequence (b0, b1, b2, . . .). LetBn be the closure of the set {bn, bn+1, bn+1, . . .}. Since Bn is included in the closure ofXn, we have diam(Bn) ≤ 2−n. So by completeness,

⋂n∈N

Bn contain a point b. Clearly, bis a limit point of A0.

Next, assume that X is not totally bounded. Then there exists an r > 0, such thatany given finite sequence (b0, b1, . . . , bn−1) can be extended by one component bn thatsatisfies d(bn, bk) ≥ r for all k < n. Clearly, the resulting sequence is infinite and has nolimit point.

Finally, assume that X is not complete. Then there exists a nested sequence B0 ⊃B1 ⊃ B2 ⊃ . . . of non-empty closed sets in X, with inf{diam(Bn) : n ∈ N} = 0, that hasan empty intersection

⋂n∈N

Bn. We may assume that Bn+1 6= Bn for all n. Then picka point bn ∈ Bn \ Bn+1 for each n. Clearly, the resulting sequence is infinite and has nolimit point. QED

Problems 12

1. Consider R ∪ {−∞,+∞}, equipped with the metric d∗ as described in Exercise 9.6.Find all limit points of Z.

2. In the space ℓ∞, a lot happens at “infinity”: Prove that C00(N,R) is not dense in ℓ∞.Hint: Show e.g. that (1, 1, 1, . . .) is not a limit point of C00(N,R).

13. Compact sets

Roughly speaking, a compact set is a set A that is not “endless” anywhere. So a searchfor an element a ∈ A with some special properties only takes a “finite effort”. Say eachmember in a search-team takes care of an open set U . . .

An open covering of a set A ⊂ X is a collection U of open sets U ⊂ X whose union covers(includes) the set A.

Definition 13.1. A set A ⊂ X is said to be compact if every open covering of A includesa finite open covering of A.

In other words, if one starts with an infinite open covering U of A, then one can discardall except finitely many sets from U and still have a covering of A.

Page 32: Notes on Metric Spaces

32 HANS KOCH

Exercise 1. Show that a compact metric space without limit points is a finite set.Hint: If X has no limit points then every x ∈ X has an open neighborhood Ux thatcontains no other points from X. The collection U = {Ux : x ∈ X} is an open covering . . .

Exercise 2. Show that every closed subset A of a compact space is compact. Hint:Given any open covering of A, add to it the open set X \A to get an open covering of X.

Exercise 3. Prove that a compact set in a metric space is totally bounded.

The above exercise covers a “global” aspect of compactness. A more “local” aspect is seenin the following

Exercise 4. Show that the open interval A = (0, 1) is not compact. Hint: Cover A withthe intervals (1/n, 1) for n = 2, 3, 4, . . ..

Theorem 13.2. Any closed interval [a, b] is compact in R.

The classic proof goes as follows.

Proof. Let U be a fixed open covering of [a, b]. Assume for contradiction that I0 = [a, b]has the following property P : No finite collection of sets from U can cover this interval.Now, if we bisect I0 into two closed intervals of half the diameter of I0 , then one of them,call it I1 , also has the property P . By iterating this procedure, we obtain a nested sequenceof intervals In of diameter 2−n(b−a), all with the property P . From Exercise 3.19 it followsthat the intersection of all these intervals contains a single point x. Now one of the setsU ∈ U must contain x, and U clearly covers In if n is sufficiently large. This contradictsthe assumption, so [a, b] must be compact. QED

Exercise 13.3 shows that a compact set in a metric space must be (totally) bounded. Ournext theorem shows that they must also be closed. Recall from Exercise 10.10 that everymetric space has the Hausdorff property.

Theorem 13.3. Any compact subset of a Hausdorff space is closed.

Proof. Let (X, d) be a metric space, and let Y ⊂ X be compact. If Y = X then Y isclosed. Assume now that Z = X \ Y is non-empty. Let z be a fixed but arbitrary pointin Z. Then for every y ∈ Y , there exist an open neighborhood Uy of y, and an openneighborhood Vy of z, such that Uy ∩ Vy = ∅. Clearly, {Uy : y ∈ Y } is an open coveringof Y . Since Y is compact, there exists some finite subset F of Y such that {Uy : y ∈ F}still covers Y . Thus, the set Wz =

⋂y∈F Vy is included in Z, and since F is finite, this set

Page 33: Notes on Metric Spaces

33

is open. Having shown that each z ∈ Z has an open neighborhood Wz that is included inZ, we conclude that Z is open, or equivalently, that Y is closed. QED

The compacts sets in Rn are now easy to describe:

Theorem 13.4. (Heine–Borel) A set in Rn is compact if and only if it is closed andbounded.

Proof. The “only if” part follows from Theorem 13.3 and Exercise 13.3. To prove the“if” part, assume that A ⊂ Rn is closed and bounded. Then A is included in some cubeC = {v ∈ Rn : |vj | ≤ r for 0 ≤ j < n}. Now we can use a bisection procedure as in theproof of Theorem 13.2 to show that C is compact. Then Exercise 13.2 shows that A ⊂ Cis compact. QED

The same theorem holds of course for subsets of R and C, and for Cn as well.

Caution: In general, it is far from true that every closed bounded set is compact!

An example is the space given in Exercise 9.14. If this example seems artificial:Consider the sequence space ℓ∞ described in Remark 7.10. Let x0 = (1, 0, 0, . . .) andx1 = (0, 1, 0, 0, . . .) and x2 = (0, 0, 1, 0, 0, . . .) etc. Then the set X = {x0, x1, x2, . . .} isboth closed and bounded in ℓ∞. But it is not compact, for the same reason as the set X inExercise 9.14. This also implies that the closed unit ball {x ∈ X : ‖x‖ ≤ 1} is not compactin ℓ∞. (The same is in fact true in any infinite dimensional normed vector space.) In somesense, one can go to “infinity” on a ball of radius 1, namely along the points x0, x1, x2, . . ..

The following is a generalization of the Bolzano-Weierstrass theorem.

Theorem 13.5. Let X be a metric space. Then the following are equivalent.

(a) X is compact.

(b) Every infinite sequence in X has a limit point.

(c) X is totally bounded and complete.

Proof. By Lemma 12.4, it suffices to prove that (a) and (b) are equivalent.

First, assume (a). Consider a sequence of points (y0, y1, y2, . . .) in X and let Y bethe closure of the set {y0, y1, y2, . . .}. Then Y is a compact metric space, as seen inExercise 13.2. It follows from Exercise 13.1 that Y is either a finite set, or else Y has alimit point. This proves (b).

Next, assume (b). From Lemma 11.5 and Lemma 12.4 we know that X includes acountable dense set A. As a consequence, every open set U ⊂ X can be written as a unionof balls from the collection B =

{Br(a) : a ∈ A, r ∈ Q}. Namely, replace Bε(u)(u) in (9.5)

Page 34: Notes on Metric Spaces

34 HANS KOCH

by a ball from the collection B that is included in Bε(u)(u). Thus, in order to prove thatX is compact, it suffices to show that every covering U ⊂ B has a finite sub-covering.

Assume for contradiction that some covering U ⊂ B has no finite sub-covering. Wecan write U = {U0, U1, U2, . . .} since B is countable; see also Problem . We may assumethat no Un is “redundant”, in the sense of being included in Vn =

⋃k<n Uk. Then for

each n, we can pick a point xn ∈ Un that does not belong to Vn. This yields an infinitesequence x = (x0, x1, x2, . . .). Each set Un only contains finitely many of the points fromx, so none of them can contain a limit point of x. But U covers X, so x cannot have alimit point. This is a contradiction. Thus, X must be compact. QED

Just for completeness . . .

As hinted in Exercise 4.4, rational functions are naturally viewed as functions from C∪{∞}to C ∪ {∞}. For a proper discussion of such functions, one needs to introduce a topologyon C ∪ {∞}. The result is called the (topological) Riemann sphere. More generally . . .

Definition 13.6. The one-point compactification of a topological space X is the set X ∪{∞} equipped with the following topology: Every subset of X that is open in X is alsoopen in X ∪ {∞}. All other open sets in X ∪ {∞} are of the form U ∪ {∞} where U is anopen subset of X whose complement is compact.

In other words, one adds to the already-open sets in X all “open neighborhoods of infinity”U ∪ {∞}. In the case X = Rn or X = Cn, the requirement that U has a compactcomplement means that U includes a “ball at infinity” {x ∈ X : ‖x‖ > r}.

Exercise 5. Show that the one-point compactification of a topological space is compact.Hint: Every open covering of X ∪ {∞} has to contain an open neighborhood of infinity.

Problems 13

1. Prove Cantor’s lemma: In a metric space, if A0 ⊃ A1 ⊃ A2 ⊃ . . . is a nested sequenceof compact sets, then their intersection

⋂n∈N

An is non-empty.

14. Connected sets

By definition, a topological space X is connected if the only subsets of X that are bothopen and closed are X and ∅. This is very simple, but a bit obscure. Equivalently . . .

Definition 14.1. A topological space is connected if it cannot be written as the union oftwo disjoint non-empty open sets.

Example 1. Let X = {x ∈ R : 2 ≤ |x| ≤ 4}, equipped with the metric d(x, y) = |x− y|.

Page 35: Notes on Metric Spaces

35

This space is disconnected, since it can be written as the union of the two disjoint openballs B2(3) = {x ∈ X : |x− 3| < 2} and B2(−3) = {x ∈ X : |x+ 3| < 2}.

Remark 2. The Definition 14.1 is convenient for converting certain “local” propertiesto “global” properties: Assume that X is connected, and that f : X → {0, 1} has thefollowing property: f is constant on some open neighborhood Ux of every point x.Claim: f is constant on X. Proof: For n = 0 and n = 1 define Vn = {x ∈ X : f(x) = n}.For every x ∈ Vn we have Ux ⊂ Vn, and thus Vn is open. This holds for n = 0 and n = 1.So both V0 and V1 are open. But since X is connected, either V0 = ∅ or V1 = ∅.

The real line is exceptionally simple:

Theorem 14.2. A set I ∈ R is connected if and only if I is an interval.

Proof. Consider the space (I, d) with the metric d(x, y) = |x− y|. To prove the “only if”part, assume that I is connected. Let a < x < b with a, b ∈ I. Then U = {u ∈ I : u < x}and V = {v ∈ I : v > x} are two disjoint non-empty open sets in I. Since I is connected,their union cannot include I. So we must have x ∈ I. This proves that I is an interval.

To prove the “if” part, let I be an interval. Assume for contradiction that I isdisconnected. Then I can be written as a union of two non-empty disjoint sets A and Bthat are both (open and) closed. Let a0 ∈ A and b0 ∈ B. We may assume that a0 < b0. Sofor n = 0 we have an interval In = [an, bn] with an ∈ A and bn ∈ B. Now use bisection toconstruct a nested sequence of such intervals, by taking In+1 to be either [cn, bn] or [an, cn],depending on whether cn = 1

2 (an + bn) belongs to A or B, respectively. The intersectionof all In contains a single point. This point x is a limit point of the sequence a, and sinceA is closed, we must have x ∈ A. Similarly, x is a limit point of b, and since B is closed,we must have x ∈ B. But this contradicts the disjointness of A and B, proving that I isconnected. QED

Straight lines in other spaces are of course similar:

Exercise 3. Let X be a normed vector space. On subsets of X consider the metricd(x, y) = ‖x − y‖. Given two points u 6= v in X, define h : R → X by the equationh(s) = u + s(v − u). The range of h is a straight line ℓ in X, passing through u = h(0)and v = h(1). Notice that d

(h(s), h(t)

)= c|s− t|, where c = d(u, v). If S is any subset of

R, show that h[S] is connected if and only if S is connected.

Notice that the Definition 14.1 of connectedness is for spaces, not for subsets of spaces.But every subset X0 of a metric space is again a metric space, if we restrict the metric toX0. The following is the analogue for topological spaces:

Definition 14.3. Let (X, T ) be a topological space, and let X0 be any subset of X. As

Page 36: Notes on Metric Spaces

36 HANS KOCH

is straightforward to check, T0 = {X0 ∩ U : U ∈ T } is a topology on X0. It is called theinduced topology on X0, and (X0, T0) is called a subspace of (X, T ).

From this definition and , one immediately gets the

Theorem 14.4. A set X0 ⊂ X is connected if and only if there are no open sets U andV , such that A = X0∩U and B = X0∩V are disjoint, non-empty, and A∪B includes X0.

In other words, a connected set cannot be “separated” with open sets.

Exercise 4. Let A and B be connected sets, and assume that their union D = A ∪ Bis disconnected. Show that there exists open sets U and V such that D ∩ U = A andD ∩ V = B. Furthermore, A and B are disjoint.

Connected sets can be regarded as “building blocks” . . .

Theorem 14.5. Any space X admits a unique decomposition into connected components(maximal connected subsets).

Proof. Let a ∈ X. Denote by Ca the union of all connected subsets of X that containa. Assume for contradiction that Ca is disconnected. Then there exist open sets U andV , such that A = Ca ∩ U and B = Ca ∩ V are disjoint, non-empty, and A ∪ B includesCa. We may assume that a ∈ A. Pick b ∈ B. Since b ∈ Ca, there exists a connected setC ⊂ Ca that contains both a and b. But C∩U and C∩V are both non-empty, since C∩Ucontains a and C ∩ V contains b. This contradicts the connectedness of C. Thus, Ca isconnected. And by its definition, Ca is maximal.

Let now C be any maximal connected subset of X. If a ∈ C then C ⊂ Ca by themaximality of Ca. But Ca ⊂ C since C is maximal, and thus C = Ca. This shows thatU = {Ca : a ∈ X} is the collection of all maximal connected subsets of X, and that anytwo sets in U are either disjoint or equal. Clearly, the union of all sets Ca is X. QED

Exercise 5. Show that the connected components of Q are all one-element sets.Hint: If x ∈ R is irrational, then Q ⊂ (−∞, x) ∪ (x,+∞).

Exercise 6. Let X0 be a subset of a normed vector space X. Let u and v be two pointsin X0, and assume that X0 includes the line segment

{u+ s(v − u) : s ∈ [0, 1]

}that joins

u and v. Show that u and v cannot belong to two different connected components of X0.Hint: See Exercise 14.3.

Exercise 7. Show that every convex set in a normed vector space is connected.

Page 37: Notes on Metric Spaces

37

Using Exercise 14.4, it is not hard to see that the connected components of a space X areclosed. So if there are only finitely many components, they are open as well. In normedvector spaces one can say more:

Theorem 14.6. In a normed vector space, the connected components of an open set areopen.

Proof. Let X be an open set in a normed vector space Y . For every x ∈ X and r > 0we define Br(x) = {y ∈ Y : ‖y − x‖ < r}. Using the same notation as in the proof ofTheorem 14.5: Pick any x ∈ X. For every a ∈ Cx we have Br(a) ⊂ X for some r > 0. Asseen in Exercise 7.8 and Exercise 14.7, Br(a) is connected, and thus Br(a) ⊂ Ca by thedefinition of Ca. But Ca = Cx and thus Br(a) ⊂ Cx, showing that Cx is open. QED

Remark 8. An open set in Rn has only countably many connected components. Namely,each component C can be “labeled” by a point in C∩Qn; see also Problem . In particular,every open set in R can be written as a union of countably many disjoint intervals.

Joining together line segments, one obtains a piecewise linear path:

Definition 14.7. Let S = [a, b] be a non-empty bounded interval and V vector space. Afunction h : S → V is said to be piecewise linear if it can be written in the form

h(s) =tj−s

tj−tj−1h(tj−1) +

s−tj−1

tj−tj−1h(tj) , s ∈ [tj−1, tj ] , (14.1)

for 0 < j ≤ n, with a = t0 < t1 < . . . < tn = b. The set of all piecewise linear functionsh : S → V will be denoted by Σ(S, V ).

Let u, v ∈ X ⊂ V . A piecewise linear function h : S → V , with values h(a) = u andh(b) = v and h(s) ∈ X for all s, is called a piecewise linear path in X that joins u and v.

Theorem 14.8. An open set X0 in a normed vector space X is connected if and only ifany two points in X0 can be joined with a piecewise linear path in X0.

Proof. To prove the “only if” part, let u and v be any two points in X0 that can be joinedwith a piecewise linear path in X0. Such a path h consists of line segments joining h(tj−1)and h(tj) for j = 1, 2, . . . , n. The points h(tj−1) and h(tj) belong to the same connectedcomponent of X0, as seen in Exercise 14.6. This holds for all j, so the endpoints u and vbelong to the same connected component. If this holds for any two points u and v in X0,then X0 has only a single connected component and thus is connected.

To prove the “if” part, pick any x0 ∈ X0. Let A be the set of all points in X0 that canbe joined to x by a piecewise linear path. Let B be the set of all points in X0 that cannot

Page 38: Notes on Metric Spaces

38 HANS KOCH

be joined to x by a piecewise linear path. If x is any point in X0, then some ball Br(x)is included in X0, and since any two points in Br(x) can be joined by a line segment, wehave either Br(x) ⊂ A or Br(x) ⊂ B. Applying this to points in A show that A is open.Applying this to points in B show that B is open. Assuming now that X0 is connected,either A or B has to be empty. But a ∈ A, and thus B = ∅. So we can join any u ∈ X0

and any v ∈ X0 by a piecewise linear path, by first joining u to x0 and then x0 to v. QED

Problems 14

1. Show that {u ∈ R2 : ‖u‖∞ ≥ 1} is connected in R2.

2. Show that the connected components of a space X are closed. Hint: Use Exercise 14.4.

15. Continuous functions

Continuous functions are the “natural” class of maps between topological spaces. So thedefinition of continuity is very simple, and the basic properties of continuous functions areeasy to establish. In what follows, X and Y are topological spaces.

Definition 15.1. A function f : X → Y is said to be continuous if f−1[V ] is open in Xwhenever V is open in Y .

In short, f is continuous if f−1[open] is open. Similarly for closed sets; see Problem 1.4.

Exercise 1. Given any c ∈ Y , show that the constant function f : X → Y , defined byf(x) = c, is continuous.

Exercise 2. Define f : R → R by setting f(x) = x − 1 for x < 0, and f(x) = x + 1 forx ≥ 0. Show that f is not continuous.

Exercise 3. Assume that X is compact and f : X → R continuous. Show that f isbounded. Hint: Cover X with sets f−1[(−n, n)] for n = 1, 2, 3, . . ..

Here two examples where Theorem 9.5 can be useful.

Exercise 4. Let X be a normed vector space. Let y be a vector in X, and let a be anumber. Show that the vector space operations x 7→ x+ y and x 7→ a ∗ x are continuous.

Exercise 5. Let I and J be intervals. If f : I → J is monotone (increasing or decreasing)and onto, show that f is continuous.

Three immediate consequences of the Definition 15.1 are the following.

Page 39: Notes on Metric Spaces

39

Theorem 15.2.

(a) The composition of two continuous functions (if defined) is continuous.

(b) A continuous function maps compact sets to compact sets.

(c) A continuous function maps connected sets to connected sets.

Exercise 6. Prove Theorem 15.2.

Exercise 7. Assume that f : [a, b] → R is continuous and satisfies f(a) < y < f(b).Show that f(x) = y for some x ∈ (a, b). Hint: Recall Theorem 14.2.

Exercise 8. Let f be a continuous function from Rm to Rn. Show that the image f [S]under f of the sphere S = {x ∈ Rm : ‖x‖ = 1} is a closed set in Rn.Hint: Recall Theorem 13.4.

Recall that a compact set A in R is closed and bounded. In particular, A contains both itssupremum and infimum. Combining this fact with property (b) above implies the following.

Theorem 15.3. A real-valued continuous function on a compact set takes on both amaximum value and a minimum value.

Remark 9. This theorem is extremely useful and popular. Suppose e.g. that we havetwo functions f, g : X → R and want to maximize f(x), subject to the constraint g(x) = c.If f is continuous and {x ∈ X : g(x) = c} is compact, then Theorem 15.3 guarantees theexistence of a solution to this problem. Many differential equations coming from Physicscan be reformulated as “variational problems” of this type. In these cases, X is a space offunctions.

The same type of argument will be used in the next section to prove Theorem 8.2.

Concerning property (c) in Theorem 15.2 . . .

Definition 15.4. Let X be a set in a topological space. Given x, y ∈ X, continuousfunction f : [0, 1] → X with the property that f(0) = x and f(1) = y is called a path inX that joins x to y. The set X is said to be path-connected if any two points in X can bejoined by a continuous path in X.

Exercise 10. Show that path-connectedness implies connectedness.

Page 40: Notes on Metric Spaces

40 HANS KOCH

In general, connectedness does not imply path-connectedness. But for normed vectorspaces, we have Theorem 14.8. And a piecewise linear path is continuous, as we will seelater. This proves the following

Theorem 15.5. An open set in a normed vector space is connected if and only if it ispath-connected.

When considering sets with extra structures, maps that preserve these structures play animportant role. In the case of topological spaces, those maps are called homeomorphisms.

Definition 15.6. Let (X, TX) and (Y, TY ) be topological spaces. A homeomorphism from(X, TX) to (Y, TY ) is a map φ : X → Y that is continuous and has a continuous inverse.

The continuity condition on φ and φ−1 simply mean that φ−1[V ] ∈ TX whenever V ∈ TY ,and φ[U ] ∈ TY whenever U ∈ TX . So every property that is defined topologically (open,closed, compact, connected, continuous, convergent, . . .) is “preserved” by φ. Two spacesthat are homeomorphic are essentially identical from a topological point of view.

Example 11. Consider the intervals X = [1,+∞) and Y = (0, 1], both equipped withthe usual metric d(x, y) = |x− y|. Define φ : X → Y by the equation φ(x) = x−1. Clearly,φ is invertible. Furthermore, both φ and φ−1 map open balls (here intervals) to open balls.And by Theorem 9.5, the same is true for arbitrary open sets, not just balls. So the spacesX and Y are homeomorphic. As metric spaces, they are quite different. In particular, Yis bounded, while X is not. But to a purely topological observer, approaching +∞ fromwithin X is no different from approaching 0 from within Y .

Problems 15

1. Show that the identity function x 7→ x from X to X is continuous.

2. Show that Re : C → R and Im : C → R are continuous. Hint: See Exercise 9.18.

3. Assume that f : R → R is continuous, and that f(x) = 0 if an only if x = 0 or |x| > 12 .

Show that the set {x ∈ R : x > 0 and f(x) = 0}, if non-empty, contains its infimum.

4. Assume that f : R → R is periodic with period p > 0, that is, f(x + p) = f(x) forall x ∈ R. If f is continuous, show that f takes on both a maximum value and aminimum value.

5. Subsets of a space X are sometimes specified in terms of inequalities. Show that anyset of the form {x ∈ X : fα(x) ≤ cα for all α ∈ A} is closed, if α 7→ fα is a family ofcontinuous real-valued functions on X, and α 7→ cα a family of real numbers, indexedby some set A. (See Remark 1.6 for notation and Exercise 11.5 for comparison.)

6. Consider the same families as in Problem 15.6. Show that if the index set A is finite,then the set {x ∈ X : fα(x) < cα for all α ∈ A} is open. (See also Exercise 10.3.)

Page 41: Notes on Metric Spaces

41

16. Continuity at a point

Definition 16.1. Let f : X → Y be a function from a space X to a space Y . Let x ∈ Xand y = f(x). We say that f is continuous at x if for every open neighborhood V of y inY , there exists an open neighborhood U of x in X, such that f [U ] ⊂ V .

Exercise 1. Show that a function f : X → Y is continuous if and only if it is continuousat very point x ∈ X.

Exercise 2. If f : X → Y is continuous at x ∈ X and g : Y → Z is continuous aty = f(x), show that g ◦ f : X → Z is continuous at x.

Exercise 3. If Y is a metric spaces, and if f : X → Y is continuous at a ∈ X, show thatf is bounded when restricted to some open neighborhood of a.

Combining the Definition 16.1 of local continuity with the Definition 9.4 of open sets in ametric space, one immediately gets the

Theorem 16.2. If Y is a metric space, then the set V in Definition 16.1 can be replacedby a ball Bε(y). Similarly, if X is a metric space, then U can be replaced by a ball Bδ(x).

In particular . . .

Theorem 16.3. Let X and Y be metric spaces, and let a ∈ X. Then f : X → Y is contin-uous at a if and only if for every ε > 0, there exists a δ > 0, such that dY

(f(x), f(a)

)< ε

holds for every point x ∈ X that satisfies dX(x, a) < δ.

Before continuing, let us finish the

Proof of Theorem 8.2. The only part that remains to be proved is the following Claim:Let ‖.‖ be any norm on Rn. Then there exists a constant c > 0 such that ‖v‖ ≥ c‖v‖∞,for every vector v ∈ Rn.

Proof: Define f(u) = ‖u‖. We have already shown that there exists a constant C suchthat f(u) ≤ C‖u‖∞, for every u ∈ Rn. Combining this with the triangle inequality (7.3),we have

∣∣f(w)− f(v)∣∣ ≤ f(w− v) ≤ C‖w− v‖∞ for any v,w ∈ Rn. So if we consider Rn

equipped with the norm ‖.‖∞, then by Theorem 16.3, this means that f is a continuousfunction from Rn to R. Now use that the unit sphere S = {v ∈ Rn : ‖v‖∞ = 1} is closed,bounded, and thus compact. Thus, by Theorem 15.3, f attains its minimum on S, say atthe point w ∈ S. Let c = f(w). By the property (N1) of the norm f , we must have c > 0.

Page 42: Notes on Metric Spaces

42 HANS KOCH

So if v is any vector in Rn of positive length t = ‖v‖∞, then t−1v lies on the sphere S,and thus ‖v‖ = t‖t−1v‖ ≥ t‖w‖ = tc = c‖v‖∞, as claimed. QED

Using Theorem 16.3 and Exercise 16.3, it is not hard to prove the following

Theorem 16.4. Assume that Y a normed vector space over F. Consider functions f :X → Y , g : X → Y , and c : X → F. If f , g, and c are continuous at a ∈ X, then so aref + g and c ∗ f ; as well as f/c if c(a) 6= 0.

Example 4. Consider functions from F to F. Starting with the fact that z 7→ z iscontinuous, we see that z 7→ zn is continuous for all n ∈ Z. This in turn implies thatpolynomials P (z) = c0+c1z+c2z

2+ . . .+cmzm are continuous, and that rational functions

(quotients of two polynomials) are continuous at every point where the denominator doesnot vanish.

Example 5. Let S be any set and Y a normed vector space. Theorem 16.4 shows thatthe set C(S, Y ) is a subspace of normed vector space B(S, Y ). The standard norm on bothspaces is the sup-norm (6.1).

Problems 16

1. Given u, v : C → R, define f : C → C by the equation f(z) = u(z) + v(z)i. If u and vare continuous at a ∈ C, show that f is continuous at a.

2. Show that the function Exp described in Theorem 4.1 is continuous.Hint: Exp(z)− Exp(w) = Exp(w)[Exp(z − w)− 1].

3. Show that a piecewise linear path in a normed vector space is continuous.

4. Let X and Y be metric spaces. Show that if two continuous functions f : X → Y andg : X → Y agree on a dense subset of X, then f = g.

5. Prove Theorem 16.4.

6. Recall Remark 4.3 and Exercise 4.4 and Definition 13.6.Show that rational functions are continuous functions from C ∪ {∞} to C ∪ {∞}.

17. Uniform continuity

As Exercise 16.1 shows, continuity is a purely “local” concept. A continuous function could“vary” slowly in one part of the space and very rapidly in another. Topologically, there isno way of measuring the difference. But with a metric, one can single out functions whosecontinuity has a more “global” nature:

Page 43: Notes on Metric Spaces

43

Definition 17.1. A function f from a metric space X to a metric space Y is said to beuniformly continuous if for every ε > 0, there exists a δ > 0, such that dY

(f(x), f(a)

)< ε

holds for every pair of points a, x ∈ X that satisfy dX(x, a) < δ.

Compare uniform continuity to “plain” continuity, as characterized in Theorem 16.3:In the plain case, it can depend on a how small dX(x, a) needs to be in order to getdY

(f(x), f(a)

)< ε. While in the uniform case, the smallness condition dX(x, a) < δ is

independent of a.

Example 1. The function f : R → R defined by f(x) = x2 is continuous on R, as seenin Example 16.4. But it is not uniformly continuous: For any positive ε and δ , we canmake |f(x+ δ)− f(x)| = δ|2x+ δ| larger than ε by choosing x large enough.

Theorem 17.2. Let X and Y be metric spaces, and assume that X is compact. Thenevery continuous f : X → Y is uniformly continuous.

Proof. Let f : X → Y be continuous, and let ε > 0 be fixed but arbitrary.

At each point a ∈ X, there exists by Theorem 16.3 an open ball U(a), centered at a,such that dY

(f(x), f(a)

)< 1

2ε for every x ∈ U(a). Let V (a) be the open ball, centeredat a, whose radius is half the radius of U(a). The collection of all these balls V (a) clearlycovers X. And since X is compact, finitely many of these balls suffice to cover X, sayV (a1), V (a2), . . . , V (an). Let δ be the smallest of the corresponding n radii.

Let now a and x be any two points in X satisfying dX(a, x) < δ. Since the ballsV (aj) cover X, the point a belongs to one of them, say V (ak). Using that dX(x, a) < δand dX(a, ak) < δ, we have dX(x, ak) < 2δ by the triangle inequality. Thus, both x and abelong to the same ball U(ak). Given how U(ak) has been chosen,

dY

(f(x), f(a)

)≤ dY

(f(x), f(ak)

)+ dY

(f(ak), f(x)

)< 1

2ε+12ε = ε ,

by the triangle inequality. This holds whenever dX(a, x) < δ. Thus, f is uniformly contin-uous on X, a claimed. QED

Remark 2. To get an intuitive idea of why this theorem is true, consider a search forpoints of worse and worse continuity. Since X is compact, there has to be a “worst” point.And since f is continuous at this point, it is at least as continuous everywhere else on X.The same kind of idea applies to a search for a maximum or minimum in Theorem 15.3.Making such “arguments” rigorous always involves covering X with suitable open sets.

Exercise 3. Let S = [a, b] be a non-empty bounded interval and Y a normed vectorspace. Show that the set Σ(S, Y ) of piecewise linear functions from S to Y , equippedwith the sup-norm (6.1), is a dense subspace of C(S, Y ). Hint: Since any f ∈ C(S, Y ) is

Page 44: Notes on Metric Spaces

44 HANS KOCH

uniformly continuous, given any ε > 0, there exists δ > 0, such that ‖f(t) − f(s)‖Y < εwhenever |s− t| < δ. Use this δ to choose the points tj in (14.1).

The above shows that continuous functions on [a, b] can be approximated (in the sup-norm) by piecewise linear functions. Later we will show that piecewise linear real-valuedfunctions can be approximated by polynomials. As a result, we get the

Theorem 17.3. (Weierstrass) The polynomials are dense in C([a, b],R

).

An even stronger notion of continuity is the following.

Definition 17.4. A function f : X → Y from a metric space X to a metric space Y issaid to be Lipschitz continuous if there exists a constant C, such that dY

(f(x), f(a)

)≤

C dX(x, a) for all a, x ∈ X.

Exercise 4. Show that Lipschitz continuity implies uniform continuity.

Exercise 5. On the interval X = [−1, 1] define f(x) = x1/3. Show that f is uniformlycontinuous, but not Lipschitz continuous.

Definition 17.5. Let S and V be any sets, and let s ∈ S. The evaluation functional Es

assigns to every function f : S → V its value at s. In other words, Es(f) = f(s).

Remark 6. If V is a vector space, then the rules (f+g)(s) = f(s)+g(s) and (a∗f)(s) =a ∗ f(s) can be written as Es(f + g) = Es(f) +Es(g) and Es(a ∗ f) = a ∗Es(f). In otherwords, the functional Es is linear.

Example 7. Show that Es is a Lipschitz continuous function from B(S,R) to R.

In the next section, we show (among other things) that for any linear map between normedvector spaces, continuity at 0 implies Lipschitz continuity.

Problems 17

1. Let Y = (0,+∞). Given any X ⊂ Y , define f : X → Y by f(x) = 1/x.Show that f is continuous on X = (b,+∞) for any choice of b ≥ 0, but uniformlycontinuous only if b > 0.

2. Show that t 7→ Exp(ti) is Lipschitz continuous on R. Show that the restrictions of cosand sin to R are real-valued and Lipschitz continuous.

3. In a metric space (X, d), show that the function x 7→ d(x, a) is Lipschitz continuous,for any fixed a ∈ X.

Page 45: Notes on Metric Spaces

45

4. Consider the function fw : D → C described in Problem 4.4. If |w − 1| ≤ 124 , show

that fw is Lipschitz continuous, with Lipschitz constant C = 12 .

Hint: Write fw(u)− fw(v) = f1(u− v) +(fw(v)− v

)(eu−v − 1).

18. Linear operators

(This can be skipped without fatal consequences.)

Here just a few things that are special to linear maps. In what follows, X, Y , Z areassumed to be vector spaces.

Definition 18.1. A map L : X → Y is said to be linear if L(u + v) = L(u) + L(v) andL(a ∗ u) = a ∗ L(u), for any two vectors u,v ∈ X and any number a.

Remark 1. If X is a vector space over C and the above holds for all complex numbers a,then L is said to be complex linear. Otherwise, if the above is restricted to real numbers,then L is said to be real linear.

Notation 18.2. Linear maps that take values in R or C are often called linear functionals.Other linear maps are often called linear operators. And it is customary to write Lu insteadof L(u), if L is linear.

Exercise 2. If L : X → Y and M : Y → Z are linear, show that M ◦ L : X → Z islinear. Remark: For linear operators, one also writes ML instead of M ◦ L.

Exercise 3. Show that if L : X → Y and M : X → Y are linear, then so are L+M anda ∗ L, for every number a. This proves the following

Theorem 18.3. The linear maps in Y X constitute a vector subspace of Y X .

Remark 4. If L : Rn → Y is linear, then by using the representation (5.3) for a vectorx ∈ Rn, we obtain Lx = x0L(e0) + x1L(e1) + . . .+ xn−1L(en−1).

Linear operators from Rn to Rm are represented by m× n matrices:

Exercise 5. A m × n matrix is a function A ∈ (Rm)n, or equivalently, an n-tuple ofm-vectors A = (a0,a1, . . . ,an−1). The vectors aj are also called the column vectors of A.The product of A with an n-vector v is the m-vector Av = v0a0 + v1a1 + . . .+ vn−1an−1.Show that v 7→ Av is a linear operator from Rn to Rm.

Page 46: Notes on Metric Spaces

46 HANS KOCH

Exercise 6. Given a linear operator L : Rn → Rm, let A be the m × n matrix withcolumn vectors aj = Lej for 0 ≤ j < n. The vectors ej here are the ones defined in (5.4).Show that Lv = Av for all vectors v ∈ Rn.

In the remaining part of this section, all spaces are normed vector spaces.

Definition 18.4. Let L : X → Y be a linear operator. Denote by L′ its restriction to theunit sphere SX = {x ∈ X : ‖x‖X = 1}. If L′ is bounded, we define

‖L‖ = sup{‖Lx‖Y : ‖x‖X = 1

}. (18.1)

Exercise 7. Consider a linear operator L : Rn → Y , and and equip Rn with themax-norm ‖.‖∞. Apply the triangle inequality to the sum Lx = x0Le0 + x1Le1 + . . . +xn−1Len−1 and use that |xj | ≤ ‖x‖∞ for all j, to prove that ‖L‖ ≤ ∑n

j=0 ‖Lej‖Y .

Theorem 18.5. Let L : X → Y be linear.

(i) If L is continuous at 0, then L′ is bounded.

(ii) If L′ is bounded, then L is Lipschitz continuous.

Proof. To prove (ii), assume that L′ is bounded. Then the ratio Q(u) = ‖Lu‖Y /‖u‖X

satisfies Q(u) ≤ ‖L‖ whenever ‖u‖X = 1. But due to the linearity of L and the property(N2) of the norm, Q is homogeneous: Q(tu) = Q(u) for all t > 0. So we have Q(x) ≤ ‖L‖for all nonzero x ∈ X, or equivalently,

‖Lx‖Y ≤ ‖L‖‖x‖X , x ∈ X . (18.2)

Using the linearity of L, we also have ‖Lx − Lu‖Y = ‖L(x − u)‖Y ≤ ‖L‖‖x − u‖X for allx, u ∈ X. This shows that L is Lipschitz continuous.

To prove (i), assume that L is continuous at 0. Then there exists δ > 0, such that‖Lx‖Y < 1 whenever ‖x‖X < 2δ. So Q(x) < δ−1 whenever ‖x‖X = δ. But by thehomogeneity of Q, the same holds for x ∈ SX , implying that L′ is bounded. QED

Remark 8. Now Exercise 18.7 shows that linear operators from Rn to any normedvector space Y are continuous. By Theorem 8.2, this fact does not depend on what normis chosen on Rn.

Is it possible for a linear map to be non-continuous?Yes:

Page 47: Notes on Metric Spaces

47

Exercise 9. Consider the space X = C00(N,R) with the sup-norm (7.5), and defineL : X → R by the equation Lx = x0 + x1 + x2 + . . .. Show that L is not continuous.Hint: Use the same sequences as in Remark 8.3.

Definition 18.6. The vector space of all continuous linear operators from X to Y isdenoted by L(X,Y ). The space L(X,R) of all continuous linear functionals on X is calledthe dual of X and is denoted by X∗.

Remark 10. As seen in Exercise 18.6, every (continuous) linear functional on Rn is ofthe form x 7→ a0x0 + a1x1 + . . . + an−1xn−1, for some a ∈ Rn. Thus, the dual of Rn canbe identified with Rn.

Recall also from Example 16.5 that C(SX , Y ) is a normed vector space, when equippedwith the sup-norm (6.1). A moment’s thought shows that this implies

Theorem 18.7. L(X,Y ) is a normed vector space for the norm (18.1).

The norm (18.1) is also referred to as the operator norm of L.

Remark 11. If t ≥ 0 then ‖L(tx)‖Y = t‖Lx‖Y . Thus, unless Lx = 0 for all x, a linearmap cannot be bounded in the sense of Definition 9.2. Still, it is customary to call L abounded linear operator if L′ is bounded.

Exercise 12. Exercise 18.2 and Theorem 15.2 show that the product (composition) MLof two continuous linear operators L : X → Y and M : Y → Z is a continuous linearoperator ML : X → Z. Show that ‖ML‖ ≤ ‖M‖‖L‖.

Problems 18

1. For a piecewise linear function h : [a, b] → Y , as given by (14.1), define

∫ b

a

h =

n∑

j=1

tj − tj−1

2

[h(tj) + h(tj−1)

]. (18.3)

Show that this defines a continuous linear operator∫ b

afrom Σ

([a, b], Y

)to Y . It is

called the integral over [a, b].

19. Limits

Summary: Limits are about extending the domain of a function by a single point. Thisis of interest only if the resulting function is continuous at the new point.

Page 48: Notes on Metric Spaces

48 HANS KOCH

Definition 19.1. Let f be a function from T \ {a} to X, where T and X are topologicalspaces, and where a limit point in T . We say that b ∈ X is a limit of f at a if the extensionf ∪ {(a, b)} is continuous at a.

If the limit b is unique, we also write

lims→a

f(s) = b . (19.1)

Exercise 1. Show that if X has the Hausdorff property then the limit b in Definition 19.1is unique. That is, if b and b′ are both limits of f at a, then b = b′.

In what follows, T and X are assumed to be a metric spaces, and a is a limit point in T .By Theorem 16.3, we immediately have the

Theorem 19.2. lims→a f(s) = b if and only if for every ε > 0 there exists δ > 0, suchthat dX

(f(s), b

)< ε whenever 0 < dS(s, a) < δ.

Example 2. The goal here is to prove that lims→∞ f(s) = 1, where f(s) = s2−ss2+1 .

Consider {s ∈ R : |s| ≥ 1}∪{∞}, with the metric d∗(u, v) =∣∣ 1u − 1

v

∣∣, where 1∞ = 0. Notice

that d∗(s,∞) = |s|−1. Thus, if |s| ≥ 1 then

∣∣f(s)− 1∣∣ ≤ |s|+ 1

s2 + 1≤ 2|s|

s2= 2d∗(s,∞) . (19.2)

Given now any ε > 0, if we choose δ = 12ε, then |f(s)− 1| < ε whenever d∗(s,∞) < δ. By

Theorem 19.2, this shows that lims→∞ f(s) = 1.

Theorem 19.3. Assume that X a normed vector space over F. Let a be a limit point inT , and define S = T \ {a}. Consider functions f : S → X, g : S → X, and c : S → F.If f , g, and c have limits at a, then so do f + g and c ∗ f ; as well as f/c if lim

s→ac(s) 6= 0.

Furthermore,

lims→a

[f(s) + g(s)

]= lim

s→af(s) + lim

s→ag(s) , lim

s→a

[c(s) ∗ f(s)

]= lim

s→ac(s) ∗ lim

s→af(s) ,

and similarly for f/c.

The proof is simple: If f ∪ {(a, bf )} and g ∪ {(a, bg)} are continuous at a, then the sum(f + g) ∪ {(a, bf + bg)} is continuous at a, by Theorem 16.4. Similarly for c ∗ f and f/c.

Such limits arise e.g. in the definition of derivatives . . .

Page 49: Notes on Metric Spaces

49

Definition 19.4. Let T be an open neighborhood of a point a ∈ F. Consider a curveh : T → X from T to a normed vector space X, and define f(s) = (s− a)−1[h(s)− h(a)]for all s ∈ T \ {a}. The function h is said to be differentiable at a if f has a limit at a.The limit, if it exists, is called the derivative of h at a and is denoted by h′(a).

Remark 3. Notice that, if h is differentiable at a, then h(t) = h(a) + (t− a)ψ(t) , whereψ = f ∪

{(a, h′(a)

)}is continuous at a, with ψ(a) = h′(a).

Exercise 4. Use the properties given in Theorem 3.6 to show that the exponentialfunction is differentiable, and that exp′ = exp.Hint: Use that exp(a+ x)− exp(a) = exp(a)[exp(x)− 1].

The metric space used in Example 19.2 is a bit ad-hoc. It would be nice to do the samewith R ∪ {∞}. This can in fact be done without complicating any estimates:

Let S be a normed vector space. Consider the “hemisphere” H0 = {s ∈ S : ‖s‖ ≤ 1},equipped with the metric d0(u, v) = ‖u−v‖. Consider also the complementary hemisphereH∗ = {s ∈ S : ‖s‖ ≥ 1} ∪ {∞}, with the metric d∗ defined in Exercise 9.7. Now we “glue”the two hemispheres together, along the equator ‖s‖ = 1:

Definition 19.5. The metric sphere for S is the set S ∪{∞}, equipped with the followingmetric d. If u and v both belong to H0, define d(u, v) = d0(u, v). Similarly, if u and vboth belong to H∗, define d(u, v) = d∗(u, v). If u ∈ H0 and v ∈ H∗, define

d(v, u) = d(u, v) = inf{d0(u, s) + d∗(s, v) : ‖s‖ = 1

}. (19.3)

As far as limits at infinity (a = ∞) and infinite limits (b = ∞) are concerned, the onlyimportant thing about this sphere is that if d(s,∞) ≤ 1 then ‖s‖ ≥ 1, in which case

d(s,∞) = ‖s‖−1 . (19.4)

It cannot get any simpler than this!

Exercise 5. Verify that the above defines indeed a metric on S ∪ {∞}.

Exercise 6. Show that on S, the spherical metric (as defined above) and the standardmetric (defined by the norm) are topologically equivalent, in the sense of Definition 10.5.

Exercise 7. Show that for X = Rn, the metric sphere is topologically the same as theone-point compactification of Rn. In particular, Rn ∪ {∞} is compact.

Exercise 8. If f : Rn → R is continuous and has a limit lims→∞ f(s) ∈ R, show that fis bounded. Hint: Use e.g. that Rn ∪ {∞} is compact, and Theorem 15.3.

Page 50: Notes on Metric Spaces

50 HANS KOCH

Exercise 9. Let X be a normed vector space. If f : Rn → X is continuous and has alimit lims→∞ f(s) ∈ X, show that f is bounded. Hint: Consider the function s 7→ ‖f(s)‖X .

Remark 10. In Definition 19.5 we have added only one “point at infinity”. This doesnot allow for different limits in different directions. For the real line, one can use the spaceR∪{−∞,+∞} from Exercise 9.6 for such limits. There is a straightforward generalizationof this construction for arbitrary normed vector spaces, but we will not discuss this here.

Remark 11. Let S be a normed vector space. Theorem 19.3 shows that C0(S,X) is asubspace of the normed vector space C(S,X). And the exercise below shows that C00(S,X)is a subspace of C0(S,X).

Exercise 12. Let V be some vector space. The support of a function f : S → V is theclosure of the set {s ∈ S : f(s) 6= 0}. Show that if f and g have compact support, thenf + g has compact support as well.

Just for completeness . . .

Definition 19.6. Let X and Y be normed vector spaces. Let u ∈ X and let U ⊂ X bean open neighborhood of u. A function F : U → Y is said to be differentiable at u if thereexists a continuous linear operator L : X → Y , such that

limx→0

‖F (u+ x)− F (u)− Lx‖Y

‖x‖X

= 0 .

If this limit exists and is 0, then L is called the derivative of F at u is denoted by DF (u).

Problems 19

1. Under the same assumptions as in Definition 19.6, let x ∈ X and consider the curveh(s) = F (u+ sx). Using the Definition 19.4, show that h′(0) = DF (u)x.Remark: DF (u)x is called the directional derivative of F in the direction x.

2. Show that differentiability at u implies continuity at u.

20. Convergent sequences

Shouldn’t this be discussed before continuity? No.

Definition 20.1. Let x = (x0, x1, x2, . . .) be a sequence of points in X, and let x ∈ X.We say that the sequence x converges to x, or that “xn → x as n→ ∞”, if for every openneighborhood U of x in X, there exists N ∈ N, such that xn ∈ U for all n > N .

Page 51: Notes on Metric Spaces

51

If the limit x is unique, we also write

limn→∞

xn = x . (20.1)

Exercise 1. Show that a sequence in a metric space cannot have more than one limit.

Remark 2. Definition 20.1 can be viewed as a special case of Definition 19.1, if weconsider N ∪ {∞} as a subspace of the metric sphere R ∪ {∞}. Notice that every openneighborhood of ∞ in this sphere includes a “ball at infinity” {s ∈ R : |s| > N}.

Exercise 3. Let n ∈ N. Show that a sequence (x0, x1, x2, . . .) converges if and only ifthe shifted sequence (xn, xn+1, xn+2, . . .) converges.

Exercise 4. Let A be a closed subset of a metric space X. and let (x0, x1, x2, . . .) be asequence of points in A that converges to a point x ∈ X. Use just the definition of “closed”and “convergent” to prove that x ∈ A.

Exercise 5. Show that in a metric space, convergent sequences are bounded.

Exercise 6. Let S and X be normed vector spaces. If a function f ∈ C(S,X) doesnot belong to C0(S,X), show that there exists an ε > 0, and a sequence (s0, s1, s2, . . .) ofpoints in S, such that sn → ∞ as n→ ∞, while ‖f(sn)‖∞ ≥ ε for all n. Use this to provethat C0(S,X) is a closed subspace of C(S,X).

In a metric space X, every open neighborhood of a point x ∈ X includes a ball Bε(x).The following are immediate consequences of Definition 20.1.

Theorem 20.2. In a metric space, xn → x if and only if for every ε > 0 there existsN ∈ N, such that d(xn, x) < ε for all n > N .

Exercise 7. Show that in a metric space, xn → x if and only if d(xn, x) → 0.

Exercise 8. Show that in a normed vector space, xn → x if and only if (xn − x) → 0.

Exercise 9. Let a = (a0, a1, a2, . . .) be a sequence of real numbers. If a is increasing andA = {a0, a1, a2, . . .} is bounded above, show that a converges to supA. If a is decreasingand A is bounded below, show that a converges to inf A.

Page 52: Notes on Metric Spaces

52 HANS KOCH

Exercise 10. Show that every limit point x of a metric space X is the limit of somesequence in X that converges to x. Hint: See Exercise 12.1

Here is a characterization of continuity in terms of sequences:

Theorem 20.3. Let f be a function from a metric space X to a metric space Y , and letx ∈ X. Then f is continuous at x if and only if f(xn) → f(x) whenever xn → x.

Proof. The “only if” part follows immediately from the definitions. In order to prove the“if” part, assume that f is not continuous at x. Then there exists an open neighborhoodV of f(x) in Y such that f−1[V ] includes none of the balls B1/n(x), where n = 1, 2, . . ..Thus, we can choose a point xn ∈ B1/n(x) such that f(xn) 6∈ V . This yields a sequence(x1, x2, . . .) with xn → x but f(xn) 6→ f(x). QED

Definition 20.4. A subsequence of (x0, x1, x2, . . .) is a sequence (xk0, xk1

, xk2, . . .), where

0 ≤ k0 < k1 < k2 < . . ..

Exercise 11. A space X is said to be sequentially compact if every sequence in X hasa convergent subsequence. Show that the Bolzano-Weierstrass Theorem 13.5 implies thefollowing: A metric space is compact if and only if it is sequentially compact.

The following can be either proved directly, or it can be regarded as a special case ofTheorem 19.3.

Theorem 20.5. Assume that X a normed vector space over F. Consider sequences x ∈XN, y ∈ XN, and c ∈ FN. If these sequences converge as n → ∞, then so do x + y andc ∗ x; as well as x/c if lim

n→∞cn 6= 0. Furthermore,

limn→∞

[xn + yn] = limn→∞

xn + limn→∞

yn , limn→∞

[cn ∗ xn] = limn→∞

cn ∗ limn→∞

xn ,

and similarly for x/c.

Now we are ready for a

Proof of Theorem 3.6. For x ∈ R and n > 0 define en(x) =(1+ x

n

)n. By Problem 3.9,

the sequence n 7→ en(x) is increasing, for each x ≥ 0. If 0 ≤ x ≤ 12 then we have an upper

bound by Problem 4.5 and thus limn→∞ en(x) exists. The same holds for x > 12 , due to

the identity emn(x) = [en(x/m)]m, where we can choose m > 2x. And for x < 0 we canuse that en(x)en(−x) → 1 by Problem 4.6. Define now exp(x) = limn→∞

(1 + x

n

)n. Then

Problem 4.6 shows that exp(x+ y) = exp(x) exp(y). And the bound given in Theorem 3.6follows from Problem 4.5. QED

Page 53: Notes on Metric Spaces

53

Notation 20.6. The space B(N, X) is also denoted by C(N, X), since any function on N

(with the discrete topology) is continuous. Assume now that X is a normed vector space.Then C(N, X) is a normed vector space, equipped with the sup-norm

‖x‖∞ = sup{‖xn‖ : n ∈ N

}, (20.2)

Theorem 20.5 show that the set C0(N, X) of all sequences in C(N, X), that converge to0 ∈ X, is a subspace of C(N, X). Yet another subspace is C00(N, X).

Problems 20

1. Show that the the sequence p in Problem 3.7 converges to 1−√1− x.

2. Let X = [0, 1]. In Problem 3.8 we found a sequence of polynomials Pn such that0 ≤ Pm(x) − Pn(x) ≤ Pm(1) − Pn(1) for all x ∈ X. And Problem 20.1 shows thatPn(x) → F (x) = 1−

√1− x, for all x ∈ X. Show that Pn → F in C(X,R).

3. Let X = [0, 1]. Given any c ∈ X, define Qn(x) = 1− Pn

(1− (x− c)2

)for all x ∈ X,

where n 7→ Pn is the sequence of polynomials considered in Problem 20.3. Show thatQn → G in C(X,R), where G(x) = |x− c|.

4. Assuming that(1 + z

n

)n → Exp(z) for all z ∈ C, prove that Exp(z) = Exp(z).

5. Let f, f0, f1, f2, . . . be functions from a vector space X to a normed vector space Y ,and assume that fn(x) → f(x) for all x ∈ X. Show that if each of the functions fj islinear, then so is f .

6. Show that C00(N, X) is dense in C0(N, X). Compare this with Problem 12.2.

7. Let X be a normed vector space. Show that C0(N, X) is a closed subspace of C(N, X).Hint: See Exercise 20.6.

21. Series

Series are just special sequences . . .

Definition 21.1. Let x = (x0, x1, x2, . . .) be a sequence of points in a vector space X.The n-th partial sum for x is defined as xn = x0+x1+ . . .+xn−1. The sequence of partialsums x =

(x0, x1, x2, . . .

)is called the series for x. The series x is also denoted by

∑j xj .

Definition 21.2. Assume now thatX is a normed vector space. If a series∑

j xj convergesin X, we define

∞∑

j=0

xj = limn→∞

n−1∑

j=0

xj . (21.1)

Page 54: Notes on Metric Spaces

54 HANS KOCH

Exercise 1. For normed vector spaces: Prove that if∑

j xj converges, then xn → 0.

Hint: Write x =(x1, x2, x3, . . .

)−(x0, x1, x2, . . .

). Recall Exercise 20.3 and Theorem 20.5.

Exercise 2. (Telescoping series) For normed vector spaces: Consider a sequence thatconverges to zero: an → 0. Sow that the series

∑j(aj − aj+1) converges to a0.

Now we will only consider series of numbers. Other series will be considered later.

Example 3. (Geometric series) Let z ∈ C, and consider the sequence z = (1, z, z2, z3, . . .)and the corresponding series z. Using that zn + zn = 1+ z zn, we get zn = 1

1−z − 11−z z

n ifz 6= 1. If |z| < 1 then |zn| → 0, as seen in Exercise 3.13. Applying Theorem 20.5, we findthat

∑∞k=0 z

k = 11−z for |z| < 1.

Exercise 4. (Harmonic series) Show that the series∑

k1

k+1 diverges.

Hint: For n = 20, 21, 22, . . . use that 1n + 1

n+1 + . . .+ 12n−1 >

12 .

Remark 5. For sequences of real numbers, we say that (a0, a1, a2, . . .) dominates(x0, x1, x2, . . .), if there exists n ∈ N such that 0 ≤ |xj | ≤ aj for all j ≥ n. Then theconvergence of

∑j aj implies the convergence of

∑j xj . This is obvious if xj ≥ 0 for all

but finitely many j. Otherwise . . .

Exercise 6. Under the above assumptions, let un = max{xn, 0} and vn = max{−xn, 0}.Show that

∑j uj converges to some number u, that

∑j vj converges to some number v,

and that∑

j xj converges to u− v.

Example 7. (Hyperharmonic series) The series∑

k1

(k+1)p+1 converges for any p > 0.

Proof: By Remark 21.5, it suffices to prove convergence in the case where n = 1p is a

positive integer. Then there exists c > 0 such that(k+1k

)p − 1 ≥ ck+1 for all k > 0, as seen

in Problem 3.3. Thus, 1kp − 1

(k+1)p ≥ c(k+1)p+1 . Now sum both sides of this inequality and

recall Exercise 21.2.

Problems 21

1. Show that if 0 ≤ an+1 ≤ an for all n and an → 0, then the alternating series∑

k xkwith xk = (−1)kak converges. Hint: Show that the intervals In =

[x2n, x2n+1

]are

nested: I0 ⊃ I1 ⊃ I2 ⊃ . . ..

2. Consider an enumeration of the rational numbers Q = {q0, q1, q2, . . .}. For everyx ∈ R and n ∈ N define fn(x) = 0 if x < qn, and fn(x) = 2−n if x ≥ qn. Showthat

∑n fn(x) converges for every x. Denoting the limits by F (x), show that F is

increasing, discontinuous at every rational number, and has limits at ±∞.

Page 55: Notes on Metric Spaces

55

22. Cauchy sequences and completeness

Roughly speaking, Cauchy sequences are sequences that would like to converge.

In this section, all spaces are metric spaces. Unless stated otherwise, we use the standardmetric on subsets of R, C, Rn and Cn.

Definition 22.1. A sequence x = (x0, x1, x2, . . .) in a metric space (X, d) is said to be aCauchy sequence if for every ε > 0 there exists N ∈ N such that d(xm, xn) < ε wheneverm,n > N .

Notice that this definition does not refer to any limit! First some immediate consequences:

Exercise 1. Show that every convergent sequence is a Cauchy sequence.Hint: If lim

n→∞xn = a, use the triangle inequality d(xm, xn) ≤ d(xm, a) + d(a, xn).

Exercise 2. Show that every Cauchy sequence is bounded. Hint: Take ε = 1 in Def-inition 22.1 to find a ball B1(xm) that contains all xn with n ≥ m. Now show that{x0, x1, . . . , xm−1} ∪B1(xm) is bounded.

Exercise 3. Show that if a Cauchy sequence x has a subsequence that converges to apoint x, then every subsequence of x (including x itself) converges to x

Exercise 4. Let 0 ≤ C < 1. If x is a sequence that satisfies d(xn+1, xn) ≤ C d(xn, xn−1)for all n > 0, show that x is a Cauchy sequence.

The obvious question is whether every Cauchy sequence converges. The answer dependse.g. on the space (X, d), as the following examples show.

Exercise 5. Consider R and X = R \ {0} with the metric d(x, y) = |x − y|. Show thatthe sequence x, defined by xn = 1/n, converges in (R, d) but not in (X, d).

Exercise 6. Consider the metrics d(m,n) = |m− n| and d∗(m,n) =∣∣ 1m − 1

n

∣∣ on the setP = {1, 2, 3, . . .}. Show that every Cauchy sequence in (P, d) converges, but that there arenon-convergent Cauchy sequences in (P, d∗).

In these examples, whenever there is a non-convergent Cauchy sequence, the space isincomplete in the sense of Definition 11.6. The same should not happen in R. Indeed . . .

Theorem 22.2. Every Cauchy sequence in Rm converges.

Page 56: Notes on Metric Spaces

56 HANS KOCH

Proof. Let x = (x1, x2, x3, . . .) be a Cauchy sequence in Rm. Then this sequence isbounded, as seen in Exercise 22.2. So by the Heine-Borel Theorem 13.4, all xj belongto a compact subset of Rn. And Problem shows that x has a convergent subsequence.Consequently, x converges, as seen in Exercise 22.3. QED

Exercise 7. Show that the following is equivalent to Definition 11.6. Hint: In onedirection, if x is a Cauchy sequence, define Bn to be the closure of {xn, xn+1, xn+2, . . .}.

Definition 22.3. A metric space X is said to be complete if every Cauchy sequence in Xconverges. A complete normed vector space is called a Banach space.

Theorem 22.4. Let (X, d) be a complete metric space and let A ⊂ X. Then (A, d) iscomplete if and only if A is closed.

Exercise 8. Prove Theorem 22.4.

Theorem 22.2 and Theorem 22.4 show that every closed subset of Rn is a complete metricspace. The same applies to Cn ≈ R2n. Other examples are discussed in the next section.

The next theorem is simple, powerful, and has countless applications. It can be used tosolve equations f(x) = x for maps f : X → X that contract distances. A solution off(x) = x is also called a fixed point of f .

Definition 22.5. A contraction on a metric space (X, d) is a map f : X → X with theproperty that there exists a constant C < 1 such that d

(f(u), f(v)

)≤ C d(u, v), for all

u, v ∈ X.

Notice that a contraction is Lipschitz continuous, as defined in Definition 17.4, with aLipschitz constant less than 1.

Theorem 22.6. (Contraction Mapping Theorem) A contraction on a complete metricspace has a unique fixed point.

Proof. Assume that X is complete and f : X → X a contraction, with Lipschitz constant0 ≤ C < 1. Pick x0 ∈ X and define xn = f(xn−1) for n = 1, 2, 3, . . .. Then we haved(xn+1, xn) = d

(f(xn), f(xn−1)

)≤ Cd(xn, xn−1) for all n > 0. As seen in Exercise 22.4

this implies that x = (x0, x1, x2, . . .) is a Cauchy sequence. By the completeness of X, thissequence converges to some point x ∈ X.

We have f(x) = f(limn→∞ xn

)= limn→∞ f(xn) = limn→∞ xn+1 = x by the con-

tinuity of f . So x is a fixed point of f . If x and a are both fixed points of f , thend(x, a) = d

(f(x), f(a)

)≤ C d(x, a), which is possible only if x = a. QED

Page 57: Notes on Metric Spaces

57

Remark 9. Pretty much any equation can be written as a fixed point equation forsome function f . For example, the equation x2 = 2 could be written as f(x) = x, wheref(x) = x+ x2 − 2. But this function f is not a contraction near x =

√2. A better choice

is f(x) = x2 + 1

x , as the following shows.

Exercise 10. Let a > 0. The goal here is to show that√a can be computed by iterating

xn = f(xn−1), where f(x) =12

(x + a

x

). Clearly, x =

√a is a fixed point of f . Show that

f is a contraction on the interval X =[√a,+∞

).

Example 11. Consider the disk D ={z ∈ C : |z| ≤ 1

8

}in C. It is closed and bounded,

and thus compact. Let w ∈ C with |w − 1| ≤ 124 . As shown in Problem 4.4, the equation

fw(z) = z + wExp(−z)− 1 defines a function fw that maps D into D. And Problem 4.4shows that fw is a contraction. Thus, the equation fw(z) = z has a unique solution z ∈ D.This number z satisfies Exp(z) = w. The map w 7→ z defines an inverse of Exp on thedisk |w − 1| ≤ 1

24 , with values in D.

Problems 22

1. Given any two Cauchy sequences x and y in X, define a sequence of real numbersd = (d0, d1, d2, . . .) by setting dn = d(xn, yn). Show that this sequence converges inR. Hint: By the triangle inequality, d(xm, ym) ≤ d(xm, xn) + d(xn, yn) + d(yn, ym)and d(xn, yn) ≤ d(xn, xm) + d(xm, ym) + d(ym, yn).

2. Let S = [0, 1]. The goal is to find a continuous function x : S → R that satisfiesx(s) = s + 1

8 [x(1 − s)]2 for all s ∈ S. Consider the ball B2(0) in the space C(S,R).Define f : B2 → C(S,R) by the equation (f(x))(s) = s+ 1

8 [x(1− s)]2. Show that f isa contraction on B2(0).

3. Let wn = Exp(ni) for n ∈ N. By Problem 4.1 we have |wn| = 1 for all n. Thus, sincethe unit circle is compact in C the sequence n 7→ wn has a convergent subsequence.Show that this, together with the result of Example 22.11, implies that Exp : C → C

cannot be one-to-one. Hint: Consider w = wnw−1m = Exp

((n−m)i

), with wn and wm

close to the limit of the convergent subsequence.

4. Show that the range of t 7→ Exp(ti) with t ∈ R is the entire circle {(x, y) ∈ C :x2 + y2 = 1}. Remark: When combined with the fact that the range of exp is(0,+∞), this shows that the range of Exp is C \ {0}.

23. Some complete metric spaces

Here we consider the sequence spaces ℓp, and spaces of continuous functions.

Exercise 1. If X is any set and Y a complete metric space, show that B(X,Y ) iscomplete. In particular, ℓ∞ is complete.

Page 58: Notes on Metric Spaces

58 HANS KOCH

Definition 23.1. Let x be a sequence of points in a Banach space X. We say that∑

j xjconverges absolutely in X if

∑j ‖xj‖ converges in R.

Theorem 23.2. Absolute convergence implies convergence.

Proof. Let x =∑

j xj be a series of points in a Banach space X, and let a =∑

j ‖xj‖ bethe corresponding series in R. Assume that a converges. Then a is a Cauchy sequence, asseen in Exercise 22.1. Using the triangle inequality, we have

‖xm − xn‖ =

∥∥∥∥m−1∑

j=n

xj

∥∥∥∥ ≤m−1∑

j=n

‖xj‖ = |am − an| , (23.1)

wheneverm > n. This shows that x is a Cauchy sequence as well. And sinceX is complete,it has to converge. QED

Notation 23.3. Let 1 ≤ p < ∞. The sequence space ℓp is defined as the space of allreal-valued sequences u such that

∑j |uj |p converges. It can be shown that (7.4) defines

a norm on this space.

Theorem 23.4. If Y is complete, then so is C(X,Y ).

Proof. Let (f0, f1, f2, . . .) be a Cauchy sequence in C(X,Y ). Let x ∈ X. By using thatdY (fn(x), fm(x)) ≤ d∞(fn, fm), we see that (f0(x), f1(x), f2(x), . . .) is a Cauchy sequencein Y . And since Y is complete, f(x) = limn→∞ fn(x) exists. This shows that the sequence(f0, f1, f2, . . .) converges “pointwise” to some function f : X → Y .

Next, we show that f is bounded, and that d∞(fn, f) → 0. Given ε > 0, choose N insuch a way that d∞(fn, fm) < ε

2 whenever m,n > N . If n > N then for any given x ∈ X,there exists m ≥ n such that dY (fm(x), f(x)) < ε

2 . Thus, by the triangle inequality,

dY (fn(x), f(x)) ≤ dY (fn(x), fm(x)) + dY (fm(x), f(x)) < ε2 + ε

2 = ε .

This shows that d∞(fn, f) < ε, and in particular, that f is bounded.

Finally, we prove that f is continuous at any given x ∈ X. Let ε > 0. Choose n suchthat d∞(fn, f) <

ε3 . Using that fn is continuous at x, we can find an open ball Bδ(x)

in X, such that dY (fn(u), fn(x)) <ε3 whenever u ∈ Bδ(x). Then for any u ∈ Bδ(x), the

triangle inequality (applied twice) yields

dY (f(u), f(x)) ≤ dY (f(u), fn(u)) + dY (fn(u), fn(x)) + dY (fn(x), f(x)) ≤ ε3 + ε

3 + ε3 = ε .

This shows that the image of Bδ(x) under f is included in the ball Bε(f(x)) in Y . Sinceε > 0 was arbitrary, this implies that f is continuous at x. QED

Page 59: Notes on Metric Spaces

59

Remark 2. Recall that the the space B(X,Y ) and its subspaces, like C(X,Y ), are (bydefault) equipped with the sup-metric (6.2). Convergence in this metric is also calleduniform convergence. So Theorem 23.4 says e.g. that the limit of a uniformly convergentsequence of continuous functions is again continuous.

Remark 3. If X and Y are normed vector spaces, and Y is complete, then L(X,Y )is complete. Sketch of the proof: Consider a Cauchy sequence of linear operators Ln ∈L(X,Y ). Given any zero-centered ball B ⊂ X, regard Ln as a function fn ∈ C(B, Y ).Now use that ‖fm − fn‖∞ = r‖Lm −Ln‖ by (18.2), where r is the radius of B. Since eachC(B, Y ) is complete, we get Ln → F for some F : X → Y , uniformly on every ball B. ButF is linear by Problem 20.5, and so Ln → F in L(X,Y ).

Remark 4. If Y is a Banach space, then so is L(X,Y ), as seen in Remark 23.3. Inparticular, the dual of any normed vector space is a Banach space.

Remark 5. Let 1 ≤ p < ∞ and 1p + 1

q = 1. From Holder’s inequality (7.7) we see thatevery sequence v ∈ ℓq defines a linear functional on ℓp, via u 7→ u0v0 + u1v1 + u2v2 + . . ..It is not hard to show that this functional is continuous, and that every continuous linearfunctional on ℓp is of this form. In this sense, ℓq is the dual of ℓp. In the same sense, ℓ1 isthe dual of C0(N,R). (The dual of ℓ∞ is more complicated.) Remark 23.3 shows that allℓp spaces are Banach spaces.

Problems 23

1. Show that ℓp ⊂ ℓq whenever p ≤ q.

2. Define pm(z) = zm

m! for m ∈ N and z ∈ C. If S is any compact subset of C, show thatthe series

∑m pm converges in C(S,C).

3. Let L : X → X be a continuous linear operator on a Banach space X, whose operatornorm ‖L‖ is less than 1. Show that that the series

∑k L

k converges absolutely inL(X,X). Here, L0 = I, where I denotes the identity operator on X. Prove that I−Lis invertible, and that its inverse is continuous, by showing that (I−L)

∑∞k=0 L

k = I.

24. Pointwise versus uniform convergence

Here we compare a very weak (pointwise) notion of convergence with a very strong (uni-form) notion of convergence, for sequences of functions.

Let f, f0, f1, f2, . . . be functions from a given set S to a topological space Y .

Definition 24.1. We say that fn → f pointwise on S if fn(s) → f(s) for every s ∈ S.

Page 60: Notes on Metric Spaces

60 HANS KOCH

Exercise 1. Consider the open interval S = (−1, 1), and define fn(s) = sn for all n ∈ N.Show that the sequence of functions (f0, f1, f2, . . .) converges pointwise on S to the zerofunction f(s) = 0.

Exercise 2. Consider the polynomials en(z) =(1+ z

n

)nfor n > 0. Show that en → Exp

pointwise on C, where Exp(z) =∑∞

m=0zm

m! . Hint: Use Problem 3.9.

Remark 3. The properties of Exp described in Theorem 4.1 follow from Problem 4.6and Problem 20.4 and Problem 4.5. And Problem 22.3 shows that Exp : C → C is notonto, as mentioned in Remark 4.6. The existence of π > 0 follows from Problem 4.3 andProblem 15.3, using f(x) = |Exp(xi)− 1|.

Let now Y be a metric space, and assume that the functions f, f0, f1, f2, . . . are bounded.

Definition 24.2. We say that fn → f uniformly on S, if for every ε > 0 there existsN ∈ N, such that d

(fn(s), f(s)

)< ε for all s ∈ S. Or equivalently, uniform convergence

on S is convergence in the space B(S, Y ).

Notice that pointwise convergence is defined independently at each point s. By contrast,a uniformly convergent sequence of functions converges “equally well” at every point s.It is crucial to understand the following example.

Exercise 4. Show that the sequence given in Exercise 24.1 does not converge uniformly.

Exercise 5. Prove the “equivalently” claim in Definition 24.2. Recall that the spaceB(S, Y ) comes equipped with the sup-metric d∞ defined in (6.2). So in this space, fn → fmeans that d∞(fn, f) → 0.

Exercise 6. Show that uniform convergence on S implies pointwise convergence on S.

Exercise 7. Let 0 < r < 1. Consider the open interval S = (−r, r), and define fn(s) = sn

for all n ∈ N. Show that the sequence of functions (f0, f1, f2, . . .) converges uniformly onS to the zero function f(s) = 0.

Only in very simple situations is pointwise convergence equivalent to uniform convergence:

Exercise 8. In the space B(S,R), with S a finite set, Show that fn → f if and only iffn(s) → f(s) for all s ∈ S.

In the context of C(S, Y ), a pedestrian way of rephrasing Theorem 23.2 is the following

Page 61: Notes on Metric Spaces

61

theorem, also known as the “Weierstrass M -test”. Notice that the convergence of∑

j Mj

implies the convergence of∑

j ‖fj‖.

Theorem 24.3. Let S be a metric space and Y is a Banach space. Consider a sequence ofcontinuous functions fj : S → Y . Assume that for each j ∈ N there exists a real numberMj > 0 such that ‖fj(s)‖ ≤ Mj for all s ∈ S. If the series

∑j Mj converges, then the

series∑

j fj converges uniformly to some bounded continuous function f : X → Y .

Just for completeness . . .

Remark 9. There is a topology on Y S (where S is any set and Y a topological space),called the product topology or topology of pointwise convergence, such that convergencein this topology is the same as pointwise convergence on S. It is the smallest topology thatmakes all evaluation functionals Es : f 7→ f(s) continuous. To make each Es continuous,the topology has to contain all sets E−1

s [U ] ={f ∈ Y S : f(s) ∈ U

}, where s is any point

in S and U is any open subset of Y . All other open sets are obtained by first taking finiteintersections, and then arbitrary unions. In particular, every open neighborhood of a pointh ∈ Y S contains a set of the form

{f ∈ Y S : f(sj) ∈ Uj for j = 1, 2, . . . , n

}, where Uj is

an open neighborhood of h(sj) in Y .

Exercise 10. Show that convergence in this topology is indeed pointwise convergence.

Problems 24

1. Prove that the convergence en → Exp is uniform on every compact subset of C.

25. Extending functions via limits

A common strategy in analysis is to approximate objects by “simple” objects. For exam-ple, x =

√2 can be approximated by rational numbers, via the sequence xn+1 = xn

2 − 1xn

,starting with x0 = 2; see Exercise 22.10. Given a function f : Q → R, the question iswhether one can define F (x) = limn→∞ f(xn). Anther example: One can try to approxi-mate a function x : [a, b] → R by piecewise linear functions xn. One question is whether

one can define an integral F (x) =∫ b

ax as limit of the trivial integrals f(xn) =

∫ b

axn.

We would like F (x) to be independent of the sequence xn → x. So F has to be continuousat x. For this to work, it is not sufficient that f is continuous:

Example 1. Let X = R \ {0}. Define f : X → R by setting f(x) = −1 if x < 0, andf(x) = 1 if x > 0. Clearly, f is continuous on X but has no continuous extension to R.

Definition 25.1. A function from a metric space X to a metric space Y is said to beCauchy continuous if it maps Cauchy sequences in X to Cauchy sequences in Y .

Page 62: Notes on Metric Spaces

62 HANS KOCH

The above example shows that continuity does not imply Cauchy continuity. The followingtheorem and exercises show that Cauchy continuity falls somewhere between continuity anduniform continuity.

Theorem 25.2. Assume f : X → Y is Cauchy continuous. Then f is continuous.

Proof. Given any x ∈ X and any sequence x that converges to x, the modified sequence(x0, x, x1, x, x2, x, . . .) converges to x as well, and thus it is a Cauchy sequence in X, as seenin Exercise 22.1. Then (f(x0), f(x), f(x1), f(x), . . .) is a Cauchy sequence in Y . It clearlyhas a subsequence that converges to f(x). Thus, the sequence (f(x0), f(x1), f(x2), . . .)converges to f(x) as well. By Theorem 20.3, this implies that f is continuous at x. QED

Exercise 2. Show that uniform continuity implies Cauchy continuity.

Exercise 3. Consider f : R → R, defined by f(x) = x2. As seen in Example 17.1, f isnot uniformly continuous. Show that f is Cauchy continuous.

In the case where X is compact, we know from Theorem 17.2 that continuity impliesuniform continuity, and thus Cauchy continuity. And if X is complete . . .

Exercise 4. IfX is complete, show that any continuous f : X → Y is Cauchy continuous.

Now that we have an idea what Cauchy continuity means . . .

Theorem 25.3. Let Let f : A→ Y be a Cauchy continuous function from a dense subsetA of a complete metric space X to a complete metric space Y . Then f has a uniquecontinuous extension F : X → Y . Furthermore, if f is uniformly continuous, then so is F .

Proof. Given any x ∈ X, pick a sequence u = (u0, u1, u2, . . .) of points in A, such thatun → x. This is possible since A is dense in X. Given that u converges, it is a Cauchysequence. Using the Cauchy continuity of f and the completeness of Y , we have f(un) → yfor some y ∈ Y . Now define F (x) = y.

To show that F (x) is independent of the chosen sequence u, let v = (v0, v1, v2, . . .) beanother sequence of points in A, such that vn → x. Then the sequence (u0, v0, u1, v1, . . .)converges to x as well. As above, we conclude that (f(u0), f(v0), f(u1), f(v1), . . .) convergesin Y . And every subsequence converges to the same point in Y . So we have f(vn) → y.

In order to show that F is continuous at x, consider any sequence x of points xn ∈ Xthat converges to x. By the constriction of F , there exists for each n a point an ∈ A suchthat dX(an, xn) <

1n and dY (F (xn), f(an)) <

1n . Since dX(an, xn) → 0 and dX(xn, x) → 0,

the triangle inequality implies that dX(an, x) → 0. Consequently, f(an) → F (x). Similarly,since dY (F (xn), f(an)) → 0 and dY (f(an), F (x)) → 0, the triangle inequality implies that

Page 63: Notes on Metric Spaces

63

dY (F (xn), F (x)) → 0. Consequently, F (xn) → F (x). By Theorem 20.3, this implies thatF is continuous at x.

The claim about uniform continuity is left as an exercise. QED

A well-known application of this theorem is the extension of a linear operator L : A → Ywhere X and Y are Banach spaces and A a dense subspace of X. If L is continuous, thenL is in fact uniformly continuous, as seen in Theorem 18.5, and thus Cauchy continuous.So as a corollary of Theorem 25.3 we have the

Theorem 25.4. A densely defined continuous linear operator has a unique continuousextension.

The extension is still linear, as seen in Problem 20.5. And its operator norm (18.1) is thesame as that of the original operator, as is easy to verify.

Example 5. Let S = [a, b] be a bounded interval and Y a Banach space. Consider thespace A = Σ(S, Y ) of all piecewise linear functions x : S → Y , viewed as a subspace ofX = C(S, Y ). Recall from Problem 18.1 that the integral over S defines a continuous linear

map∫ b

a: A → Y . Furthermore, A is dense in X, as seen in Exercise 17.3. Thus,

∫ b

ahas

a unique continuous extension to X. This extension is called the Riemann integral (forcontinuous functions).

The following proposition illustrates a common use of dense subsets.

Proposition 25.5. Let n 7→ Ln be a sequence of linear operators from a normed vectorspace X to a normed vector space Y . Assume that there exists a constant c > 0 such that‖Lnx‖Y ≤ c‖x‖X for all n and x ∈ X. Assume also that Lna → 0 for all a in some densesubset A of X. Then Lnx→ 0 for all x ∈ X.

Proof. Let x ∈ X and ε > 0. Choose a ∈ A such that ‖x−a‖X < ε2c . Then ‖Ln(x−a)‖Y ≤

c‖x − a‖X < ε2 for any n. Since Lna → 0, there exists N such that ‖Lna‖Y < ε

2 for alln > N . So for n > N we have ‖Lnx‖Y = ‖Ln(x−a)+Lna‖Y ≤ ‖Ln(x−a)‖Y +‖Lna‖Y <ε2+ < ε

2 = ε. This shows that Lnx→ 0, as claimed. QED

Exercise 6. Consider the Fourier coefficients Lnx =∫ 1

−1sin(nπs)x(s)ds for functions x

in X = C([−1, 1],R). They define linear functionals Ln : X → R, and it is not hard to

check that |Lnx| ≤ 2‖x‖∞ for all n and all x ∈ X. Use Theorem 17.3 and Proposition 25.5to prove that Lnx→ 0 for all x ∈ X.

The following is overdue but fits here:

Page 64: Notes on Metric Spaces

64 HANS KOCH

Proof of Theorem 17.3. Let f be a continuous real-valued function on S = [a, b]. Letε > 0. As shown in Exercise 17.3, there exists a piecewise linear h : S → R such that‖f − h‖∞ < ε

2 . It is not hard to see that h can be written as

h(s) =

m∑

k=1

hk(s) , hk(s) = ak + bk|s− ck| , (25.1)

for some numbers ak, bk, ck ∈ R. By Problem 20.3 there exists for each k a polynomial pksuch that ‖hk − pk‖ < ε

2m . Consider now the polynomial p = p1 + p2 + . . . + pm. By thetriangle inequality, we have

‖h− p‖∞ =

∥∥∥∥m∑

k=1

(hk − pk)

∥∥∥∥ ≤m∑

k=1

‖hk − pk‖∞ < mε

2m=ε

2, (25.2)

and ‖f − p‖∞ ≤ ‖f − h‖∞ + ‖h− p‖∞ ≤ ε2 + ε

2 = ε. So an arbitrary function f ∈ C(S,R)can be approximated to arbitrary precision (in the sup-norm) by a polynomial. This showsthat the subspace of polynomial functions p : S → R is dense in C(S,R). QED

26. Completion of metric spaces

In applications, one usually chooses a metric that is adapted to the problem being con-sidered. But then the given space X may not be complete, in which case many usefultheorems like the Contraction Mapping Theorem 22.6 cannot be used. If X sits inside acomplete metric space, then there is no problem: simply consider its closure in the largerspace. But if not, then we cannot just “add missing points” from a larger space. Still,every incomplete metric space can be “completed” to make it into a complete metric space.

In the case X = Q, the goal would be to construct a model X of the real numbers byusing nothing but rational numbers. So how would one represent an irrational numbera in terms of rational numbers? The obvious choice is to use a sequence of rationalnumbers x = (x0, x1, x2, . . .) whose limit in R is a. This sequence could be the “rationalrepresentation” of a. But there are many such sequences, and there is no natural way ofchoosing one among them. This is a common problem with a well known solution: Insteadof choosing one, take all of them!

In what follows, let (X, d) be a fixed metric space. If x and y are any two Cauchy sequencesin X, we define

x ∼ y if and only if d(xn, yn) → 0 as n→ ∞ . (26.1)

Denote by C the set of all Cauchy sequences in X.

Exercise 1. Show that “∼” is an equivalence relation in C. (See Section 1 for a defini-tion.)

Page 65: Notes on Metric Spaces

65

Exercise 2. As seen in Problem 22.1, the limit δ(y,v) = limn→∞ d(yn, vn) exists, forany two sequences y and v in C. Show that if x ∼ y and u ∼ v, then δ(x,u) = δ(y,v).

Definition 26.1. For every sequence y ∈ C, define the equivalence class of y to be the sety = {x ∈ C : x ∼ y}. Let X be the collection all these equivalence classes y. For any two

points x and y in X, define

d(x, y

)= lim

n→∞d(xn, yn) . (26.2)

From Problem 22.1 and Exercise 26.2, we see that the limit in (26.2) exists and defines a

function d on X × X. Now we can use the triangle inequality for d to get

Exercise 3. Show that d is a metric on X.

Proving the following is not hard. But it is a bit tedious; so we just state the result:

Theorem 26.2. The metric space(X, d

)is complete.

Exercise 4. Consider the case X = Q. Let x and y be Cauchy sequences of rationalnumbers, such that xn → a and yn → b in R. Show that d

(x, y

)= d(a, b), where

d(a, b) = |a− b| as usual.

One issue that remains is that X is not a subset of X. We constructed X from scratch,not by taking X and adding new elements. But there is a subset of X that can be“identified” with X. Namely, to any given x ∈ X we can associate the Cauchy sequencex = (x, x, x, . . .) and its equivalence class φ(x) = x. This defines a function φ from X to

X. Consider its range Y = {φ(x) : x ∈ X}. It is trivial to check that(Y, d

)is isometrically

isomorphic to (X, d), in the following sense:

Definition 26.3. Let (X, d) and (Y, d′) be metric spaces. An isometry from (X, d) to(Y, d′) is a map φ : X → Y that is one-to-one and onto and has the property that

d′(φ(x), φ(z)

)= d(x, z) , x, z ∈ X . (26.3)

If such an isometry exists, then the two spaces are said to be isometrically isomorphic.

Notice that every property that is defined topologically or metrically (open, closed, com-pact, connected, continuous, convergent, complete, . . .) is “preserved” by an isometry φ.

Page 66: Notes on Metric Spaces

66 HANS KOCH

So from a purely topological or metric point of view, two spaces that are isometricallyisomorphic can be considered identical.

Taking this into account when trying to “complete” a space leads to the

Definition 26.4. A metric space (X ′, d′) is called a completion of (X, d) if there exists adense subset Y ⊂ X ′ such that (Y, d′) is isometrically isomorphic to (X, d).

Theorem 26.5. Every incomplete metric space can be completed (has a completion).

Given the work that we have already done, finishing the proof of Theorem 26.5 onlyamounts to showing that Y = φ[X] is dense in X. Here, φ : X → X is the map describedbefore Definition 26.3. We leave this as an

Exercise 5. (Not difficult, but potentially messy.) Show that every point in X can beobtained as the limit of some sequence in Y .

Remark 6. By Theorem 22.4, the density condition in Definition 26.4 guarantees that(X, d

)is the smallest complete metric space that includes

(Y, d

)as a subspace. So our

procedure only added what was necessary to produce a complete metric space.