a course in metric spaces assuming basic real...

127
A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSIS KONRAD AGUILAR Abstract. Notes, exercises, and some solutions for MAT 472: Intermediate Real Analysis I at ASU. Texts for which these notes are based on include: Spaces by Tom L. Lindstrøm, Principles of Mathematical Analysis by Walter Rudin, and Linear Analysis by Béla Bollobás. Contents Acknowledgements 2 1. Basics of Metric spaces 2 1.1. Metric spaces definition, convergence, examples 2 1.1.1. Why the triangle inequality? 3 1.1.2. Examples of metric spaces 7 1.1.3. Exercises 15 1.2. The topology of metric spaces 19 1.2.1. Closure, interior, density 29 1.2.2. Exercises 34 1.3. Continuity 42 1.3.1. Exercises 52 References 55 1.4. Other continuities and spaces of continuous functions 56 1.4.1. Exercises 71 1.5. Completeness 76 1.5.1. Exercises 84 1.6. Compactness 90 1.6.1. Exercises 108 2. Spaces of Functions 113 2.1. Dense sets of continuous functions and the Stone-Weierstrass theorem 114 2.1.1. Exercises 126 Date : March 4, 2019. 1

Upload: others

Post on 23-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

A COURSE IN METRIC SPACES ASSUMING BASIC REALANALYSIS

KONRAD AGUILAR

Abstract. Notes, exercises, and some solutions for MAT 472: Intermediate RealAnalysis I at ASU. Texts for which these notes are based on include: Spaces byTom L. Lindstrøm, Principles of Mathematical Analysis by Walter Rudin, andLinear Analysis by Béla Bollobás.

Contents

Acknowledgements 21. Basics of Metric spaces 21.1. Metric spaces definition, convergence, examples 21.1.1. Why the triangle inequality? 31.1.2. Examples of metric spaces 71.1.3. Exercises 151.2. The topology of metric spaces 191.2.1. Closure, interior, density 291.2.2. Exercises 341.3. Continuity 421.3.1. Exercises 52References 551.4. Other continuities and spaces of continuous functions 561.4.1. Exercises 711.5. Completeness 761.5.1. Exercises 841.6. Compactness 901.6.1. Exercises 1082. Spaces of Functions 1132.1. Dense sets of continuous functions and the Stone-Weierstrass theorem 1142.1.1. Exercises 126

Date: March 4, 2019.1

Page 2: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

2 KONRAD AGUILAR

Acknowledgements

I thank my MAT 472 (Fall 2018) students at ASU for helping me with these notesduring lecture and outside of lecture.

371="analysis on the real line/advanced calculus." Since MAT 371 is a prerequisitefor this course, these notes assume that 371 is known and will freely use results aboutanalysis on the real line such as convergence of real-valued sequences and series, etc.The natural numbers, N, contains 0 throughout these notes.

1. Basics of Metric spaces

1.1. Metric spaces definition, convergence, examples. In these notes, we willtry to tackle three main motivations for the study of metric spaces. These stem fromthe fact that the main purpose of a metric is to give a notion of "closeness" of pointsand sequence of points in a given set (convergence). One can argue that this is thepurpose of analysis. Very informally, the study of analysis can be seen as the studyof how close things are, and the study of algebra is the study of when things are thesame. (Of course, both studies are useful and fascinating and share plenty of overlapas we shall see in this class). Since this class is the sequel to analysis on the real line,MAT 371, it is natural to wonder why one would care about a more abstract notionof closeness than the one provided by the absolute value on the real line. Here are 3reasons why.

(1) For an appropriate notion of "closeness"(metric), for any continuous real-valued function on an interval [a, b], we will be able to find a polynomial asclose as we want to that continuous function. This is the Stone-WeierstrassTheorem. Note that in 473, we will use the Stone-Weierstrass Theorem toextend this idea to more types of functions (integrable functions) with morenotions of "closeness."

(2) For an appropriate notion of "closeness"(metric) and any fixed n ∈ N, forany continuous real-valued function on an interval [a, b], we will be able tofind a polynomial of degree n as close as possible to that continuous function(finite-dimensional normed vector spaces).

(3) We will obtain a better understanding of irrational numbers and how theyconverge by providing a certain metric on them (Baire space).

It may be the case that we do not get to all of the above problems, but we will,in the very least, get a better understanding how to solve each of these problems.Let’s begin with the main definition of the course.

Page 3: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 3

Definition 1.1.1 (metric and metric space). Let X be a non-empty set. A metricd on X is a function

d : X ×X → [0,∞) ⊆ R

such that:

(1) (coincidence) for all a, b ∈ X, d(a, b) = 0 if and only if a = b,(2) (symmetry) for all a, b ∈ X, d(a, b) = d(b, a),(3) (triangle inequality) for all a, b, c ∈ X,

d(a, c) 6 d(a, b) + d(b, c).

If d is a metric on X, then we call the pair (X, d) a metric space. Also, in words, ford(a, b) we say "the distance from a to b."

We note that it will usually be the case that the function d we are given to show isa metric satisfies d(a, b) <∞ for all a, b ∈ X immediately. However, there are somemetrics that do not obviously satisfy d(a, b) < ∞ for all a, b ∈ X, and this wouldalso need to be checked.

Here is the required first example.

Example 1.1.2 (usual/standard metric on R and C.). Consider the set R. If we defined1(a, b) = |a− b| for all a, b ∈ R, then d1 is a function from R×R to [0,∞). Also, ifa = b, then d1(a, b) = |a− b| = |a− a| = |0|. If 0 = d1(a, b) = |a− b|, then a− b = 0

and thus a = b. If a, b ∈ R, then d1(a, b) = |a− b| = | − (b− a)| = |b− a| = d1(b, a).Furthermore, for all a, b ∈ R, we have |a + b| 6 |a| + |b| by 371. Therefore, ifx, y, z ∈ R, then

d1(x, z) = |x− z|

= |x+ 0− z|

= |x+ (−y + y)− z|

= |(x− y) + (y − z)|

6 |x− y|+ |y − z| = d1(x, y) + d1(y, z).

Therefore d1 is a metric on R.If we consider C instead of R, then d1(µ, ν) = |µ−ν| for µ, ν ∈ C, where | · | is the

complex modulus. (If z = reiθ, then |z| = r, or if z = a+ ib, then |z| =√a2 + b2.)

1.1.1. Why the triangle inequality? Requiring a metric to be non-negative real-valued,coincidental, and symmetric are more or less obvious conditions one would desire fora metric to satisfy. However, the triangle inequality may seem a little mysterious.Hence, we will motivate the trianlge inequality first with a geometric motivation,and then we will prove some general consequences that show why this geometricmotivation is the desirable one to define a metric.

Page 4: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

4 KONRAD AGUILAR

Consider R2 and define a function d : R2 ×R2 → [0,∞) by

d2((x1, x2), (y1, y2)) =√

(x1 − y1)2 + (x2 − y2)2.

We will show shortly in Section 1.1.2, that this defines a metric on R2 and thus(R2, d2) is a metric space, but first let’s see what the trianlge inequality tells us. Let(x1, x2), (y1, y2), (z1, z2) ∈ R2. (draw a picture). Given these three points, we mayconnect them with straight line to form a triangle, then the triangle inequality tellsus something very familiar geometrically, that is

d2((x1, x2), (y1, y2)) 6 d2((x1, x2), (z1, z2)) + d2((z1, z2), (y1, y2))

tells us that the distance of any side of the triangle is less than the sum of the dis-tances of the two other sides of the triangle. Although this provides a nice geometricintuition for the triangle inequaliy, it doesn’t really explain why this geometric iden-tity was chosen to be included in the definition of a metric. There are many otherinteresting and useful geometric identities in R2, so why was the trianle inequalitychosen over those other ones to define the abstract notion of a metric space? Next,we attempt to provide reasons for this, while introducing definitons and proving factswe will use throughout the course.

First, we note that the purpose of a metric is to not only provide a notion ofdistance or "closeness", but also to provide a way to see when a sequence of pointsgets close to a point, or converges to a point. We will now see that the triangleinequality shows that a metric gifts a more than satisfactory notion of convergence,but let’s first provide definitions of seqeuences of converges. First, some notation.

Notation 1.1.3 (Cartesian product). For all n ∈ N, let Xn be a set. We denote theCartesian product of these sets by∏

n∈NXn = {(x0, x1, x2, . . .) | for all k ∈ N, xk ∈ Xk}.

We will sometimes denote elements of∏n∈NXn by (xn)n∈N.

If there exists a set X such that Xn = X for all n ∈ N, then we denote

XN =∏n∈N

X,

and note also that XN = {f : N→ X | f is a function}. If f : N→ X is a function,then we see that (f(n))n∈N ∈ XN, and if (xn)n∈N ∈ XN, then setting xn = f(n) forall n ∈ N defines a function f : N→ X.

Note that the following definition does not require the notion of a metric.

Definition 1.1.4 (sequence). Let X be a set. A sequence in X is an element(xn)n∈N ∈ XN.

Page 5: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 5

Remark 1.1.5. The purpose of this definition for a sequence is to distinguish thesequence (xn)n∈N ∈ XN from the set {xn ∈ X | n ∈ N} ⊆ X. These are not thesame thing. The second is the set that contains the terms of the sequence, and ifx4 = x5 for instance, the set {xn ∈ X | n ∈ N} would forget x4 or x5 altogethersince sets don’t allow for repetition, and we certainly do not want to forget terms ofa sequence. Also, sets contain no order to them, so {xn ∈ X | n ∈ N} also forgetsthe order, which would again be terrible. And, note that even if x4 = x5, the element(xn)n∈N ∈ XN, which is the sequence, does not forget x5 and does not forget x4,and also does not forget order. This is also why it’s a good idea to view sequencesas functions valued in X with domain equal to the natural numbers.

Since a metric is supposed to provide a notion of distance, the next definitionmakes sense, which borrows from analysis on the real line.

Definition 1.1.6 (convergence). Let (X, d) be a metric space. A sequence (xn)n∈N

in X converges if

∃a ∈ X such that ∀ε > 0, ∃N ∈ N, such that d(xn, a) < ε for all n > N.

If this occurs, then we say that (xn)n∈N converges to a and that a is a limit of(xn)n∈N.

Before we discuss how the triangle inequality enhances this notion of convergence,we first show that convergence in any metric space is associated to convergence inthe usual metric on R. Indeed:

Theorem 1.1.7 (metricR convergence). Let (X, d) be a metric space and let (xn)n∈N

be a sequence in X.(xn)n∈N converges to a point a ∈ X if and only if the sequence (d(xn, a))n∈N in

R converges to 0 in the usual metric, i.e. limn→∞ d(xn, a) = 0.

Proof. Exercise �

A first consequence of the triangle inequality (and coincidence) is unique limitsand allows us to say say "a is the limit..." in the above definition instead of "a is alimit..."

Theorem 1.1.8 (unique limits). Let (X, d) be a metric space and let (xn)n∈N be asequence in X.

If (xn)n∈N converges to a ∈ X, then a is the unique element in X that (xn)n∈N

converges to.

Proof. Assume by way of contradiction that (xn)n∈N converges to b ∈ X and a 6= b.Hence d(a, b) > 0 by coincidence. Thus d(a,b)

17 > 0. By definition of convergence there

Page 6: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

6 KONRAD AGUILAR

exists Na ∈ N such that d(xn, a) < d(a,b)17 for all n > Na, and there exists Nb ∈ N

such that d(xn, b) <d(a,b)

17 for all n > Nb. Let N = max{Na, Nb}, then we have bythe triangle inequality

d(a, b) 6 d(a, xN ) + d(xN , b) <d(a, b)

17+

d(a, b)

17= 2

d(a, b)

176 d(a, b).

Hence d(a, b) < d(a, b), a contradiction. �

Another property one would expect for a convergent sequence to have is that itsset of points form a bounded set in X. First, we describe the correct notion forboundedness in a metric space.

Definition 1.1.9 (bounded and diameter). Let (X, d) be a metric space. Let A ⊆ X.We say that A is bounded if diam(A) < ∞, where diam(A) = supa,b∈A{d(a, b)} iscalled the diameter of A. (We will use diamd instead of diam in case we are workingwith multiple metrics). A not bounded set is called unbounded.

A sequence (xn)n∈N in X is a bounded sequence if the set {xn ∈ X | n ∈ N} isbounded.

Example 1.1.10 (diameter is diameter). Consider the set R with metric d1 definedby d1(a, b) = |a − b|. The set [0, 1] is bounded in (R, d1) with diam([0, 1]) = 1, andthe set N is not bounded (R, d1) with diam(N) =∞.

Also, let r > 0 and (a, b) ∈ R2 , the set {(x1, x2) ∈ R2 | (x1−a)2 +(x2−b)2 = r2}satisfies diam({(x1, x2) ∈ R2 | (x1 − a)2 + (x2 − b)2 = r2}) = 2r with respect tothe metric d2 on R2 (defined in the beginning Section 1.1.1), which is the length ofany diameter of the circle of radius r centered at (a, b). Note that with d2, we have(x1−a)2+(x2−b)2 = r2 means d2((x1, x2), (a, b)) = r. A hint to show this is to use thetriangle inequality with any two points in {(x1, x2) ∈ R2 | (x1−a)2 +(x2−b)2 = r2}and the point (a, b). This will give you diam({(x1, x2) ∈ R2 | (x1− a)2 + (x2− b)2 =

r2}) 6 2r. To get equality, just find two points on the circle that are exactly distance2r from each other. You could try (a+ r, b), (a− r, b).

Theorem 1.1.11 (convergence implies bounded). Let (X, d) be a metric space andlet (xn)n∈N be a sequence in X. If (xn)n∈N converges to a ∈ X, then (xn)n∈N isbounded and {xn ∈ X | n ∈ N} ∪ {a} is bounded.

Proof. Exercise. �

Next, given a sequence (xn)n∈N and with limit a, convergence informally meansthe the terms xn are getting closer to a as n grows. Intuitively, this should also meanthat the terms xn and xm should be getting closer together as n and m grow. Thisrequires another definition.

Page 7: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 7

Definition 1.1.12 (Cauchy sequence). Let (X, d) be a metric space. A sequence(xn)n∈N in X is Cauchy if

∀ε > 0, ∃N ∈ N, such that d(xn, xm) < ε for all n,m > N.

We note that Cauchy need not imply convergence (where would the limit comefrom?) and we will study this in depth later. However, it should be the case that"convergence implies Cauchy" and this is because of the triangle inequality as sug-gested above. Indeed:

Theorem 1.1.13 (convergence implies Cauchy). Let (X, d) be a metric space andlet (xn)n∈N be a sequence in X. If (xn) converges, then (xn)n∈N is Cauchy.

Proof. Assume that (xn) converges to some a ∈ X. Let ε > 0. Since ε2 > 0, by

convergence, there exists N ∈ N such that d(xn, a) < ε2 for all n > N . Let n,m > N ,

then

d(xn, xm) 6 d(xn, a) + d(a, xm) <ε

2+ε

2= ε,

which completes the proof. �

We note that we also have that any set formed by a Cauchy sequence is bounded.

Theorem 1.1.14 (Cauchy implies bounded). Let (X, d) be a metric space and let(xn)n∈N be a sequence in X. If (xn) is Cauchy, then (xn) is bounded.

Proof. This would follow the same process of any proof of Theorem 1.1.11, which isan exercise. �

Thus, the triangle inequality (along with the other more obvious conditions of ametric) allows for a very satisfying notion of convergence, and convergence can beseen as a main task of the job of a metric. We will later find deeper reasons as towhy the triangle inequality is crucial, but we will move on from this topic for now.

Next, we cover many of the main examples that will follow us throughout thecourse. We cover all of them yet since we do not have the tools yet define themyet such as the operator norm on the set of complex-valued n × n-matrices Mn(C)

(we don’t know what an operator is yet), and the supremum norm on the space ofbounded continuous functions between two fixed metric spaces (we don’t know whatcontinuity means between metric spaces yet).

1.1.2. Examples of metric spaces. The first example shows us that any set can beequipped with a metric. Although the following metric seems somewhat useless, itis in fact very useful for making sure that we define the correct generalizations ofdefinitions from the real line case. We leave many of the proofs of these examples asexercises.

Page 8: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

8 KONRAD AGUILAR

Example 1.1.15 (discrete metric). Let X be a non-empty set. The function ddisc :

X ×X → [0,∞) defined by

ddisc(a, b) =

{0 : if a = b

1 : if a 6= b

is a metric on X called the discrete metric.So, if C ="the set of all cats", then (C, ddisc) is a metric space.

The following metric space will become a main tool in understanding the irrationalnumbers in a new light, and is a foundational example of the area of mathematicscalled Descriptive Set Theory.

Example 1.1.16 (Baire space). Consider the set NN, where we recall thatNN = {(x0, x1, x2, . . .) | ∀k ∈ N, xk ∈ N}. In other words, the space of N-valued

sequences. The function dB : NN ×NN → [0,∞) defined by

dB((xn)n∈N, (yn)n∈N) =

{0 : if (xn)n∈N = (yn)n∈N

2−min{m∈N:xm 6=ym} : if (xn)n∈N 6= (yn)n∈N

is a metric on NN called the Baire metric and (NN, dB) is called the Baire space.So, consider the sequences x = (100, 100, 100, . . .) andy = (100, 100, 100, 17, 111, 100, 100, . . .), then d(x, y) = 2−3 = 1/8. Here is a hint onthe triangle inequality. Let (xn)n∈N, (yn)n∈N, (zn)n∈N ∈ NN. Fix m ∈ N. If xm = ym

and ym = zm, then xm = zm. Use the contrapositive of this statement and the factthat 1/2j 6 1/2k if j > k.

Many of the examples of metric spaces will be given by sets whose elements them-selves are sequences like in the above example. So, it is helpful to have a standardnotation for this moving forward.

Notation 1.1.17 (sequences of sequences). Let X be a set whose elements aresequences in some set Y . So X ⊆ Y N. Now let (xn)n∈N be a sequence in X. Thusfor each m ∈ N, the element xm ∈ X is an element in Y and thus a sequence in Y ,so we denote xm = ((xm)0, (xm)1, (xm)2, . . .) = ((xm)k)k∈N is a sequence in Y andthus (xm)k ∈ Y for all k ∈ N.

The following two examples are the first examples of building a metric space fromanother metric space.

Example 1.1.18 (subspace metric). Let (X, d) be a metric space. If Y ⊆ X, then(Y, d) is also a metric space.

The next example has many applications.

Page 9: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 9

Example 1.1.19 (Cantor space). Consider the set of {0, 1}-valued sequences, {0, 1}N.Since {0, 1}N ⊂ NN, we have that ({0, 1}N, dB) is a metric space by Example 1.1.18called the Cantor space.

The next few examples come from sets called vector spaces. Some vector spacesmay be equipped with norms (we will also define "norm") that induce metrics. First,we recall the definition of a vector space.

Definition 1.1.20 (Vector space). Let K = R or C(complex numbers), called theset of scalars. Let V be a non-empty set. Let p : V × V → V be a function and lets : K× V → V be a function. For all u, v ∈ V, µ ∈ K, denote p(u, v) = u+p v, calledvector addition, and s(µ, u) = µ ·p u, called scalar multiplication.

If for all u, v, w ∈ V, µ, ν ∈ K, we have

(1) (commutativity) u+p v = v +p u

(2) (associativity) u+p (v +p w) = (u+p v) +p w

(3) (zero) there exists an element 0p ∈ V , such that x+p 0p = x for all x ∈ V(4) (additive inverse) For every x ∈ V , there exists an element −x ∈ V such that

x+p (−x) = 0p.(5) (mulitplication over K) µ ·s (ν ·s u) = (µν) ·s u(6) (unit of scalar multiplication) 1 ·s u = u.(7) (distrubution of K over additon in V ) µ ·s (u+p v) = µ ·s u+p µ ·s v(8) (distribution of addition in K over V ) (µ+ ν) ·s u = µ ·s u+p ν ·s u.

If p and s satisfy all of these conditions, then we call V a vector space over K withrespect to p and s. However, given a vector space, we will sometimes denote +p and·s by + and concatenation (or just ·), respectively, and sometimes we will denote0p simply by 0. Also, we denote u +p (−v) = u −p v called vector subtraction andsometimes denote −p by just −.

We may now define norm. We note that in this class, we will assume that thevector spaces we use have already been shown to be vector spaces, so we will notconcern ourselves with showing a given vector space is in fact a vector space.

Definition 1.1.21 (normed vector space). Let V be a vector space over K = R orC with addition p and scalar multiplication s. A function n : V → [0,∞) ⊂ R is anorm if

(1) (positivity) for all v ∈ V , n(v) = 0 if and only if v = 0p

(2) (homogeneity) for all µ ∈ K, v ∈ V , n(µ ·s v) = |µ|n(v) (note: if K = R, then| · | is the absolute value and if K = C, then | · | is the modulus.)

(3) (triangle inequality) for all u, v ∈ V , n(u+p v) 6 n(u) + n(v).

Page 10: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

10 KONRAD AGUILAR

When all of these conditions are satisfied, we denote n(u) = ‖u‖ for all u ∈ V andcall V a normed vector space with respect to the norm ‖ · ‖.

We note that it will usually be the case that the function n we are given to showis a norm satisfies n(u) < ∞ for all u ∈ V immediately. However, there are somenorms that do not obviously satisfy n(u) < ∞ for all u ∈ V , and this would alsoneed to be checked.

We can think of a norm as a form of length. So, positivity says that the onlyvector of length zero is the zero vector. Homogeneity, says that we can increase ordecrease the length of a vector by "scaling it" which is accomplished by multiplyingby a scalar. There is another deeper meaning to this condition as well that we willdiscuss later. The triangle inequality allows us to to have similar advantages thatmetric spaces have, which we show in the next theorem, as well as some deeperconsequences we will discuss later.

Theorem-Definition 1.1.22 (norm induced metric). If V is a normed vector spacewith norm ‖ · ‖, then the function d‖·‖ : V × V → [0,∞) defined for all u, v ∈ V

by d‖·‖(u, v) = ‖u − v‖ (recall that "−" is the vector subtraction) is a metric on Vcalled the metric induced by the norm ‖ · ‖.

Proof. The proof is the same as the proof of Example 1.1.2. �

Before we introduce the many metric spaces we get from normed vector spaces,we need a result from 371.

Theorem 1.1.23 (Minkowski’s Inequality). Let K = R or C. Fix p ∈ N, 1 6 p <

∞. If (xn)n∈N and (yn)n∈N are sequences in K such that∑∞

n=0 |xn|p < ∞ and∑∞n=0 |yn|p <∞, then( ∞∑

n=0

|xn − yn|p) 1

p

6

( ∞∑n=0

|xn|p) 1

p

+

( ∞∑n=0

|yn|p) 1

p

.

And, fix a, b ∈ R, a < b, if f, g are a real-valued functions on [a, b] such that |f |p, |g|p

are Reimann integrable on [a, b], then(∫ b

a|f(x)− g(x)|p dx

) 1p

6

(∫ b

a|f(x)|p dx

) 1p

+

(∫ b

a|g(x)|p dx

) 1p

.

One aspect of 473 is that we will able to extend Minkowski’s inequality while alsoproviding a single theorem that covers both of the above cases in one case.

Example 1.1.24 (Rn, Cn). Let K = R or C. Let n ∈ Z+. Consider the vectorspace Kn = {(x1, . . . , xn) | x1, . . . , xn ∈ K} with vector operations (x1, . . . , xn) +

(y1, . . . , yn) = (x1 + y1, . . . , xn + yn) and µ(x1, . . . , xn) = (µx1, . . . , µxn) for µ ∈ K,and the zero vector is (0, 0, . . . , 0).

Page 11: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 11

Fix p ∈ N, 1 6 p 6∞. For 1 6 p <∞. Define for all x ∈ Kn,

‖x‖p =

(n∑k=1

|xk|p) 1

p

.

Everything but the trianlge inequality is easy to check (so check it), and the triangleinequality is provided by Theorem 1.1.23. So, ‖ · ‖p is a norm and we denote itsinduced metric by dp by Theorem-Definition 1.1.22. ‖ · ‖2 is called the Euclideannorm and we note that d2 is the same d2 from the beginning of Section 1.1.1.

For p =∞. Define for all u ∈ Kn,

‖x‖∞ = max{|xk| | k ∈ {1, . . . , n}}.

It is easy to check that it is a norm (so check it), and we denote its induced metricby d∞.

Example 1.1.25 (integrable functions). Fix a, b ∈ R, a < b. Let C([a, b],R) = {f :

[a, b] → R | f is continuous}. This is a vector space with vector operations definedpointwise by (f + g)(x) = f(x) + g(x) and (µf)(x) = µ(f(x)) for µ ∈ R, and thezero vector is the constant 0 function.

For 1 6 p < ∞. Since continuous functions defined on a closed bounded intervalare Riemann integrable, define for all f ∈ C([a, b],R),

‖f‖p =

(∫ b

a|f(x)|p dx

) 1p

.

Homogeneity is easy to check (so check it). The triangle inequality is provided byTheorem 1.1.23. What remains is positivity. If f = 0 is the constant 0 function, then|0|p = 0, and so ‖0‖p = 0. Now, assume that f ∈ C([a, b],R) and f 6= 0. So, f is notthe constant 0 function. Hence there exists x0 ∈ [a, b] such that f(x0) 6= 0. Hence|f(x0)| > 0 and |f(x0)|p > 0. Since f is continuous, so are the functions |f | and|f |p, defined pointwise by |f |(x) = |f(x)| and |f |p(x) = |f(x)|p. Hence, there existw, z ∈ [a, b], w < z and r > 0 such that |f |p(c) > r > 0 for all c ∈ [w, z] by 371.Hence since |f(x)|p > 0 for all x ∈ [a, b],∫ b

a|f(x)|p dx =

∫ w

a|f(x)|p dx+

∫ z

w|f(x)|p dx+

∫ b

z|f(x)|p dx

> 0 +

∫ z

w|f(x)|p dx+ 0 > r(z − w) > 0.

Thus ‖f‖p =(∫ b

a |f(x)|p) 1p> 0. So, ‖·‖p is a norm and we denote its induced metric

by dp by Theorem-Definition 1.1.22. (‖ · ‖∞ is to be continued).

The above norm would not have satisfied positivity if we allowed for discontinuousRiemann integrable functions. Indeed, consider the Riemann integrable function on[0, 1], f , defined by f(x) = 0 for all 0 6 x < 1 and f(1) = 87, then f is not the

Page 12: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

12 KONRAD AGUILAR

constant zero function but∫ 1

0 |f(x)|p dx = 0 for all 1 6 p < ∞. We will find a wayto remedy this in 473.

Example 1.1.26 (series). Let K = R or C. Let p ∈ N, 1 6 p 6∞.For 1 6 p < ∞, define `p = {(x0, x1, x2, . . .) ∈ KN |

∑∞k=0 |xk|p < ∞}. This is a

vector space with vector operations (x0, x1, . . .) + (y0, y1, . . .) = (x0 +y0, x1 +y1, . . .)

and µ(x0, x1, . . .) = (µx0, µx1, . . .). Define for all x = (xn)n∈N ∈ `p,

‖x‖p =

( ∞∑k=0

|xk|p) 1

p

Finiteness is provided by definition of the set, positivity and homogeneity are easyto check (so check them). Triangle inequality is provided by Theorem 1.1.23. Hence‖ · ‖p is a norm. Denote the associated metric by dp.

For p = ∞, let `∞ = {(x0, x1, x2, . . .) ∈ KN | supk∈N |xk| < ∞}, the space ofbounded sequences in K. Define for all x = (xn)n∈N ∈ `∞

‖x‖∞ = supk∈N|xk|

The fact that this is a norm will be provided by Example 1.1.27 and we denote itsassociated metric by d∞.

We end this section to show further examples of building metrics from othermetrics. We already used an idea like this to put a metric on the Cantor space inExample 1.1.19. The first two are related to the above examples.

Example 1.1.27 (bounded functions). Let X be a non-empty set and (Y, d) a metricspace. The set of bounded functions from X to Y , defined by B(X,Y ) = {f : X →Y | diam(f(X)) <∞} is a metric space with metric d∞(f, g) = supx∈X d(f(x), g(x))

defined for all f, g ∈ B(X,Y ).First, we show that d(f, g) <∞ for all f, g ∈ B(X,Y ). Let x ∈ X. Fix x0 ∈ X

d(f(x), g(x)) 6 d(f(x), f(x0)) + d(f(x0), g(x0)) + d(g(x0), g(x))

6 diam(f(X)) + d(f(x0), g(x0)) + diam(g(X))

Hence diam(f(X)) + d(f(x0), g(x0)) + diam(g(X)) is an upper bound for the set{d(f(x), g(x)) ∈ R | x ∈ X}. Since supremum is the least upper bound, we have

d∞(f, g) = supx∈X

d(f(x), g(x)) 6 diam(f(X)) + d(f(x0), g(x0)) + diam(g(X)) <∞.

Coincidence and symmetry are easy to check (so check them). For triangle inequality,let f, g, h ∈ B(X,Y ). Let x ∈ X, we have that

d(f(x), h(x)) 6 d(f(x), g(x)) + d(g(x), h(x)) 6 d∞(f, g) + d∞(g, h),

and by definition of supremum, we have d∞(f, h) 6 d∞(f, g) + d∞(g, h).

Page 13: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 13

We note that from Example 1.1.26, we have that B(N,K) = `∞ for K = R or C,and the d∞ of Example 1.1.26 is the same as this example if K is equipped with itsusual metric. Thus, we have established (`∞, d∞) as a metric space.

In order to define appropriate metrics from other metrics in the following manner,we introduce the following definition.

Definition 1.1.28 (topological product metric). FixN ∈ N. For each k ∈ N, k 6 N ,let (Xk, dk) be a metric space. Let

∏Nk=0Xk = {(x0, x1, . . . , xN ) | ∀k ∈ {0, . . . , N}, xk ∈

Xk} denote the Cartesian product. We call a metric d on∏Nk=0Xk, a product metric.

We call a product metric d on∏Nk=0Xk topological if for all sequences (xn)n∈N in∏N

k=0Xk, it holds that (xn)n∈N converges with respect to d if and only if for eachk ∈ {0, . . . , N} the sequence ((xn)k)n∈N in Xk converges with respect to dk, where(xn)k is the kth-coordinate of xn. (This is to say that the sequence converges if andonly if it converges coordinate-wise).

Now, we provide examples of topological product metrics.

Example 1.1.29 (topological product metric). Fix N ∈ N. For each k ∈ N, k 6 N ,let (Xk, dk) be a metric space. Define a metric d∞ on

∏Nk=0Xk by

d∞((x0, . . . , xN ), (y0, . . . , yN )) = maxk∈{0,...,N}

{dk(xk, yk)}

for all (x0, . . . , xN ), (y0, . . . , yN ) ∈∏Nk=0Xk. It is easy to check this is a metric on∏N

k=0Xk (so check it), so d∞ is a product metric.To prove we have a topological product metric, we begin with the forward direc-

tion. Thus, let (xn)n∈N be a sequence in∏Nk=0Xk that converges to a = (a0, . . . , aN )

with respect to d∞. Let ε > 0. There exists M ∈ N such that d∞(xn, a) < ε forall n > M . Thus, maxk∈{0,...,N}{dk((xn)k, ak)} < ε for all n > M . Therefore foreach k ∈ {0, . . . , N}, we have dk((xn)k, ak) < ε for all n > N , which completes thisdirection.

For the reverse direction, assume that for each k ∈ {0, . . . , N}, the sequence((xn)k)n∈N in Xk converges to some ak ∈ Xk. Set a = (a0, . . . , aN ) ∈

∏Nk=0Xk. Let

ε > 0. For each k ∈ {0, . . . , N}, there exists Mk ∈ N such that dk((xn)k, ak) < ε forall n >Mk. ChooseM = max{M0, . . . ,Mk}. Hence if n >M , then dk((xn)k, ak) < ε

for all k ∈ {0, . . . , N}. Thus, if n >M , thend∞(xn, a) = maxk∈{0,...,N}{dk((xn)k, ak)} < ε, which completes the proof.

If time permits, we will show that the above notions can extend to infinite productsif done carefully.

We end with another way to build a metric from another metric.

Page 14: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

14 KONRAD AGUILAR

Example 1.1.30. Let X be a set and let (Y, d) be a metric space. Assume there existsan injection f : X → Y . Then, we may define a metric df on X by

df (a, b) = d(f(a), f(b))

for all a, b ∈ X. It is easy to check that this is a metric on X (where is injectivityused?). This allows us to place an interesting metric on the following set. Let p bea point not in N (this could be just some non-natural real number). We will place ametric on the set N∪{p}. For symbolic purposes which will become clearer later, wedenote p = ∞ and N∞ = N ∪ {∞}. The function dc : N∞ ×N∞ → [0,∞) definedfor all a, b ∈ N∞ by

dc(a, b) =

∣∣∣ 1a+1 −

1b+1

∣∣∣ :if a, b ∈ N1

a+1 :if a ∈ N and b =∞1b+1 :if b ∈ N and a =∞0 :if a =∞ = b

is a metric on N∞ since this is the metric given by the injection f : N∞ → { 1n+1 ∈

R | n ∈ N} ∪ {0} given by f(n) = 1/(n + 1) for all n ∈ N and f(∞) = 0, sodc(a, b) = |f(a)− f(b)| for all a, b ∈ N∞ (here { 1

n+1 ∈ R | n ∈ N} ∪ {0} is equippedwith the usual metric on R as a subset of R like in Example 1.1.18.)

Page 15: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 15

1.1.3. Exercises.

(1) For this problem, we need the following definition.

Definition 1.1.31 (eventually constant). Let X be a set and let (xn)n∈N bea sequence in X, we say that (xn)n∈N is eventually constant if there existsa ∈ X and N ∈ N such that xn = a for all n > N .

(This problem displays how incredibly restricitive the discrete metric issince the only convergence sequences it allows for are eventually constantsequences).(a) Let (X, d) be a metric space. Let (xn)n∈N be an eventually constant

sequence in X. If a ∈ X such that there exists N ∈ N with xn = a forall n > N , then (xn)n∈N converges to a.

(b) ** (5 points) Let X be a set and let (xn)n∈N be a sequence in X. Showthat (xn)n∈N converges with respect to ddisc if and only if (xn)n∈N iseventually constant. Then, show that if d is any metric on X, thenconvergence with respect to ddisc implies convergence with respect to d.

Proof. Assume that (xn)n∈N converges with respect to ddisc. Let a ∈ Xbe its limit. Since 1 > 0, there existsN ∈ N such that ddisc(xn, a) < 1 forall n > N . Since ddisc is only valued in {0, 1}, we have that ddisc(xn, a) =

0 for all n > N . Thus xn = a for all n > N .Now, assume that (xn)n∈N is eventually constant. By part (a), (xn)n∈N

converges with respect to any metric including ddisc. �

(c) ** (5 points) Consider the set R. Find sequence in R that convergeswith respect the usual metric on R (d1 from Example 1.1.2) but doesnot converge with respect to ddisc. You must prove your claims.

Proof. By 371, we know that the sequence ( 1n+1)n∈N in R converges

to 0 with respect to the usual metric. Now, fix N ∈ N. We have that1

N+1 6=1

(N+1)+1 . Hence, for all N ∈ N there exists n > N such that1

N+1 6=1

n+1 . Hence ( 1n+1)n∈N is not eventually constant and thus does

not converge with respect to ddisc. �

(2) Establish the reverse triangle inequality for any metric space (X, d). So, provethat for all a, b, c ∈ X, it holds that

|d(a, c)− d(c, b)| 6 d(a, b).

(3) Prove Theorem 1.1.7.

(4) ** (10 points) Prove Theorem 1.1.11

Page 16: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

16 KONRAD AGUILAR

Proof. Since (xn)n∈N converges to a, there exists N ∈ N such that d(xn, a) <

7 for all n > N . Now, the set {d(xj , xk) ∈ R | j, k ∈ {0, . . . , N}} is a finiteset. Hence let M = max{d(xj , xk) ∈ R | j, k ∈ {0, . . . , N}} < ∞. LetM ′ = max{M, 7} <∞.

Now, let u, v ∈ {xn ∈ X | n ∈ N} ∪ {a}. The only cases that does notfollow immediately from the above and symmetry are the following cases.

Case 1 (u, v ∈ {xn ∈ X | n ∈ N}): There exists p, q ∈ N such that u = xp

and v = xq. If p, q 6 N , then d(u, v) 6M 6M ′. If p 6 N and q > N+1, thend(u, v) 6 d(u, xN ) + d(xN , v) 6 d(u, xN ) + d(xN , a) + d(a, v) < M + 7 + 7 6

3M ′ by the triangle inequality.Case 2 (u ∈ {xn ∈ X | n 6 N} and v ∈ {a}): There exists p 6 N such

that u = xp. Then d(u, v) 6 d(u, xN ) + d(xN , v) < M + 7 6 2M ′ by thetriangle inequality.

Therefore diam({xn ∈ X | n ∈ N} ∪ {a}) 6 3M ′, and since {xn ∈ X | n ∈N} ⊆ {xn ∈ X | n ∈ N} ∪ {a}, we have that diam({xn ∈ X | n ∈ N}) 6diam({xn ∈ X | n ∈ N} ∪ {a}) 6 3M ′ or we could see that this follows fromCase 1. �

(5) The first question shows a way to establish convergence of a sequence byestimating each term of the sequence carefully with another convergent se-quence. This is one way to think of convergence of irrational numbers byusing convergence of rationals since each irrational number has a sequence ofrationals converging to it. The second question establishes a convenient toolfor showing a sequence is Cauchy. Both of these use the triangle inequalityin crucial ways.(a) ** (10 points) Let (X, d) be a metric space. Let (βn)n∈N be a sequence

in R>0 (non-negative real numbers) such that (βn)n∈N converges to 0

in the usual metric. Let (xn)n∈N be a sequence in X and let x ∈ X.Prove that if there exists a sequence (yk)k∈N in X and for each n ∈ Na sequence (yn,k)k∈N in X such that

(i) d(yk, x) 6 βk and d(yn,k, xn) 6 βk for all k ∈ N, and(ii) for each k ∈ N, the sequence (yn,k)n∈N converges to yk,

then (xn)n∈N converges to x. (Hint: lim sup is helpful).

Proof. Let ε > 0. There exists N ∈ N such that |βk − 0| < ε/4 for allk > N . Since βk is non-negative, we have βk < ε/4 for all k > N . Hence,we have for any n ∈ N

d(xn, x) 6 d(xn, yn,N ) + d(yn,N , yN ) + d(yN , x)

6 βN + d(yn,N , yN ) + βN

Page 17: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 17

< ε/2 + d(yn,N , yN ).

Thus taking lim sup of both sides, we have since limn→∞ d(yn,N , yN ) = 0

by Theorem 1.1.7,

lim supn→∞

d(xn, x) 6 ε/2 + 0

Hence, for all ε > 0, it holds that lim supn→∞ d(xn, x) < ε. Thuslim supn→∞ d(xn, x) = 0. Therefore since metrics only take non-negativevalues, we have

0 6 lim infn→∞

d(xn, x) 6 lim supn→∞

d(xn, x) = 0

implies lim infn→∞ d(xn, x) = lim supn→∞ d(xn, x) = 0 and thuslimn→∞ d(xn, x) = 0. Therefore (xn)n∈N converges to x by Theorem1.1.7. �

(b) ** (10 points) Let (X, d) be a metric space. Let (βn)n∈N be a sequencein R>0 such that

∑∞n=0 βn <∞. Let (xn)n∈N be a sequence in X.

Prove that if d(xn, xn+1) 6 βn for each n ∈ N, then (xn)n∈N is Cauchyand if furthermore (xn)n∈N converges to a ∈ X, then d(xn, a) 6

∑∞k=n βk

for all n ∈ N. (Hint: recall that if a series of converges, thenlimn→∞

∑∞k=n βk = 0 ("the tails of a convergent series converge to 0").)

Proof. Let ε > 0. Since∑∞

n=0 βn, there existsN ∈ N such that∑∞

k=n βk <

ε for all n > N . Now, let m,n > N , and assume without loss of gener-ality that m > n. Thus there exists j ∈ N, k > 1 such that m = n + j.Hence

d(xn, xm) = d(xn, xn+j)

6 d(xn, xn+1) + d(xn+1, xn+j)

6 d(xn, xn+1) + d(xn+1, xn+2) + d(xn+2, xn+j)

...

6j−1∑k=0

d(xn+k, xn+k+1) 6j−1∑k=0

βn+k

=

n+j−1∑k=n

βk 6∞∑k=n

βk < ε.

Thus (xn)n∈N is Cauchy.Now, assume (xn)n∈N converges to some a ∈ X. Fix n ∈ N. Let ε > 0.There exists N ∈ N such that for all j > N , we have d(xj , a) < ε. Let

Page 18: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

18 KONRAD AGUILAR

j > max{N,n}. Then using the same process as above

d(xn, a) 6 d(xn, xj) + d(xj , a)

6

( ∞∑k=n

βk

)+ d(xj , a)

<

( ∞∑k=n

βk

)+ ε.

Hence d(xn, a) < (∑∞

k=n βk) + ε for all ε, which implies d(xn, a) −(∑∞

k=n βk) < ε for all ε > 0, which implies d(xn, a) − (∑∞

k=n βk) 6 0,which implies d(xn, a) 6 (

∑∞k=n βk). �

(6) Show all the metrics and norms in all the examples of Section 1.1.2 sectionare metrics and norms, respectively. (Most of the examples have hints or fullsolutions, so this seems like a lot more work than it actually is.)

(7) Let K = R or C. For n ∈ Z+ and p ∈ N, 1 6 p 6∞, show that the metrics dpon Kn from Example 1.1.24 are topological product metrics, where each K inthe product Kn is equipped with usual metric on K. (This follows similarlyas the proof of Example 1.1.29 and make sure to know proof in Example1.1.29.)

Page 19: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 19

1.2. The topology of metric spaces. Let X be a set and let d and d′ be twometrics on X. One of our main motivations for introducing metrics is to provide anice notion of convergence. Thus, if d and d′ produce the same convergent sequences,then in some way, we could think of the metrics as the "same." This will be usefulsince some metrics can be much worse to deal with than some others but theystill produce the same convergenct sequences. For instance, on Kn, it would bemuch easier to deal with d∞ than d23, so if these were to have the same convergentsequences (we will actually show this is true in this section), then we would be free touse d∞ instead of d23 for the purposes of convergence. A consequence of this sectionis to find another way to do this than just comparing sequences, which will be easierto use in some cases. (We do note that many metrics can describe much more thanjust convergence, so we stress that in some cases we will care about more than justconvergence and won’t want to view two metrics as the "same" even though theymay produce the same convergent sequences, and we will discuss this more later).And, another important consequence of this section will be to show that at the levelof convergence, the metrics of Section 1.1.2 are all worth studying except for thediscrete metric. We say that the discrete metric isn’t worth studying because wewere already able to describe all of its convergent sequences in the first homeworkExercises 1.1.3, which were the eventually constant sequences, so there is really nomore analysis required, and thus, we shouldn’t waste our time on it, so the onlyanalysis that is required is to find ways to avoid the discrete metric.

The key to doing this involves certain kind of sets of metric spaces for which manyof the ideas in this course can be described using. These sets will simplify some ofour notions drastically, so before we move on to other topics; we take a moment toappreciate these sets. This section attempts to produce a most general discussion ofthese kinds of sets. Since we are basing our motivation for metrics on convergence,we begin sets called "closed sets." Let’s first think about what a closed set shouldinvolve given a metric space (X, d). Let’s say we have a set F ⊆ X and a sequence(xn)n∈N in F . If this sequence happened to converge and we assume that F is closed,then where should its limit be? Well, if F were closed, then the limit shouldn’t beallowed to escape F if all of the sequences terms are in F . It turns out that in thework of metric spaces, this is a correct way to define a closed set, which is nice sinceit only involves convergence. Thus, we define.

Definition 1.2.1 (closed set). Let (X, d) be a metric space. A subset F ⊆ X isclosed if:

for all sequences (xn)n∈N in F , if (xn)n∈N converges to a ∈ X, then a ∈ F .

Our first example of closed sets are:

Page 20: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

20 KONRAD AGUILAR

Theorem 1.2.2 (trivial sets are closed). If (X, d) be a metric space, then X isclosed, ∅ is closed, and for all a ∈ X, the set {a} is closed.

Proof. X is closed since the definition only allows for sequences to converge in X.The empty set ∅ is vacuously closed since it has no sequences. Now, let a ∈ X, andlet (xn)n∈N be a sequence in {a} that converges to some b ∈ X. Then xn = a forall n ∈ N. Thus, this sequence is eventually constant and hence converges to a byExercises 1.1.3. Hence, since limits are unique by Theorem 1.1.8, we have that a = b,which implies b ∈ {a} and completes the proof. �

Let’s now look at some less-trivial standard examples of closed sets that exist inany metric space.

Definition 1.2.3 (closed ball). Let (X, d) be a metric space. Let r ∈ R+. Let a ∈ X.The set B(a; r) = {x ∈ X | d(x, a) 6 r} is the closed ball centered at a or radius r.(If we are dealing with multiple metrics, we may use the notation Bd(a; r), and ifwe have multiple metrics or sets, then we may denote B(X,d)(a; r)).

Let’s make sure that we are allowed to call this set closed.

Theorem 1.2.4 (closed balls are closed). Let (X, d) be a metric space. If r ∈ R>0

and a ∈ X, then B(a; r) is closed.

Proof. Let (xn)n∈N be a sequence in B(a; r) that converges to some b ∈ X. Thus,for all n ∈ N, we have

d(b, a) 6 d(xn, b) + d(xn, a) 6 d(xn, b) + r.

Thus, taking limits, we have by Theorem 1.1.7

d(b, a) 6 limn→∞

(d(xn, b) + r) = 0 + r = r.

Thus b ∈ B(a; r). �

Although (given our apporach to metric spaces) the definition of closed sets comesmore naturally, it turns out that certain other sets will be more useful for the theorymoving forward. These are open sets. We define them simply to be the complementof closed sets since if you leave a closed set (the complement of the closed set), thenyou would expect to be in an open area (an open set). Open sets will also help usbetter understand closed sets.

Definition 1.2.5 (open sets). Let (X, d) be a metric space. A subset U ⊆ X is openif X \ U is closed (the complement of U is closed).

Here are some trivially open sets.

Page 21: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 21

Theorem 1.2.6 (trivial sets are open). If (X, d) be a metric space, then X is open,∅ is open, and for all a ∈ X, the set X \ {a} is open.

Proof. By Theorem 1.2.2, X \X = ∅ is open since X is closed. By Theorem 1.2.2,X \ ∅ = X is open since ∅ is closed. Let a ∈ X, then {a} is closed, and thus{a} = X \ (X \ {a}) is closed by Theorem 1.2.2, and so X \ {a} is open. �

Immediately, we have the following theorem. Be careful, the two statements in thefollowing theorem are different (not-open does not mean closed) in that there existsets in certain metric spaces that are neither open nor closed (think of (0, 1] ⊂ R withthe usual metric). There are also sets that are open and closed (X and ∅, always,but we will discuss some interesting examples of metric spaces that have plenty ofopen and closed sets).

Theorem 1.2.7 (complement definition of closed). Let (X, d) be a metric space.The following hold:

(1) A subset U ⊆ X is open if and only if X \ U is closed.(2) A subset F ⊆ X is closed if and only if X \ F is open.

Proof. (1) is the definition of open. For (2), we have the following be definition ofopen.

F ⊆ X is closed ⇐⇒ F = X \ (X \ F ) is closed ⇐⇒ X \ F is open,

which completes the proof. �

Now, we discuss the most important open sets existing in any metric space., whichwill also helps understand both closed sets and open sets better.

Definition 1.2.8 ((open) balls). Let (X, d) be a metric space. Let r ∈ R+ (positivereal numbers) and a ∈ X. The set B(a; r) = {x ∈ X | d(x, a) < r} is the (open)ball of radius r centered at a. (If we are dealing with multiple metrics, we may usethe notation Bd(a; r), and if we have multiple metrics or sets, then we may denoteB(X,d)(a; r).)

Let’s first make sure that we are allowed to call these open balls.

Theorem 1.2.9 (open balls are open). Let (X, d) be a metric space. If r ∈ R+ anda ∈ X, then B(a; r) is open.

Proof. Exercise, but is similar to the proof of Theorem 1.2.4. �

Next, we begin to move to a characterization of open sets that does not involvethe complement of closed sets. We begin this journey with the following observation.

Page 22: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

22 KONRAD AGUILAR

Theorem 1.2.10 (open sets and balls). Let (X, d) be a metric space. If U ⊆ X isopen, then for all a ∈ U , there exists r ∈ R+ such that B(a; r) ⊆ U .

Proof. We prove by contraposition. Thus, assume the negation of the conclusion, wewill show the negation of the hypothesis, which is U is not open, which is the samething as showing X \ U is not closed. So, assume there exists a ∈ U , such that forall r ∈ R+, B(a; r) 6⊆ U . Thus for all r ∈ R+, we have B(a; r)∩ (X \U) 6= ∅. Hence,let n ∈ N. Then there exists xn ∈ B(a; 1

n+1) ∩ (X \ U). Thus 0 6 d(xn, a) < 1n+1 .

Therefore, by squeeze theorem, we have limn→∞ d(xn, a) = 0. Therefore, by Theorem1.1.7, the sequence (xn)n∈N in X \ U converges to a 6∈ X \ U. Thus X \ U is notclosed, which implies U is not open by definition. �

The following are seemingly simple but incredibly important (take MAT 410)properties of open and closed sets.

Theorem 1.2.11. (topologically open/closed) Let (X, d) be a metric space. Let Λ bea non-empty set. Fix N ∈ N.

(1) If for each α ∈ Λ, Uα ⊆ X is open, and for each j ∈ {0, . . . , N}, Vj ⊆ X isopen, then ∪α∈ΛUα is open and ∩Nj=0Vj is open.

(2) If for each α ∈ Λ, Fα ⊆ X is closed, and for each j ∈ {0, . . . , N}, Gj ⊆ X

is closed, then ∩α∈ΛFα is closed and ∪Nj=0Gj is closed.

Proof. We begin with the first part of part (2). Let (xn)n∈N be a sequence in ∩α∈ΛFα

that converges to some a ∈ X. Thus (xn)n∈N is a convergent sequence in Fα for allα ∈ Λ. Hence, by definition of closed, we have a ∈ Fα for all α ∈ Λ. Thus a ∈ ∩α∈ΛFα,and is thus closed.

For the second part of (2). Let (xn)n∈N be a sequence in ∪Nj=0Gj that converges tosome a ∈ X. Assume by way of contradiction that a 6∈ ∪Nj=0Gj . Thus a ∈ ∩Nj=0X \Gjby De Morgan’s Laws. Hence for each j ∈ {0, . . . , N}, there exists rj > 0 such thatB(a; rj) ⊆ X \Gj by Theorem 1.2.10 since X \Gj is open for all j ∈ {0, . . . , N}. Letr = min{r0, . . . , rN}, which is still greater than 0. Then B(a; r) ⊆ B(a; rj) ⊆ X \Gjfor all j ∈ {0, . . . , N}. Hence B(a; r) ⊆ ∩Nj=0X \ Gj . Now, since (xn)n∈N convergesto a, there exists N ′ ∈ N such that d(xn, a) < r for all n > N ′. In particular,x′N ∈ B(a; r) ⊆ ∩Nj=0X \ Gj , which is a contradiction since x′N ∈ ∪Nj=0Gj . Thus,a ∈ ∪Nj=0Gj , which completes (2) by definition.

The proof of (1) is an application of De Morgan’s Laws, Theorem 1.2.7, and part(2). Indeed: X \ Uα is closed for all α ∈ Λ. Thus X \ (∪α∈ΛUα) = ∩α∈ΛX \ Uα isclosed by part (1). Hence ∪α∈ΛUα is open. The second part of (1) is similar. �

Page 23: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 23

We can only get away with finiteness in the intersection of open case since theintersection ∩∞n=1(−1/n, 1/n) = {0} is not open in the usual metric on R. Indeed,(1/(n+1))n∈N converges to 0, which shows that the complement of {0} is not closed.

Now, we can finally prove our non-complement characterization of open sets.

Theorem 1.2.12 (intrinsic open definition). Let (X, d) be a metric space. Let U ⊆X. The following are equivalent:

(1) U is open;(2) for all a ∈ U , there exists r ∈ R+ such that B(a; r) ⊆ U ;(3) for all a ∈ U , there exists an open set V ⊆ X such that a ∈ V ⊆ U .

Proof. (1) =⇒ (2) is already done by Theorem 1.2.10.(2) =⇒ (3) follows from the fact that B(a; r) is open by Theorem 1.2.9.We finish with (3) =⇒ (1). For all a ∈ U , there exists and open set a ∈ Va ⊆ U .

By Theorem 1.2.11, we have that ∪a∈UVa is open. Now ∪a∈UVa ⊆ U by construction.If a0 ∈ U , then a0 ∈ Va0 ⊆ ∪a∈UVa. Thus ∪a∈UVa = U is open, which completes thewhole proof. �

This, in turn, allows us to provide a non-sequential definition of closed, which willalso be useful, but we finally see that convergence can be described with only opensets, which was one of our motivations to introduce them to begin with. Indeed:

Theorem 1.2.13 (topological convergence). Let (X, d) be a metric space. Let (xn)n∈N

be a sequence. The following are equivalent:

(1) (xn)n∈N converges to a ∈ X;(2) for all ε > 0, there exists N ∈ N such that xn ∈ B(a; ε) for all n > N ;(3) for all open sets U ⊆ X containing a, there exists N ∈ N such that xn ∈ U

for all n > N .

Proof. (1) =⇒ (2) is by definition of B(a; ε).For (2) =⇒ (3). Let U ⊆ X be an open set containing a. Since U is open, there

exists r > 0 such that B(a; r) ⊆ U by Theorem 1.2.12. Thus, there exists N ∈ Nsuch that xn ∈ B(a; r) ⊆ U for all n > N .

For (3) =⇒ (1). Let ε > 0. The set B(a; ε) is an open set containing a byTheorem 1.2.9. Hence, there exists N ∈ N such that xn ∈ B(a; ε) for all n > N ,which completes the proof by definition of B(a; ε). �

Theorem 1.2.14 (non-sequential closed definition). Let (X, d) be a metric space.Let F ⊆ X. The following are equivalent:

(1) F is closed;(2) for all a ∈ X, if B(a; r) ∩ F 6= ∅ for all r ∈ R+, then a ∈ F ;

Page 24: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

24 KONRAD AGUILAR

(3) for all a ∈ X, if U ∩ F 6= ∅ for all open sets such that a ∈ U ⊆ X, thena ∈ F .

Proof. Exercise. �

There is something really deep happening in the above theorem. This above theo-rem is essentially relying on the fact that the open sets around a point can somehowbe "generated" by countably many sets. We can see this in action in the proof ofTheorem 1.2.10, where we use countably many balls to build a sequence. However,to truly respect the depth of the above theorem, one should take MAT 410.

Now, that we have nice overview of open and closed sets and how they helpus better understand convergence, we provide some more examples of closed sets.The first is an example of closed sets that occur in any metric space and is anexample that somehow defends the notion of closed. That is, a convergent sequenceand its limit together form a closed set. In the following proof, one could use theoriginal definition of closed, but this becomes a cumbersome counting argumentsince a sequence in {xn ∈ X | n ∈ N} ∪ {a} need not behave nicely since theorder is forgotten. Indeed, (a, x100, x1, x5, x3, x99, x101, a, x98, . . .) could be the startof convergent sequence {xn ∈ X | n ∈ N} ∪ {a}. Thus, we proceed in the followingway.

Theorem 1.2.15 (convergent sequences with limit form closed sets). Let (X, d) bea metric space. Let (xn)n∈N be a sequence in X. If (xn)n∈N converges to a ∈ X,then the set {xn ∈ X | n ∈ N} ∪ {a} is a closed set.

Proof. We will show that X \ ({xn ∈ X | n ∈ N} ∪ {a}) is open. Let b ∈ X \({xn ∈ X | n ∈ N} ∪ {a}). Since b 6= a, we have d(a, b) > 0 and d(a,b)

2 > 0.Thus, by Theorem 1.2.13, there exists N ∈ N such that xn ∈ B(a; d(a,b)

2 ) for alln > N . Thus for all n > N , we have xn 6∈ B(b; d(a,b)

2 ), since if not, we would haved(a, b) 6 d(a, xn) + d(b, xn) < d(a,b)

2 + d(a,b)2 = d(a, b), which is a contradiction.

Similarly, a 6∈ B(b; d(a,b)2 ). The rest of the proof is left as an exercise. �

There are many standard examples of closed sets in R, and some more will beprovided in the exercises, but we provide on example here to gain more familiaritywith sequence spaces. First, we show the following, which is not an "if and only if"and this will be discussed further in the exercises.

Theorem 1.2.16 (`p convergence). Fix p ∈ N, 1 6 p 6∞.If (xn)n∈N is a sequence in `p that converges with respect to dp, then for each

k ∈ N, the sequence ((xn)k)n∈N in K converges with respect to the usual metric.That is to say that the sequence converges coordinate-wise.

Page 25: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 25

Before we prove this theorem, here is a picture describing what we would like toshow. Let (xn)n∈N be a sequence in `p and a = (a0, a1, a2, . . .) ∈ `p.

x0 = ((x0)0, (x0)1, (x0)2, (x0)3, . . .)

x1 = ((x1)0, (x1)1, (x1)2, (x1)3 . . .)

x2 = ((x2)0, (x2)1, (x2)2, (x2)3 . . .)

...

xn = ((xn)0, (xn)1, (xn)2, (xn)3 . . .)

...

a = (a0, a1, a2, a3, . . .),

and given the hypothesis, we want to show the "columns of real or complex numbersconverge to the associated entries in a." That is, we want to show (with respect tothe usual metric on K), the sequence (xn)0 in K converges to a0 ∈ K and (xn)1 inK converges to a1 ∈ K and (xn)2 in K converges to a2 ∈ K, etc.

Proof. Assume that (xn)n∈N is a sequence in `p that converges with respect to dp.Let a = (a0, a1, . . .) ∈ `p be its limit. We will show that for each k ∈ N, we havethat ((xn)k)n∈N in K converges to ak in the usual metric.

Begin with 1 6 p <∞Fix k ∈ N. Let ε > 0. There exists N ∈ N, such that dp(xn, a) < ε for all n > N .

Hence for all n > N ,

dp(xn, a) = ‖xn − a‖p =

∞∑j=0

|(xn)j − aj |p1/p

< ε.

Hence∑∞

j=0 |(xn)j−aj |p < εp for all n > N . Therefore |(xn)k−ak|p 6∑∞

j=0 |(xn)j−aj |p < εp and so |(xn)k − ak| < ε for all n > N .

The proof for p =∞ follows similarly, but make sure you can do it. �

With this we may show.

Theorem 1.2.17 (a closed `2 set). If H = {(xn) ∈ KN | ∀k ∈ N, |xk| 6 1k+1}, then

H ⊂ `2 and H is closed in (`2, d2).

Proof. Let x ∈ H, so x = (xn)n∈N such that |xk| 6 1k+1 for all k ∈ N. Hence

|xk|2 6 1(k+1)2

for all k ∈ N. Therefore∑∞

n=0 |xn|2 < ∞ by 371 (comparison test).Thus x ∈ `2.

Now, let (xn)n∈N be a sequence in H that converges to some a = (a0, a1, . . .) ∈ `2.By Theorem 1.2.16, we have for each k ∈ N, limn→∞ |(xn)k| = |ak|. Hence |ak| =

limn→∞ |(xn)k| 6 limn→∞1

k+1 = 1k+1 . �

Page 26: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

26 KONRAD AGUILAR

Since we are motivating the purpose of metrics by convergence, then given twometrics d and d′ on a single set X, if the same sequences converge in both metrics,then the metrics would serve the same purpose with respect to convergence. Metricsand norms do much more than just convergence, but sometimes convergence is allwe care about, so we will study this "same convergence" property which will comefrom our study of open sets, which leads us to the main definition of the section.

Definition 1.2.18 (metric topology). Let (X, d) be a metric space. The topologyassociated to (X, d) is

τ(X,d) = {U ∈ P(X) | U is open with respect to d},

where P(X) is the power set of X.

The following example is another in the line of why the discrete metric is terrible.There is no variety in its topology. Every subset is open.

Example 1.2.19 (discrete topology). LetX be a non-empty set. We have that τ(X,ddisc) =

P(X). Here is why. Let A ⊆ X. If A = ∅, then A is open. Assume a ∈ A. ThenB(a; 1) = {a} ⊆ A. Hence A is open by Theorem 1.2.12.

Definition 1.2.20 (topologically equivalent). Let (X, d) and (X, d′) be two metricspaces. (X, d) and (X, d′) are topologically equivalent if τ(X,d) = τ(X,d′).

Now, we see that this is equivalent to both metrics forming the same convergentsequences, which for many applications is all we care about.

Theorem 1.2.21 (convergent equivalence). Let (X, d) and (X, d′) be two metricspaces.

(X, d) and (X, d′) are topologically equivalent if and only if they have the same con-vergent sequences. That is, {(xn)n∈N ∈ XN | (xn)n∈N converges with respect to d} =

{(xn)n∈N ∈ XN | (xn)n∈N converges with respect to d′}.

Proof. First assume that (X, d) and (X, d′) are topologically equivalent. Let (xn)n∈N

be a sequence in X and a ∈ X. Assume (xn)n∈N converges to a with respect to d.Let U ⊆ X be an open set with respect to d′ containing a. By assumption, U ⊆ X isan open set with respect to d containing a as well. Hence, there exists N ∈ N suchthat xn ∈ U for all n > N by Theorem 1.2.13. Thus (xn)n∈N converges to a withrespect to d′ by Theorem 1.2.13. Assuming first that (xn)n∈N converges to a withrespect to d′ would show (xn)n∈N converges to a with respect to d using the sameargument.

Let U ∈ τ(X,d). Then X \U is closed with respect to d. Let (xn)n∈N be a sequencein X \ U that converges with respect to d′ to a ∈ X. By assumption, (xn)n∈N

converges with respect to d to a ∈ X. Since X \ U is closed with respect to d, we

Page 27: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 27

have that a ∈ X \ U . Hence X \ U is closed with respect to d′, and thus U is openwith respect to d′. Therefore τ(X,d) ⊆ τ(X,d′). The same argument would show thatτ(X,d′) ⊆ τ(X,d). �

With this at our disposal we can see that the metrics onKn introduced in Example1.1.24 are all topologically equivalent. Indeed:

Example 1.2.22 (Kn, p-convergence). Fix N ∈ N. Let (X0, d0), . . . (XN , dN ) be met-ric spaces. Any two topological product metrics on

∏Nk=0Xk are topologically equiv-

alent. This is immediate from the definition of topological product metric and The-orem 1.2.21. Therefore, by Exercices 1.1.3, we have that for a fixed n ∈ Z+, andp, q ∈ Z+, 1 6 p, q 6 ∞, the metric spaces (Kn, dp) and (Kn, dq) from Example1.1.24 are tolopologically equivalent.

Thus if one is working with d23((x1, . . . , xn), (y1, . . . , yn)) =(∑n

k=1 |xk − yk|23)1/23,

and is wondering whether some strange sequence converges, then one could insteadplug the sequence into d∞((x1, . . . , xn), (y1, . . . , yn)) = max{|x1−y1|, . . . , |xn−yn|},to check if the seqeunce converges, which is much easier to deal with. BE CARE-FUL: THIS DOESN’T APPLY TO `p spaces. This will be seen by the exercise inthis section dealing with `2 and d∞.

Hopefully, we are convinced that the discrete metric is more or less not worthstudying. So, when one conducts research in metric spaces and comes up with anew metric space, then one hopes that they did not create a metric space that wastopologically equivalent to the discrete metric. If you look through a paper thatdevelops a new metric space, you will usually see somewhere a statement about whythe metric space in question is not topologically equivalent to the discrete metricto show that the work is non-trivial in the most basic way. Hence, we now providesome tools to checking if one is dealing with a metric that is topologically equivalentto the discrete metric, and this will be a main theme throughout the course andprovide more tools later. In the exercises, we will use the tools of this section toshow that every specific example of a metric space (X, d) from Section 1.1.2 is nottopologically equivalent to (X, ddisc) except for the discrete metric space itself. So,all the examples we are working with (besides the discrete metric) are at least moreinteresting that the discrete metric space.

Theorem 1.2.23 (topologically discrete). Let (X, d). The following are equivalent:

(1) τ(X,d) 6= P(X);(2) (X, d) is not topologically equivalent to (X, ddisc);(3) there exists a sequence (xn)n∈N that converges with respect d that is not

eventually constant.

Page 28: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

28 KONRAD AGUILAR

Proof. (1) =⇒ (2). The contraposition of this is Example 1.2.19.(2) =⇒ (3). The contraposition of this is provided by 1.1.3 Exercises.(3) =⇒ (1). We proceed by contraposition. So, assume that τ(X,d) = P(X).

Let (xn)n∈N be a sequence in X that converges to a ∈ X with respect to d. Sinceτ(X,d) = P(X), we have that {a} is open with respect to d. So, there exists N ∈ Nsuch that xn ∈ {a} for all n > N . Thus xn = a for all n > N. So, every convergentsequence is eventually constant. �

Now, we use this to show that a metric does not have to "look like" the discretemetric, by showing that ANY metric on a non-empty finite set is topologically equiv-alent to the discrete metric to be topologically equivalent to the discrete metric. Thisthus defends our reasoning for going through all this trouble, while also giving anexample where the discrete metric is actually a good choice.

Theorem 1.2.24 (finite sets are discrete). Let X be a non-empty finite set. If d isa metric on X, then (X, d) is topologically equivalent to (X, ddisc).

Proof. Let A ⊆ X. We will show that A is open with respect to d. Let a ∈ A. SinceX is finite, the set {d(x, y) ∈ [0,∞) | x, y ∈ X,x 6= y} is finite and does not contain0. Thus 0 < min{d(x, y) ∈ [0,∞) | x, y ∈ X,x 6= y}. Let r = min{d(x, y) ∈ [0,∞) |x, y ∈ X,x 6= y} > 0. Now, let b ∈ Bd(a; r2). Then d(b, a) < r

2 . If b = a, then wewould be done since Bd(a; r2) = {a} ⊆ A, and thus A would be open by Theorem1.2.12. Assume by way of contradiction that b 6= a, then d(b, a) ∈ {d(x, y) ∈ [0,∞) |x, y ∈ X,x 6= y} and so r > r

2 > min{d(x, y) ∈ [0,∞) | x, y ∈ X,x 6= y} = r, whichis a contradiction. �

The above doesn’t say that you should switch out whatever metric you startedwith with the discrete metric since the metric you started with could be importantfor other reasons; it just says that the discrete metric is not terrible in this case.Based on these findings, we now have a reason to make the following definition.

Definition 1.2.25 (topologically discrete). Let (X, d) be a metric space. (X, d) istopologically discrete if (X, d) is topolocically equivalent to (X, ddisc).

We finish this discussion about topology of metric spaces with a warning. Let(X, d) be a metric space and let Y ⊆ X. We note that it is can be the case thatτ(Y,d) 6⊆ τ(X,d). For instance, [0, 1] ⊆ R, but the set [0, 1) is open in ([0, 1], d1), but itis not open in (R, d1). However we do have the following relationships.

Theorem 1.2.26 (subspace topology). Let (X, d) be a metric space and let Y ⊆ X.

(1) If U ∈ τ(X,d), then U ∩ Y ∈ τ(Y,d).

(2) If Y ∈ τ(X,d), then τ(Y,d) ⊆ τ(X,d).

Page 29: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 29

Proof. (1) Let a ∈ U ∩ Y . Then, since a ∈ U , there exists r ∈ R+ such thatB(X,d)(a; r) ⊆ U . Thus B(Y,d)(a; r) = B(X,d)(a; r) ∩ Y ⊆ U ∩ Y , and a ∈ B(Y,d)(a; r)

since a ∈ Y as well. Thus, U ∩ Y is open in (Y, d) by Theorem 1.2.12.(2) Let U ∈ τ(Y,d). Let a ∈ U . There exists r ∈ R+ such that B(Y,d)(a; r) ⊆ U .

Now B(X,d)(a; r) is open in (X, d). Since Y is open in (X, d), we have B(Y,d)(a; r) =

B(X,d)(a; r) ∩ Y is open in (X, d) by Theorem 1.2.11. Therefore U is open in (X, d)

by Theorem 1.2.12. �

1.2.1. Closure, interior, density. Now, that we see the importance of open and closedsets, we would like to discuss a way to build open and closed sets not covered yet.This is the following.

Definition 1.2.27 (closure and interior). Let (X, d) be a metric space. Let A ⊆ X.

(1) The closure of A is defined to be the set

A = {a ∈ X | ∀r ∈ R+, B(a; r) ∩A 6= ∅}.

(2) The interior of A is defined to be the set

Ao = {a ∈ X | ∃r ∈ R+, B(a; r) ⊆ A}.

We list the first important facts about these sets.

Theorem 1.2.28 (basic interior/closure facts). Let (X, d) be a metric space. LetA ⊆ X. The following hold.

(1) Ao ⊆ A ⊆ A.(2) A is closed and Ao is open.(3) Ao = {a ∈ X | ∃ open U ⊆ X such that a ∈ U and U ⊆ A} and

A = {a ∈ X | ∀ open U ⊆ X such that a ∈ U, we have U ∩A 6= ∅}

= {a ∈ X | ∃ a sequence (xn)n∈N in A such that (xn)n∈N converges to a}.

Proof. (1) Let a ∈ Ao. Thus, there exists r ∈ R+ such that B(a; r) ⊆ A, and soa ∈ A since a ∈ B(a; r), and so Ao ⊆ A.

Now, let a ∈ A, then for all r ∈ R+, we have a ∈ B(a; r)∩A 6= ∅, and thus a ∈ A.(2) For closure. Let (xn)n∈N be a sequence in A that converges to a ∈ X. Hence for

each n ∈ N, there exists yn ∈ B(xn; 1n+1)∩A. Now, let r ∈ R+. There exists N0 ∈ N

such that 1n+1 <

r2 for all n > N0 by Archimedean property. And, by convergence,

there exists N1 ∈ N such that d(xn, a) < r2 for all n > N1. Let N = max{N0, N1}.

Then,d(yN , a) 6 d(yN , xN ) + d(xN , a) <

r

2+r

2= r.

Thus yN ∈ B(a; r) ∩A 6= ∅, which completes this part.For interior. Let a ∈ Ao. Thus, there exists r ∈ R+ such that B(a; r) ⊆ A. We

will show B(a; r) ⊆ Ao. Let b ∈ B(a; r). Since B(a; r) is open by Theorem 1.2.9, we

Page 30: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

30 KONRAD AGUILAR

have that there exists t ∈ R+ such that B(b; t) ⊆ B(a; r) ⊆ A by Theorem 1.2.12,and so b ∈ Ao. Thus for all b ∈ B(a; r), we have that b ∈ Ao. Hence B(a; r) ⊆ Ao,and thus Ao is open by Theorem 1.2.12.

(3) Exercise. Hint: these equalities come from methods already used in this proof.�

Theorem 1.2.29 (topological closure/interior). Let (X, d) be a metric space. LetA ⊆ X. Let Γ = {B ∈ P(X) | B is closed and A ⊆ B} and ∆ = {B ∈ P(X) |B is open and B ⊆ A}. The following hold (the words "least" and "greatest" arewith respect to the partial order of "⊆"):

(1) ∩B∈ΓB is the least closed set containing A and A = ∩B∈ΓB, and(2) ∪B∈∆B is the greatest open set contained in A and Ao = ∪B∈∆B.

Proof. First, note that Γ 6= ∅, where this is the empty set of P(X), since X is closed,and ∆ 6= ∅, where this is the empty set of P(X), since ∅ is open.

(1) We note that ∩B∈ΓB is closed by Theorem 1.2.11. Now, let C be closed suchthat A ⊆ C, then ∩B∈ΓB ⊆ C since C ∈ Γ. Hence, a least closed set containing Aexists and it is ∩B∈ΓB. Now, since A is closed by Theorem 1.2.28 and A ⊆ A, wehave that A ∈ Γ and thus ∩B∈ΓB ⊆ A. Now, let a ∈ A. By Theorem 1.2.28, thereexists a sequence (xn)n∈N in A that converges to a. Since A ⊆ ∩B∈ΓB ⊆ A, we havethat (xn)n∈N is in ∩B∈ΓB. Since ∩B∈ΓB is closed, we have that a ∈ ∩B∈ΓB, whichcompletes (1).

(2) We note that ∪B∈∆B is open by Theorem 1.2.11. Now, let C be open suchthat A ⊇ C, then ∪B∈∆B ⊇ C since C ∈ ∆. Hence, a greatest open set containedin A exists and it is ∪B∈∆B. Now, since Ao is open by Theorem 1.2.28 and A ⊇ Ao,we have that Ao ∈ ∆ and thus ∪B∈∆B ⊇ Ao. Now, let a ∈ ∪B∈∆B. There thereexists B ∈ ∆ such that a ∈ B. Since B is open, there exists an r ∈ R+ such thata ∈ B(a; r) ⊆ B ⊆ A. Thus, a ∈ Ao. �

With this at our disposal, we can now "more easily" prove other proerties aboutclosure and interior.

Theorem 1.2.30 (more closure/interior properties). Let (X, d) be a metric space.Let A ⊆ X. The following hold.

(1) A is closed if and only if A = A, and A is open if and only if A = Ao.(2) A = A and Aoo = Ao.(3) Let C ⊆ A. It holds that C ⊆ A, and if A is closed, then C ⊆ A.(4) Let C ⊇ A. It holds that Co ⊇ Ao, and if A is open, then Co ⊇ A.(5) X \ (Ao) = X \A and X \A = (X \A)o.(6) If B ⊆ X, then A ∪B = A ∪B and (A ∩B)o = Ao ∩Bo.

Page 31: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 31

Proof. (1) Assume A is closed. Since A ⊆ A, then A is the least closed set containingA, and thus A = A by Theorem 1.2.29. Assume A = A, then A is closed by Theorem1.2.28.

Assume A is open. Since A ⊆ A, then A is the greatest open set contained in A,and thus Ao = A. Assume Ao = A, then A is open by Theorem 1.2.28.

(2) Since A is closed and Ao is open by Theorem 1.2.28, this property holds by(1).

(3) C ⊆ A ⊆ A, and C ⊆ C. By Theorem 1.2.29, we have C ⊆ A by least since Ais closed by Theorem 1.2.28. Now, if A is closed, then C ⊆ A = A by (1).

(4) Exercise. This is very similar to (3), but check it.(5) Now, Ao ⊆ A implies thatX\A ⊆ X\(Ao). NoteX\(Ao) is closed by Theorem

1.2.28, and thus X \A ⊆ X \ (Ao) by (3). Now, let a ∈ X \ (Ao), then for all r ∈ R+,we have that B(a; r) 6⊆ A. Hence, for all r ∈ R+, we have B(a; r) ∩ (X \ A) 6= ∅,which implies a ∈ X \A.

The other equality is similar (exercise), so prove it.(6) Since A ⊆ A and B ⊆ B by Theorem 1.2.28, we have A ∪ B ⊆ A ∪ B. Now,

A∪B is closed by Theorem 1.2.11. Thus A ∪B ⊆ A∪B by (3). Now, let a ∈ A∪B.First, assume a ∈ A. Let r ∈ R+, then ∅ 6= B(a; r)∩A ⊆ B(a; r)∩ (A supB). Hencea ∈ A ∪B. The same argument shows that if a ∈ B, then a ∈ A ∪B.

Now by (5) X \ (A∩B)o = X \ (A ∩B) = (X \A) ∪ (X \B) = X \A∪X \B =

X\(Ao)∪X\(Bo) = X\(Ao∩Bo) by the first part of (6). Hence, taking complements,we have (A ∩B)o = Ao ∩Bo. �

Note there exist metric spaces such that B(a; r) 6= B(a; r) and B(a; r) 6= B(a; r)o,even though (0, 1) = [0, 1] and [0, 1]o = (0, 1) in the usual metric on R. An easyexample of this is the discret metric on a set of more than one element. Indeed: ifx ∈ X, then Bddisc(x; 1) = {x} and Bddisc(x; 1) = X ) {x} since X has more thanone element. Since every subset of a discrete metric space is open (and closed) wehave Bddisc(x; 1) = Bddisc(x; 1) 6= Bddisc(x; 1) and Bddisc(x; 1)o = X 6= Bddisc(x; 1).There will be more interesting examples in exercises. However, we always have.

Theorem 1.2.31 (balls interior and closure). Let (X, d) be a metric space, and letr > 0, then

B(a; r)o = B(a; r) ⊆ B(a; r) ⊆ B(a; r)

and

B(a; r) ⊆ B(a; r)o ⊆ B(a; r) = B(a; r).

Proof. For the first line. The first equality comes from Theorem 1.2.30 and the factthat B(a; r) is open. The first subset is from Theorem 1.2.28. The second subset isfrom Theorem 1.2.30 and the fact that B(a; r) is closed. �

Page 32: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

32 KONRAD AGUILAR

Finally, in relation to diameter, we have:

Theorem 1.2.32 (diamter of closure). Let (X, d) be a metric space. If A ⊆ X, thendiam(A) = diam

(A)

Proof. By definition of diameter, we have that diam(A) 6 diam(A) since A ⊆ A byTheorem 1.2.28. Similarly, if diam(A) =∞, then diam(A) =∞ = diam(A). So, nowassume that diam(A) < ∞. Let a, b ∈ A. Let ε > 0. There exists aε ∈ B(a; ε2) ∩ Aand bε ∈ B(b; ε2) ∩A. Thus

d(a, b) 6 d(a, aε) + d(aε, bε) + d(bε, b) <ε

2+ d(aε, bε) +

ε

26 ε+ diam(A)

since aε, bε ∈ A. Hence d(a, b) < ε + diam(A). Thus d(a, b) − diam(A) < ε for allε > 0. Hence d(a, b)−diam(A) 6 0, which implies d(a, b) 6 diam(A). So, diam(A) isan upper bound of {d(a, b) ∈ [0,∞) | a, b ∈ A}, so the least uppper bound satisfiesdiam

(A)6 diam(A). �

Note that it could be the case that diam(A) 6= diam(Ao). Indeed, consider the setA = [0, 1]∪ {4} ⊆ R, then in the usual metric, we have Ao = (0, 1), and thus, in theusual metric diam(A) = 4 but diam(Ao) = 1.

It’ll often be the case that the metric space we are dealing with is a little toocomplicated. For example, the set of reals R is quite complicated the more you learnabout it. However, the rationals Q help us in dealing with R since for every elementin R, we can find a rational within ε for all ε > 0 by 371. Thus, we have by definitionof closure Q = R. It turns out that we will be able to do something similar in certainmore abstract metric spaces. Thus, we define:

Definition 1.2.33 (density). Let (X, d) be a metric space. A set D ⊆ X is densein X if D = X.

Now, density is just a special case of closure, so there is not point to prove moretheorems about it, but we should still entertain ourselves with finding certain densesubsets of our favorite metric spaces. We will do some in the exercises, but weintroduce a new favorite metric space now and find a nice dense subset for it thatfeels familiar.

Example 1.2.34 (density and convergent K-valued sequences). First, we define cc =

{(xn)n∈N ∈ KN | (xn)n∈N converges with respect to the usual metric}. From 371,we know supk∈N |xk| <∞. Also, we have that cc is normed vector space with respectto the same operations as `∞. Hence (cc, d∞) is a metric space.

Now, define ce = {(xn)n∈N ∈ KN | (xn)n∈N is eventually constant}. By Exercises1.1.3, we have that ce ⊆ cc.

Page 33: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 33

Now, we will show that ce is dense in cc with respect to d∞. That is, we will showce = cc. Let x = (xn)n∈N ∈ cc. Let r ∈ R+. We will find an element y ∈ B(x; r)∩ ce.Since (xn)n∈N ∈ cc, we have that there exists a ∈ K andN ∈ N such that |xn−a| < r

2

for all n > N . Now, define y = (yn)n∈N in the following way

yn =

{xn :if 0 6 n 6 N

a :if n > N.

Hence y ∈ ce. Now, if 0 6 n 6 N , then |xn−yn| = |xn−xn| = 0, and if n > N , then|xn − yn| = |xn − a| < r

2 . Hence d∞(x, y) = ‖x − y‖∞ = supn∈N |xn − yn| 6 r2 < r.

Thus y ∈ B(x; r)∩ce. Therefore x ∈ ce by definition of closure, and so cc ⊆ ce, whichcompletes the proof.

Qn is dense Rn for dp for any p ∈ N, 1 6 p 6 ∞. This will be an exercise.Something similar can be shown for Cn as well, but it’s essentially the same proofas Rn, and if we need it later, we will work it out.

We will discuss density of some other of our favorite metric spaces later on whenmotivated by other pursuits.

Page 34: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

34 KONRAD AGUILAR

1.2.2. Exercises.

(1) ** (5 points) Prove Theorem 1.2.9. (Hint: similar to the proof of Theorem1.2.4).

Proof. Let (xn)n∈N be a convergent sequence in X \ B(a; r) = {x ∈ X |d(x, a) > r} that converges to some b ∈ X. Thus for all n ∈ N, we have

r 6 d(xn, a) 6 d(xn, b) + d(b, a).

Thus taking limits and by Theorem 1.1.7, we have

r 6 limn→∞

(d(xn, b) + d(b, a)) = 0 + d(a, b) = d(a, b).

Hence b ∈ X \B(a; r), which completes the proof. �

(2) Prove Theorem 1.2.14. (Hint: (1) =⇒ (2) and (2) =⇒ (3) are similar tothe proof of Theorem 1.2.12, and (3) =⇒ (1) uses Theorem 1.2.13).

(3) ** (10 points) Finish the proof of Theorem 1.2.15. Include the whole proofin your solution.

Proof. We will show that X \ ({xn ∈ X | n ∈ N} ∪ {a}) is open. Let b ∈X \({xn ∈ X | n ∈ N}∪{a}). Since b 6= a, we have d(a, b) > 0 and d(a,b)

2 > 0.Thus, by Theorem 1.2.13, there exists N ∈ N such that xn ∈ B(a; d(a,b)

2 ) forall n > N . Thus for all n > N , we have xn 6∈ B(b; d(a,b)

2 ), since if not, wewould have d(a, b) 6 d(a, xn) + d(b, xn) < d(a,b)

2 + d(a,b)2 = d(a, b), which is a

contradiction.Now, we also have that b 6= xj for all j ∈ {0, . . . , N}. Hence, let δ =

min{d(x0,b)2 , . . . , d(xN ,b)

2 , d(a,b)2 }, which is greater than 0. Since δ 6 d(a,b)

2 , wehave that xn 6∈ B(b, δ) for all n > N as above. Now, if xj ∈ B(b, δ) for somej ∈ {0, . . . , N}, then d(xj , b) < δ 6 d(xj ,b)

2 , which is a contradiction, and wenote that if a ∈ B(b, δ), then d(a, b) < δ 6 d(a,b)

2 , which is a contradiction.Hence B(b, δ) ∩ ({xn ∈ X | n ∈ N} ∪ {a}) = ∅ and so B(b, δ) ⊆ X \ ({xn ∈X | n ∈ N} ∪ {a}), which completes the proof by Theorem 1.2.12. �

(4) ** (10 points) First, show that `2 ⊆ `∞. In this exercise, we will show that`2 not closed in (`∞, d∞) and that Theorem 1.2.16 is not an "if and only if"for (`2, d2).

For each n ∈ N, let xn = ((xn)k)k∈N ∈ KN be defined by

(xn)k =

{1√k+1

: if k 6 n0 : if k > n.

Show that xn ∈ `2 for each n ∈ N, and show that (xn)n∈N converges to a =

(ak)k∈N ∈ `∞ with respect to d∞, where ak = 1√k+1

for all k ∈ N, and show

Page 35: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 35

that a 6∈ `2 (in your solution, you don’t have to show that a = (ak)k∈N ∈ `∞,but you should check this for yourself). Thus, showing that `2 is not closedin (`∞, d∞) and explain why this shows that.

Next, show that the sequence ((xn)k)n∈N in K converges to ak in theusual metric for each k ∈ N, and show that the sequence (xn)n∈N in `2 isnot Cauchy with respect to d2 (the Cauchy criterion for convergence of aseries is crucial for this proof, and use the Cauchy criterion along with thefact that

∑n=0

1n+1 = ∞, i.e. the series of ( 1

n+1)n∈N diverges). This showsthat (xn)n∈N does not converge to anything with respect to d2 by Theorem1.1.13 (this is stronger than just showing it doesn’t converge to a, which isanother reason why Cauchy is helpful since not-Cauchy rules out convergenceto every element at once). Therefore, this shows that Theorem 1.2.16 is notan "if and only if" for (`2, d2) and explain why this shows that.

We note that from this problem, one could come up with a general waythat shows that for any p ∈ N, 1 6 p < ∞, it holds that `p not closed in(`∞, d∞) and that Theorem 1.2.16 is not an "if and only if" for (`p, dp). (Wealso note that Theorem 1.2.16 is not an "if and only if" for (`∞, d∞) and asimilar process can show this too). And this is why in this problem, I askedyou to do `2 instead of `1 since `2 is more suggestive towards this generalway. Also, only turn in the `2 case.

Proof. Let x = (xk)k∈N ∈ `2. Then∑∞

k=0 |xk|2 <∞. Therefore limk→∞ |xk|2 =

0 by 271. Hence limn→∞ |xk| = 0 since√· is continuous on its domain by

371. Hence (|xk|)k∈N converges and is thus bounded. Thus supk∈N |xk| <∞.Thus x ∈ `∞.

Fix n ∈ N. We have that∑∞

k=0 |(xn)k|2 =∑n

k=01√k+1

<∞. Thus xn ∈ `2.Also note that

d∞(xn, a) = supk∈N|(xn)k − ak|

= sup{|(xn)0 − a0|, . . . , |(xn)n − an|, |(xn)n+1 − an+1|, |(xn)n+2 − an+2|, . . .}

= sup{0, . . . , 0, |0− 1√n+ 2

|, |0− 1√n+ 3

|, . . .} =1√n+ 2

.

Thus 0 6 limn→∞ d∞(xn, a) 6 limn→∞1√n+2

= 0.

Therefore (xn)n∈N converges to a with respect to d∞. Furthermore∑∞

k=0 |ak|2 =∑∞k=0

1k+1 =∞ by 271, and thus a 6∈ `2. Therefore as (xn)n∈N is a sequence

in `2 that converges to a 6∈ `2, we have that `2 is not closed in (`∞, d∞).Next, fix k ∈ N. Then, when n > k, we have that (xn)k = 1√

k+1= ak.

Hence ((xn)k)n∈N is eventually constat to ak and thus converges in any metricto ak including the usual metric. Thus to show that Theorem 1.2.16 is not an

Page 36: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

36 KONRAD AGUILAR

"if and only if" for (`2, d2), it remains to show that (xn)n∈N does not convergewith respect to d2. To accomplish this and as requested in the statement ofthe problem, we will show that (xn)n∈N is not Cauchy with respect to d2 andthus cannot converge to anything by the contrapositive of Theorem 1.1.13.Now since

∑n=0

1n+1 =∞ by 271, the Cauchy criterion then says that there

exists ε > 0 such that for all N ∈ N, there exists n > m > N such that∑nk=m+1

1k+1 = |

∑nk=m+1

1k+1 | > ε.

So, let N ∈ N and choose n > m > N satisfying∑n

k=m+11

k+1 > ε. Then,

d2(xn, xm) =

( ∞∑k=0

|(xn)k − (xm)k|2)1/2

=

(n∑

k=m+1

| 1√k + 1

|2)1/2

=

(n∑

k=m+1

1

k + 1

)1/2

> ε1/2.

Thus (xn)n∈N is not Cauchy with respect to d2, and the proof is complete. �

(5) ** (10 points) FixN ∈ N. Let (X0, d0), . . . , (XN , dN ) be metric spaces and letd∞ be the topological product metric on

∏Nn=0Xn defined in Example 1.1.29.

Show that if Uj ⊆ Xj is open with respect to dj for each j ∈ {0, . . . , N},then

∏Nn=0 Un is open with respect to d∞. So, the product of open sets is

open in this topological product metric, which is a main reason why we callthis metric topological. (Note that by this exercise and Example 1.2.22, theproduct of open sets is open for any topological product metric, but youdon’t have to mention this in your solution.)

Proof. Let x = (x0, . . . , xN ) ∈∏Nn=0 Un. Since Uk is open with repsect to dk,

for each k ∈ {0, . . . , N}, we have a rk ∈ R+ such that Bdk(xk; rk) ⊆ Uk. Letr = min{r0, . . . , rN} > 0. We will show that Bd∞(x; r) ⊆

∏Nn=0 Un. So, let

y = (y0, . . . , yN ) ∈ Bd∞(x; r). Fix k ∈ {0, . . . , N}. We have

rk > min{r0, . . . , rN} = r > d∞(x, y)

= max{d0(x0, y0), . . . , dN (xN , yN )} > dk(xk, yk).

Thus dk(xk, yk) < rk, which implies yk ∈ Bdk(xk; rk) ⊆ Uk. Hence for eachk ∈ {0, . . . , N}, we have yk ∈ Uk, which implies that y ∈

∏Nn=0 Un by

definition of Cartesian product. Thus Bd∞(x; r) ⊆∏Nn=0 Un, which completes

the proof. �

Page 37: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 37

(6) (The following is useful for making topological product metrics on infiniteproducts of metric spaces, which is a topic that we may not get to in thisclass.) Let (X, d) be a metric space. In this exercise, for any K ∈ R+, wewill make a make a new metric on X that is topologically equivalent to theoriginal metric and has diameter less than or equal to K even if diamd(X) =

∞.Let K ∈ R+. Define for all a, b ∈ X, dK(a, b) = K · d(a,b)

1+d(a,b) .(a) Show that dK is a metric on X and

diamdK (X) 6 K.(b) ** (10 points) Show that (X, d) is topologically equivalent to (X, dK).

Proof of (b). Fix K > 0. Let U be open with respect to dK . Let a ∈ U . Byopen in dK , there exists r ∈ R+ such that BdK (a; r) ⊆ U . First let’s assumethat r

K < 1. Thus δ =rK

1− rK> 0. We will show that Bd(a; δ) ⊆ BdK (a; r) ⊆ U .

So, let b ∈ Bd(a; δ). Thus d(a, b) < δ =rK

1− rK, which implies that d(a, b)(1−

rK ) < r

K =⇒ d(a, b) − d(a, b) rK < rK =⇒ d(a, b) < d(a, b) rK + r

K =

(1 + d(a, b)) rK =⇒ d(a,b)1+d(a,b) <

rK =⇒ K · d(a,b)

1+d(a,b) < r =⇒ dK(a, b) < r.Hence b ∈ BdK (a; r).

Now, if rK > 1. Then, we may find t ∈ R+, t 6 r such that t

K < 1. So, wehave BdK (a; t) ⊆ BdK (a; r) ⊆ U , and we could use the same proof as beforewith r replaced with t to achieve the desired result. Hence, in either case,there exists δ ∈ R+ such that Bd(a; δ) ⊂ U . Thus U is open with respect tod. And, so τ(X,dK) ⊆ τ(X,d).

Next, let U ∈ τ(X,d). Let a ∈ U . There exists r ∈ R+ such that Bd(a; r) ⊆U . Now, set δ = Kr

1+r > 0. We will show that BdK (a; δ) ⊆ Bd(a; r) ⊆ U .Let b ∈ BdK (a; δ). Then dK(a, b) < δ = Kr

1+r =⇒ K · d(a,b)1+d(a,b) <

Kr1+r =⇒

d(a,b)1+d(a,b) <

r1+r =⇒ d(a, b)(1 + r) < r(1 + d(a, b)) =⇒ d(a, b) + r · d(a, b) <

r + r · d(a, b) =⇒ d(a, b) < r. Hence b ∈ Bd(a; r) ⊆ U, which completes theproof. �

(7) (Sometimes we only want to compare topologies in one direction, the follow-ing allows us to do this using convergent sequences, but be careful, it does itin the opposite direction). Let (X, d) and (X, d′) be two metric spaces. Showthat the following are equivalent(a) τ(X,d) ⊆ τ(X,d′);(b) {(xn)n∈N ∈ XN | (xn)n∈N converges with respect to d′}

⊆ {(xn)n∈N ∈ XN | (xn)n∈N converges with respect to d}.

Page 38: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

38 KONRAD AGUILAR

(8) In this problem, we bring up a new concept, while also showing that theevery specific example of a metric space (X, d) from Section 1.1.2 is nottopologically discrete except for the discrete metric space itself. That is, Idid not provide us with useless examples. First, we require a new definition.

Definition 1.2.35 (isolated points). Let (X, d) be a metric space. A pointa ∈ X is isolated if there exists r ∈ R+ such that B(a; r) = {a}.

(a) Let (X, d) be a metric space. Show that if {a} is open, then a ∈ X

is isolated. Show that if (X, d) has a non-isolated point, then it is nottopologically discrete.

(b) ** (10 points) With respect to the metric space (N∞, dc) of Example1.1.30, show that every n ∈ N is isolated and ∞ is not isolated in N∞and use this and part (a) to show that (N∞, dc) is not topologicallydiscrete.

Proof. Fix n ∈ N. First, we show that for all k ∈ Z \ {0} such that−n 6 k, it holds that dc(n, n+ k) > 1

(n+1)(n+2) . So, fix such a k.

First, we will show that |k|n+k+1 >

1n+2 . Now, if k > 1 then since k−1 > 0,

we have n(k − 1) > (k − 1) =⇒ nk − n + k − 1 > 0 =⇒ k(n + 2) >

n + k + 1 =⇒ |k|n+k+1 >

1n+2 . Now, if k 6 −1, then |k| = −k and

−k > 1 > 0 =⇒ −k(n+3) > (n+3) > (n+1) =⇒ −nk−n−3k−1 >

0 =⇒ n(−k − 1) − 2k − k − 1 > 0 =⇒ n(|k| − 1) + 2|k| − k − 1 >

0 =⇒ |k|n+ |k|2 > n+k+ 1 =⇒ |k|n+k+1 >

1n+2 . Hence, dc(n, n+k) =

|k|(n+1)(n+k+1) >

1(n+1)(n+2) .

We will show that Bdc(n,1

(n+2)2) = {n}. First, let m ∈ N such that

m 6= n, then m = n + k for some k ∈ Z such that −n 6 k, k 6= 0.Thus, dc(n,m) = dc(n, n + k) > 1

(n+1)(n+2) >1

(n+2)2, which implies

m 6∈ Bdc(n,1

(n+2)2). Furthermore, note that dc(n,∞) = 1

n+1 >1

(n+2)2,

and so ∞ 6∈ Bdc(n,1

(n+2)2). Thus Bdc(n,

1(n+2)2

) = {n}. Therefore, alln ∈ N are isolated points.Now, consider ∞ ∈ N∞. Let r ∈ R+. By the Archimedean property,there exists n ∈ N such that 1

n+1 < r. Therefore dc(n,∞) = 1n+1 < r.

Hence Bdc(∞, r) ⊇ Bdc(∞, 1n+1) ⊇ {∞, n}. Thus ∞ is not isolated.

Therefore, by part (a), (N∞, dc) is not topologically discrete. �

(c) ** (10 points) Show that every point of the Baire space (NN, dB) isnot isolated and use this and part (a) to show that the Baire space isnot topologically discrete. The same proof shows the same result for theCantor space, so make sure you can do this as well but don’t include itin your solution.

Page 39: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 39

Proof. Let x = (xn)n∈N ∈ NN. Let r ∈ R+. There exists k ∈ N suchthat 2−k < r. Define for all n ∈ N:

yn =

{xn : if n 6 kxn + 1 : if n > k + 1

Thus (yn)n∈N ∈ NN and dB((xn)n∈N, (yn)n∈N) = 2−(k+1) < 2−k <

r. Therefore {(yn)n∈N, (xn)n∈N} ⊆ B(x; r). So, x = (xn)n∈N is notisolated. Thus (NN, dB) is not topologically discrete by part (a). �

(d) Show that any normed vector space V such that {0p} ( V with theirmetric induced by the norm d‖·‖, is not topologically discrete. (Hint:one way is to show that the zero 0p is not isolated and use part (a), oranother way is to find a non-eventually constant sequence that convergesto 0p. For the second approach, you would also have to prove that thesequence you found both converges to 0p and is not eventually constant.Either approach would use homogeneity of the norm).

(9) (a) Consider the Baire space (NN, dB). Show that if x ∈ NN, r ∈ R+, thenB(x; r) = B(x; r). That is, the closure of the open ball is itself, and sothe open ball is closed. Also, show that B(x; 2−n) 6= B(x; 2−n) for alln ∈ N.

(b) ** (10 points) Let (V, ‖·‖) be a normed vector space and let 0p be its zerovector. Show that for all r ∈ R+, it holds that Bd‖·‖(0p; r) = Bd‖·‖(0p; r).

(This is true for balls of any positive radius center at anywhere, not justcentered at 0p, but only turn in the case for centered at 0p. Note thatthis doesn’t happen for every metric space; see (9)(a) for example.)

Proof. Let r ∈ R+. By Theorem 1.2.31, we already have thatBd‖·‖(0p; r) ⊆Bd‖·‖(0p; r). Now, let v ∈ Bd‖·‖(0p; r). First note that ‖v‖ = ‖0p − v‖ =

d‖·‖(0p, v) 6 r, Let n ∈ N, and define vn = nn+1v. Then, if n ∈ N, we

have by homogeneity

‖vn‖ =

∥∥∥∥ n

n+ 1v

∥∥∥∥ =n

n+ 1‖v‖ 6 n

n+ 1r < r.

Therfore the sequence (vn)n∈N is in Bd‖·‖(0p; r). Also, for n ∈ N, wehave by homogeneity

d‖·‖(vn, v) = ‖vn − v‖ =

∥∥∥∥ n

n+ 1v − v

∥∥∥∥ =

∣∣∣∣ n

n+ 1− 1

∣∣∣∣ · ‖v‖ =1

n+ 1‖v‖.

Thus, as ‖v‖ is a fixed real number, we have that limn→∞ d‖·‖(vn, v) = 0

by the squeeze theorem. Therefore v ∈ Bd‖·‖(0p; r) by Theorem 1.2.28.�

Page 40: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

40 KONRAD AGUILAR

(10) Finish proving Theorem 1.2.28 and Theorem 1.2.30.

(11) N is dense inN∞ with respect to dc defined in Example 1.1.30. This is similarto the proof about isolated points of (N∞, dc) done in the above exercise.

(12) Let X be a non-empty set. Show that the only dense subset of X with respectto the discrete metric ddisc is X. The whole set of any metric spaces is alwaysdense, so this question is really asking you to exclude all other possibilities.Show that if (X, d) is a metric space and has dense subset A 6= X, then(X, d) is not topologically equivalent to (X, ddisc). (Note that this is anotherway of showing that (N∞, dc) is not topologically discrete by (11)).

(13) ** (10 points) Using notation from Example 1.2.34, show that cc ⊆ `∞ andcc is not dense in (`∞, d∞).

Proof. We already had that cc ⊆ `∞ by Example 1.2.34, so I don’t know whyI put this here.

To show not dense, we have to show that cc ( `∞. So, using the negationof closure, we need to find x ∈ `∞ such that there exists r ∈ R+ such thatBd∞(x; r) ∩ cc = ∅.

Consider x = ((−1)n)n∈N ∈ `∞. We will show that x 6∈ cc. Choose r = 14 .

we will show that B(x; r)∩cc = ∅, so we will show that B(x; r) ⊆ `∞ \cc. Lety = (yn)n∈N ∈ B(x; r). To show that y ∈ `∞ \ cc, we will show that (yn)n∈N

is not Cauchy with respect to the usual metric on K. Choose ε = 32 > 0.

Let N ∈ N. First assume that N is even. Then d∞(y, x) < 14 implies that

|(−1)N − yN | 6 d∞(y, x) < 14 =⇒ |1 − yN | < 1

4 and |(−1)N+1 − yN+1| 6d∞(y, x) < 1

4 =⇒ |− 1− yN+1| < 14 . Thus yN − 1 > −1

4 =⇒ yN > 34 . And

−yN+1 − 1 > −14 =⇒ −yN+1 >

34 . Therefore

yN − yN+1 >3

4+

3

4=

3

2=⇒ |yN − yN+1| >

3

2.

A similar argument shows the same for N odd. Thus (yn)n∈N is not Cauchywith respect to the usual metric and thus not convergent. Hence y 6∈ cc. �

(14) ** (5 points) Fix n ∈ N \ {0}. Use (7) of Exercises 1.1.3 to show that Qn isdense Rn for dp for any p ∈ N, 1 6 p 6∞. (This should be a short problemusing the density of Q in R from 371 and the suggested exercise.)

Proof. Fix 1 6 p 6 ∞. Then by (7) of Exercises 1.1.3, we have that dp isa topological product metric (Definition 1.1.28) with respect to the usualmetric on R in each component of the Cartesian product Rn.

Page 41: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 41

Let x = (x1, . . . , xn) ∈ Rn. For each k ∈ {1, . . . , n}, by density of Q in Rin the usual metric, we have that there exists a sequence ((qk)m)m∈N in Qthat converges to xk. Now, for each m ∈ N, define qm = ((q1)m, . . . , (qn)m).Thus the sequence (qm)m∈N is in Qn and converges to x with respect to dp bydefinition of topological product metric. Hence x ∈ Qn by Theorem 1.2.28.Hence Rn ⊆ Qn, which implies Rn = Qn since Rn ⊇ Qn by definition ofclosure. �

Page 42: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

42 KONRAD AGUILAR

1.3. Continuity. What should be a nice function between metric spaces? Well,based on our theme and our motivation for studying metrics, the natural requirementfor "nice" should be that the function preserves convergence from the first metricspace to the next metric space. We borrow from 371 for the name of these "nice"functions and define.

Definition 1.3.1 (continuity at a point). Let (X, d) and (Y, d′) be metric spaces. Afunction f : X → Y is continuous at x0 ∈ X if for every sequence (xn)n∈N in X thatconverges to x0, we have that the sequence (f(xn))n∈N in Y converges to f(x0).

Definition 1.3.2 (continuity). Let (X, d) and (Y, d′) be metric spaces. A functionf : X → Y is continuous if it is continuous at every point in X. We will sometimeswrite f : (X, d)→ (Y, d′) is continuous.

Let’s take a look at some examples of continuous functions that are associatedwith metric spaces.

First, we define a way to measure the distance between a point and a set. Inmultivariable calculus and linear algebra, the notion of a distance between a pointand a set was introduced in the context of points and lines and planes and subspaces.This is the generalization of such a concept that will reappear when we discussnormed vector spaces in more detail and relates to our discussion at the beginningof these notes about finding "for any given continuous real-value function on [a, b],a closest polynomial of a fixed degree."

Definition 1.3.3 (distance from point to set). Let (X, d) be a metric space. LetA ⊆ X be non-empty and y ∈ X, then the distance from y to A is defined to be

d(y,A) = inf{d(y, a) ∈ R | a ∈ A}.

Now, we give a list of continuous functions that come for free from any metricspace, and also find another advantage to the triangle inequality, by showing that ametric on X is itself is continuous with respect to a certain metric on X ×X.

Theorem 1.3.4 (automatically continuous). Let (X, d), (Y, d′), and (Z, d′′) be met-ric spaces.

(1) Any constant function from X to Y is continuous.(2) If f : (X, d) → (Y, d′) and g : (Y, d′) → (Z, d′′) are continuous, then g ◦ f :

(X, d)→ (Z, d′′) is continuous.(3) If ∅ 6= A ⊆ X, then the inclusion mapping ιA : (A, d) → (X, d) defined by

ιA(a) = a for all a ∈ A, is continuous.(4) If ∅ 6= A ⊆ X and f : (X, d) → (Y, d′) is continuous, then its restriction to

A, denoted f |A : (A, d) → (Y, d′) defined by fA(a) = f(a) for all a ∈ A, iscontinous.

Page 43: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 43

(5) If ∅ 6= A ⊆ X, then the function fA : (X, d) → (R, d1) defined by fA(x) =

d(x,A) for all x ∈ X, is continuous.(6) Fix x0 ∈ X. The function fx0 : (X, d)→ (R, d1) defined by fx0(x) = d(x, x0)

for all x ∈ X, is continous.(7) The function d : (X × X, d∞) → (R, d1) is continuous. In fact, d : (X ×

X, dprod)→ (R, d1) is continuous with respect to any topological product met-ric on X ×X.

Proof. Most of these follow the exact process that was presented in 371 and the oneswe don’t complete here are left as an exercise. So, we focus on the ones that involvemetrics.

(5) Assume that (xn)n∈N converges to x ∈ X. Let n ∈ N. Fix a ∈ A. Then sinceinfimum is a lower bound, we have d(xn, A) 6 d(xn, a) 6 d(xn, x) + d(x, a). Thusd(xn, A) is a lower bound for the set {d(xn, x) + d(x, a) | a ∈ A}. Hence, its greatestlower bound is greater than or equal to d(xn, A), and thus

d(xn, A) 6 inf{d(xn, x) + d(x, a) | a ∈ A}

= d(xn, x) + inf{d(x, a) | a ∈ A} = d(xn, x) + d(x,A).

Thus d(xn, A) − d(x,A) 6 d(xn, x). Beginning with d(x,A) instead of d(xn, A),we also have d(x,A) − d(xn, A) 6 d(xn, x), and thus 0 6 |d(xn, A) − d(x,A)| 6d(xn, x). Thus by squeeze theorem we have limn→∞ |d(xn, A)− d(x,A)| = 0 implieslimn→∞ |fA(xn)− fA(x)| = 0, which establishes converges in (R, d1).

(6) d(x, x0) = d(x, {x0}), and so this is just a corollary of (5).(7) Let (xn) = ((xn)0, (xn)1)n∈N be a sequence in X ×X that converges to a =

(a0, a1) with respect to d∞. Since d∞ is a topological product metric, we have that((xn)0)n∈N and ((xn)1)n∈N converges to a0 and a1 respectively, with respect to d.Now, consider

d((xn)0, (xn)1) 6 d((xn)0, a0) + d(a0, (xn)1)

6 d((xn)0, a0) + d(a0, a1) + d(a1, (xn)1),

which implies that d((xn)0, (xn)1)−d(a0, a1) 6 d((xn)0, a0)+d(a1, (xn)1). Beginningwith d(a0, a1) instead of d((xn)0, (xn)1) would produce d(a0, a1)− d((xn)0, (xn)1) 6

d((xn)0, a0) + d(a1, (xn)1). Hence 0 6 |d((xn)0, (xn)1) − d(a0, a1)| 6 d((xn)0, a0) +

d(a1, (xn)1). By the squeeze theorem, we have limn→∞ |d((xn)0, (xn)1)−d(a0, a1)| =0, which establishes convergence in (R, d1). Looking back through the proof, it isevident that only a topological product metric was required to establish this result.

We note that in the proof of (5) and (7), we established more general reversetriangle inequalities, for which we list here. Indeed:

Page 44: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

44 KONRAD AGUILAR

Theorem 1.3.5 (more reverse triangles). Let (X, d) be metric space.

(1) If x, y ∈ X, ∅ 6= A ⊆ X, then

|d(x,A)− d(y,A)| 6 d(x, y).

(2) If x0, x1, y0, y1 ∈ X, then

|d(x0, x1)− d(y0, y1)| 6 d(x0, y0) + d(x1, y1).

The norm for a normed vector space also satisfies some fascinating continuityproperties, which we present now.

Theorem 1.3.6 (norm continuity). Let V be a vector space over K with normn(u) = ‖u‖ for all u ∈ V .

(1) The norm n : (V, d‖·‖)→ (R, d1) is continuous.(2) Vector addition is continuous. That is, the function p : (V × V, d∞) →

(V, d‖·‖) defined by p(u, v) = u+ v for all u, v ∈ V , is continuous.(3) Scalar multiplication is continuous. That is, the function s : (K× V, d∞)→

(V, d‖·‖) defined by s(λ, v) = λ · v for all λ ∈ K, v ∈ V , is continuous withrespect to the usual metric on K.

This convergence definition is all that we have needed thus far, but moving for-ward, a more topological definition of continuity will be vital since it won’t requireus to check every point for continuity. But, first, we prove a metric space definitionof continuity that moves us a little closer to the topological definitions.

Theorem 1.3.7 (ball continuity). Let (X, d) and (Y, d′) be metric spaces. Let f :

(X, d)→ (Y, d′) be a function. The following are equivalent:

(1) f is continuous;(2) for all x ∈ X, ε > 0, there exists δ > 0 such that d′(f(a), f(x)) < ε for all

a ∈ X such that d(a, x) < δ;(3) for all x ∈ X, ε > 0, there exists δ > 0 such that Bd(x; δ) ⊆ f−1(Bd′(f(x); ε))

(Note Bd(x; δ) ⊆ f−1(Bd′(f(x); ε)) ⇐⇒ f(Bd(x; δ)) ⊆ Bd′(f(x); ε));(4) for all x ∈ X, ε > 0, the set f−1(Bd′(f(x); ε)) is open in (X, d).

Furthermore, the above conditions also show continuity at a point x0 ∈ X if "for allx ∈ X" was replaced by "for x0 ∈ X."

Proof. (2) ⇐⇒ (3) follows directly from the definition of the sets involved, so weare free to use it in the rest of the proof.

Next, we do (1) =⇒ (3). We proceed by contraposition. So, there exists x ∈X, ε > 0 such that for all δ > 0, we have that Bd(x; δ) 6⊆ f−1(Bd′(f(x); ε)) ⇐⇒Bd(x; δ) ∩ (X \ f−1(Bd′(f(x); ε))) 6= ∅. Hence, for each n ∈ N, there exists xn ∈Bd(x; 1

n+1) ∩ (X \ f−1(Bd′(f(x); ε))). Thus d(xn, x) < 1n+1 and d′(f(xn), f(x)) > ε

Page 45: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 45

for all n ∈ N. Thus by squeeze theorem (xn)n∈N converges to x, but (f(xn))n∈N

does not converge to f(x). Hence, f is not continuous at x, so f is not continuous.Next, is (2) =⇒ (1). Let x ∈ X and let (xn)n∈N be a sequence in X that

converges to x. Let ε > 0. There exists δ > 0 such that if a ∈ X and d(a, x) < δ, thend′(f(a), f(x)) < ε. Now, there exists N ∈ N such that d(xn, x) < δ for all n > N .Hence d′(f(xn), f(x)) < ε for all n > N . Thus, (f(xn))n∈N converges to f(x) andso f is continuous at x, and since x ∈ X was arbitrary, f is continuous. Hence, thefirst three equivalences are established, and we will use this for the remainder of theproof.

Next, we do (4) =⇒ (3). Let x ∈ X, ε > 0. By definition x ∈ f−1(Bd′(f(x); ε)),and since this set is open, there exists δ > 0 such that B(x; δ) ⊆ f−1(Bd′(f(x); ε)).

To complete the proof, we show that (1) =⇒ (4). Let x ∈ X, ε > 0. Wewill show that X \ (f−1(Bd′(f(x); ε))) is closed. Let (xn)n∈N be a sequence inX \ (f−1(Bd′(f(x); ε))) that converges to x0 ∈ X. Since f is continuous, we havethat limn→∞ d′(f(xn), f(x0)) = 0. Now, for each n ∈ N, we have

ε 6 d′(f(xn), f(x)) 6 d′(f(xn), f(x0)) + d′(f(x), f(x0)),

which implies that ε 6 d′(f(xn), f(x0)) + d′(f(x), f(x0) for all n ∈ N, and thus ε 6limn→∞(d′(f(xn), f(x0)) + d′(f(x), f(x0)) = 0 + d′(f(x), f(x0)). Hence f(x0) ∈ Y \Bd′(f(x); ε), which implies that x0 ∈ X\(f−1(Bd′(f(x); ε))) since preimages preservecomplements. Therefore X \(f−1(Bd′(f(x); ε))) is closed, and thus f−1(Bd′(f(x); ε))

is open. �

Now, we introduce a topological form of continuity, which does not directly men-tion any metric structure. First, recall the following basic facts. If f : X → Y is afunction, then

(1) f(f−1(B)) ⊆ B for all B ⊆ Y (equality occurs on all sets if and only if f issurjective, but we do not need this fact here but will be used later);

(2) A ⊆ f−1(f(A)) for all A ⊆ X (equality occurs on all sets if and only if f isinjective, but we do not need this fact here but will be used later).

Theorem 1.3.8 (topological continuity). Let (X, d) and (Y, d′) be metric spaces andlet f : (X, d)→ (Y, d′) be a function. The following are equivalent:

(1) f is continuous;(2) for every x ∈ X and open V ⊆ Y such that f(x) ∈ V , there exists an open

set U ⊆ X such that x ∈ U and U ⊆ f−1(V )

(Note U ⊆ f−1(V ) ⇐⇒ f(U) ⊆ V ; ) ;(3) for every open V ⊆ Y , the set f−1(V ) ⊆ X is open;(4) for every closed V ⊆ Y , the set f−1(V ) ⊆ X is closed;(5) for every A ⊆ X, it holds that f

(A)⊆ f(A).

Page 46: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

46 KONRAD AGUILAR

Proof. (2) =⇒ (1). Let ε > 0, x ∈ X. Now Bd′(f(x); ε) is an open set containingf(x). Thus, by assumption, there exists U ⊆ X open such that x ∈ U and U ⊆f−1(Bd′(f(x); ε)). Since U is open, there exists δ > 0 such that Bd(x, δ) ⊆ U ⊆f−1(Bd′(f(x); ε)). Thus, f is continuous by the previous theorem.

(3) =⇒ (2). Let x ∈ X and let V ⊆ Y be open such that f(x) ∈ V . Byassumption, we have that f−1(V ) is open. Thus since x ∈ f−1(V ), there exists openU ⊆ X such that x ∈ U ⊆ f−1(V ).

(3) ⇐⇒ (4) follows from the fact that complements of open are closed andcomplements of closed are open and the fact that preimages preserve complements.

(1) =⇒ (4). Let V ⊆ Y be closed. Let (xn)n∈N be a sequence in f−1(V ) thatconverges to x0 ∈ X. Since f is continuous, we have that (f(xn))n∈N in V convergesto f(x0). Since V is closed, we have that f(x0) ∈ V , and thus x0 ∈ f−1(V ). Thusf−1(V ) is closed.

(3) =⇒ (1). Let x ∈ X, ε > 0. The set Bd′(f(x); ε) ⊆ Y is open. Hence, byassumption, the set f−1(Bd′(f(x); ε)) is open. Hence f is continuous by the previoustheorem. Thus, the first four equivalences are established.

(5) =⇒ (4). Let V ⊆ Y be closed. By assumption, we have f(f−1(V )

)⊆

f(f−1(V )) ⊆ V = V by Section 1.2.1 and definition of image and preimage. Hence

f−1(V ) ⊆ f−1(f(f−1(V )

))⊆ f−1(V ) ⊆ f−1(V )

by Section 1.2.1 and definition of image and preimage. Hence f−1(V ) = f−1(V ),which implies that f−1(V ) is closed by Section 1.2.1.

(4) =⇒ (5). Let A ⊆ X. By Section 1.2.1, f(A) is closed. Thus, by assump-tion f−1

(f(A)

)is closed. Hence since f(A) ⊆ f(A) by Section 1.2.1, we have by

definition of image and preimage

A ⊆ f−1(f(A)) ⊆ f−1(f(A)

).

Since f−1(f(A)

)is closed, then by Section 1.2.1, we have A ⊆ f−1

(f(A)

). Hence,

by definition of image and preimage

f(A)⊆ f

(f−1

(f(A)

))⊆ f(A),

which completes the whole proof. �

Continuity provides us with another way to make sure we are not just workingwith something like the discrete metric and surprisingly relies on existence of at leastone discontinuous function.

Theorem 1.3.9 (discrete continuity). Let (X, d) and (Y, d′) be metric spaces, whereX and Y both have at least 2 points.

(X, d) is not topologically discrete if and only if there exists a function f : (X, d)→(Y, d′) that is not continuous.

Page 47: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 47

Proof. We prove the reverse direction by contraposition. So, assume that (X, d) istopologically discrete. Let f : (X, d) → (Y, d′) be a function. Let V ⊆ Y be open,then since every subset of X is open, we have that f−1(V ) is open. Hence f iscontinuous.

We prove the forward direction by contraposition. Let A ⊆ X. Let y1, y0 ∈ Y, y1 6=y0. Since every function is continuous, we have that the characterisic function of Agiven by y0, y1, χA,y0,y1 is continuous, where

χA,y0,y1(x) =

{y1 : if x ∈ Ay0 : if x ∈ X \A.

Since {y1} is closed, then A = χ−1A,y0,y1

({y1}) is closed by continuity. So, every subsetof X is closed and thus every subset of X is open. �

Before we move onto special types of continuous maps, we discuss how continuousmaps allows us to compare the topologies of two metric spaces (X, d) and (Y, d′),

where X may not equal Y . We already used topological equivalence for the casewhen X = Y .

Definition 1.3.10 (homeomorphism). Let (X, d) and (Y, d′) be metric spaces. Letf : X → Y be a bijection.

We call f a homeomorphism if f : (X, d) → (Y, d′) is continuous and f−1 :

(Y, d′)→ (X, d) is continuous.We say (X, d) and (Y, d′) are homeomorphic if there exists a homeomorphism

between them.

Note that is in general quite difficult that show that two spaces are not homeomor-phic since once has to check that every continuous bijection cannot have continuousinverse. As of right now, we do not have many tools to show this, but we will discussthem in later sections. Here are some examples of homeomorphisms.

Example 1.3.11 (371 homeomorphisms). (1) f : ([0, 1], d1) → ([0, 1], d1) definedby f(x) = x2 for all x ∈ [0, 1] is continuous by 371. On this interval f isinvertible and f−1(x) =

√x for all x ∈ [0, 1] and is continuous by 371.

(2) Fix m, b, c, d ∈ R, c 6 d,m > 0, and define f(x) = mx + b for all x ∈ [c, d].Then by 371 f : ([c, d], d1) → ([f(c), f(d)], d1) is a homeomorphism withinverse f−1(x) = x−b

m .

Our above discussion about discrete metric provides us with many continuousbijections that aren’t homeomorphisms. Indeed:

Example 1.3.12 (a non-homeomorphism). The function f : (R, ddisc) → (R, d1) de-fined by f(x) = x is continuous by Theorem 1.3.9. However, f is a bijection with

Page 48: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

48 KONRAD AGUILAR

inverse f−1(x) = x and f−1 : (R, d1) → (R, ddisc) is not continuous since (0, 1] isopen in (R, ddisc) but f−1((0, 1]) = (0, 1] is not open in (R, d1). Therefore f is acontinuous bijection that is not a homeomorphism.

Note that the above example did not prove that (R, ddisc) and (R, d1) are nothomeomorphic since we only checked one function. To show (R, ddisc) and (R, d1)

are not homeomorphic, one would have to show that every bijection is not a home-omorphisms, so check f(x) = x, f(x) = 7x3, f(x) = x5 and many more are nothomeomorphisms. This would take a while. It turns out that because one of themetrics is discrete, we don’t have to do this. Indeed:

Example 1.3.13 (not homeomorphic example). Let (X, d) be a metric space. We willshow that (X, d) is topologically discrete if and only if (X, d) and (X, ddisc) arehomeomorphic.

For the forward direction, the function f : (X, d)→ (X, ddisc) defined by f(x) = x

for all x ∈ X is a homeomorphism since if U ⊆ X, then f−1(U) = U ∈ P (X) =

τ(X,d), and (f−1)−1(U) = U ∈ P (X) = τ(X,ddisc).For the backward direction, assume there exists a homeomorphism between f :

(X, d) → (X, ddisc). Let W ⊆ X. Now, f(W ) is open in (X, ddisc) since everyset is open in this metric. Hence, by continuity and bijectivity of f , we have thatf−1(f(W )) = W is open with respect to d. Therefore τ(X,d) = P (X). Hence (X, d)

is topologically discrete.In particular, (R, d1) and (R, ddisc) are not homeomorphic since (R, d1) is not

topologically discrete.

Remark 1.3.14. Next, we will show that homeomorphic encompasses our previousdefinition of topological equivalence, and thus one could define two metric spaces(X, d) and (Y, d′) to be topologically equivalent if there is a homeomorphism betweenthem. But, this is what we already defined as homeomorphic. Sometimes we will stilluse the term topological equivalence instead of homeomorphic as it will still servesome aesthetic purposes.

Theorem 1.3.15 (homeomorphism is topological equivalence). Let (X, d) and (Y, d′)

be metric spaces. Let f : X → Y be a bijection. Recall the metric df on X defined bydf (a, b) = d′(f(a), f(b)) from Example 1.1.30. (Note that X now has two metrics: dand df ). The following are equivalent:

(1) f is a homeomorphism;(2) (X, d) and (X, df ) are topologically equivalent as in Definition 1.2.20;(3) F : P (X) → P (Y ) defined by F(A) = f(A) for all A ∈ P (X) is a bijection

from τ(X,d) onto τ(Y,d′) with inverse F−1(V ) = f−1(V );

Page 49: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 49

(4) the map F : XN×X → Y N×Y defined by F ((xn)n∈N, a) = ((f(xn))n∈N, f(a))

for all ((xn)n∈N, a) ∈ XN ×X is a bijection from{((xn)n∈N, a) ∈ XN ×X | (xn)n∈N converges to a with respect to d} onto

{((yn)n∈N, b) ∈ Y N × Y | (yn)n∈N converges to b with respect to d′} with in-verse F−1((yn)n∈N, b) = ((f−1(yn))n∈N, f

−1(b)).

Proof. (1) =⇒ (2) We will show that (X, d) and (X, df ) have the same closed sets,which would establish the results by taking complements. So, let F ⊆ X be closedwith respect to d. Let (xn)n∈N be a sequence in F that converges to a ∈ X withrespect to df . Hence since f−1 is continuous, we have

0 = limn→∞

df (xn, a)

= limn→∞

d′(f(xn), f(a))

= limn→∞

d(f−1(f(xn)), f−1(f(a)))

= limn→∞

d(xn, a).

Therefore (xn)n∈N converges to a with respect to d. Thus as F is closed with respectto d, we have that a ∈ F . Assuming first that F ⊆ X was closed with respect to df

would follow the same proof with the role of f−1 switched with f .(2) =⇒ (3) First, we show that F maps τ(X,d) into τ(Y,d′). Let U ∈ τ(X,d).

Then U ∈ τ(X,df ) by assumption. Let f(x) ∈ f(U), where x ∈ U . So, there existsr ∈ R+ such that {a ∈ X | d′(f(x), f(a)) < r} = Bdf (x; r) ⊆ U . Now, we showthat Bd′(f(x); r) ⊆ f(U). Let y ∈ Bd′(f(x); r). Then d′(f(x), y) < r. Since f is abijection, we have that there exists a ∈ X such that f(a) = y. However df (x, a) =

d′(f(x), y) < r. Thus a ∈ Bdf (x; r) ⊆ U implies that y = f(a) ∈ f(U). HenceBd′(f(x); r) ⊆ f(U). Therefore F(U) = f(U) ∈ τ(Y,d′).

Now, we show onto. Assume that V ∈ τ(Y,d′). Consider f−1(V ). Let x ∈ f−1(V ).Then f(x) ∈ V , and so there exists r ∈ R+ such that Bd′(f(x); r) ⊆ V . We willshow that Bdf (x; r) ⊆ f−1(V ). Let a ∈ Bdf (x; r), then d′(f(x), f(a)) < r, whichimplies that f(a) ∈ Bd′(f(x); r) ⊆ V , and so a ∈ f−1(V ). Hence Bdf (x; r) ⊆ f−1(V )

and thus f−1(V ) ∈ τ(X,df ) = τ(X,d). Also F(f−1(V )) = f(f−1(V )) = V since f is abijection.

Now assume that F(U1) = F(U2), thus f(U1) = f(U2) and f−1(f(U1)) = f−1(f(U2))

implies U1 = U2 since f is a bijection.(3) =⇒ (4) First, we show that F maps the set{((xn)n∈N, a) ∈ XN ×X | (xn)n∈N converges to a with respect to d} into{((yn)n∈N, b) ∈ Y N×Y | (yn)n∈N converges to b with respect to d′}. Let (xn)n∈N ∈

XN such that (xn)n∈N converges with respect to d with limit a. Let V ∈ τ(Y,d′) con-tain f(a). Now, a ∈ f−1(V ) = F−1(V ) ∈ τ(X,d) by assumption. Hence, there existsN ∈ N such that xn ∈ f−1(V ) for all n > N . Hence f(xn) ∈ V for all n > N .

Page 50: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

50 KONRAD AGUILAR

Thus (f(xn))n∈N converges to f(a) with respect to d′. Therefore F ((xn)n∈N, a) ∈{((yn)n∈N, b) ∈ Y N | (yn)n∈N converges to b with respect to d′}.

Now, for onto let (yn)n∈N ∈ Y N such that (yn)n∈N converges with respect to d′

with limit b. Let U ∈ τ(X,d) contain f−1(b). Now, by assumption b ∈ f(U) ∈ τ(Y,d′)

and thus there exists N ∈ N such that yn ∈ f(U) for all n > N . Hence f−1(yn) ∈ Ufor all n > N . Therefore (f−1(yn))n∈N converges to f−1(b) with respect to d. Andsince f is a bijection, we have F ((f−1(yn))n∈N, f

−1(b)) = ((yn)n∈N, b).Finally, assume that F ((xn)n∈N, a) = F ((zn)n∈N, c), then f(xn) = f(zn) for all

n ∈ N and f(a) = f(c), and by injectivity, we have xn = zn for all n ∈ N and a = c.Thus ((xn)n∈N, a) = ((zn)n∈N, c).

(4) =⇒ (1). Assume that (xn)n∈N in X converges to a ∈ X with respect tod. Then by assumption (f(xn))n∈N converges to with respect to d′ to f(a). Hencef is continuous. Continuity of f−1 follows with the roles of f switched with f−1.Therefore f is a homeomorphism. �

(1) ⇐⇒ (4) of the above Theorem shows that if we can find a homeomorphismbetween two spaces, then we can find a different description of convergence in eitherspace. So, if we find a homeomorphism from the irrationals to some other space,then maybe we can unravel the mystery of convergence of irrationals. This is whatthe Baire spaces does for us. It turns out that we may not have time to go throughthe proof in detail, so I will simply provide the homeomorphism and explain brieflyits consequences.However, up to going over some basic number theory concepts, theproof is doable with the current knowledge about metric spaces and continuity atthis stage in the course. Of course, this means that I should provide a referenceand here is the only reference that I know of for the proof of the following facts [1,Proposition 5.10]. This is far from the first place this was proven as it is a well-knownresult in Descriptive Set Theory, but as I said, I cannot find a reference aside fromthat one. There is a reference for the fact that these to spaces are homeomorphic,but we need more than that; we need to know a specific homeomorphism to gathera concrete description of convergence of irrationals.

Let N = (N\{0})N be the set of positive integer sequences. The map cf : ((0, 1)\Q, d1)→ (N , dB) defined by

cf(θ) = (θn)n∈N,

where (θn)n∈N is the unique continued fraction expansion of the irrational number θ,is a homeomorphism. To better understand (θn)n∈N, we mention the following fact.

Page 51: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 51

If for each N ∈ N, we define

[θ0, θ1, . . . , θN ] =1

θ0 +1

θ1 +1

θ2 +1

. . . +1

θN

∈ Q,

then θ = limN→∞[θ0, θ1, . . . , θN ]. So, for each θ ∈ (0, 1) \Q, we have this particularsequence of rationals that converge to it given by a sequence of positive integers.

And, by this homeomorphism and Theorem 1.3.15 and [1, Proposition 5.10], givena sequence of irrationals (θ(n))n∈N that converge to an irrational θ, we have thefollowing,

(1) There exists a sequence (βk)k∈N in R that converges to 0 with respect to d1

such that for each n ∈ N, k ∈ N

|[θ(n)0, . . . , θ(n)k]− θ(n)| 6 βk

and |[θ0, . . . , θk]− θ| 6 βk by basic number theory, and(2) for each k ∈ N, and we have

limn→∞

|[θ(n)0, . . . , θ(n)k]− [θ0, . . . , θk]| = 0

by definition of the Baire metric.

These satisfy the conditions of (5)(a) of 1.1.3 Exercises.What is the best (βk)k∈N?

(βk)k∈N =

(2

(F0)2,

2

(F1)2,

2

(F2)2,

2

(F3)2, . . .

),

where (F (n))n∈N is the Fibonacci sequence. What about irrationals in all of R? Onecould just shift things carefully as any convergent sequence is bounded, it and itslimit exists in an interval, but we will not go into details here.

Page 52: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

52 KONRAD AGUILAR

1.3.1. Exercises.

(1) Let (X, d) be a metric space. Let x ∈ X and A ⊆ X. Show that x ∈ A if andonly if d(x,A) = 0. Use this to show that if A is closed, then x 6∈ A if andonly if d(x,A) > 0.

(2) Finish proving Theorem 1.3.4.

(3) Let (V, ‖ · ‖) be a normed vector space with norm n(v) = ‖v‖ for all v ∈ V .(a) ** (10 points) Show that for all u, v ∈ V , it holds that

|‖u‖ − ‖v‖| 6 ‖u− v‖.

(This is called the reverse triangle inequality for norms). Use this toprove (1) of prove Theorem 1.3.6.

Proof. Let u, v ∈ V . Then, by the triangle inequality

‖u‖ = ‖u+ (v − u)‖ 6 ‖u‖+ ‖v − u‖,

which implies ‖u‖ − ‖v‖ 6 ‖v − u‖ = ‖u − v‖. Switching the rolesof u and v, we have ‖v‖ − ‖u‖ 6 ‖u − v‖, which together imply that|‖u‖ − ‖v‖| 6 ‖u− v‖.Now, let (un)n∈N be a sequence in V converging in V to some u ∈ Vwith respect to d‖·‖. Then, for each n ∈ N, we have by the reversetriangle inequality we just proved

d1(n(un), n(u)) = |n(un)− n(u)| = |‖un‖ − ‖u‖| 6 ‖un − u‖ = d‖·‖(un, u).

Hence (n(un))n∈N converges to n(u) in d1 by the squeeze theorem. �

(b) Use the norm triangle inequality and homogeneity to prove (2) and (3)of Theorem 1.3.6. Therefore, n is continuous.

(4) In this problem, we will show that convergent sequences themselves are con-tinuous functions as well, which provides a sense of consistency of thesenotions since continuity can be defined using convergence. First, we discuss:(a) Let (X, d) and (Y, d′) be metric spaces. If f : (X, d) → (Y, d′) is a

function, then f is continuous at every isolated point. (Isolated pointswere defined in Definition 1.2.35).

(b) ** (10 points) Recall N∞ = N ∪ {∞} and dc from Example 1.1.30. Let(X, d) be a metric space. Let (xn)n∈N be a sequence in X, and let a ∈ X.Define f : (N∞, dc)→ (X, d) by f(n) = xn for each n ∈ N and f(∞) =

a.

Show that (xn)n∈N converges to a if and only if f is continuous. (Forthe forward direction, using part (a) and (8)(b) of 1.2.2 Exercises, you

Page 53: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 53

only have to check continuity at the point ∞ ∈ N∞, and make sure tomention why in your solution. For the backward direction, it helps tofirst show that the sequence (n)n∈N in N∞ converges to∞ with respectto dc.).

Proof. ( =⇒ ) By part (a) and (8)(b) of 1.2.2 Exercises, we have thatf is continuous at n for all n ∈ N since each n ∈ N is isolated. Whatremains is to check continuity at ∞.Let ε > 0. Since (xn)n∈N converges to a, there exists N ∈ N such thatd(f(n), f(∞)) = d(xn, a) < ε for all n > N . Choose δ = 1

N+1 > 0. Ifn ∈ N such that dc(n,∞) < δ, then 1

n+1 = dc(n,∞) < δ = 1N+1 , which

implies n > N , and thus d(f(n), f(∞)) < ε.( ⇐= ) First, we show that (n)n∈N converges to ∞ with respect to dc.Let ε > 0. By the Archimedean property, there exists N ∈ N such that

1n+1 6

1N+1 < ε for all n > N . Hence dc(n,∞) = 1

n+1 < ε for alln > N . Thus, (n)n∈N converges to∞ with respect to dc. Now, since f iscontinuous, it sends any converging sequence to a converging sequence,and in particular, (f(n))n∈N converges to f(∞) with repsect to d, butby definition of f , we have (xn)n∈N converges to a with repsect to d. �

(5) ** (5 points) Let (X, d) and (Y, d′) be metric spaces. Let f : (X, d)→ (Y, d′)

be continuous. Show that if B ⊆ Y is closed, A is dense in X, and f(A) ⊆ B,then f(X) ⊆ B. (Hint: (5) of Theorem 1.3.8 helps along with properties ofclosure.)

Proof. Since A is dense in X, we have A = X. Since f is continuous, we havethat f(X) = f(A) ⊆ f(A). Since B is closed, we have f(A) ⊆ B = B. Thusf(X) ⊆ B. �

(6) Let (X, d) and (Y, d′) be metric spaces and let f, g : (X, d) → (Y, d′) becontinuous functions. Let A ⊆ X be dense in X. Show that if f(a) = g(a)

for all a ∈ X, then f(x) = g(x) for all x ∈ X.

(7) ** (5 points) Let (X, d) and (Y, d′) be metric spaces. Let f : (X, d)→ (Y, d′)

be continuous and surjective (so f(X) = Y ). Show that if A ⊆ X is dense inX, then f(A) is dense in Y .

Proof. We have

Y = f(X) by surjectivity

= f(A) by density

⊆ f(A) by continuity.

Page 54: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

54 KONRAD AGUILAR

But, by definition of closure, we have f(A) ⊆ Y . Therefore Y = f(A). �

(8) Fix N ∈ N. Let (X0, d0), . . . , (XN , dN ) be metric spaces and let d be anytopological product metric on

∏Nn=0Xn defined in Example 1.1.29. For each

j ∈ {0, . . . , N}, define pj :(∏N

n=0Xn, d)→ (Xj , dj) by pj(x0, . . . , xN ) = xj

for all (x0, . . . , xN ) ∈∏Nn=0Xn. Show that for each j ∈ {0, . . . , N}, the

function pj is continuous.

(9) ** (10 points) (The following is antoher useful tool for showing when twometric spaces are not homeomorphic). Let (X, d) and (Y, d′) be metric spaces.Show that if f : (X, d)→ (Y, d′) is a homeomorphism, then x ∈ X is isolatedif and only if f(x) is isolated. Then, use this to show that if (X, d) hasno isolated points and (Y, d′) has at least one isolated point, then (X, d)

and (Y, d′) are not homeomorphic. Then, use this to show that (Q, d1) and(N∞, dc) are not homeomorphic. (Both Q and N∞ are countably infinite sothere exists at least one bijection between them and neither are topologicallydiscrete, so this question isn’t entirely trivial. Density of Q in R from 371can be used to show that (Q, d1) has no isolated points, and you can use(8)(b) from 1.2.2 Exercises for the rest). (Isolated points were defined in1.2.2 Exercises.)

Proof. Let x ∈ X be isolated, so there exists r ∈ R+ such that Bd(x; r) =

{x}. Hence f(Bd(x; r)) = {f(x)}. Note that f(Bd(x; r)) is open by The-orem 1.3.15. Hence there exists t ∈ R+ such that f(x) ∈ Bd′(f(x); t) ⊆f(Bd(x; r)) = {f(x)}. Thus {f(x)} = Bd′(f(x); t), and so f(x) is isolated.

Now, assume that there exists x ∈ X such that f(x) is isolated. So, thereexists r ∈ R+ such that {f(x)} = Bd′(f(x); r). Now since f is a bijection,we have {x} = f−1({f(x)}) = f−1(Bd′(f(x); r)). Since f is continuous,we have f−1(Bd′(f(x); r)) is open. Thus since x ∈ f−1(Bd′(f(x); r)), thereexists t ∈ R+ such that {x} ⊆ Bd(x; t) ⊆ f−1(Bd′(f(x); r)) = {x}. Hence{x} = Bd(x; t).

For the next part, assume by way of contradiction that (X, d) and (Y, d′)

are homeomorphic. Then, there exists a homeomorphism f : (X, d)→ (Y, d′).Let y0 ∈ Y be an isolated point in Y which exists by assumption. Since f issurjective, there exists x0 ∈ X such that f(x0) = y0, which implies that x0

is isolated by what we just proved, which is a contradiction since (X, d) hasno isolated points.

For the final part, we first show that (Q, d1) has no isolated points. Letq ∈ Q and let r ∈ R+. Then since q, q + r ∈ R and q < q + r, there exists

Page 55: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 55

q′ ∈ Q such that q < q′ < q + r by density of Q in R from 371, and soq − r < q′ < q + r with q 6= q′. Hence 0 < d1(q′, q) = |q′ − q| < r whichimplies B(Q,d1)(q; r) ) {q}. Thus (Q, d1) has no isolated points. However(N∞, dc) has many isolated points by (8)(b) from 1.2.2 Exercises . And thus(Q, d1) and (N∞, dc) are not homeomorphic by the previous parts of thisproblem. �

(10) Let (X, d) and (Y, d′) be metric spaces and let f : (X, d) → (Y, d′) be acontinuous bijection.(a) Show that f is homeomorphism if and only if f is an open map. (f is

an open map if for all open U ∈ X, it holds that f(U) is open.)(b) Show that f is homeomorphism if and only if f is a closed map. (f is a

closed map if for all closed F ∈ X, it holds that f(F ) is closed.)

References

[1] K. Aguilar and F. Latrémolière. Quantum ultrametrics on AF algebras and the Gromov-Hausdorff propinquity. Studia Mathematica, 231(2):149 –193, 2015. ArXiv: 1511.07114.

Page 56: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

56 KONRAD AGUILAR

1.4. Other continuities and spaces of continuous functions. The first othertype of continuity comes from the definition of continuity from (3) of Theorem 1.3.7.This definition shows us that for a fixed ε > 0, the size of the ball we fit into thepreimage of the ε-ball depends where we are in the domain. That is, δ depends onthe point x. But, what if δ did not depend on x and thus, we can find one δ or radiusthat works for all points at once and thus this δ is uniform instead of pointwise. Ofcourse, this means that there is no point to define uniform continuity at a point. Asimple rearrangement of quantifiers allows us to define this new form of continuity.

Definition 1.4.1 (uniform continuity). Let (X, d) and (Y, d′) be two metric spaces.A function f : X → Y is uniformly continuous if

for every ε > 0, there exists δ > 0 such that d′(f(x), f(y)) < ε for all x, y ∈ Xsuch that d(x, y) < δ.

Oddly enough this rearrangement makes it so we cannot have a fully topologicalnotion of uniform continuity. Uniform continuity is a much more metric notion as weshall see more evidence of that soon enough (although, we note that there is a moregeneral analytical space than a metric space called a uniform space, which allows foruniform continuity). However, we still have the following equivalence, which followsimmediately from basic set manipulation.

Theorem 1.4.2 (ball uniform continiuty). Let (X, d) and (Y, d′) be metric spaces.Let f : (X, d)→ (Y, d′) be a function.

If f is uniformly continuous, then f is continuous.Furthermore, the following are equivalent:

(1) f is uniformly continuous;(2) for all ε > 0, there exists δ > 0 such that Bd(x, δ) ⊆ f−1(Bd′(f(x), ε) for all

x ∈ X.(Note that Bd(x, δ) ⊆ f−1(Bd′(f(x), ε) ⇐⇒ f(Bd(x, δ)) ⊆ Bd′(f(x), ε).)

We will soon provide many examples of uniformly continuous functions, but let’sfirst look at a non-uniformly continuous function.

Example 1.4.3 (x2 on (R, d1) is not uniformly continuous). Define f : (R, d1) →(R, d1) by f(x) = x2 for all x ∈ R, which is continuous by 371. Choose ε = 1 > 0.Let δ > 0. Consider x = (2/δ)+(δ/4) and y = (2/δ)−(δ/4). Then, |x−y| = δ/2 < δ

and |x2 − y2| = |x− y| · |x+ y| = (δ/2) · (4/δ) = 2 > 1.

Here is an example of a uniformly continuous function.

Example 1.4.4 (√x is uniformly continuous). Consider f : ([0,∞), d1) → (R, d1)

defined by f(x) =√x for all x ∈ [0,∞). Let ε > 0. Choose δ = ε2 > 0. Let

Page 57: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 57

x, y ∈ [0,∞) such that |x− y| < δ. If x = y, then there is nothing to show. Assumewithout loss of generality that x < y. First, assume that y < δ. Then, since f(0) 6

f(x) < f(y) < f(δ), we have |f(y) − f(x)| = f(y) − f(x) < f(δ) − f(0) =√δ =√

ε2 = |ε| = ε.Now assume that y > δ. Then, Hence, 0 < ε =

√δ 6√y 6√x+√y. Hence since

(√x+√y)(√x−√y) = x− y,

|f(x)− f(y)| = |x− y|√x+√y<ε2

ε= ε,

which completes the proof.

The following will be another useful tool for showing when a function isn’t uni-formly continuous, which brings to light more of the metric structure involve inuniform continuity.

Theorem 1.4.5 (uniform preserves Cauchy). Let (X, d) and (Y, d′) be metric spaces.If a function f : (X, d) → (Y, d′) is uniformly continuous, then for every Cauchy

sequence (xn)n∈N in X, the seqeunce (f(xn))n∈N in Y is Cauchy.

Proof. Let ε > 0. There exists δ > 0 such that d′(f(x), f(y)) < ε for all x, y ∈ Xsuch that d(x, y) < δ. Now, there exists N ∈ N such that d(xn, xm) < δ for alln,m > N , and thus d′(f(xn), f(xm)) < ε for all n,m > N . �

The above is not an if and only if due the fact that x2 is not uniformly continuousbut sends Cauchy sequences to Cauchy sequences. Indeed, if (xn)n∈N is Cauchy in(R, d1) then it converges by 371. Therefore, since x2 is continuous, it sends thisconvergent sequence to a convergent sequence, which is also Cauchy.

We use this previous theorem to establish a not uniformly continuous functionthat is continuous.

Example 1.4.6 (1/x on (0, 1) is not uniformly continuous). Consider f : ((0, 1), d1)→(R, d1) defined by f(x) = 1

x for all x ∈ (0, 1). This is continuous by 371. Considerthe sequence ( 1

n+2)n∈N in (0, 1), which is Cauchy by 371. However, for each n ∈ N,we have f( 1

n+2) = n + 2, which forms an unbounded sequence and thus cannot beCauchy. Thus f is not uniformly continuous.

We also note that there are many uniformly continuous functions just as in The-orem 1.3.4. Indeed:

Theorem 1.4.7 (automatically uniformly continuous). Let (X, d), (Y, d′), and (Z, d′′)

be metric spaces.

(1) Any constant function from X to Y is uniformly continuous.

Page 58: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

58 KONRAD AGUILAR

(2) If f : (X, d) → (Y, d′) and g : (Y, d′) → (Z, d′′) are uniformly continuous,then g ◦ f : (X, d)→ (Z, d′′) is uniformly continuous.

(3) If ∅ 6= A ⊆ X, then the inclusion mapping ιA : (A, d) → (X, d) is uniformlycontinuous.

(4) If ∅ 6= A ⊆ X and f : (X, d) → (Y, d′) is uniformly continuous, then itsrestriction to A, denoted f |A : (A, d)→ (Y, d′) is uniformly continuous.

(5) If ∅ 6= A ⊆ X, then the function fA : (X, d) → (R, d1) defined by fA(x) =

d(x,A) for all x ∈ X, is uniformly continuous.(6) Fix x0 ∈ X. The function fx0 : (X, d)→ (R, d1) defined by fx0(x) = d(x, x0)

for all x ∈ X, is uniformly continuous.(7) The function d : (X ×X, d∞)→ (R, d1) is uniformly continuous.

Proof. (1) through (4) are left as an exercise.(5) through (7) will be given by Theorem 1.4.10 and Theorem 1.4.9. �

We will now provide many more examples of uniformly continuous functions byintroducing a new type of continuity, which truly requires the metric structure to bedefined.

Definition 1.4.8 (Lipschitz function). Let (X, d) and (Y, d′) be metric spaces. Letf : (X, d)→ (Y, d′) be a function. We say f is Lipschitz if there exists K ∈ R>0 suchthat

d′(f(x), f(y)) 6 K · d(x, y)

for all x, y ∈ X. If this occurs, then we call f a K-Lipschitz function.

First, we check that this is a special type of continuity, and in fact, a special typeof uniform continuity.

Theorem 1.4.9 (Lipschitz implies uniform). Let (X, d) and (Y, d′) be metric spaces.Let f : (X, d)→ (Y, d′) be a function. If f is Lipschitz, then f is uniformly continuousand thus continuous.

Proof. Since f is Lipschitz, there existsK ∈ R>0 such that d′(f(x), f(y)) 6 K·d(x, y)

for all x, y ∈ X.First, assume that K = 0. Fix x0 ∈ X, then if x ∈ X, then d′(f(x), f(x0)) 6

0 · d(x, x0) = 0. Thus f(x) = f(x0) for all x ∈ X. Hence f is constant, so it isuniformly continuous by Theorem 1.4.7.

Second, assume that K > 0. Let ε > 0. Choose δ = ε/K > 0. Let a, b ∈ X suchthat d(a, b) < δ, then

d′(f(a), f(b)) 6 K · d(a, b) < K · ε/K = ε.

Thus, f is uniformly continuous in either case. And, f is conitnuous by Theorem1.4.2. �

Page 59: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 59

Let’s now repeat Theorem 1.3.4 with Lipschitz functions, which by the previoustheorem will provide many more automatically uniformly continuous functions onany given metric space (X, d).

Theorem 1.4.10 (automatically Lipschitz). Let (X, d), (Y, d′), and (Z, d′′) be metricspaces.

(1) A function c : (X, d)→ (Y, d′) is constant if and only if it is 0-Lipschitz.(2) If f : (X, d) → (Y, d′) and g : (Y, d′) → (Z, d′′) are Lipschitz, then g ◦ f :

(X, d)→ (Z, d′′) is Lipschitz. And, if g is K-Lipschitz and f is L-Lipschitz,then g ◦ f is K · L-Lipschitz.

(3) If ∅ 6= A ⊆ X, then the inclusion mapping ιA : (A, d)→ (X, d) is 1-Lipschitz.(4) If ∅ 6= A ⊆ X and f : (X, d)→ (Y, d′) is Lipschitz, then its restriction to A,

denoted f |A : (A, d)→ (Y, d′) is Lipschitz.(5) If ∅ 6= A ⊆ X, then the function fA : (X, d) → (R, d1) defined by fA(x) =

d(x,A) for all x ∈ X, is 1-Lipschitz, and is thus uniformly continuous.(6) Fix x0 ∈ X. The function fx0 : (X, d)→ (R, d1) defined by fx0(x) = d(x, x0)

for all x ∈ X, is 1-Lipschitz and is thus uniformly continuous.(7) The function d : (X ×X, d∞)→ (R, d1) is 2-Lipschitz and is thus uniformly

continuous.

Proof. (1) through (4) are left as exercises. Note that (1) is different than the (1) ofboth Theorem 1.3.4 and Theorem 1.4.7.

(5). Let x, y ∈ X. Then by Theorem 1.3.5, we have

|fA(x)− fA(y)| = |d(x,A)− d(y,A)| 6 d(x, y) = 1 · d(x, y),

which completes (5).(6) is immediate from (5) if we set A = {x0}.(7) Let (x0, x1), (y0, y1) ∈ X ×X. Then by Theorem 1.3.5, we have

|d(x0, x1)− d(y0, y1)| 6 d(x0, y0) + d(x1, y1)

6 max{d(x0, y0), d(x1, y1)}+ max{d(x0, y0), d(x1, y1)}

= d∞((x0, x1), (y0, y1)) + d∞((x0, x1), (y0, y1))

= 2 · d∞((x0, x1), (y0, y1)),

which completes (7). �

Sometimes it will benefit us to to know the "best" K such that the a function isK-Lipschitz. We now define:

Definition 1.4.11 (Lipschitz constant). Let (X, d) and (Y, d′) be metric spaces. Letf : (X, d)→ (Y, d′) be a function. We define the Lipschitz constant of f to be

Ld,d′(f) := inf{K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)

}

Page 60: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

60 KONRAD AGUILAR

with the convention that inf{∅} =∞.Denote F (X,Y ) := {f : X → Y | f is a function}, we have that Ld,d′ is a function

from F (X,Y ) to [0,∞].If (Y, d′) = (K, d1) for K = R or C, then we denote Ld,d1 simply by Ld.

The above definition gives the most literal notion of Lipschitz constant. However,for computational and aesthetic purposes, we have the following presentation ofthe Lipschitz constant. Indeed, the following theorem suggests that the Lipschitzconstant is providing a notion of "steepest slope" even when no differential structureexists.

Theorem 1.4.12 (Lipschitz slope). Let (X, d) and (Y, d′) be metric spaces.If f : (X, d)→ (Y, d′) is a function, then

(1) Ld,d′(f) <∞ if and only ifLd,d′(f) ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)},

(2) if X has at least 2 points, then Ld,d′(f) <∞ if and only if

sup

{d′(f(x), f(y))

d(x, y)

∣∣∣ x, y ∈ X,x 6= y

}<∞,

and if X has only one point, then Ld,d′(f) = 0,(3) if X has at least 2 points, then

Ld,d′(f) = sup

{d′(f(x), f(y))

d(x, y)

∣∣∣ x, y ∈ X,x 6= y

},

and if X has only one point then Ld,d′(f) = 0, and(4) f is Lipschitz if and only if Ld,d′(f) < ∞, and if K ∈ R>0, then f is K-

Lipschitz if and only if Ld,d′(f) 6 K.

Proof. (1) Assume that Ld,d′(f) <∞, then by 371, there exists a sequence (Kn)n∈N

in {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)} such that (Kn)n∈N converges toLd,d′(f) in the usual metric. Fix x, y ∈ X, then d′(f(x), f(y)) 6 Kn · d(x, y) forall n ∈ N. Hence d′(f(x), f(y)) is a lower bound for the real-valued sequence (Kn ·d(x, y))n∈N. Therefore

d′(f(x), f(y)) 6 limn→∞

Kn · d(x, y) = Ld,d′(f) · d(x, y).

Hence, this is true for all x, y ∈ X. ThusLd,d′(f) ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)}.Now if Ld,d′(f) ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)}, then Ld,d′(f) <

∞ since Ld,d′(f) ∈ R.(2) and (3). The one point case is follows form the fact that d′(f(x), f(y)) = 0 if

x = y. So, assume X has at least two points. First assume that

Page 61: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 61

sup{

d′(f(x),f(y))d(x,y)

∣∣∣ x, y ∈ X,x 6= y}

= J <∞. Thus

d′(f(x), f(y))

d(x, y)6 J

for all x, y ∈ X,x 6= y. Hence d′(f(x), f(y)) 6 J · d(x, y) for all x, y ∈ X sinced′(f(x), f(y)) = 0 if x = y. Hence

J ∈{K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)

}and thus Ld,d′(f) = inf {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)} 6 J <∞.

Now, by part (1), we have thatLd,d′(f) ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)}. Thus for all x, y ∈

X we have d′(f(x), f(y)) 6 Ld,d′(f) · d(x, y), which implies that d′(f(x),f(y))d(x,y) 6

Ld,d′(f) for all x, y ∈ X,x 6= y. Therefore Ld,d′(f) is an upper bound for the set{d′(f(x),f(y))

d(x,y) | x, y ∈ X,x 6= y}. Hence, as J is the least upper bound of this set, we

have J 6 Ld,d′(f). Thus J = Ld,d′(f).Next, assume that Ld,d′(f) <∞. Then, by part (1),Ld,d′(f) ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)}. Hence just as above,

we have the set{

d′(f(x),f(y))d(x,y)

∣∣∣ x, y ∈ X,x 6= y}

is bounded by Ld,d′(f) and thus the

least upper bound sup{

d′(f(x),f(y))d(x,y)

∣∣∣ x, y ∈ X,x 6= y}6 Ld,d′(f) <∞. Now, let

J = sup{

d′(f(x),f(y))d(x,y)

∣∣∣ x, y ∈ X,x 6= y}<∞. Then, just as above

J ∈ {K ∈ R | ∀x, y ∈ X, d′(f(x), f(y)) 6 K · d(x, y)}. Therefore Ld,d′(f) 6 J ,which completes the proof.

(4) This follows easliy from using the supremum definition of Lipschitz constantand the arguments we have already used several times above, but make sure to checkthis yourself. �

The above also allows us to find non-Lipschitz functions easily, and we will proivdean example of a uniformly continuous function that’s not Lipschitz. Indeed:

Example 1.4.13 (√· not Lipschitz). Consider the uniformly continuous function f :

([0,∞), d1)→ (R, d1) defined by f(x) =√x for all x ∈ [0,∞).

Now for each n ∈ N, we have

f(

1(n+1)2

)− f(0)∣∣∣ 1

(n+1)2− 0∣∣∣ =

1n+1

1(n+1)2

= n+ 1.

Hence

Ld1(f) = sup

{|f(x)− f(y)||x− y|

∣∣∣ x, y ∈ X,x 6= y

}> sup{n+ 1 | n ∈ N} =∞.

Thus, by (4) of Theorem 1.4.12, we have f is not Lipschitz.

Page 62: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

62 KONRAD AGUILAR

We will find many examples of non-Lipschitz uniformly continuous functions incompactness section. We can also now easily establish the Lipschitz constants of thefollowing functions.

Example 1.4.14 (metric functions Lipschitz=1). Let (X, d) be a metric space. Fixx0 ∈ X. Consider fx0 : (X, d) → (R, d1) defined by fx0(x) = d(x0, x) for all x ∈ X.If X only has one element, then Ld(f) = 0 using the original definition.

Now, assume that X has at least 2 elements. Then, by Theorem 1.4.10, we alreadyknow that Ld(f) 6 1 by (4) of Theorem 1.4.12. Now, consider x ∈ X such thatx 6= x0, which exists by assumption. Hence

|fx0(x)− fx0(x0)|d(x, x0)

=|d(x0, x)− d(x0, x0)|

d(x, x0)=|d(x0, x)|d(x, x0)

= 1.

Therefore Ld(f) > 1, by supremum definition. Thus Ld(f) = 1.

In the case when (X, d) = ([a, b], d1) in the above example, we have examplesof many Lipschitz functions that are not differentiable since these would just bethe absolute value functions. However, due to the supremum definition of Lipschitzconstant, it makes sense that there should be some relationship between differentiablefunctions and Lipschitz functions. Here is such a relationship.

Example 1.4.15 (differentiable plus more is Lipschitz). Fix a, b ∈ R such that a < b.Let f : ([a, b], d1)→ (R, d1) be continuous and assume f differentiable on (a, b). Fur-thermore, assume that f has bounded derivative on (a, b), so that supx∈(a,b) |f ′(x)| <∞. We will now show that

Ld1(f) = sup

{|f(x)− f(y)||x− y|

∣∣∣ x, y ∈ [a, b], x 6= y

}= sup

z∈(a,b)|f ′(z)|.

Fix x, y ∈ [a, b], x < y. By assumption and the Mean Value theorem, there existsc ∈ (x, y) such that f ′(c) = f(y)−f(x)

y−x . Hence, |f ′(c)| = |f(y)−f(x)||y−x| , and since f has

bounded derivative on (a, b), we have

|f(y)− f(x)||y − x|

= |f ′(c)| 6 supz∈(a,b)

|f ′(z)| <∞,

which is a constant not dependent on x, y, and thus

Ld1(f) = sup

{|f(x)− f(y)||x− y|

∣∣∣ x, y ∈ [a, b], x 6= y

}6 sup

z∈(a,b)|f ′(z)| <∞,

Now, fix z ∈ (a, b), then since Ld1(f) <∞, we have

|f ′(z)| =∣∣∣∣ limw→z

f(w)− f(z)

w − z

∣∣∣∣= lim

w→z

|f(w)− f(z)||w − z|

6 sup

{|f(x)− f(y)||x− y|

∣∣∣ x, y ∈ [a, b], x 6= y

}= Ld1(f).

Hence supz∈(a,b) |f ′(z)| 6 Ld1(f). which completes the proof.

Page 63: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 63

Note that√· does not have bounded derivative on (0, b) for any b > 0, so the

above example does not contradict Example 1.4.13. Indeed, its derivative on (0, b) is1

2√· .Furthermore, the above essentially shows that the Lipschitz constant is the "cor-

rect" notion of the steepest slope of a functions when a derivative is not defined.By the above example, we can find the Lipschitz constant of an old friend.

Example 1.4.16 (Lipschitz constant of Fund. Thm. of Calc.). Fix a, b ∈ R suchthat a < b. Let f ∈ C([a, b],R), the normed vector space of continuous func-tions from ([a, b], d1) to (R, d1). By continuity and the fact that (a, b) = [a, b],we have that supx∈(a,b) |f(x)| = supx∈[a,b] |f(x)| = ‖f‖∞. Indeed, by containmentsupx∈(a,b) |f(x)| 6 supx∈[a,b] |f(x)|.Now, consider f(b), by closure, there exists (xn)n∈N

in (a, b) such that limn→∞ xn = b, and by continuity, we have supx∈(a,b) |f(x)| >limn→∞ |f(xn)| = |f(b)|. Similarly, for f(a).

Now, since continuous functions are Riemann integrable, we have by the Fun-damental Theorem of Calculus that F (x) =

∫ xa f(t) dt is continuous on [a, b] and

differentiable on (a, b) such that F ′(x) = f(x) for all x ∈ (a, b). Hence, the conditionsof the previous example are satisfied, and so

Ld1(F ) = supx∈(a,b)

|F ′(x)| = supx∈(a,b)

|f(x)| = ‖f‖∞.

We will find many more examples of Lipschitz functions when we focus on normedvector spaces.

Now, we introduce a special type of Lipschitz functions.

Definition 1.4.17 (bi-Lipschitz). Let (X, d) and (Y, d′) be metric spaces.Let f : (X, d) → (Y, d′) be a function. f is bi-Lipschitz if there exist K,L ∈ R+

such that

K · d(a, b) 6 d′(f(a), f(b)) 6 L · d(a, b) for all a, b ∈ X.

If this occurs, then we say that f is (K,L)-bi-Lipschitz. Note that by definition, allbi-Lipschitz functions are Lipschitz, and in this case, L-Lipschitz.

Let’s do a quick example of a bi-Lipschitz function based on our previous theoremsabout Lipschitz functions.

Example 1.4.18 (x2 bi-Lipschitz sometimes). Fix a, b ∈ R, 0 < a < b. The functionf(x) = x2 is a bijection from ([a, b], d1) onto ([a2, b2], d1) with inverse f−1(x) =

√x.

Now, by Example 1.4.15, we have that Ld1(f) = supx∈(a,b) |2x| = 2b. Also, sincea > 0, we have that f−1 is differentiable on (a, b) with bounded derivative. Thus byExample 1.4.15, we have Ld1(f−1) = supx∈(a2,b2)

∣∣∣ 12√x

∣∣∣ = 12a . Hence for all x, y ∈ [a, b]

Page 64: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

64 KONRAD AGUILAR

we have

2a · d1(x, y) = 2a · d1(f−1(f(x)), f−1(f(y)))

6 2a · 1

2a· d1(f(x), f(y))

= d1(f(x), f(y))

6 2b · d1(x, y).

Hence, f is (2a, 2b)-bi-Lipschitz.

We can actually generalize the relationship a bi-Lipschitz function has with itsinverse in the following, while also capturing some other properties.

Theorem 1.4.19 (bi-Lipschitz implies homeomorphism). Let (X, d) and (Y, d′) bemetric spaces.

If f : (X, d)→ (Y, d′) is a surjective function that is (K,L)-bi-Lipschitz, then:

(1) f is injective,(2) f−1 is

(1L ,

1K

)-bi-Lipschitz,

(3) f is a homeomorphism, and thus (X, d) and (Y, d′) are homeomorphic.

Proof. (1) Assume that a, b ∈ X such that f(a) = f(b), thenK · d(a, b) 6 d′(f(a), f(b)) = 0 =⇒ d(a, b) = 0 since K 6= 0.(2) By (1), f is a bijection and thus f−1 exists. Now, let c, d ∈ Y , then K ·

d(f−1(c), f−1(d)) 6 d′(f(f−1(c)), f(f−1(d))) = d′(c, d) =⇒ d(f−1(c), f−1(d)) 61K · d

′(c, d). Also, note that

1

Ld′(c, d) =

1

Ld′(f(f−1(c)), f(f−1(d))) 6

1

L·L·d(f−1(c), f−1(d)) = d(f−1(c), f−1(d)),

which completes the proof of (2).(3) By (2) and Theorem 1.4.9, we have that both f and f−1 are continuous as

they are both Lipschitz. �

Note that (1) above did not require surjectivity. Also, note that adding surjectivitywas all we need to create a homeomorphism, whereas continuous bijections need notbe homeomorphisms. Consequence (3) of the above theorem shows that bi-Lipschitzis stronger than homeomorphism. So, we introduce a new equivalence between metricspaces.

Definition 1.4.20 (equivalent metrics). Let (X, d) and (Y, d′).(X, d) and (Y, d′) are equivalent if there exists a surjective (K,L)-bi-Lipschitz

function f : (X, d)→ (Y, d′).

We will give some easy examples of equivalent metric spaces now, and we willdiscuss some much more interesting ones once we focus on normed vector spaces.

Page 65: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 65

Example 1.4.21 (closed bounded intervals are equivalent). Let a, b ∈ R, a < b andc, d ∈ R, c < d. We will show that ([a, b], d1) and ([c, d], d1) are equivalent metricspaces. To do this we have to construct a bi-Lipschitz map. Let m = d−c

b−a 6= 0 and letz = cb−ad

b−a . The function f(x) = mx+ z is easliy checked to be a bijection from [a, b]

and [c, d]. It’s inverse is f−1(x) = x−zm . Now |f(x) − f(y)| = |mx + z −my − z| =

m · |x− y|. And |x− y| =∣∣∣f(x)−z

m − f(y)−zm

∣∣∣ = 1m |f(x)− f(y)|. Hence f is (m,m)-bi-

Lipschitz.

We could have done the above example with two open bounded intervals as well.Note that is in general quite difficult that show that two metric spaces are not

equivalent since once has to check that every Lipschitz bijection cannot have a Lip-schitz inverse. But, we can at least right now introduce one nice way to check iftwo spaces are not equivalent, which displays how equivalent metrics preserve moremetric structure than topological equivalence and why we needed bounded in theabove example.

Theorem 1.4.22 (equivalence and diameter). Let (X, d) and (Y, d′) be metric spaces.If (X, d) and (Y, d′) are equivalent metric spaces, then diamd(X) <∞ if and only

if diamd′(Y ) <∞.In particular, if f : (X, d) → (Y, d′) is a surjective function that is (K,L)-bi-

Lipschitz, then K · diamd(X) 6 diamd′(Y ) 6 L · diamd(X).

Proof. Let f : (X, d)→ (Y, d′) is a surjective function that is (K,L)-bi-Lipschitz.Fix a, b ∈ X, then

K · d(a, b) 6 d′(f(a), f(b)) 6 diamd′(Y ).

Hence K · diamd(X) 6 diamd′(Y ). Thus, if diamd′(Y ) <∞, then diam(X)d <∞.Now, fix u, v ∈ Y . By surjectivity, there exist a, b ∈ X such that f(a) = u, f(b) =

v. Hence

d′(u, v) = d′(f(a), f(b)) 6 L · d(a, b) 6 L · diamd(X).

Thus diamd′(Y ) 6 L · diamd(X). Therefore, if diamd(X) < ∞, then diamd′(Y ) <

∞. �

This next example shows that there can be two metric spaces with a Lipschitzhomeomorphism, but the metric spaces are not equivalent, so that topological equiv-alence or homeomorphic is not a strong as equivalence.

Example 1.4.23 (Lipschitz homeomorphism that’s not bi-Lipschitz). Let (X, d) be ametric space such that diamd(X) = ∞. Fix K > 0, and recall the metric dK on Xfrom 1.2.2 Exercises defined by dK(a, b) = K · d(a,b)

1+d(a,b) . We showed that diamdK (X) 6

K < ∞. Thus, by the above theorem, we have that (X, dK) and (X, d) cannot be

Page 66: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

66 KONRAD AGUILAR

equivalent metric spaces even though they are homeomorphic by the map f(x) = x

for all x ∈ X and 1.2.2 Exercises.This is made more interesting because we have the map f : (X, d) → (X, dK)

defined by f(x) = x is K-Lipschitz since dK(f(a), f(b)) = dK(a, b) = K · d(a,b)1+d(a,b) 6

K · d(a, b), and cannot be bi-Lipschitz since these spaces are not equivalent.

Of course, we also have that ((0, 1), d1) and (R, d1) are not equivalent metricspaces as one has infinite diameter, whereas the other has finite diameter, so therecannot exist a bi-Lipschitz surjection from on to the other. However by 371, one canshow that these two spaces are homeomorphic using compositions with tangent andthe lines we have presented above in Example 1.4.21.

Before we move on to some amazing bi-Lipschitz functions, we first we prove atheorem that shows that Lipschitz functions preserve bounded sets. That is, theimage of abounded set under a Lipschitz function is bounded. We have essentiallyalready proved this in Theorem 1.4.22 (which is why we cover it here before we moveon), but we are displaying this as its own result since we will come back to it againand again.

Theorem 1.4.24 (Lipschitz preserves bounded). Let (X, d) and (Y, d′) be metricspaces. Let f : (X, d)→ (Y, d′) be Lipschitz.

If A ⊆ X is bounded, then f(A) is bounded.

Proof. Since f is Lipschitz, there existsK ∈ R>0 such that d′(f(a), f(b)) 6 K ·d(a, b)

for all a, b ∈ X. Hence if a, b ∈ A, then

d′(f(a), f(b)) 6 K · d(a, b) 6 K · diamd(A) <∞.

Hence diamd′(f(A)) 6 K · diamd(A) <∞ by definition of supremum and bounded,which completes the proof. �

Now, do uniformly continuous or continuous functions preserve bounded sets? Itturns out that this is NOT true in general. Uniformly continuous functions and con-tinuous functions will preserve certain sets related to stricter notions of size of setsthat all imply boundedness. But, this is the related to the notion of compactness andwill be discussed in a later section. In the context of Theorem 1.4.28, we will pro-vide examples of uniformly continuous and continuous functions that don’t preservebounded sets.

Now let’s focus on a special class of bi-Lipschitz functions. These functions com-pletely capture the metric structure.

Definition 1.4.25 (isometry). Let (X, d) and (Y, d′) be metric spaces. A functionf : (X, d)→ (Y, d′) is an isometry if d′(f(a), f(b)) = d(a, b) for all a, b ∈ X.

Page 67: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 67

(X, d) and (Y, d′) are isometric if there exists and surjective isometry from (X, d)

to (Y, d′).

Theorem 1.4.26 (basic isometry facts). Let (X, d) and (Y, d′) be metric spaces.Let f : (X, d) → (Y, d′) be a function. f is an isometry if and only if f is (1, 1)-bi-Lipschitz.

In particular, if f is an isometry, then

(1) f is injective,(2) diamd(X) = diamd′(Y ),

(3) and if f is surjective, then f−1 is an isometry, and thus f is a homeomor-phism.

Proof. All of these follow immediately by definition, Theorem 1.4.22, and Theorem1.4.19. �

(2) of the above Thoerem provides a nice way of showing that two metric spacesare not isometric. Indeed, the two metric spaces ([a, b], d1) and ([c, d], d1) are notisometric if |b− a| 6= |c− d|, and in fact, by the above theorem and Example 1.4.21,we have that this condition is equivalent to being not-isometric in these cases, andthus characterizes when they are isometric.

Also note that the function f(x) = x2 from ([a, b], d1) and ([a2, b2], d1) for 0 <

a < b from Example 1.4.18 cannot be isometries since it would have to be the casethat a = 1/2 = b. However ([a, b], d1) and ([a2, b2], d1) can be isometric if a and b arechosen carefully, that is a = 1 − b, 1/2 < b < 1, then diam([a, b]) = diam([a2, b2]),which is enough for intervals to be isometric as mentioned above.

We will discuss more difficult but useful isometries once we introduce spaces ofcontinuous functions shortly.

We will introduce many more example of bi-Lipschitz functions when we focus onnormed vector spaces.

Now, we may introduce many more metric spaces based on the introduction of allthese different kinds of continuous functions.

Definition 1.4.27 (sets of continuous functions). Let (X, d) and (Y, d′) be metricspaces. Define the following sets. Recall that the set of bounded functions from X

to Y is B(X,Y ) = {f : X → Y | diamd′(f(X)) <∞}.

(1) The set of continuous functions from X to Y is C(X,Y ) = {f : X → Y |f is continuous}.

(2) The set of bounded continuous functions from X to Y is Cb(X,Y ) = {f ∈B(X,Y ) | f is continuous}.

(3) The set of uniformly continuous functions from X to Y is UC(X,Y ) = {f :

X → Y | f is uniformly continuous}.

Page 68: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

68 KONRAD AGUILAR

(4) The set of bounded uniformly continuous functions from X to Y is UCb(X,Y ) =

{f ∈ B(X,Y ) | f is uniformly continuous}.(5) The set of Lipschitz functions from X to Y is L(X,Y ) = {f : X → Y |

f is Lipschitz}.(6) The set of bounded Lipschitz functions from X to Y is Lb(X,Y ) = {f ∈

B(X,Y ) | f is Lipschitz}.

Sometimes when (Y, d′) = (K, d1), where K = R or C, we will simply write C(X,Y )

as C(X) and do the same for the other spaces.

Let’s now see how the above sets compare and when the above sets are metricspaces with the expected metric d∞.

Theorem 1.4.28 (comparison of continuous functions). Let (X, d) and (Y, d′) bemetric spaces. We have

L(X,Y ) ⊆ UC(X,Y ) ⊆ C(X,Y ),

and there exists spaces where equality fails on each containment and d∞ fails to be ametric on each set.

Furthermore, we have

Lb(X,Y ) ⊆ UCb(X,Y ) ⊆ Cb(X,Y ) ⊆ B(X,Y ),

and there exists spaces where equality fails on each containment. Also, (Lb(X,Y ), d∞),(UCb(X,Y ), d∞), and (Cb(X,Y ), d∞) are metric spaces since they are all subspacesof (B(X,Y ), d∞).

Finally, if diamd(X) <∞, then Lb(X,Y ) = L(X,Y ) and thus (L(X,Y ), d∞) is ametric space and there exist metric spaces (X, d) and (Y, d′) such that diamd(X) <∞and UC(X,Y ) and C(X,Y ) fail to be metric spaces with respect to d∞.

Proof. The first and second string of containments are given by Definition 1.4.1 andTheorem 1.4.9.

Example 1.4.6 provides f(x) = 1/x and spaces for which UC(X,Y ) ( C(X,Y ).For UCb(X,Y ) ( Cb(X,Y ), consider f(x) = sin

(π2x

)on (0, 1) with f : ((0, 1), d1)→

(R, d1). This is continuous by composition of continuous functions, and it is boundedsince sin(x) is bounded. However, it is not uniformly continuous by Theorem 1.4.5sincesin

π

2(

1n+2

)

n∈N

=

(sin

(π(n+ 2)

2

))n∈N

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

is not Cauchy but ( 1n+2)n∈N is Cauchy in (0, 1).

For L(X,Y ) ( UC(X,Y ), we have f(x) =√x from Example 1.4.13 an Example

1.4.4. For Lb(X,Y ) ( UCb(X,Y ) by the same examples.

Page 69: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 69

Consider (X, d) = (R, d1) and (Y, d′) = (R, d1), then f(x) = x for all x ∈ X isLipschitz, and so is g(x) = 0 for all x ∈ R, but supx∈R |f(x)− g(x)| = supx∈R |x| =∞, and since f, g ∈ L(X,Y ) ⊆ UC(X,Y ) ⊆ C(X,Y ), we have that d∞ fails to be ametric in on each set.

Now, let’s assume that diamd(X) <∞. By definition Lb(X,Y ) ⊆ L(X,Y ), so letf ∈ L(X,Y ). Since f is Lipschitz, there exists K ∈ [0,∞) such that d′(f(a), f(b)) 6

K · d(a, b) for all a, b ∈ X. Thus

d′(f(a), f(b)) 6 K · diamd(X) =⇒ diamd′(f(X)) 6 K · diamd(X) <∞.

Thus f ∈ B(X,Y ), which implies f ∈ Lb(X,Y ).

Next, f(x) = 1/x on (0, 1) is continuous but unbounded by 371 and diamd1((0, 1)) <

∞, which provides an example for which C(X,Y ) is not a metric space with respectto the metric d∞.

We have to try a little harder for UC(X,Y ), but a familiar example can savethe day and is one of the main reasons why we introduced such a wide arrayof metric spaces to work with in the beginning. Recall ce = {(xn)n∈N ∈ KN |(xn)n∈N is eventually constant}, which is metric space with respect to d∞. Con-sider the subset of ce defined by Z1 = {(xn)n∈N ∈ ce | ∃N ∈ N such that ∀n 6N, xn = 1, and ∀n > N, xn = 0}. Then (Z1, d∞) is a metric space and note thatdiamd∞(Z1) = 1 <∞.

Define s : (Z1, d∞)→ (R, d1) by s(x) =∑∞

n=0 xn, where x = (xn)n∈N ∈ Z1. Thisfunction is well-defined since the sum is only being taken over finitely many non-zeroterms. It is left as an exercise to show that s is uniformly continuous and that s(Z1)

is unbounded. Hence s ∈ UC(Z1,R) and thus, we have that UC(Z1,R) is not ametric space with respect to d∞ even though diamd∞(Z1) <∞. �

Let’s now intorduce an isometry which will be pivotal when we work with com-pleteness. We waited until now to introduce this isometry since we need intorducethe space of continuous functions. The following example allows us to isometricallyembed a metric space into a larger metric space with richer structure that we willcapitalize on later.

Example 1.4.29 (completeness isometry). Let (X, d) be a metric space. Fix x0 ∈ X.For each x ∈ X, define fx : (X, d)→ (R, d1) by

fx(a) = d(x, a)− d(a, x0).

Page 70: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

70 KONRAD AGUILAR

Now, we will show that fx is continuous by showing it is Lipschitz. Let a, b ∈ X.Then

d1(fx(a), fx(b)) = |d(x, a)− d(a, x0)− (d(x, b)− d(b, x0))|

= |d(x, a)− d(x, b) + d(b, x0)− d(a, x0)|

6 |d(x, a)− d(x, b)|+ |d(b, x0)− d(a, x0)|

6 d(a, b) + d(a, b) = 2 · d(a, b).

And thus, fx is 2-Lipschitz. It is left as an exercise to show that fx is bounded.Hence, we have a well-defined function

FX : X → Cb(X,R)

defined by FX(x) = fx for all x ∈ X.It is left as an exercise to show that FX : (X, d)→ (Cb(X,R), d∞) is an isometry.We note that FX maps into Lb(X,R), but we will need to use the structure of

(Cb(X,R), d∞) to obtain some results later on that would fail to be true if we onlyconsidered (Lb(X,R), d∞).

Page 71: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 71

1.4.1. Exercises.

(1) Finish proving Theorem 1.4.7.

(2) Finish proving Theorem 1.4.10.

(3) ** (10 points) (This following exercise can be proven using the continuity ofthe metric in a nice way, and this approach is outline in the hint).

Let (X, d) and (Y, d′) be metric spaces. Let A ⊆ X be dense. Show thatif f : (X, d) → (Y, d′) is continuous and f : (A, d) → (Y, d′) is uniformlycontinuous, then f : (X, d)→ (Y, d′) is uniformly continuous.

(Hint: here is an outline with many missing details that you have to in-clude. Begin the proof with an ε > 0 and get a δ > 0 from uniform continu-ityof f on A using ε/3. You will want to use δ/2 for uniform continuity onall of X. Then, let d(a, b) < δ/2 for a, b ∈ X. By A = X, obtain sequences(an)n∈N, (bn)n∈N in A converging to a, b, respectively. Then use continuityof d on (X × X, d∞) and the fact that ((an, bn))n∈N converges to (a, b) in(X ×X, d∞) to find N ∈ N such that d(an, bn) < δ for all n > N (why canyou do this and why is it δ instead of δ/2?), then recall what uniform continu-ity on A tells you about f(an) and f(bn) for all n > N . Next, find other N ’susing the continuity of f on all of X and the given convergent sequences andε/3. Finish the proof by choosing the max of all the N ’s (there should onlybe 3 N ’s) and use this max and the triangle inequality with d′(f(a), f(b))

along with everything else...)

Proof. Let ε > 0. There exists δ > 0 such that for all a, b ∈ A, if d(a, b) < δ,then d′(f(a), f(b)) < ε/3.

Let a, b ∈ X such that d(a, b) < δ/2. Since A = X, there exists sequences(an)n∈N and (bn)n∈N in A such that (an)n∈N converges to a and (bn)n∈N

converges to b. Hence ((an, bn))n∈N converges to (a, b) in (X ×X, d∞). Sincethe metric d is continuous on (X×X, d∞), we have that limn→∞ d(an, bn) =

d(a, b). Thus, there exists N0 ∈ N such that |d(an, bn) − d(a, b)| < δ/2 =⇒d(an, bn) < d(a, b) + δ/2 < δ/2 + δ/2 = δ for all n > N0, and thusd′(f(an), f(bn)) < ε/3 for all n > N0 since an, bn ∈ A for al n ∈ N andthe statement at the beginning of the proof.

Since f is continuous on (X, d) and thus sends convergent sequence toconvergent sequences, there exists Na ∈ N such that d′(f(an), f(a)) < ε/3

for all n > Na and there exists Nb ∈ N such that d′(f(bn), f(b)) < ε/3 forall n > Nb. Choose N = max{N0, Na, Nb}. Then,

d′(f(a), f(b)) 6 d′(f(a), f(aN )) + d′(f(aN ), f(bN )) + d′(f(bN ), f(b))

Page 72: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

72 KONRAD AGUILAR

< ε/3 + ε/3 + ε/3 = ε,

which completes the proof. �

(4) Show that the norm n : V → [0,∞) of a normed vector space (V, ‖ · ‖) is1-Lipschitz, where n is defined by n(v) = ‖v‖ for all v ∈ V .

(5) In this problem, we will show the process of integration is continuous. InExample 1.4.16, we showed this continuity at the level of a fixed continuousfunction, but in this problem, we will see this at the level of all continuousfunctions. First, we note that (C([a, b],R), d∞) is a metric space since for allf ∈ C([a, b],R), we have that f([a, b]) = [c, d] for some c, d ∈ R, which is abounded set by 371, and thus, in this case C([a, b],R) = Cb([a, b],R).

Let a, b ∈ R, a < b. For f ∈ C([a, b],R), define

Vf : [a, b]→ R,

by Vf (x) =∫ xa f(t) dt for all x ∈ [a, b]. By the Fundamental Theorem of

Calculus and 371, we have that Vf ∈ C([a, b],R).Define the Volterra operator to be the function

V : (C([a, b],R), d∞)→ (C([a, b],R), d∞)

defined by V (f) = Vf for all f ∈ C([a, b],R).

Show that V is |b− a|-Lipschitz and thus continuous.

(6) In this problem, we will give an example of an isometry that has a left inversefor which the left inverse is not an isometry itself.

Fix 1 6 p 6 ∞. Recall `p from Example 1.1.26. Define the right shiftoperator

SR : (`p, dp)→ (`p, dp)

by SR(x0, x1, x2, x3, . . .) = (0, x0, x1, x2, x3, . . .) for all (xn)n∈N ∈ `p.Define the left shift operator

SL : (`p, dp)→ (`p, dp)

by SL(x0, x1, x2, x3, . . .) = (x1, x2, x3, . . .) for all (xn)n∈N ∈ `p.(a) ** (10 points) Show that SR is an isometry that is not surjective, and

SL is not an isometry but is 1-Lipschitz.

Page 73: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 73

Proof. First consider 1 6 p < ∞. Let x = (xn)n∈N, y = (yn)n∈N ∈ `p.Then,

dp(x, y) =

( ∞∑n=0

|xn − yn|p)1/p

= (|x0 − y0|p + |x1 − y1|p + |x2 − y2|p + · · · )1/p

= (|0− 0|p + |x0 − y0|p + |x1 − y1|p + |x2 − y2|p + · · · )1/p

= dp((0, x0, x1, x2, . . .), (0, y0, y1, y2, . . .))

= dp(SR(x), SR(y)).

Thus, SR is an isometry. For p =∞, we have

dp(x, y) = sup{|xn − yn| ∈ R | n ∈ N}

= sup{|xn − yn| ∈ R | n ∈ N}

= sup {{|xn − yn| ∈ R | n ∈ N} ∪ {|0− 0}}

= dp(SR(x), SR(y)).

So SR is an isometry.It is not surjective since the element (1, 0, 0, 0, . . .) ∈ `p is not in theimage of SR regardless of 1 6 p 6∞.Let 1 6 p <∞. Let x = (xn)n∈N, y = (yn)n∈N ∈ `p. Then,

dp(SL(x), SL(y)) =

( ∞∑n=1

|xn − yn|

)1/p

6

( ∞∑n=0

|xn − yn|

)1/p

= dp(x, y).

since the sum is over more terms of the non-negative sequence (|xn −yn|p)n∈N. Thus SL is 1-Lipschitz.If p =∞, then

dp(SL(x), SL(y)) = supn∈N\{0}

|xn − yn|

6 supn∈N|xn − yn|

= dp(x, y).

since {|xn − yn| | n ∈ N \ {0}} ⊆ {|xn − yn| | n ∈ N}. Thus SL is1-Lipschitz.We will show SL is not an isometry by showing it is not injective,which will prove non-isometry regardless of 1 6 p 6 ∞. Consider(1, 0, 0, 0, . . .), (0, 0, 0, 0, . . .) ∈ `p. Note (1, 0, 0, 0, . . .) 6= (0, 0, 0, 0, . . .)

Page 74: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

74 KONRAD AGUILAR

but SL((1, 0, 0, 0, . . .)) = (0, 0, 0, . . .) = SL((0, 0, 0, 0, . . .)). Hence SL isnot injective and could not be an isometry regardless of any metric sinceisometries are injective. �

(b) Show that SL ◦ SR(x) = x for all x ∈ `p.

(7) ** (10 points) Recall ce = {(xn)n∈N ∈ KN | (xn)n∈N is eventually constant},which is metric space with respect to d∞. Consider the subset of ce definedby Z1 = {(xn)n∈N ∈ ce | ∃N ∈ N such that ∀n 6 N, xn = 1, and ∀n >

N, xn = 0}. Then (Z1, d∞) is a metric space and diamd∞(Z1) = 1 <∞. (Z1

is also defined in the proof of Theorem 1.4.28, where we will use the followingfunction and facts).

Define s : (Z1, d∞) → (R, d1) by s(x) =∑∞

n=0 xn, where x = (xn)n∈N ∈Z1, which is well-defined since a fixed element in Z1 has only finitely manynon-zero terms.

Show that s is uniformly continuous and show that s(Z1) is unbounded.Also, show that s is not Lipschitz (showing s is not Lipschitz should be veryshort based on the fact that s(Z1) is unbounded, Z1 is bounded, and a resultin this section.)

Proof. Let ε > 0. Choose δ = 1. Let x = (xn)n∈N, y = (yn)n∈N ∈ Z1 suchthat d∞(x, y) < δ = 1 =⇒ supn∈N |xn − yn| < 1 =⇒ |xn − yn| < 1, ∀n ∈N =⇒ xn = yn, ∀n ∈ N since xn, yn ∈ {0, 1} for all n ∈ N. Hence, x = y

and since s is well-defined by the discussion of the problem, we have thats(x) = s(y) =⇒ |s(x)− s(y)| = 0 < ε. Therefore s is uniformly continuous.

For unbounded image, let n ∈ N\{0}. Define x = (1, . . . , 1, 0, 0, . . .), wherethe last 1 is in the n − 1 coordinate. Thus x ∈ Z1 and s(x) =

∑n−1j=0 1 = n.

Therefore s(Z1) ⊇ N \ {0}, which is an unbounded subset of (R, d1). (It istrue that s(Z1) = N \ {0}, but this does not need to be shown).

For not Lipschitz, if s were Lipschitz, then s(Z1) would be bounded byTheorem 1.4.24 and the fact that diamd∞(Z1) = 1 < ∞ given in the state-ment of the problem, which is a contradiction to the last paragraph. Hences is not Lipschitz. �

(8) Let (X, d) be a metric space. Fix x0 ∈ X. Using notation from Example1.4.29,(a) ** (5 points) Show that fx ∈ Cb(X,R) for all x ∈ X. (We already

showed fx ∈ C(X,R) for all x ∈ X by Example 1.4.29, so your only jobhere is to show bounded.)

Page 75: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 75

Proof. Fix x ∈ X. Note that x, x0 ∈ X are fixed. Let a, b ∈ X. Then

|fx(a)− fx(b)| = |d(x, a)− d(a, x0)− d(x, b) + d(b, x0)|

6 |d(x, a)− d(a, x0)|+ | − d(x, b) + d(b, x0)|

6 d(x, x0) + d(x, x0) = 2 · d(x, x0).

Thus 2 · d(x, x0) is an upper bound of {|fx(a)− fx(b)| | a, b ∈ X}, andso its least upper bound satisfies

diamd1(fx(X)) 6 2 · d(x, x0).

So, fx is bounded. It’s fine if you just showed |fx(a)| 6 d(x, x0) for alla ∈ X. �

(b) ** (10 points) Show that FX : (X, d)→ (Cb(X,R), d∞) is an isometry.

Proof. Let x, y ∈ X. We will first show that d∞(FX(x), FX(y)) 6

d(x, y).Now, d∞(FX(x), FX(y)) = d∞(fx, fy) = supa∈X d1(fx(a), fy(a)) =

supa∈X |fx(a)− fy(a)|.So, let a ∈ X. Then

|fx(a)− fy(a)| = |d(x, a)− d(a, x0)− d(y, a) + d(a, x0)|

= |d(x, a)− d(y, a)|

6 d(x, y).

Thus d(x, y) is an upper bound for {|fx(a)−fy(a)| | a ∈ X}, and hence,its least upper bound satisfies

d(x, y) > supa∈X|fx(a)− fy(a)| = d∞(fx, fy) = d∞(FX(x), FX(y)).

Now, if we show that there exists a ∈ X such that |fx(a) − fy(a)| =

d(x, y), then the upper bound d(x, y) must be the least upper boundsince it is in the set {|fx(a) − fy(a)| | a ∈ X}. Consider a = x ∈ X,then reusing some of the above calculations

|fx(a)− fy(a)| = |fx(x)− fy(x)| = |d(x, x)− d(x, y)| = |0− d(x, y)| = d(x, y).

Therefore d∞(FX(x), FX(y)) = d(x, y) for all x, y ∈ X. �

Page 76: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

76 KONRAD AGUILAR

1.5. Completeness. We have seen the usefulness of Cauchy sequences several timessince every convergent sequence is Cauchy. However, when working with (R, d1) in371, it was the case that Cauchy sequences converge as well. Unfortunately, this isnot the case for every metric space. Here is one of the most basic examples. Considerthe metric space ((0, 1], d1). The sequence

(1

n+1

)n∈N

is in (0, 1] and its Cauchy, but

it can be shown that it does not converge in (0, 1]. Unfortunately, this sequence isCauchy, so we cannot use this technique to show that

(1

n+1

)n∈N

does not converge

in (0, 1]. Here is how you would show this. Fix any r ∈ (0, 1]. Let N ∈ N, there existsN ′ > N such that 1

N ′+1 <r2 = r − r

2 =⇒ r2 < r − 1

N ′+1 =⇒ |r − 1N ′+1 | >

r2 .

So, in this section, we will discuss metric spaces that have this nice property of(R, d1) and show that some of our examples do already have this property and someconsequences of having this property. Also, for metric spaces that may not have thisproperty, we will find a way to embed isometrically any metric space into a spacethat has this property to obtain many benefits from this property. But, first, let’sstate this property clearly.

Definition 1.5.1 (complete metric space). A metric space (X, d) is complete if forevery Cauchy sequence (xn)n∈N in X there exists a ∈ X such that (xn)n∈N convergesto a.

First, we mention a process for showing spaces are complete. First, give yourselfan arbitrary Cauchy sequence. Second, try to construct a guess for the limit. Third,make sure your guess is in the metric space. Fourth, show that the Cauchy sequenceconverges to the limit. Now, let’s apply this process.

Next, we prove a general result about closed subsets of complete metric spaces,which provides a basic setting for displaying this process.

Theorem 1.5.2 (closed in complete). Let (X, d) be a complete metric space. LetA ⊆ X. The following are equivalent:

(1) A is closed in (X, d);(2) (A, d) is a complete metric space.

Proof. ( =⇒ ) Let (an)n∈N be a Cauchy sequence in (A, d). Hence (an)n∈N is aCauchy sequence in (X, d), which is complete, and thus converges and has a limitx ∈ X. Since A is closed in (X, d), we have that x ∈ A. Thus (A, d) is complete.

( ⇐= ) Let (an)n∈N be a sequence in A that converges to x ∈ X. Since (an)n∈N

converges, it is Cauchy. Hence, we have that since (A, d) is complete, the sequence(an)n∈N converges to a limit a ∈ A. Since the same metric is used and limits areunique, we have that x = a ∈ A. Hence A is closed. �

Page 77: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 77

The above theorem provides another way to show that ((0, 1], d1) is not completesince it is a subspace of the complete metric space (R, d1) and (0, 1] is not closed in(R, d1).

Now, we prove that one of our main examples of a metric space is a completemetric space.

Example 1.5.3 ((`p, dp) is complete). For 1 6 p 6∞, the metric space (`p, dp) definedin Example 1.1.26 is complete. It’ll be an exercise to show that case for p =∞, whichis much easier than the case 1 6 p <∞, which we will do now.

Fix 1 6 p <∞. Let (xn)n∈N in (`p, dp) be Cauchy, where for each n ∈ N, we havexn = ((xn)0, (xn)1, . . .) = ((xn)k)k∈N is a sequence in K. By the same argumentof Theorem 1.2.16, we have for each k ∈ N, the sequence ((xn)k)n∈N is Cauchy in(K, d1), which is a complete metric space by 371. Therefore ((xn)k)n∈N has somelimit ak ∈ K. Set a = (a0, a1, a2, . . .) ∈ KN. We will show (xn)n∈N converges to a in(`p, dp), but we first must show that a ∈ `p.

Since Cauchy sequences are bounded, there existsR ∈ R+ such that supk∈N ‖xn‖p <R. Consider 47 > 0. Fix M ∈ N. Since the finite sum of convergent real-valued se-quences converge, we have that there exists N ′ ∈ N such that(

M∑k=0

|ak − (xN ′)k|p)1/p

< 47

since ((xn)k)n∈N converges to ak for k ∈ {0, . . . ,M}.Thus, by Minkowski’s inequality (Theorem 1.1.23), we have(

M∑k=0

|ak|p)1/p

=

(M∑k=0

|(ak − (xN ′)k) + (xN ′)k|p)1/p

6

(M∑k=0

|ak − (xN ′)k|p)1/p

+

(M∑k=0

|(xN ′)k|p)1/p

6 47 + ‖xN ′‖p 6 47 +R.

Hence∑M

k=0 |ak|p 6 (47+R)p. Hence the sequence of partial sums(∑M

k=0 |ak|p)M∈N

is non-decreasing (as M grows more and more non-negative terms are being added)and bounded. Thus, it converges by the monotone convergence theorem. Therefore∑∞

k=0 |ak|p <∞, and thus a ∈ `p.Now, we show convergence to a. Let ε > 0. There exists N ∈ N such that for all

n,m > N , we have

dp(xn, xm) =

( ∞∑k=0

|(xn)k − (xm)k|p)1/p

< ε/4.

Page 78: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

78 KONRAD AGUILAR

Let n > N . Fix M ∈ N. Since finite sum of convergent sequences converge, thereexists N0 > N such that (

M∑k=0

|ak − (xN0)k|p)1/p

< ε/4

since ((xn)k)n∈N converges to ak for k ∈ {0, . . . ,M}.Hence, by Minkowski’s inequality (Theorem 1.1.23), we have(M∑k=0

|ak − (xn)k|p)1/p

=

(M∑k=0

|(ak − (xN0)k) + ((xN0)k − (xn)k)|p)1/p

6

(M∑k=0

|ak − (xN0)k|p)1/p

+

(M∑k=0

|(xN0)k − (xn)k|p)1/p

< ε/4 + dp(xN0 , xn) < ε/4 + ε/4 = ε/2,

Since M ∈ N was arbitrary, we have that the sequence(∑M

k=0 |ak − (xn)k|p)M∈N

is non-decreasing and bounded by (ε/2)p, and thus converges by the monotone con-vergence theorem and its limit

∑∞k=0 |ak − (xn)k|p 6 (ε/2)p. Thus,

dp(a, xn) =

( ∞∑k=0

|ak − (xn)k|p)1/p

6 ε/2 < ε

for all n > N , which completes the proof of completeness.

We saw by the example in the beginning of the section that ((0, 1], d1) is notcomplete, and in particular, the example shows that completeness can depend onjust the set itself since (R, d1) is complete. The following example shows that it canjust depend on the metric as well. However, we do not always have the luxury of anymetric space being a SUBSET of a complete metric space, and thus the method ofTheorem 1.5.2 fails to show non-complete.

Again, we will be showing a space is not complete (C([0, 1],R), d1). To showsomething is not complete, it is not enough to find a Cauchy sequence that convergesto something outside the set. You have to find a Cauchy sequence that does notconverge to anything in your set (no surprises here, this is just the negation of thedefinition of complete). For instance, for (C([0, 1],R), d1), consider the sequence offunctions fn(x) = xn. It can be shown that (fn)n∈N is Cauchy. Also, function

g(x) =

{0 : 0 6 x < 1

1 : x = 1,

satisfies limn→∞∫ 1

0 |fn(x)− g(x)| dx = 0 and g 6∈ C([0, 1],R) since it is not continu-ous. So, one might suspect that this would show that (C([0, 1],R), d1) is not complete.But, (fn)n∈N does in fact converge to a function in (C([0, 1],R), d1). (fn)n∈N canbe shown to converge to the constant 0 function (h(x) = 0), which is continuous.

Page 79: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 79

Thus, the existence of g does not establish that (C([0, 1],R), d1) is not complete. Wenote that this also displays that limits are only guaranteed to be unique within ametric space, and this also shows that d1 fails to be a metric even if one function iscontinuous and the other is Riemann integrable since d1(g, h) = 0 but g 6= h. So, wehave to try harder, which is the next example. To make our work computationallyeasier, we consider (C([0, 2],R), d1).

Example 1.5.4 (integral not complete). We already discussed that (C([0, 2],R), d∞)

is a metric space in (5) of 1.4.1 Exercises, and it will be an exercise to show it iscomplete. However, we will now show that (C([0, 2],R), d1) is not complete.

For each n ∈ N, define fn : [0, 2]→ R by

fn(x) =

0 : if 0 6 x < 1− 1

2n+1

2n+1x+ (1− 2n+1) : if 1− 12n+1 6 x < 1

1 : if 1 6 x 6 2,

which is continuous. (Draw a picture next). This looks like a floor at level 0 and thena ramp of slope 2n+1 and then a floor at level 1. As n increases, the slope is gettingsteeper and steeper and looks like it is "converging" to a step function, which wouldbe discontinuous. "Converging" is in quotes because we won’t be technically using ametric space since the discontinuous function is not our space, but we can still usesome metric properties about d1 on R and facts about Riemann integrable functionsfreely. Before we show "convergence" to this discontinuous function, let’s show oursequence (fn)n∈N is Cauchy in (C([0, 2],R), d1). Let n ∈ N, then

d1(fn, fn+1) =

∫ 2

0|fn(x)− fn+1(x)| dx

=

∫ 2

0fn(x)− fn+1(x)

=

∫ 1− 12n+1

0fn(x)− fn+1(x) dx+

∫ 1− 12n+2

1− 12n+1

fn(x)− fn+1(x) dx

+

∫ 1

1− 12n+2

fn(x)− fn+1(x) dx+

∫ 2

1fn(x)− fn+1(x) dx

= 0 +

∫ 1− 12n+2

1− 12n+1

fn(x) dx+

∫ 1

1− 12n+2

fn(x)− fn+1(x) dx+ 0

= 2−n−4 + 2−n−4 = 2−n−3.

Hence since∑∞

n=0 2−n−3 < ∞, we have that (fn)n∈N is Cauchy by 5(b) of 1.1.3Exercises.

Now, we have to show that (fn)n∈N does not converge to any g ∈ C([0, 2],R).First, we show that

limn→∞

∫ 2

0|fn(x)− f(x)| dx = 0,

Page 80: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

80 KONRAD AGUILAR

where

f(x) =

{0 : if 0 6 x < 1

1 : if 1 6 x 6 2,

and we note that f is discontinuous on [0, 2]. Let n ∈ N.∫ 2

0|fn(x)− f(x)| dx =

∫ 2

0fn(x)− f(x)

=

∫ 1− 12n+1

0fn(x)− fn+1(x) dx+

∫ 1

1− 12n+1

fn(x)− f(x) dx

+

∫ 2

1fn(x)− fn+1(x) dx

= 0 +

∫ 1

1− 12n+1

fn(x) dx

= 0 + 2−n−2 + 0 = 2−n−2,

and thus limn→∞∫ 2

0 |fn(x)−f(x)| dx = 0. Now assume by way of contradiction thatthere exists g ∈ C([0, 2],R) such that limn→∞ d1(fn, g) = 0. Hence, by properties ofthe usual metric on R, we have∫ 2

0|f(x)− g(x)| dx 6

∫ 2

0|f(x)− fn(x)| dx+

∫ 2

0|fn(x)− g(x)| dx

for all n ∈ N, and thus taking limits we have that∫ 2

0 |f(x)− g(x)| dx = 0. However,this does not immediately imply that f − g = 0 and f = g since f − g is notcontinuous. Yet, we do have for all r ∈ (0, 1) that

0 =

∫ 2

0|f(x)− g(x)| dx

=

∫ r

0|f(x)− g(x)| dx+

∫ 1

r|f(x)− g(x)| dx+

∫ 2

1|f(x)− g(x)| dx.

Hence, as all the terms are non-negative, we have that∫ r

0 |f(x)−g(x)| dx =∫ 1r |f(x)−

g(x)| =∫ 2

1 |f(x) − g(x)| dx = 0. Since f is continuous on [0, r) and [1, 2] we havethat g = f on these intervals. Hence, if t ∈ [0, 1), then f = g on [0, 1+t

2 ), since1+t

2 < 1. Since t < 1+t2 , we have that [0, t] ⊂ [0, 1+t

2 ). Thus g = f on [0, 1+t2 ) implies

g(t) = f(t). Thus g = f on [0, 1) and g = f on [1, 2]. Hence, we have that g = f onall of [0, 2], which implies that g is discontinuous, a contradiction.

Therefore, (fn)n∈N does not converge in (C([0, 2],R), d1) and so (C([0, 2],R), d1)

is not complete.

One can use similar arguments to show that (C([a, b],R), dp) is not complete forall a, b ∈ R, a < b, 1 6 p < ∞. But, we had other function spaces with dp-typemetrics that do turn out to be complete, which will be the following example.

So, what failed in the C([0, 2],R) with d1 example versus the previous example?Well, the issues appear immediately in that convergence in d1 on C([0, 2],R) creates

Page 81: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 81

candidates for limits that don’t have to be in the set (a discontinuous function),which was a main part of our argument.

It is terrible when a metric space is not complete since it provides such a convenientway to establish convergence. However, we will end this section by showing that anymetric space is "contained" in a complete metric space in a "unique" way. First, weneed to prove some more results about complete metric spaces.

Theorem 1.5.5 (Occasional completeness of Cb(X,Y ).). Let (X, d) be a metricspace. (Y, d′) is a complete metric space if and only if (Cb(X,Y ), d∞) is a completemetric space.

Proof. Exercise. �

It will also be shown in exercises that (Y, d′) is a complete metric space if and only if(UCb(X,Y ), d∞) is a complete metric space. However, there are examples for which(Lb(X,Y ), d∞) fails to be complete even if (Y, d′) is complete, and although thiscan be shown directly, we will show this as an application of the Stone-WeierstrassTheorem (that theorem about continuous functions being limits of polynomials).Yet, we will see that the non-completeness of (Lb(X,Y ), d∞) is for a good cause bythe Stone-Weierstrass Theorem.

Let’s first define what we mean by this "bigger" complete metric space.

Definition 1.5.6 (completion). Let (X, d) be a metric space. (Y, d′) is a completionof (X, d) if (Y, d′) is complete and there exists and isometry F : (X, d)→ (Y, d′) suchthat F (X) is dense in (Y, d′).

What this above definition says is that there exists an isometric copy of (X, d)

living inside a complete metric space. Thus, all the metric information of (X, d)

can be recovered in a complete metric space by way of an isometry, the greatest ofcontinuous maps with respect to metric spaces.

Here are some basic examples of completions.

Example 1.5.7 (some completions). (1) Let (X, d) be a complete metric space.Then (X, d) is a completion of (X, d) with isometry F : (X, d) → (X, d)

defined by F (x) = x for all x ∈ X.(2) Let (Y, d′) be a complete metric space and let X ⊆ Y be dense in Y . Then

(Y, d′) is a completion of (X, d′) with isometry ι : (X, d′) → (Y, d′) given byι(x) = x for all x ∈ X.

In particular, (R, d1) is a completion of (Q, d1).

Now, let’s show that any metric space has a completion, which comes from anisometry covered in the previous section.

Page 82: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

82 KONRAD AGUILAR

Theorem 1.5.8 (completion existence). If (X, d) is a metric space, then (X, d) hasa completion. In particular, using notation from Example 1.4.29, a completion is(FX(X), d∞

)with isometry FX : (X, d)→

(FX(X), d∞

).

Proof. We already showed that FX is an isometry in Exercises 1.4.1. Since (Cb(X,R), d∞)

is complete by Theorem 1.5.5, we have that(FX(X), d∞

)is a complete metric space

by Theorem 1.5.2 since the set FX(X) is closed. �

It would be annoying to have to deal with multiple completions or to have to ac-knowledge multiple completions. It turns out that there can be mutliple completions,but that they are all in isometric bijection to each other. So, they are unique up toisometric bijection.

We first need the following result.

Theorem 1.5.9 (extending isometries). Let (Y, d′) and (Z, d′′) be metric spaces.

(1) If (Z, d′′) is complete, X ⊆ Y is dense, and f : (X, d′) → (Z, d′′) is anisometry, then there exists a unique function f : (Y, d′) → (Z, d′′) such thatf is an isometry and f restricted to X is f , called the isometric extension.

(2) If (Y, d′) is complete and g : (Y, d′) → (Z, d′′) is an isometry, then g(Y ) isclosed and if g(Y ) is dense then g is surjective.

Furthermore, both of the above statements hold with every "isometry" replaced with"bi-Lipschitz."

Proof. (1) Let y ∈ Y . SinceX is dense in Y , there exists (xn)n∈N inX that convergesto y. Hence, (xn)n∈N is Cauchy since it converges (recall that this does not requirecompleteness), and thus (f(xn))n∈N is Cauchy since isometries are uniformly contin-uous. Since (Z, d′′) is complete, there exists z ∈ Z such that (f(xn))n∈N convergesto. Set f(y) = z. Now, we have a relation from Y to Z. Let’s show it is a function. Leta, b ∈ Y . Let (an)n∈N, (bn)n∈N in X converging to a, b. As above, by uniform conti-nuity on X and completeness, let f(a), f(b) be the limits of (f(an))n∈N, (f(bn))n∈N,respectively. Since the metric is continuous and f is an isometry on X, we have

(1.1) d′(a, b) = limn→∞

d′(an, bn) = limn→∞

d′′(f(an), f(bn)) = d′′(f(a), f(b)).

Thus, if a = b, then f(a) = f(b). Thus, f is well-defined. In particular, we also showedthat for any a ∈ Y and any sequence (an)n∈N in X converging to a, we have that(f(an))n∈N converges to f(a). Hence, note that if x ∈ X, then the constant sequence(x)n∈N is a sequence in X converging to x. Hence, (f(x))n∈N converges to f(x), butalso (f(x))n∈N converges to f(x). Hence, by unique limits, we have f(x) = f(x).

Thus f restricted to X is f . Furthermore, the same argument of Equation 1.1, showsthat that f is an isometry on all of (Y, d′).

Page 83: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 83

For uniqueness, if there existed an isometry g : (Y, d′)→ (Z, d′′) whose restrictionto X if f , then f would agree with g on the dense set X, and hence would agree onall of Y by 1.3.1 Exercises. Hence f is the unique extension.

(2) Exercise.The remaining comment about bi-Lipschitz can be proven similarly with some

care, but make sure to check this. �

Theorem 1.5.10 (completion uniqueness). Let (X, d) be a metric space. If (Y, d′)

and (Z, d′′) are two completions of (X, d), then there exists a surjective isometry from(Y, d′) onto (Z, d′′).

Proof. By definition of completion, let fY : (X, d)→ (Y, d′) and fZ : (X, d)→ (Z, d′′)

be isometries such that fY (X) is dense in Y and fZ(X) is dense in Z. Note thatfY : X → fY (X) is a bijection by isometry and definition of image. Thus, the mapf−1 : fY (X) → X exists. Hence, we may define g : (fY (X), d′) → (fZ(X), d′′) byg = fZ ◦ f−1

Y . Let c, d ∈ fY (X). Since the inverse of an isometry is an isometryby Theorem 1.4.26 and fZ is an isometry, we have d′(c, d) = d(f−1

Y (c), f−1Y (d)) =

d′′(fZ(f−1Y (c)), fZ(f−1

Y (d))) = d′′(g(c), g(d)) (note that this is the proof that com-position of isometries are isometries, and one can use a similar proof to show thatcomposition of bi-Lipschitz maps are bi-Lipschitz). Therefore g is an isometry. Wealso note that g is a function with codomain (Z, d′′), which is complete. Thus, byTheorem 1.5.9, let g : (Y, d′) → (Z, d′′) be the isometric extension of g to Y sincefY (X) is dense in Y and (Z, d′′) is complete. Now, since fY and fZ are bijectionswith respect to their ranges, we have

fZ(X) = fZ(f−1Y (fY (X)) = g(fY (X)) = g(fY (X)) ⊆ g(Y ).

Hence Z = fZ(X) ⊆ g(Y ) ⊆ Z. Thus g(Y ) is dense in Z. Therefore, by Theorem1.5.9, we have that g : (Y, d′)→ (Z, d′′) is a surjective isometry. �

So, the completion of (C([a, b],R), dp) for 1 6 p <∞ exists and finding an explicitdescription of it, is a main topic MAT 473. The motivation for describing sucha completion lies in the fact that it would be great to be able to do analysis onintegrable functions (since we will also show that integrable functions exist in thiscompletion in an appropriate) and not just continuous functions since integrablefunctions have many applications themselves. The completion of metric spaces hasmany more applications that will appear in 473. However, this will require us todevelop a new theory of integration far better than Riemann integration.

Page 84: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

84 KONRAD AGUILAR

1.5.1. Exercises.

(1) ** (10 points) Prove (2) of Theorem 1.5.9.

Proof. Let (zn)n∈N be a sequence in g(Y ) such that (zn)n∈N converges to z ∈Z. Set zn = g(yn), where yn ∈ Y for all n ∈ N by definition of image. Since(zn)n∈N converges, we have that (zn)n∈N is Cauchy (recall that this does notrequire completeness). Now, we will show that (yn)n∈N is Cauchy. Let ε > 0.There exists N ∈ N such that d′′(zn, zm) < ε for all n,m > N . Let n,m > N ,then d′(yn, ym) = d′′(g(yn), g(ym)) = d′′(zn, zm) < ε since g is an isometry.Thus (yn)n∈N is Cauchy. Since (Y, d′) is complete, we have that (yn)n∈N

converges to some y ∈ Y . Thus, since g is continuous, we have (g(yn))n∈N

converges to g(y). Since limits are unique and (g(yn))n∈N = (zn)n∈N alsoconverges to z, we have g(y) = z, and thus z ∈ g(Y ). Hence g(Y ) is closed.If g(Y ) is dense, then Z = g(Y ) = g(Y ), and thus g is surjective. �

(2) Let X be a non-empty set and let (Y, d′) be a metric space.(a) ** (15 points) Show that (B(X,Y ), d∞) is complete if and only if (Y, d′)

is complete. Thus, letting X = N and (Y, d′) = (K, d1), which is com-plete, explain why this shows that (`∞, d∞) is complete, which finishesExample 1.5.3. Next, show that if (X, d) is a metric space, then Cb(X,Y )

is closed in (B(X,Y ), d∞), and use this to show that (Cb(X,Y ), d∞)

is complete if and only if (Y, d′) is complete. Hence, with (X, d) =

([a, b], d1) and (Y, d′) = (R, d1), we have that (C([a, b],R), d∞) is com-plete even though (C([a, b],R), dp) is not complete for all 1 6 p < ∞by Example 1.5.4. (Note that the forward direction of both "if and onlyif"s should be the same proof.)

Proof. We begin by showing "(B(X,Y ), d∞) is complete if and only if(Y, d′) is complete." First ( =⇒ ). Let (yn)n∈N be a Cauchy sequencein (Y, d′). Let n ∈ N. Define fn : X → Y by fn(x) = yn for all x ∈X. fn is constant and thus bounded, so fn ∈ B(X,Y ). We will nowshow (fn)n∈N is Cauchy in (B(X,Y ), d∞). Let ε > 0. There exists N ∈N such that d′(yn, ym) < ε. Let n,m > N . We have d∞(fn, fm) =

supx∈X d′(fn(x), fm(x)) = supx∈X d′(yn, ym) < ε. Since (B(X,Y ), d∞)

is complete, we have that (fn)n∈N converges to some f ∈ B(X,Y ) withrespect to d∞. Pick your favorite element of X, mine is α ∈ X. Note thatf(α) ∈ Y . We will show (yn)n∈N converges to f(α) ∈ Y with respect tod′. Let ε >. There exists M ∈ N such that d∞(fn, f) < ε for all n >M .Let n >M. Then d′(yn, f(α)) = d′(fn(α), f(α)) 6 d∞(fn, f) < ε. Hence(Y, d′) is complete.

Page 85: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 85

Now ( ⇐= ). Let (fn)n∈N be a Cauchy sequence in (B(X,Y ), d∞).First, we build our guess for the limit of (fn)n∈N. Let a ∈ X. Then(fn(a))n∈N is a sequence in Y . Let ε >. Since (fn)n∈N is Cauchy, thereexists N ∈ N such that d∞(fn, fm) < ε for all n,m > N . Let n,m > N .Then d′(fn(a), fm(a)) 6 d∞(fn, fm) < ε. Thus (fn(a))n∈N is Cauchy in(Y, d′). Since (Y, d′) is complete, denote its limit by ya ∈ Y . Now, for eacha ∈ X, define f(a) = ya. It is easily checked that f : a ∈ X 7→ ya ∈ Yis well-defined. Therefore, f : X → Y is a function.Now, we show our guess f is an element of B(X,Y ). Since (fn)n∈N isCauchy, it is bounded, so there existsK > 0 such that supn,m∈N d∞(fn, fm) =

K. Consider 4 ∈ N and 25 > 0 (these are randomly chosen numbers andhave no dependence on anything). Note that f4 ∈ B(X,Y ) and thusdiamd′(f4(X)) < ∞. Now, let a, b ∈ X. By definition of f , there ex-ists Na ∈ N such that d′(fn(a), f(a)) < 25, and Nb ∈ N such thatd′(fn(b), f(b)) < 25 for all n > Nb. Consider N = max{Na, Nb}. Thus,

d′(f(a), f(b)) 6 d′(fN (a), f(a)) + d′(fN (a), fN (b)) + d′(fN (b), f(b))

< 50 + d′(fN (a), fN (b))

6 50 + d′(f4(a), fN (a)) + d′(f4(a), f4(b)) + d′(f4(b), fN (b))

6 50 + d∞(f4, fN ) + d′(f4(a), f4(b)) + d∞(f4, fN )

6 50 + 2K + diamd′(f4(X)).

The term β = 50 + 2K + diamd′(f4(X)) and has no dependence on a

nor b. Thus β < ∞ is an upper bound of {d′(f(a), f(b)) | a, b ∈ X},and its least upper bound satisfies diamd′(f(X)) 6 β < ∞. Thereforef ∈ B(X,Y ).Finally, we show (fn)n∈N converges to f ∈ B(X,Y ) with respect tod∞. Let ε > 0. Since (fn)n∈N is Cauchy, there exists P ∈ N such thatd∞(fn, fm) < ε/3 for all n,m > P . Let n > P . Let a ∈ X. By definitionof f , there exists N0 > P such that d′(fN0(a), f(a)) < ε/3. Now,

d′(fn(a), f(a)) 6 d′(fN0(a), fn(a)) + d′(fN0(a), f(a))

6 d∞(fN0 , fn) + d′(fN0(a), f(a))

< ε/3 + ε/3 = 2ε/3.

The term 2ε/3 has no dependence on a (if you are not convinced, thenlet b ∈ X and see that you still get d′(fn(b), f(b)) < 2ε/3 for the samen > P .) Thus 2ε/3 is an upper bound of {d′(fn(a), f(a)) | a ∈ X}, andits least upper bound satisfies d∞(fn, f) 6 2ε/3 < ε. Hence (fn)n∈N

converges to f with respect to d∞ and the proof is complete.

Page 86: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

86 KONRAD AGUILAR

Note `∞ = {(xn)n∈N ∈ KN | supn∈N |xn| < ∞} = {f : N → K |diamd1(f(N)) < ∞} = B(N,K), and since (K, d1) is complete by 371,we have that (`∞, d∞) = (B(N,K), d∞) is complete by the previousresult.Now, we show Cb(X,Y ) is closed in (B(X,Y ), d∞) given that (X, d)

is now a metric space. Let (fn)n∈N be a sequence in Cb(X,Y ) thatconverges to some f ∈ B(X,Y ) with respect to d∞. All we need to showis that f is continuous on X. Let a ∈ X. Let ε > 0. By convergencein d∞, there exists N ∈ N such that d∞(fN , f) < ε/3. Since fN iscontinuous, there exists δ > 0 such that d′(f(x), f(a)) < ε/3 if d(x, a) <

δ. Let x ∈ X such that d(x, a) < δ. Then

d′(f(x), f(a)) 6 d′(fN (x), f(x)) + d′(fN (x), fN (a)) + d′(fN (a), f(a))

6 d′(fN , f) + d′(fN (x), fN (a)) + d′(fN , f)

< ε/3 + ε/3 + ε/3 = ε.

Thus, f is continuous at a, and thus on X as a was arbitrary.Finally, we show "(Cb(X,Y ), d∞) is complete if and only if (Y, d′) iscomplete." For the forward direction, the proof is the same as abovesince the functions fn created in the above proof were constant andthus continuous. For the backward direction, if (Y, d′) is complete, then(B(X,Y ), d∞) by the above result. Since Cb(X,Y ) is closed in (B(X,Y ), d∞),we have that (C(X,Y ), d∞) is complete by Theorem 1.5.2. �

(b) Show that if (X, d) is a metric space, then UCb(X,Y ) is closed in(Cb(X,Y ), d∞), and use this and part (a) to show that (UCb(X,Y ), d∞)

is complete if and only if (Y, d′) is complete. (Note that the forward di-rection of this "if and only if" should be the same proof as the forwarddirection of both "if and only if"s of part (a).)

(3) Let (X, d) and (Y, d′) be metric spaces. If (X, d) and (Y, d′) are equivalent (seeDefinition 1.4.20), then (X, d) is complete if and only if (Y, d′) is complete.

(4) We have already seen that it is easy to come up with homeomorphismsbetween a space of finite diameter and a space of infinite diameter, and thusthese spaces cannot be equivalent. But, it’s a little more difficult to come upwith homeomorphic but not equivalent spaces that have the same diamter.The Baire space and (0, 1) \Q serve this purpose since one is complete andthe other isn’t. So, all we have to do is show that the Baire space is completesince ((0, 1) \Q, d1) is not complete by the sequence (π/(n+ 6))n∈N and the

Page 87: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 87

same argument that the beginning of the section for why ((0, 1), d1) is notcomplete.

Show that the space (N , dB) from the end of Section 1.3 is complete (recallthat N was just the subset of NN of positive integer valued sequences) anduse this to show that (N , dB) and ((0, 1)\Q, d1) cannot be equivalent by theprevious exercise.

(5) Here is a fascinating equivalence for being a complete metric space that wewill use later. Let (X, d) be a metric space.(a) Let F0 ⊇ F1 ⊇ F2 ⊇ · · · be a family of non-empty subsets of X. Show

that if limn→∞ diam(Fn) = 0 and ∩n∈NFn 6= ∅, then there exists a ∈ Xsuch that ∩n∈NFn = {a}.

(b) ** (10 points) Show that the following are equivalent:• (X, d) is complete;• for every family of non-empty closed subsets F0, F1, F2, . . . of Xsuch that F0 ⊇ F1 ⊇ F2 ⊇ · · · and limn→∞ diam(Fn) = 0, it holdsthat ∩n∈NFn = {a} for some a ∈ X.

(Hint: for the reverse direction, given a Cauchy sequence (xn)n∈N, foreach N ∈ N, define FN = {xk ∈ X | k > N}. Note that each FN isclosed (it’s just the closure of a set) and F0 ⊇ F1 ⊇ · · · . Continue fromhere. For the forward direction, assume such a family of sets is given.Since each set is non-empty, let xn ∈ Fn. Show that (xn)n∈N is Cauchyand then shows its limit a, which exists by completeness, is an elementof the intersection, thenpart (a) finishes the proof.)

Proof. ( =⇒ ) Let F0, F1, F2, . . . be a family of non-empty closed subsetsof X such that F0 ⊇ F1 ⊇ F2 ⊇ · · · and limn→∞ diam(Fn) = 0.Since each set is non-empty, pick xn ∈ Fn for each n ∈ N. Let ε > 0.Since limn→∞ diam(Fn) = 0, there existsN ∈ N such that diam(Fn) < ε

for all n > N . Let n,m > N , then xn ∈ Fn ⊆ FN and xm ∈ Fm ⊆ FN

and thus

d(xn, xm) 6 diam(FN ) < ε

by definition of diameter.Therefore (xn)n∈N is Cauchy and since (X, d) is complete, we have that(xn)n∈N converges to some a ∈ X. Now, let k ∈ N. The sequence(xn+k)k∈N is a sequence in Fk and is a subsequence of (xn)n∈N. Hence(xn+k)k∈N converges to a ∈ X. Since Fk is closed, we have that a ∈ Fk.Since k ∈ N was arbitrary, we have that a ∈ ∩n∈NFn. Thus ∩n∈NFn 6= ∅.Therefore, by part (a), we have that ∩n∈NFn 6= {a}.

Page 88: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

88 KONRAD AGUILAR

( ⇐= ) Let (xn)n∈N be a Cauchy sequence in (X, d). For each N ∈ N,define FN = {xk ∈ X | k > N}. Note that each FN is closed since it’sjust the closure of a set and F0 ⊇ F1 ⊇ · · · . Now, we check the diametercondition.Let ε > 0. By Cauchy, there exists N ∈ N such that d(xn, xm) < ε/4 forall n,m > N . Let n > N and let a, b ∈ Fn. Then, by closure, there existsxj , xl ∈ {xk ∈ X | k > n} such that d(a, xj) < ε/4 and d(b, xl) < ε/4.Hence since j, l > n > N , we have

d(a, b) < d(a, xj) + d(xj , xl) + d(xl, b) < ε/4 + ε/4 + ε/4 = 3ε/4.

Since a, b ∈ Fn were arbitrary, we have diam(Fn) = supa,b∈Fn d(a, b) 6

3ε/4 < ε, which established convergence to 0.Thus, by assumption, there exists a ∈ X such that ∩n∈NFn = {a}. Letε > 0. There exists N ∈ N such that diam(Fn) < ε for all n > N. Letn > N . Then xn, a ∈ Fn and thus

d(xn, a) 6 diam(Fn) < ε,

which completes the proof. �

(6) Here is another fascinating equivalence for being a complete metric space,which shows that closed balls get the job done in the previous exercise. Onedirection of this is surprisingly more difficult than the same direction in theprevious exercise since the sets given in the hint of the previous exercise neednot be equal to closed balls.

Let (X, d) be a metric space. Show that the following are equivalent:• (X, d) is complete;• for every family of non-empty closed balls F0, F1, F2, . . . of X such thatF0 ⊇ F1 ⊇ F2 ⊇ · · · and limn→∞ diam(Fn) = 0, it holds that ∩n∈NFn =

{a} for some a ∈ X.

(7) Let (X, d) be a metric space. Let A ⊆ X be dense. If every Cauchy sequencein A converges to an element in X, then (X, d) is complete.

(8) Let N ∈ N and let (Xj , dj) be a metric space for each j ∈ {0, . . . , N}.Consider the metric d∞ on X =

∏Nj=0Xj .

(a) Show that (xn)n∈N in (X, d∞) is Cauchy if and only if ((xn)k)n∈N isCauchy for each k ∈ {0, . . . , N}. (Recall for each n ∈ N, the notationxn = ((xn)0, (xn)1, . . . , (xn)k, . . . , (xn)N ).

(b) ** (10 points) Use part (a) to show that (Xk, dk) is complete for eachk ∈ {0, . . . , N} if and only if (X, d∞) is complete.

Page 89: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 89

Proof. ( =⇒ ) Let (xn)n∈N be Cauchy in (X, d∞). Denote xn = ((xn)0, . . . , (xn)N ).By part (a), we have that ((xn)k)n∈N is Cauchy in (Xk, dk) for eachk ∈ {0, . . . , N}. Thus, by assumption we have that ((xn)k)n∈N con-verges in (Xk, dk) to some ak ∈ Xk for each k ∈ {0, . . . , N}. Thus, sinced∞ is a topological product metric, we have that (xn)n∈N converges in(X, d∞) to a = (a0, . . . , aN ) ∈ X.( ⇐= ) Let k ∈ {0, . . . , N}. Let ((xn)k)n∈N be a Cauchy sequence in(Xk, dk). Now, for each l ∈ {0, . . . , N} \ {k}, pick zl ∈ Xl. For eachn ∈ N, define xn ∈ X, where (xn)l = zl if l ∈ {0, . . . , N} \ {k} and(xn)l = (xn)k if k = l. Now, for each l ∈ {0, . . . , N} \ {k}, we have that((xn)l)n∈N is a constant sequence in (Xl, dl), which is Cauchy. Thus, forevery l ∈ {0, . . . , N}, we have that ((xn)l)n∈N is Cauchy. Therefore, bypart (a), we have that (xn)n∈N is Cauchy in (X, d∞). Hence (xn)n∈N

converges in (X, d∞) to some a = (a0, . . . , aN ) ∈ X. Thus, by topologicalproduct metric, we have that ((xn)k)n∈N converges in (Xk, dk) to ak ∈Xk. �

(9) Let n ∈ N \ {0}. Assume K = R or C. Let 1 6 p 6 ∞. Show that (Kn, dp)

is complete. (Hint: this follows a similar process as Exercise (7), and in fact,the case p = ∞ is taken care of by Exercise (7)(why?), but this does notimply the case 1 6 p <∞, and this case should be done separately.)

(10) Let X be a non-empty set. Show that the metric space (X, ddisc) is complete.

Page 90: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

90 KONRAD AGUILAR

1.6. Compactness. The notion of a compact set is to provide a notion of a "small"set in a metric sense. Of course, finite sets are "small", but they are quite uninterest-ing in a metric set since the only metrics on a finite set are topologically equivalentto a discrete metric. So, the pursuit of a compact set is to be small without beingtrivial (note that finite sets will still be compact, bu the idea is to look for moreinteresting compact sets). In 371, we had some non-trivial compact sets in the formof closed bounded intervals [a, b], and we saw that the basics of analysis on (R, d1)

could be broken down into results about [a, b] or (a, b), which are not compact butsomething called totally bounded which is "almost compact." Thus, although thesesets were small, they still were very useful, and it makes sense to search such an ideaof "small" for general metric spaces (X, d).

Now, our introduction of a metric was to find a correct notion of convergence, sowe would like to introduce compactness as a small set with respect to convergence.This requires the following definition.

Definition 1.6.1 (subsequence). Let X be a non-empty set. Let (xn)n∈N be asequence in V . Let (nk)k∈N ∈ NN be an (strictly) increasing sequence in N. That isn0 < n1 < n2 < · · · and thus nk > k for all k ∈ N. For each k ∈ N, define ak = xnk .The sequence (ak)k∈N = (xnk)k∈N in X is called a subsequence of (xn)n∈N.

Note that any sequence is a subsequence of itself by taking nk = k for all k ∈ N.And note that (x2, x2, x4, x5, x7, . . .) is not a subsequence since n0 = 2 > 2 = n1. Itis still a sequence, just not a subsequence of (xn)n∈N. Also, (x2, x0, x4, x5, x7, . . .) isnot a subsequence of (xn)n∈N.

Here are some facts about subsequences before we jump to compactness.

Theorem 1.6.2 (subsequences and convergence). Let (X, d) be a metric space. Let(xn)n∈N be a sequence in X and a ∈ X.

(1) (xn)n∈N converges to a if and only if every subsequence of (xn)n∈N convergesto a.

(2) (xn)n∈N is Cauchy if and only if every subsequence of (xn)n∈N is Cauchy.(3) If (xn)n∈N is Cauchy and (xn)n∈N has a convergent subsequence, then (xn)n∈N

converges to the same limit as the convergent subsequence.

Proof. (1)( =⇒ ) Let (xnk)k∈N be a subsequence of (xn)n∈N. Let ε > 0. There existsN ∈ N such that d(xn, a) < ε for all n > N . By definition of subsequence, we havenN > N and nk > nN > N for all k > N . Hence if k > N , then nk > N and so

d(xnk , a) < ε.

Page 91: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 91

( ⇐= ) If every subsequence converges to a, then the subsequence defined bynk = k for all k ∈ N, which is (xk)k∈N = (xnk)k∈N converges to a by assumption,which is simply the original sequence.

(2) The proof of this follows the same process as the proof of (1).(3) Let (xnk)k∈N be the given convergent subsequence that converges to some

a ∈ X. Let ε > 0. There exists N1 ∈ N such that d(xn, xm) < ε/2 for all n,m >N1. There exists N2 ∈ N such that d(xnk , a) < ε/2 for all k > N2. Choose N =

max{N1, N2}. Let k > N then nk > k > N and thus

d(xk, a) 6 d(xk, xnk) + d(xnk , a) < ε/2 + ε/2 = ε,

which completes the proof. �

Now, we introduce the definition of compactness. The idea is to be small withrespect to convergence, so one could require a set A to be compact if every sequencein A converged to an element in A, so that A is so "small" that the sequence mustbe squeezed to a limit and that limit must be in the set. But it turns out that this istoo restrictive. Indeed, even a two element set {x0, x1} would fail to be compact inthis definition since (x0, x1, x0, x1, x0, x1, . . .) is a sequence in {x0, x1} that does notconverge in any metric since it is not Cauchy (choose ε = d(x0, x1)/2 > 0). However,this sequence has a convergent subsequence. So, we loosen this somewhat to definecompactness as...

Definition 1.6.3 (compact). Let (X, d) be a metric space. A subset A ⊆ X iscompact if every sequence in A has a convergent subsequence that converges to anelement in A.

We call (X, d) a compact metric space if X ⊆ X is compact.

First, we check that the definition of compact metric space isn’t ambiguous.

Theorem 1.6.4 (compactness and subspace). Let (X, d) be a metric space. LetA ⊆ X. The following are equivalent:

(1) A is compact in (X, d);(2) A is compact in (A, d) [That is, (A, d) is a compact metric space].

Proof. (1) =⇒ (2) Let (xn)n∈N be a sequence in A ⊆ X. Since A is compactin (X, d), there exists a subsequence (xnk)k∈N that converges to a ∈ A. Thus A iscompact in (A, d).

(2) =⇒ (1) Let (xn)n∈N be a sequence in A. Since A is compact in (A, d), thereexists a subsequence (xnk)k∈N that converges to some a ∈ A with respect to d. Butsince X has the same metric, the proof is complete. �

Here are some basic compact sets that exist in any metric space.

Page 92: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

92 KONRAD AGUILAR

Theorem 1.6.5 (always compact). Let (X, d) be a metric space. ∅ ( X is compactand any finite subset A ⊆ X is compact. In particular, singletons are compact.

Proof. ∅ is vacuously compact. Let A ⊆ X be finite. Let (xn)n∈N be a sequence in A.By the pigeon-hole principle, there exists a ∈ A an infinite subset P ⊆ N such thatxn = a for all n ∈ P . Order P = {n0, n1, n2, . . .}, where n0 < n1 < n2 < n3 . . . bythe well-ordering principle. Hence (xnk)k∈N is a convergent subsequence of (xn)n∈N

that converges to a ∈ A. Thus A is compact. �

Now, we prove a familiar relationship with compact sets and continuous functions,which makes sense since continuous functions preserve convergence of sequences.

Theorem 1.6.6 (continuity and compactness). Let (X, d), (Y, d′) be metric spacesand let f : (X, d) → (Y, d′) be a continuous function. If A ⊆ X is compact, thenf(A) is compact.

Proof. Let (yn)n∈N be a sequence in f(A). Set yn = f(an) for some an ∈ A forall n ∈ N by definition of image. Since A is compact, the sequence (an)n∈N hasa convergent subsequence (ank)k∈N that converges to some a ∈ A. By continuity,(ynk)k∈N = (f(ank))k∈N converges to f(a) ∈ f(A). Hence f(A) is compact. �

Another useful property is that finite product of compact metric spaces with anytopological product metric is compact. Indeed:

Theorem 1.6.7 (finite product of compact). Let N ∈ N and let (Xj , dj) be a metricspace for each j ∈ {0, . . . , N}. Let d be a topological product metric on X =

∏Nj=0Xj.

If Aj ⊆ Xj is compact for each j ∈ {0, . . . , N}, then∏Nj=0Aj is compact in (X, d).

Proof. Let (xn)n∈N be a sequence in A =∏Nj=0Aj . Thus for each j ∈ {0, . . . , N},

((xn)j)n∈N is a sequence in Aj . Consider j = 0. Thus, ((xn)0)n∈N has a conver-gent subsequence ((xnk)0)k∈N that converges to some a0 ∈ A0. Now, for j = 1,((xnk)1)k∈N is a sequence in A1, and has a convergent subsequence ((xnkl)1)l∈N

that converges to some a1 ∈ A1. Now, note that ((xnkl)0)l∈N is a subsequence of((xnk)0)k∈N and by Theorem 1.6.2, we have ((xnkl)0)l∈N converges to a0.

Hence ((xnkl)0)l∈N converges to a0 ∈ A0 and ((xnkl)1)l∈N that converges toa1 ∈ A1. If N = 1, the proof would be complete since (xnkl)l∈N would convergeto (a0, a1) ∈ A by definition of product metric and since a subsequence of a subse-quence is a subsequence of the original sequence by definition. For arbitrary N ∈ N,the proof is complete by induction. �

Unfortunately, the following isn’t an equivalence like in 371, but still establishesthat our general notion of compactness still recovers some classical structure, and

Page 93: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 93

we will see after the proof why we would not want the following to be an equivalencein this generality.

Theorem 1.6.8 (compact implies closed and bounded). Let (X, d) be a metric space.If A ⊆ X is compact, then A is closed and bounded.

Proof. Let (xn) be a sequence in A that converges to a ∈ X. Since A is compact, wehave that (xn)n∈N has a convergent subsequence (xnk)k∈N that converges to b ∈ A.But, by Theorem 1.6.2, we have b = a ∈ A.

By Theorem 1.6.7, we have that A×A is compact in (X×X, d∞). Since the metricis continuous on (X×X, d∞), we have that d(A×A) is compact in (R, d1) by Theorem1.6.6. Thus d(A × A) = {d(a, b) ∈ R | (a, b) ∈ A × A} = {d(a, b) ∈ R | a, b ∈ A} isbounded by 371. Hence, it’s supremum is finite, and so ∞ > sup{d(a, b) ∈ R | a, b ∈A} = diam(A). �

Example 1.6.9 (Heine-Borel fails). (1) LetX be a non-empty set. Consider (X, ddisc).A ⊆ X is compact if and only if A is finite.

Proof. Exercise. �

Thus R is closed and bounded in (R, ddisc) but is not compact since itis infinite. This also displays that closed balls need not be compact sinceB(R,ddisc)(x; 1) = R for all x ∈ R.

Furthemore, note that if we allowed for "closed and bounded" to meancompact, then continuous functions would fail to preserve compactness sincef : x ∈ (R, ddisc) 7→ x ∈ (R, d1) is continuous and sends the closed andbounded set R to f(R) = R which is not bounded by 371 which is notcompact, and we certainly would not want to lose preservation of compactnessby continuous functions.

(2) The Baire space (N , dB) is not compact since if it were then ((0, 1) \Q, d1)

would be compact since there is a continuous map from (N , dB) onto ((0, 1)\Q, d1), which would be a contradiction since ((0, 1) \ Q, d1) is not compactby 371 as it is not closed. However, (N , dB) is closed and bounded. Thus, itis good that we did not define compactness in general to be the closed andbounded sets of a metric space.

We can also show.

Theorem 1.6.10 (closed subset of compact is compact). If B ⊆ A is closed in(X, d) and A is compact, then B is compact.

Proof. Let (xn)n∈N be a sequence in B. Since B ⊆ A and A is compact, thereexists a subsequence (xnk)k∈N that converges to some a ∈ A. However, (xnk)k∈N is

Page 94: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

94 KONRAD AGUILAR

a sequence in B that converges and since B is closed, we have that a ∈ B. ThereforeB is compact. �

This sequential version of compactness has gotten us pretty far, but in orderto prove other facts about compactness, we require a more topological version ofcompactness. Our first goal is to better understand why closed and bounded failsto capture compactness. It turns out that we can find particular bounded sets thatdo acccomplish the task as long as the metric space of the subset is also complete.This notion is called totally bounded. But, first, we take a moment to realize that wehave enough information to discuss a special properties about spaces of continuousfunctions on compact sets.

Theorem 1.6.11 (continuous functions on compact). Let (X, d) and (Y, d′) be met-ric spaces.

If (X, d) be is a compact metric space, then Cb(X,Y ) = C(X,Y ) and therefore(C(X,Y ), d∞) is a metric space.

Proof. Let f ∈ C(X,Y ). Since (X, d) is compact, we have that f(X) is compact.Therefore, by Theorem 1.6.8, we have that f(X) is bounded. Hence f ∈ Cb(X,Y ),which completes the proof. �

It is also true that the set formed by a convergent sequence and its limit arecompact (and thus we can find examples of infinite compact sets existing in certainmetric spaces, not just (R, d1), for instance this occurs in every non-zero normedvector space (make a sequence of infinite different terms converging to the zero vec-tor)) and that every continuous function on a compact set A is uniformly continuouson A, but this sequential definition of compactness that we began with is a diffi-cult approach to proving this. Thus, for this and many other reasons, we look todifferent characterizations of compactness. However, this is a long journey. So, let’sget started. First, we define total boundedness and see how far it gets us. It is aslight weaking of compactness, which will ease the process of finding equivalencesfor compactness in the metric sense since total boundedness is much more relatedto the metric structure as it is defined using Cauchy sequences, and later we willsee an equivalence that explicitly uses the metric by way of metric open balls. Ourdefinition of compactness does not really need metric structure since it only needsconvergence; however, our (sequential) definition of compactness is only truly usefulin the metric world, but this means, it is thus very useful in the metric world.

Definition 1.6.12 (totally bounded). Let (X, d) be a metric space. A set A ⊆ X istotally bounded if every sequence in A has a Cauchy subsequence.

If X is totally bounded, then we call (X, d) a totally bounded metric space.

Page 95: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 95

First, we make sure that totally bounded metric spaces make sense.

Theorem 1.6.13. Let (X, d) be a metric space. Let A ⊆ X. The following areequivalent;

(1) A is totally bounded in (X, d);(2) A is totally bounded in (A, d). [That is, (A, d) is a totally bounded metric

space].

Proof. This follows the same argument as Theorem 1.6.4. �

Theorem 1.6.14 (always totally bounded). Let (X, d) be a metric space. ∅ ( X

is totally bounded and any finite subset A ⊆ X is totally bounded. In particular,singletons are totally bounded.

Proof. This is the same proof as Theorem 1.6.5. �

We also have the following analogue to Theorem 1.6.10 in the totally boundedcase and we see that no condition is required on the subset since requiring a Cauchysubsequence does not require a mention of a limit.

Theorem 1.6.15 (subsets of totally bounded/compact sets). Let (X, d) be a metricspace. Let A ⊆ X.

If B ⊆ A and A is totally bounded, then B is totally bounded.

Proof. Let (xn)n∈N be a sequence in B. Thus (xn)n∈N is sequence in A. Since A istotally bounded, then (xn)n∈N has a Cauchy subsequence (xnk)k∈N. But, (xnk)k∈N

only has terms from B, so it is a Cauchy subsequence of (xn)n∈N in B. So B istotally bounded. �

Now, we prove a relationship with totally bounded sets and uniformly continuousfunctions, which makes sense since uniformly continuous functions preserve Cauchysequences.

Theorem 1.6.16 (uniform continuity and totally bounded). Let (X, d), (Y, d′) bemetric spaces and let f : (X, d) → (Y, d′) be a uniformly continuous function. IfA ⊆ X is totally bounded, then f(A) is totally bounded.

Proof. This is the same proof at Theorem 1.6.6 and the fact that uniformly contin-uous functions map Cauchy sequences to Cauchy sequences. �

Another useful property is that finite product of totally bounded metric spaceswith the d∞ metric is totally bounded. d∞ is needed to take care of Cauchy sequences,and so any topological product metric won’t do. Indeed:

Page 96: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

96 KONRAD AGUILAR

Theorem 1.6.17 (finite product of totally bounded). Let N ∈ N and let (Xj , dj) bea metric space for each j ∈ {0, . . . , N}. Consider the metric d∞ on X =

∏Nj=0Xj.

If Aj ⊆ Xj is totally bounded for each j ∈ {0, . . . , N}, then∏Nj=0Aj is totally

bounded in (X, d∞).

Proof. This is essentially the same proof as Theorem 1.6.7 along with the fact that asequence in the product is Cauchy with respect to d∞ if and only if each coordinatesequence is Cauchy by 1.5.1 Exercises. �

Before we prove the following, we need a result that likely wasn’t covered in 371,which also brings to light how "close" total boundedness is to compactness and thisalso establishes many examples of totally bounded sets that aren’t compact.

Theorem 1.6.18 (Some (R, d1) totally bounded sets). Consider (R, d1).

(1) A ⊆ R is totally bounded if and only if A is compact.(2) A ⊆ R is totally bounded if and only if A is bounded.

Thus, (a, b) is totally bounded and not compact for all a, b ∈ R, a < b by 371.

Proof. (1) ( =⇒ ) Let (xn)n∈N be a sequence in A. For each n ∈ N, let yn ∈B(xn; 1

n+1) ∩ A by definition of closure. Since A is totally bounded, (yn)n∈N hasa Cauchy subsequence (ynk)k∈N. Since (R, d1) is complete, we have that (ynk)k∈N

converges to a ∈ R, but since A is closed, we have that a ∈ A. Let ε > 0. ChooseN1 ∈ N such that 1

nk+1 < ε/2 for all k > N1, and choose N2 ∈ N such thatd1(ynk , a) < ε/2 for all k > N2. Let N = max{N1, N2}. Let k > N , then

d1(xnk , a) < d1(xnk , ynk) + d1(ynk , a) <1

nk + 1+ ε/2 < ε/2 + ε/2 = ε.

Thus (xn)n∈N has a convergent subsequence that converges to a ∈ A. Therefore Ais compact.

(⇐= ) Let (xn)n∈N be a sequence in A. Since A is compact and A ⊆ A, we havethat (xn)n∈N has a convergent subsequence (xnk)k∈N that converges to some a ∈ A.Since convergence implies Cauchy, we have that (xnk)k∈N is Cauchy.

(2) ( =⇒ ) By (1), we have A is compact, which is bounded. Hence diam(A) =

diam(A) <∞ and thus A is bounded.( ⇐= ) Assume that A is bounded, then ∞ > diam(A) = diam(A), so that A

is closed and bounded, which is compact by 371. Hence by (1), we have that A istotally bounded. �

Be careful, bounded does not imply totally bounded in general. We will discusssome important examples after the following since we will at least show total bound-edness implies bounded.

Page 97: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 97

Here is also our first equivalence of compactness using completeness and totallybounded which is motivated by the above result.

Theorem 1.6.19 (compact implies totally bounded implies bounded). Let (X, d)

be a metric space. Let A ⊆ X.

(1) A is compact if and only if (A, d) is complete and A is totally bounded.(2) If A is totally bounded, then A is bounded.

Proof. (1) ( =⇒ ) The fact that A is totally bounded is the same as the backwarddirection of (1) of the previous theorem but check this for yourself.

For completeness, let (xn)n∈N be a Cauchy sequence in A. Since A is compact, wehave that (xn)n∈N has a convergent subsequence (xnk)k∈N that converges to somea ∈ A. Thus, by Theorem 1.6.2, we have that (xn)n∈N converges to a ∈ A. Hence(A, d) is complete.

(⇐= ) Let (xn)n∈N be a sequence in A. Since A is totally bounded, (xn)n∈N hasa Cauchy subsequence (xnk)k∈N. Since (A, d) is complete, we have that (xnk)k∈N

converges to some a ∈ A.(2) By Theorem 1.6.17, we have that A × A is totally bounded in (X ×X, d∞).

Since the metric is uniformly continuous on (X × X, d∞), we have that d(A × A)

is totally bounded in (R, d1) by Theorem 1.6.16. Thus d(A × A) = {d(a, b) ∈ R |(a, b) ∈ A×A} = {d(a, b) ∈ R | a, b ∈ A} is bounded by Theorem 1.6.18. Hence, it’ssupremum is finite, and so ∞ > sup{d(a, b) ∈ R | a, b ∈ A} = diam(A). �

Example 1.6.20 (bounded non-totally bounded sets). (1) Let X be a non-emptyset. Consider (X, ddisc). A ⊆ X is totally bounded if and only if A is finite.

Proof. This is the same proof as Example 1.6.9 �

Thus R is bounded in (R, ddisc) but is not totally bounded since it isinfinite. This also displays that closed balls need not be totally boundedsince B(R,ddisc)(x; 1) = R for all x ∈ R.

(2) The Baire space (N , dB) is not even totally bounded since if it were then itwould be compact by Theorem 1.6.19 since it is complete by 1.5.1 Exercises,and thus would lead to the contradiction that ((0, 1)\Q, d1) would be compactjust as in Example 1.6.9. However, (N , dB) is bounded. Thus, it is good thatwe did not define total boundedness in general to be just bounded sets of ametric space.

It will turn out the the set formed by a Cauchy sequence is totally bounded, buta different characterization of totally bounded will help in this pursuit.

With the above tools in hand, we can summarize how our different forms of con-tinuity preserve certain metric properties of sets. Indeed:

Page 98: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

98 KONRAD AGUILAR

Theorem 1.6.21 (metric properties preserved by continuity). Let (X, d) and (Y, d′)

be metric spaces. Let f : (X, d)→ (Y, d′) be a function and A ⊆ X.

(1) If A is bounded and f is Lipschitz, then f(A) is bounded, and thus if X isbounded, then Lb(X,Y ) = L(X,Y ) and (L(X,Y ), d∞) is a metric space.

(2) If A is totally bounded and f is Lipschitz or uniformly continuous, thenf(A) is totally bounded, and thus if X is totally bounded, then UCb(X,Y ) =

UC(X,Y ) and (UC(X,Y ), d∞) is a metric space.(3) If A is compact and f is Lipschitz, uniformly continuous, or continuous, then

f(A) is compact, and thus if X is compact, then Cb(X,Y ) = C(X,Y ) and(C(X,Y ), d∞) is a metric space.

Furthermore, there exists a non-continuous and thus non-Lipschitz and non-uniformlycontinuous function that maps bounded, totally bounded, and compact sets to bounded,totally bounded, and compacts sets, respectively.

Proof. (1) is Theorem 1.4.24. (2) is Theorem 1.6.16 and the fact that totally boundedsets are bounded by Theorem 1.6.19 and the fact that Lipschitz functions are uni-formly continuous. (3) is Theorem 1.6.6 and Theorem 1.6.11 and the fact that Lips-chitz or uniformly continuous functions are continuous.

Next, since totally bounded and compact sets are bounded, we have that UCb(X,Y ) =

UC(X,Y ) and (UC(X,Y ), d∞) is a metric space ifX is totally bounded and Cb(X,Y ) =

C(X,Y ) and (C(X,Y ), d∞) is a metric space if X is compact.The function f : (R, d1)→ (R, d1) defined for all x ∈ R by

f(x) =

{0 : x 6 0

1 : x > 0

is not continuous and thus not Lipschitz nor uniformly continuous, but it sendsbounded, totally bounded, and compact sets to bounded, totally bounded, and com-pacts sets, respectively, since its image is fintite. �

Next, we pursue out different characterization of total boundednes, which will helpus toward the topological characterization of compactness. First, we define.

Definition 1.6.22 (epsilon nets). Let (X, d) be a metric space. Let A ⊆ X. Letε > 0. A set Nε ⊆ A is an ε-net of A if A ⊆ ∪a∈NεBd(a; ε)

Nε is a finite ε-net if Nε is finite.

A ε-net always exists for any subset A and any ε (just take Nε = A), but whatspecial property does A have when one can always find a finite ε-net for any ε?

Theorem 1.6.23 (total boundedness and ε-nets). Let (X, d) be a metric space andA ⊆ X. The following are equivalent:

(1) A is totally bounded in (X, d);

Page 99: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 99

(2) for every ε > 0, there exists a finite ε-net of A;(3) for every ε > 0, there exists a finite subset Nε of X (not necessarily A) such

that A ⊆ ∪x∈NεBd(x; ε).(4) A is totally bounded in (A, d).(5) for every ε > 0, there exists a finite subset Nε of A such that

A ⊆ ∪x∈NεB(A,d)(x; ε).

Proof. If A is finite, then all equivaleneces are trivial. So, for the remainder of theproof, assume that A is infinite.

(1) =⇒ (2) We proceed by contraposition. Assume there exists ε > 0 such thatno finite ε-net exists of A. Let a0 ∈ A, then {a0} is not an ε-net since it is finite, soA 6⊆ Bd(a0; ε). So, there exists a1 ∈ A such that a1 6∈ Bd(a0; ε) =⇒ d(a0, a1) > ε.

Now, {a0, a1} is not a ε-net since it is finite, so A 6⊆ ∪1j=0Bd(aj ; ε). Thus, there exists

a2 ∈ A such that a2 6∈ ∪1j=0Bd(aj ; ε) =⇒ a2 ∈ ∩1

j=0(X \ Bd(aj ; ε)), which impliesthat d(a0, a2) > ε, d(a1, a2) > ε and recall that d(a0, a1) > ε. Continue in this way toconstruct a sequence (an)n∈N in A such that d(an, am) > ε for all n,m ∈ N, n 6= m.Thus, (an)n∈N cannot have a Cauchy subseqeunce.

(2) =⇒ (3) is immediate since A ⊆ X.(3) =⇒ (2) Let ε > 0. There exists a finite subset Nε/2 of X such that A ⊆

∪x∈Nε/2Bd(x; ε/2). For each x ∈ Nε/2 fix one ax ∈ A such that ax ∈ Bd(x; ε/2) if itexists. Thus Nε = {ax ∈ A | x ∈ Nε/2} ⊆ A is finite. Let a ∈ A, then a ∈ Bd(x; ε/2)

for some x ∈ Nε/2. Then

d(a, ax) 6 d(ax, x) + d(x, a) < ε/2 + ε/2 = ε.

Hence A ⊆ ∪b∈NεBd(b; ε).(2) =⇒ (1) Let (xn)n∈N be a sequence in A. Consider ε = 2−0. By assumption

there exists a finite 2−0-net of A, N2−0 . By the pigeon-hole principle, there existsa0 ∈ N2−0 and an infinite subset M0 ⊆ N such that xn ∈ Bd(a0; 2−0) for all n ∈M0.Let n0 = min{M0}. Let M ′0 = M0 \ {n0}, which is an infinite set, and note that forall n ∈M ′0, we have that d(xn, xn0) < d(a0, xn) + d(a0, xn0) < 2−0 + 2−0 = 2 · 2−0.

Next, consider ε = 2−1. By assumption there exists a finite 2−1-net of A, N2−1 .By the pigeon-hole principle, there exists a1 ∈ N2−1 and an infinite subset M1 ⊆M ′0such that xn ∈ Bd(a1; 2−1) for all n ∈M1. Let n1 = min{M1} and note that

n0 < n1 and d(xn0 , xn1) < 2 · 2−0.

Let M ′1 = M1 \ {n1}, which is an infinite set, and note that for all n ∈M ′1, we havethat d(xn, xn1) < d(a1, xn) + d(a1, xn1) < 2−1 + 2−1 = 2 · 2−1.

Next, consider ε = 2−2. By assumption there exists a finite 2−2-net of A, N2−2 .By the pigeon-hole principle, there exists a2 ∈ N2−2 and an infinite subset M2 ⊆M ′1

Page 100: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

100 KONRAD AGUILAR

such that xn ∈ Bd(a2; 2−2) for all n ∈M2. Let n2 = min{M2} and note that

n1 < n2 and d(xn1 , xn2) < 2 · 2−1.

Let M ′2 = M2 \ {n2}, which is an infinite set, and note that for all n ∈M ′2, we havethat d(xn, xn2) < d(a2, xn) + d(a2, xn2) < 2−2 + 2−2 = 2 · 2−2.

Continue in this way, to construct a subsequence (xnk)k∈N of (xn)n∈N such thatd(xnk , xnk+1

) < 2 · 2−k. Since (2 · 2−k)k∈N is summable, we have that (xnk)k∈N isCauchy by (5)(b) of 1.1.3 Exercises.

(1) ⇐⇒ (4)(4) ⇐⇒ (5) Since (1) ⇐⇒ (2) is true for any metric space (X, d) such that

A ⊆ X, then (1) ⇐⇒ (2) is true for (A, d) as well. And, the statement of (5) is justusing the definition of ε-nets where the ambient metric spaces is now (A, d). �

The point of (3) in the above theorem is to show that the points that makethe finite ε-net need not come from A, which can be a convenient feature whenapproaching some proofs. The above theorem also gives us another reason why weconsider compact and totally bounded sets to be "small" in that we can always finda finite set of balls of any fixed radius that covers the set. With this characterization,we show

Theorem 1.6.24 (Cauchy sequences are totally bounded). Let (X, d) be a metricspace.

If (xn)n∈N is a Cauchy sequence, then the set {xn ∈ X | n ∈ N} is totally bounded.

Proof. Exercise. �

We are getting closer to our topological characterization of compactness, but weneed a few more results about totally bounded sets, which are deeply connected tometric structure even though they look topological in nature and we will see thisdisplayed in the following proof.

Theorem 1.6.25 (Countability and total boundedness). Let (X, d) be a metricspace. If A is totally bounded, then there exists a countable family of open sets of{Un ∈ τ(X,d) | n ∈ N} such that for every a ∈ A and every open set V ∈ τ(X,d) witha ∈ V , there exists na ∈ N such that a ∈ Una ⊆ V .

Proof. Let n ∈ N \ {0}. Since A is totally bounded, there exists a finite 1/n-net ofA, N1/n. Since each N1/n is finite, we have that

{Bd(x; 1/n) ∈ τ(X,d) | n ∈ N \ {0}, x ∈ N1/n}

is a countable family of open sets. Now, let a ∈ A and let a ∈ V such that V ∈ τ(X,d).Since V is open, there exists r ∈ R+ such that a ∈ Bd(a; r) ⊆ V . By the Archimedeanproperty, we have that there exists n ∈ N \ {0} such that 1/n < r/2. Now since

Page 101: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 101

A ⊆ ∪x∈N1/nBd(x; 1/n) by definition of net, we have that there exists xa ∈ N1/n such

that a ∈ Bd(xa; 1/n). Now let b ∈ Bd(xa; 1/n). Then d(a, b) 6 d(b, xa) + d(xa, a) <

1/n+ 1/n < r/2 + r/2 = r. Thus b ∈ Bd(a; r) ⊆ V. Therefore a ∈ Bd(xa; 1/n) ⊆ V ,where xa ∈ N1/n. Hence, since {Bd(x; 1/n) ∈ τ(X,d) | n ∈ N \ {0}, x ∈ N1/n} isa countable family, we can write {Bd(x; 1/n) ∈ τ(X,d) | n ∈ N \ {0}, x ∈ N1/n} =

{Un ∈ τ(X,d) | n ∈ N}, which is a countable family that satisifes the conclusion. �

The above is telling us that the open sets containing elements of a totally boundedset A are "generated" by countably many sets.

Next, we introduce the topological generalization of ε-nets which actually allowsus to characterize compact sets.

Definition 1.6.26 (open cover). Let (X, d) be a metric space. LetA ⊆ X.O ⊆ τ(X,d)

with ∅ 6∈ O is called an open cover of A if A ⊆ ∪U∈OU . F ⊆ O is called a finitesubcover of A, if there exists N ∈ N such that F = {Uλj ∈ O | j ∈ {0, . . . , N}} suchthat A ⊆ ∪U∈FU = ∪Nj=0Uλj .

So, finite ε-nets are finite subcovers of families of balls with FIXED radius forall balls. This is a key reason why total boundedness alone is not enough to implycompactness, it is the extra condition of completeness that allows one to have morepossibile open sets like balls of varying radii, which is actually the most general opencovers that need be considered. Indeed:

Theorem 1.6.27 (ball open covers). Let (X, d) be a metric space. Let A ⊆ X. Thefollowing are equivalent:

(1) every open cover of A has a finite subcover of A;(2) if Λ is a non-empty set and A ⊆ ∪λ∈ΛBd(xλ, rλ), where xλ ∈ X, rλ ∈ R+

for all λ ∈ Λ, then there exists a finite subset Γ ⊆ Λ such that A ⊆∪λ∈ΓBd(xλ, rλ).

Proof. (1) =⇒ (2) This conclusion is done since {Bd(xλ, rλ) ∈ τ(X,d) | λ ∈ Λ} formsan open cover of A.

(2) =⇒ (1) Let O = {Uλ ∈ τ(X,d) | λ ∈ Λ}. Fix λ ∈ Λ. Since Uλ is open, for eachxλ ∈ Uλ, there exists rxλ ∈ R+ such thatBd(xλ, rxλ) ⊆ Uλ. Thus ∪xλ∈UλBd(xλ, rxλ) =

Uλ. Therefore A ⊆ ∪λ∈Λ,xλ∈UλBd(xλ, rxλ). Hence, there exists a finite subset Γ ⊆ Λ

such that

A ⊆ ∪λ∈Γ,xλ∈UλBd(xλ, rxλ) =⇒ A ⊆ ∪λ∈Γ,xλ∈UλBd(xλ, rxλ) ⊆ ∪λ∈ΓUλ.

(We note there there are also only finitely many xλ1 , . . . , xλN for each λ ∈ Γ as wellbut we did not need this here). Thus, O has a finite subcover of A. �

Page 102: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

102 KONRAD AGUILAR

Now, we are ready to prove the topological characterization of compactness, whichcontains our previous characrterization using total boundedness and completenessas well which will serve us well. First, we provide equivalences for when an entiremetric space is compact, and then move to compact subsets using Theorem 1.6.4.This may seem like extra work, but it is required since subspace topologies can actvery different, but it will turn out that compactness is not affected by subspacetopologies, which is surprising and incredibly useful and one of the main reasonsthat compact sets are sought after. (4) of the next theorem may have snuck inunexpectedly, but just realize, that it is a generalized version of the nested intervalproperty from 371, and you will feel at ease.

Theorem 1.6.28 (topological compact metric spaces). Let (X, d) be a metric space.The following are equivalent:

(1) X is compact and so (X, d) is a compact metric space;(2) if Λ is a non-empty set and X ⊆ ∪λ∈ΛBd(xλ, rλ), where xλ ∈ X, rλ ∈ R+

for all λ ∈ Λ, then there exists a finite subset Γ ⊆ Λ such that X ⊆∪λ∈ΓBd(xλ, rλ);

(3) every open cover of X has a finite subcover of X;(4) for any non-empty set Λ and family {Fλ ∈ P (X) | λ ∈ Λ} of closed sets

of (X, d) and for every finite subset Γ ⊆ Λ it holds that ∩j∈ΓFj 6= ∅, then∩λ∈ΛFλ 6= ∅.

(5) X is totally bounded and (X, d) is complete.

Proof. First, the statement in (1) is given by the definition of compactness.(2) ⇐⇒ (3) is done by the previous theorem.(3) =⇒ (4) We proceed by contraposition. Let {Fλ ∈ P (X) | λ ∈ Λ} be a family

of closed sets satisfying the given conditions before "then" (these conditions togetheris called the "finite intersection property" (FIP)), and assume that ∩λ∈ΛFλ = ∅. Thus

X = X \ ∅ = X \ (∩λ∈ΛFλ) = ∪λ∈ΛX \ Fλ.

Hence, as each Fλ is closed, we have that {X \ Fλ | λ ∈ Λ} is an open cover of X.Assume by way of contradiction that there exists a finite subcover {X \Fλ | λ ∈ Γ},where Γ ⊆ Λ is finite. Then, X ⊆ ∪γ∈ΓX \ Fγ . Therefore by assumption

∅ 6= ∩γ∈ΓFγ = X \ (∪γ∈ΓX \ Fγ) ⊆ X \X = ∅,

which is a contradiction. Thus, the open cover {X\Fλ | λ ∈ Λ} has no finite subcover.(4) =⇒ (3). We proceed by contraposition. Let O = {Uλ ∈ τ(X,d) | λ ∈ Λ} be an

open cover of X with no finite subcover. Now,

X ⊆ ∪λ∈ΛUλ =⇒ ∩λ∈ΛX \ Uλ = ∅.

Page 103: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 103

Note that each X \ Uλ is closed in (X, d). Let Γ ⊆ Λ be finite. By assumption, wehave that X 6⊆ ∪λ∈ΓUλ =⇒ X ∩ (X \ (∪λ∈ΓUλ) 6= ∅ =⇒ ∩λ∈ΓX \ Uλ 6= ∅. Thus,the family {X \ Uλ ∈ P (X) | λ ∈ Λ} satisfies the negation of (4).

(4) =⇒ (5) For total boundedness, let ε > 0. Since X ⊆ ∪x∈XBd(x; ε) is an opencover, and we already have (4) =⇒ (3), it holds that there exists a finite subcoverand thus a finite set Nε ⊆ X such that X ⊆ ∪x∈NεBd(x; ε).

For completeness, we use the equivalence established in (5) of 1.5.1 Exercises. Let{Fn ∈ P (X) | n ∈ N} be a family of non-empty closed subsets of X such thatF0 ⊇ F1 ⊇ · · · and limn→∞ diam(Fn) = 0. By containment, this family satisfies thehypotheses of (4), and thus ∩n∈NFn 6= ∅. Thus, by (5) of 1.5.1 Exercises, we have∩n∈NFn = {x}, which completes the proof.

(5) ⇐⇒ (1) is done by Theorem 1.6.19, so all that remains is...(1) =⇒ (3) Let O = {Vλ ∈ τ(X,d) | λ ∈ Λ} be an open cover of X. Since X

is compact, it is totally bounded. Thus, let {Un ∈ τ(X,d) | n ∈ N} satsify for everyx ∈ X and every open set V ∈ τ(X,d) with x ∈ V , there exists nx ∈ N such thatx ∈ Unx ⊆ V by Theorem 1.6.25. So, fix λ ∈ Λ. For each x ∈ Vλ, there exists nx ∈ Nsuch that x ∈ Unx ⊆ Vλ. Let Mλ = {nx ∈ N | x ∈ Vλ}. Hence Vλ = ∪n∈Mλ

Un.Now, let M = ∪λ∈ΛMλ ⊆ N. Therefore X ⊆ ∪λ∈ΛVλ = ∪λ∈Λ ∪n∈Mλ

Un = ∪n∈MUn.Now fix m ∈ M , then m ∈ Mλm = {nx ∈ N | x ∈ Vλm} for some λm ∈ Λ, and soUm = Unx ⊆ Vλm . And, thus X ⊆ ∪m∈MUm ⊆ ∪m∈MVλm .

Thus, O has a countable subscover {Vλm ∈ τ(X,d) | m ∈ M}. If it was finite,then we would be done, so assume it is countably infinite. For ease of notation,set {Vλm ∈ τ(X,d) | m ∈ M} = {Vn ∈ τ(X,d) | n ∈ N}. Now, we will reducethis to a finite subcover. Next, for each N ∈ N, set BN = ∪Nj=0Vj , and note thatX = ∪n∈NVn = ∪N∈NBN . If there exists N ∈ N such that X = BN , then we wouldbe done. So, assume by way of contradiction, that X 6= Bn for all n ∈ N. So, foreach n ∈ N, choose xn ∈ X \ Bn. Since X is compact, there exists a convergentsubsequence (xnk)k∈N that converges to some x ∈ X = ∪N∈NBN . Thus, x ∈ Bm

for some m ∈ N. Since Bm is open, there exists N ∈ N such that xnk ∈ Bm

for all k > N . However, there exists L ∈ N, L > N such that nL > m. But,Bm ⊆ BnL =⇒ xnL ∈ X \ BnL ⊆ X \ Bm, which implies xnL 6∈ Bm for someL > N , a contradiction. Therefore, there exists N ∈ N such that X = BN = ∪Nj=0Vj

and thus {Vj ∈ τ(X,d) | j ∈ {0, . . . , N}} is a finite subcover of X from O. �

Now, we find a characterization of the compact subsets of a metric space. Themost surprising equivalence comes from (5) and (6) since one can use open subsetsfrom the whole space or the subspace. But, let’s recall a relationship between opensusbets of the subspace that we proved earlier in the course while also expanding

Page 104: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

104 KONRAD AGUILAR

on the result, which will also remind us of the subtlety between open subsets of asubspace.

Theorem 1.6.29 (more on topological subspaces). Let (X, d) be a metric space. LetA ⊆ X.

(1) U ∈ τ(A,d) if and only if there exists V ∈ τ(X,d) such that U = V ∩A.(2) G is closed in (A, d) if and only if there exists a closed subset F of (X, d)

such that G = F ∩A.

Proof. (1) (⇐= ) is provided by Theorem 1.2.26.( =⇒ ) For each x ∈ U , there exists rx ∈ R+ such that B(A,d)(x; rx) ⊆ U . Thus

∪x∈UB(A,d)(x; rx) = U . Let V = ∪x∈UB(X,d)(x; rx) ∈ τ(X,d) since open balls areopen and the arbitrary union of open sets is open. Also note that B(A,d)(x; rx) =

B(X,d)(x; rx) ∩A for all x ∈ U . Hence

V ∩A =(∪x∈UB(X,d)(x; rx)

)∩A

= ∪x∈U(B(X,d)(x; rx) ∩A

)= ∪x∈UB(A,d)(x; rx) = U,

which completes the proof.(2) ( =⇒ ) Now A \ G ∈ τ(A,d). By part (1), there exists V ∈ τ(X,d) such that

A\G = V ∩A. Now G = A\(A\G) = A\(V ∩A) = (A\V )∪(A\A) = (A\V )∪∅ =

A \ V = A∩ (X \ V ). But, X \ V is closed in (X, d), which completes this direction.(⇐= ) Assume that F is closed in (X, d). Thus X \F ∈ τ(X,d). Therefore, by part

(1), (X \ F ) ∩A ∈ τ(A,d). Thus A \ ((X \ F ) ∩A) is closed in (A, d). However

A \ ((X \ F ) ∩A) = (A \ (X \ F )) ∪ (A \A)

= (A ∩ (X \ (X \ F ))) ∪ ∅

= A ∩ F,

which completes this direction. �

Theorem 1.6.30 (topological compactness). Let (X, d) be a metric space. Let A ⊆X. The following are equivalent:

(1) A is compact in (X, d);(2) (A, d) is a compact metric space;(3) if Λ is a non-empty set and A ⊆ ∪λ∈ΛB(X,d)(xλ, rλ), where xλ ∈ X, rλ ∈

R+ for all λ ∈ Λ, then there exists a finite subset Γ ⊆ Λ such that A ⊆∪λ∈ΓB(X,d)(xλ, rλ);

(4) if Λ is a non-empty set and A ⊆ ∪λ∈ΛB(A,d)(aλ, rλ), where aλ ∈ A, rλ ∈R+ for all λ ∈ Λ, then there exists a finite subset Γ ⊆ Λ such that A ⊆∪λ∈ΓB(A,d)(aλ, rλ);

Page 105: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 105

(5) every open cover of A containing only open subsets of (X, d) has a finitesubcover of A;

(6) every open cover of A containing only open subsets of (A, d) has a finitesubcover of A;

(7) for any non-empty set Λ and family {Fλ ∈ P (X) | λ ∈ Λ} of closed sets of(X, d) and for every finite subset Γ ⊆ Λ it holds that ∩j∈Γ(Fj ∩A) 6= ∅, then∩λ∈Λ(Fλ ∩A) 6= ∅;

(8) for any non-empty set Λ and family {Fλ ∈ P (A) | λ ∈ Λ} of closed setsof (A, d) and for every finite subset Γ ⊆ Λ it holds that ∩j∈ΓFj 6= ∅, then∩λ∈ΛFλ 6= ∅;

(9) A is totally bounded in (X, d) and (A, d) is complete;(10) A is totally bounded in (A, d) and (A, d) is complete.

Proof. (1) ⇐⇒ (2) is given by Theorem 1.6.4.(3) ⇐⇒ (5) is given by Theorem 1.6.27.(6) =⇒ (5) Let {Uλ ∈ τ(X,d) | λ ∈ Λ} be an open cover of A. Hence A ⊆ ∪λ∈ΛUλ.

HenceA = A ∩A ⊆ (∪λ∈ΛUλ) ∩A = ∪λ∈Λ(Uλ ∩A).

By Theorem 1.2.26. We have that {Uλ ∩ A ∈ P (A) | λ ∈ Λ} is an open cover ofA containing only open subsets of (A, d). Hence, by assumption there exists a finitesubset Γ ⊆ Λ such that

A ⊆ ∪λ∈Γ(Uλ ∩A) ⊆ ∪λ∈ΓUλ,

which completes this proof.(5) =⇒ (6) Let A ⊆ ∪λ∈ΛUλ, where Uλ ∈ τ(A,d) for each λ ∈ Λ. By Theorem

1.6.29, for each λ ∈ Λ, there exists Vλ ∈ τ(X,d) such that Uλ = Vλ ∩A ⊆ Vλ. Hence

A ⊆ ∪λ∈ΛUλ ⊆ ∪λ∈ΛVλ.

Therefore, by assumption there exists a finite set Γ ⊆ Λ such that

A ⊆ ∪λ∈ΓVλ.

HenceA = A ∩A ⊆ (∪λ∈ΓVλ) ∩A = ∪λ∈Γ (Vλ ∩A) = ∪λ∈ΓUλ,

which completes this direction.(6) =⇒ (7) We proceed by contraposition. Assume there exists a family {Fλ ∈

P (X) | λ ∈ Λ} of closed sets of (X, d) such that for every finite subset Γ ⊆ Λ itholds that ∩j∈Γ(Fj ∩ A) 6= ∅ and ∩λ∈Λ(Fλ ∩ A) = ∅. Now by Theorem 1.6.29, wehave that Fλ ∩ A is closed in (A, d) for each λ ∈ Λ. Hence A \ (Fλ ∩ A) is open in(A, d). Hence,

A = A \ ∅ = A \ (∩λ∈Λ(Fλ ∩A)) = ∪λ∈Λ(A \ Fλ) = ∪λ∈Λ((X \ Fλ) ∩A).

Page 106: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

106 KONRAD AGUILAR

Now for each λ ∈ Λ, we have (X\Fλ) is closed in (X, d), and thus (X\Fλ)∩A is openin (A, d). Hence {(X \Fλ)∩A | λ ∈ Λ} forms an open cover of A with only open setsin (A, d). Now, let Γ ⊆ Λ be finite. Now, by assumption, we have A ⊇ ∩j∈ΓFj∩A ) ∅.Therefore A \ (∩j∈ΓFj ∩A) ( A, which implies ∪λ∈Γ((X \ Fj) ∩A) ( A, and is nota finite subcover. Therefore {(X \ Fλ) ∩ A | λ ∈ Λ} has no finite subcover, which isthe negation of (6).

(7) =⇒ (8) Assume there exists a family {Fλ ∈ P (A) | λ ∈ Λ} of closed setsof (A, d) such that for every finite subset Γ ⊆ Λ it holds that ∩j∈ΓFj 6= ∅. Then,by Theorem 1.6.29, for each λ ∈ Λ, there exists a closed set Gλ in (X, d) such thatFλ = Gλ ∩A. Thus, by assumption, we have that ∩λ∈ΛFλ = ∩λ∈Λ(Gλ ∩A) 6= ∅.

(2) ⇐⇒ (4) ⇐⇒ (6) ⇐⇒ (8) ⇐⇒ (10) is given by Theorem 1.6.28. Also (9)⇐⇒ (10) is given by Theorem 1.6.23.

Thus, we have (1) =⇒ (2). Next, (2) =⇒ (6) =⇒ (5) =⇒ (3). Next, (3)=⇒ (5) =⇒ (6) =⇒ (4). Next, (4) =⇒ (6) =⇒ (5). Next, (5) =⇒ (6).Next, (6) =⇒ (7). Next, (7) =⇒ (8). Next, (8) =⇒ (10) =⇒ (9). Next, (9)=⇒ (10). Next, (10) =⇒ (2) =⇒ (1). �

Now, we will see the consequences of our work and show the following. The dif-ficulty involving the original definition of compactness in the following theorem isthe fact that a sequence of a set formed by the terms of a sequence need not be asubsequence of the original sequence.

Theorem 1.6.31 (conv seq form cmpct set). Let (X, d) be a metric space and let(xn)n∈N be a sequence. If (xn)n∈N converges to a ∈ X, then the set {xn ∈ X | n ∈N} ∪ {a} is compact.

Proof. Let {Uλ ∈ τ(X,d) | λ ∈ Λ} be an open cover of B = {xn ∈ X | n ∈ N} ∪ {a}.Since B ⊆ ∪λ∈ΛUλ, there exists λa ∈ Λ such that a ∈ Uλa . Hence, by convergence,there exists N ∈ N such that xn ∈ Uλa for all n > N . Similarly, let λ0, . . . , λN ∈ Λ

such that xj ∈ Uλj for all j ∈ {0, . . . , N}. Therefore {Uλa , Uλ0 , . . . , UλN } is a finitesubcover. �

Another useful consequence of the topological definition of compactness is thefollowing metric notion.

Theorem 1.6.32 (continuous on compact is uniform). Let (X, d), (Y, d′) be metricspaces. If (X, d) is a compact metric space and f : (X, d)→ (Y, d′) is continuous, thenf is uniformly continuous and thus UCb(X,Y ) = UC(X,Y ) = C(X,Y ) = Cb(X,Y ).

Proof. Let ε > 0. For each x ∈ X, there exists δx > 0 such that if y ∈ Bd(x; δx) ⇐⇒d(x, y) < δx, then d′(f(y), f(x)) < ε/2. Now X ⊆ ∪x∈XBd(x; δx/2). Since X iscompact, there exists N ∈ N and x0, . . . , xN such that X ⊆ ∪Nj=0Bd(xj ; δxj/2).

Page 107: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 107

Consider δ = min{δxj/2 | j ∈ {0, . . . , N}} > 0. Let a, b ∈ X such that d(a, b) < δ.

Now, there exists k ∈ {0, . . . , N} such that b ∈ Bd(xk; δxk/2) and so d(b, xk) <

δxk/2 < δxk . Also

d(a, xk) 6 d(a, b) + d(b, xk) < δ + δxk/2 6 δxk/2 + δxk/2 = δxk .

Therefore d′(f(a), f(xk)) < ε/2 and d′(f(xk), f(b)) < ε/2. Thus

d′(f(a), f(b)) 6 d′(f(a), f(xk)) + d′(f(xk), f(b)) < ε/2 + ε/2 = ε,

which completes the proof. �

Note that total boundedness would not be enough since the deltas could all bedifferent, so no delta net and can’t just take min since there are infinitely many. Also((0, 1), d1) is totally bounded and we already know that f(x) = 1/x is continuousand not uniformly continuous on this set. Hence, even though uniform continuity isa very metric notion, it is the topological characterization of compactness that helpsus with the proof.

Note that uniformly continuous functions on a compact set are not necessarilyLipschitz (think f(x) =

√x on [0, 1].)

Page 108: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

108 KONRAD AGUILAR

1.6.1. Exercises.

(1) Establish the equivalence in (1) of Example 1.6.9.

(2) ** (10 points) We prove the following generalization of Theorem 1.6.18. Let(X, d) be a metric space (not necessarily complete). Let A ⊆ X. Show thatA is totally bounded if and only if A is totally bounded. Now, assume (X, d)

is COMPLETE, use the previous sentence to show that A is totally boundedif and only if A is compact. Still assuming (X, d) is COMPLETE, show that(A is closed and totally bounded) if and only if (A is compact).

Proof. First we show that A is totally bounded if and only if A is totallybounded. We begin with the forward direction. Let (xn)n∈N be a sequence inA. By closure, for each n ∈ N, there exists yn ∈ A such that d(xn, yn) < 1

n+1 .Since A is totally bounded, there exists a Cauchy subsequence (ynk)k∈N of(yn)n∈N. Now, there exists N1 ∈ N such that d(ynj , ynk) < ε/3 for all k > N .Also, there exists N2 ∈ N such that 1

nk+1 < ε/3 for all k > N2. ChooseN = max{N1, N2}. Let j, k > N , then

d(xnj , xnk) 6 d(xnj , ynj ) + d(ynj , ynk) + d(ynk , xnk)

<1

nj + 1+ ε/3 +

1

nk + 1

< ε/3 + ε/3 + ε/3 = ε.

For the reverse direction, by Theorem 1.6.15, we have A is totally boundedsince it is a subset of the totally bounded set A.

Now, for the rest assume that (X, d) is complete.If A is totally bounded then A is totally bounded by the previous result,

but A is a closed subset of a complete space and is thus (A, d) is complete.Thus, by Theorem 1.6.19, we have that A is compact. Now, if A is compact,then A is totally bounded by Theorem 1.6.19 and thus A is totally boundedby the previous result.

Now, assume that A is closed and totally bounded. Then A = A is compactby the previous result. If A is compact, then A is totally bounded by Theorem1.6.19 and is closed by Theorem 1.6.8. �

(3) Let X be a non-empty set and (Y, d′) be a metric space. Let f : X → Y bea bijection. Define df (a, b) = d′(f(a), f(b)) for all a, b ∈ X.

Show that f : (X, df ) → (Y, d′) is a homeomorphism. Use this to showthat (N∞, dc) is a compact metric space.

(4) ** (10 points) Consider the set H = {(xn)n∈N ∈ `2 | ∀n ∈ N, |xn| 6 1/(n+

1)}. We already showed that H is closed (Theorem 1.2.17), and since (`2, d2)

Page 109: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 109

is complete by Example 1.5.3, we have that (H, d2) is complete by Theorem1.5.2. Hence, to show that H is a compact subset of (`2, d2), all that remainsis to show that H is totally bounded.

In the case that K = R, show that H is totally bounded and is thuscompact by finishing the following proof (include the whole proof in yoursolution). (The case with K = C is basically the same and actually followsfrom the K = R case but don’t deal with the K = C case.)

Proof. Let ε > 0. By 271, there exists N ∈ N such that∑∞

n=N+11

(n+1)2<

ε2/2 (the tails of any convergent series converge to 0.) Now, by 371, we havethat for each n ∈ {0, . . . , N}, the set [−1/(n + 1), 1/(n + 1)] is compact in(R, d1), and is thus totally bounded by Theorem 1.6.19. By Theorem 1.6.23,there exists a finite subset An of [−1/(n+ 1), 1/(n+ 1)] such that

[−1/(n+ 1), 1/(n+ 1)] = ∪a∈AnB([−1/(n+1),1/(n+1)],d1)

(a; ε/

√2(N + 1)

).

Consider the set

Nε = {(xn)n∈N ∈ RN | ∀n ∈ {0, . . . , N}, xn ∈ An and ∀n > N, xn = 0.}

Note Nε is finite since each An is finite. Now, if x = (xn)n∈N ∈ Nε, then ifn ∈ {0, . . . , N}, then xn ∈ An ⊂ [−1/(n+ 1), 1/(n+ 1)] =⇒ −1/(n+ 1) 6

xn 6 1/(n+1) =⇒ |xn| 6 1/(n+1) and if n > N , then xn = 0 =⇒ |xn| =0 6 1/(n + 1), which altogether imply x ∈ H. Therefore Nε ⊂ H. We willshow that Nε is an ε-net of H.

So, let x ∈ H. Fix n ∈ {0, . . . , N}. Now |xn| 6 1/(n + 1) =⇒ xn ∈[−1/(n+ 1), 1/(n+ 1)]. Thus there exists an ∈ An such that

xn ∈ B([−1/(n+1),1/(n+1)],d1)

(an; ε/

√2(N + 1)

),

which implies |xn − an| < ε/√

2(N + 1) =⇒ |xn − an|2 < ε2/(2(N + 1)).Now for n > N , set an = 0. Thus a = (an)n∈N ∈ Nε. Hence

d2(x, a) =

( ∞∑n=0

|xn − an|2)1/2

=

(N∑n=0

|xn − an|2 +

∞∑n=N+1

|xn − an|2)1/2

=

(N∑n=0

|xn − an|2 +

∞∑n=N+1

|xn − 0|2)1/2

<

(N∑n=0

ε2/(2(N + 1)) +

∞∑n=N+1

1/(n+ 1)2

)1/2

<(ε2/(2(N + 1)) · (N + 1) + ε2/2

)1/2

Page 110: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

110 KONRAD AGUILAR

=(ε2/2 + ε2/2

)1/2= ε.

Thus x ∈ Bd2(a; ε) ⊆ ∪b∈NεBd2(b; ε). Thus H ⊆ ∪b∈NεBd2(b; ε). ThereforeH is totally bounded and thus compact by the statements in the problem.

(5) ** (10 points) Let (X, d) be a compact metric space. Let f : (X, d)→ (X, d)

be a function.Show that if d(f(a), f(b)) < d(a, b) for all a, b ∈ X, a 6= b, then f has a

unique fixed point (that is, there exists a unique c ∈ X such that f(c) = c).(Hint: define g(x) = d(x, f(x)) for all x ∈ X. Show that g : (X, d)→ (R, d1)

is continuous (use continuity of d and f (why is f contninuous (< =⇒ 6)?)).Thus g(X) is compact (why?). Next, explain why there exists c ∈ X suchthat infx∈X g(x) = g(c). Show g(c) = 0. This gets you a fixed point for f(why?). Show it is the unique fixed point.)

Proof. First, note that f is continuous since it is 1-Lipschitz.Define g(x) = d(x, f(x)) for all x ∈ X. We show g : (X, d)→ (R, d1) is con-

tinuous. Let (xn)n∈N be a sequence in (X, d) converging to some a ∈ X. Sincef is continuous, we have that (f(xn))n∈N converges to f(a) in (X, d). Thusthe sequence (xn, f(xn))n∈N converges to (a, f(a)) in (X ×X, d∞) by topo-logical product metric. Hence since d is continuous, we have (g(xn))n∈N =

(d(xn, f(xn))n∈N converges to g(a) = d(a, f(a)) in (R, d1). Thus g is continu-ous. Now, since (X, d) is compact, we have that g(X) is compact in (R, d1) byTheorem 1.6.6. Therefore, by 371, we have that infx∈X g(X) ∈ g(X) sincecompact sets contain their infimum. Hence there exists a ∈ X such thatg(a) = infx∈X g(X) = infx∈X d(x, f(x)) > 0.

Now, assume by way of contradiction that d(a, f(a)) = g(a) > 0. Thusa 6= f(a) and thus by the assumption on f , we have that

g(f(a)) = d(f(a), f(f(a)) < d(a, f(a)) = g(a).

But, f(a) ∈ X, which contradicts the fact that g(a) is the infimum. Therefore,d(a, f(a)) = g(a) = 0, and so a = f(a), which implies that a is a fixed point.Now assume that b ∈ X is a fixed point and a 6= b. Then

d(a, b) = d(f(a), f(b)) < d(a, b),

which is a contradiction. And thus, the fixed point is unique. �

(6) The main point of this problem is part (b). Part (b) can be shown using theopen cover definition of compactness, but since we haven’t gotten there yet

Page 111: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 111

at the time this exercise was assigned, part (a) is there to help give a methodto prove part (b) using the sequential definition of compactness.(a) Let (X, d) be a metric space. Let (xn)n∈N be a sequence inX and a ∈ X.

Show that the following are equivalent:• (xn)n∈N converges to a;• every subsequence (xnk)n∈N of (xn)n∈N has a subsequence (xnkl )l∈N

that covnerges to a. (Hint: the forward direction is just like theforward direction of (1) of Theorem 1.6.2. But, the backwards di-rection is not that simple since we have to show the result for anysubsequence. Proceeding by contraposition helps with this direc-tion.)

(b) ** (10 points) Let (X, d), (Y, d′) be metric spaces. Let X be compactand f : (X, d)→ (Y, d′) a function.Show that if f is a continuous bijection, then f is a homeomorphism.(to use part (a), you would try to show sequential continuity of f−1 byusing sequential compactness of (X, d). You don’t have to use part (a)or the sequential version of compactness to prove this and you are freeto use any other equivalent version of compactnes, (open cover, etc)).

Proof. Since f is a bijection, we have that f−1 : Y → X is well-definedand we show that it is continuous. Let (yn)n∈N be a sequence in Y thatconverges to some y ∈ Y with respect to d′. Denote xn = f−1(yn) foreach n ∈ N and x = f−1(y). We will show that (xn)n∈N converges tox in (X, d). We will use part (a). Let (xnk)k∈N be a subsequence of(xn)n∈N. Since (X, d) is compact, there exists a subsequence (xnkl )l∈N

of (xnk)k∈N that converges to some a ∈ X. Since f is continuous, wehave that (f((xnkl ))l∈N converges to f(a). But by bijection, we have(ynkl )l∈N = (f((xnkl ))l∈N, and thus (f((xnkl ))l∈N converges to y sinceit is a subsequence of (yn)n∈N and limits are unique. Therefore, we havey = f(a) =⇒ x = f−1(y) = a, by bijection. Thus (f−1(yn))n∈N

converges to f−1(y) by part (a), and thus f−1 is continuous. �

(7) ** (5 points) Let (X, d) be a compact metric space. Let d′ be another metricon X, so that (X, d′) is a metric space. If τ(X,d) ⊆ τ(X,d′) and (X, d′) isa compact metric space, then τ(X,d) = τ(X,d′). (Hint: the previous problemhelps).

Proof. Consider the function f : (X, d′)→ (X, d) defined by f(x) = x for allx ∈ X. We will show that f is continuous. Let U ∈ τ(X,d), then f−1(U) =

U ∈ τ(X,d) ⊆ τ(X,d′). Hence f is continuous. It is also a bijection. Hence , by

Page 112: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

112 KONRAD AGUILAR

(6)(b), we have that it is a homeomorphism since (X, d′) is compact. Thus,f−1 : (X, d)→ (X, d′) is continuous. Hence if U ∈ τ(X,d′), then (f−1)−1(U) =

U ∈ τ(X,d). So τ(X,d′) ⊆ τ(X,d). �

(8) ** (5 points) Let (X, d) and (X, d′) be metric spaces. If τ(X,d) = τ(X,d′) andA ⊆ X, then A is compact in (X, d) if and only if A is compact in (X, d′).

Proof. Since τ(X,d) = τ(X,d′), we have that f : (X, d′) → (X, d) defined byf(x) = x for all x ∈ X is a homeomorphism. Thus f and f−1 = f arecontinuous. Hence if A is compact in (X, d′), then f(A) = A is compact in(X, d) and if A is compact in (X, d), then f−1(A) = A is compact in (X, d′)

by Theorem 1.6.6. �

(9) Fix n ∈ N\{0} and fix 1 6 p 6∞. Prove that every closed ball in (Rn, dp) iscompact. (Hint: recall that τ(Rn,dp) = τ(Rn,d∞) for all 1 6 p 6∞ by Example1.2.22, so it suffices to show that every closed ball in (Rn, d∞) is compactby the previous problem. Next explain why sets of the form

∏nj=1[aj , bj ] are

compact in (Rn, d∞) (This part should be really short based on a result inthis section). Then show that any closed ball in (Rn, d∞) is contained insome

∏nj=1[aj , bj ] and explain why this completes the result.)

(10) Show that the Baire space is not compact by finding a subset of the Bairespace that is not totally bounded and show that your set is not totallybounded.

(11) (** 10 points) Prove Theorem 1.6.24.

Proof. Let ε > 0. Since (xn)n∈N is Cauchy, ther exists N ∈ N such thatfor all n,m > N , we have d(xn, xm) < ε. Consider Nε = {x0, x1, . . . , xN},which is a finite set. Let y ∈ {xn ∈ X | n ∈ N}. If y = xk such that k 6 N ,then d(y, xk) = 0 < ε =⇒ y ∈ B(xk; ε) ⊆ ∪x∈NεB(x; ε). Now assume thatk > N . Then

d(y, xN ) = d(xk, xN ) < ε,

which implies y ∈ B(xN ; ε) ⊆ ∪x∈NεB(x; ε). Therefore {xn ∈ X | n ∈ N} ⊆∪x∈NεB(x; ε), and thus Nε is a finite ε-net. Hence {xn ∈ X | n ∈ N} istotally bounded. �

Page 113: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 113

2. Spaces of Functions

The purpose of this chapter is to show study metrics spaces of functions at deeperlevel. A main consequence of this chapter is to show that any real-valued continuousfunction on some compact interval [a, b] is the limit of polynomials with respect tothe d∞ metric, so polynomials are dense in (C([a, b],R), d∞). So, within any ε > 0

band around a continuous function, there exists a polynomial. Polynomial approxi-mations is how most applied mathematics works. In fact, Taylor series of infinitelydifferentiable functions, already provided that infinitely differentiable functions likeex, cosx, etc are the limit of polynomials on compact intervals [a, b]. So, really, themain goal of this chapter is to extend this result to continuous functions that maynot be differentiable, like certain piece-wise functions, absolute value functions, func-tions like f(x) = x1/3, etc. However, our pursuit doesn’t stop here. We would liketo find nice dense subsets for any (C(X,R), d∞), where (X, d) is compact metric.Why pursue this? Well, we have found and studied much more interesting compactsets than just [a, b], like any closed ball or rectangle in (R2, d2) (the xy-place withthe standard pythagorean metric), (N∞, dc), or (H, d2) where H ⊆ `2, from 1.6.1Exercises. So, in general, we may not be able to make sense of polynomials on thesesets (although multivariable polynomials make sense on compact sets in (R2, d2) andwill be dense in the continuous functions). Thus, we need to look for other possi-bilities for nice dense subsets. It turns out that the set of Lipschitz functions willbe dense in (C(X,R), d∞), for any compact metric (X, d). Recall that the set ofLipschitz functions in C(X,R) contains the functions fx0(x) = d(x, x0) for fixedx0 ∈ X (the generalized absolute value functions), and one could argue that theseare even easier to deal with than polynomials. So, although polynomial approxima-tion in C([a, b],R) was already done by Weierstrass, it is M. H. Stone who provideda result that proves Weierstrass’ result while also allowing for density of Lipschitzfunctions in (C(X,R), d∞), for any compact metric (X, d) and much more. Notethat in C([a, b],R) polynomials are also Lipschitz by Example 1.4.15 since they aredifferentiable with bounded derivative on any compact set.

Now, we have already proven many results about C(X,Y ), for instance (C(X,Y ), d∞)

is a metric space if (X, d) is compact, and it is complete if (Y, d′) is complete, so wealready have that (C(X,R), d∞) is a complete metric space for any compact met-ric (X, d) by 1.5.1 Exercises and Theorem 1.6.21, so this chapter is mainly devotedto the more advanced result about (C(X,Y ), d∞), the Stone-Weierstrass Theoremwhen (Y, d′) = (R, d1).

Page 114: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

114 KONRAD AGUILAR

2.1. Dense sets of continuous functions and the Stone-Weierstrass theo-rem. As mentioned above, we will prove that the polynomials are dense in the metricspace (C([a, b],R), d∞) and many more. What’s fascinating is that these results stillrely on Taylor’s theorem. It’s as if the ability to approximate continuous functionsstill relies on the ability to control the "slope" of a function. This will be displayedexplicitly by showing that Lipschitz functions are always dense in ((C(X,R), d∞) forany compact metric space (X, d). So, first, we remind the reader of Taylor’s theoremand how it can be used to provide convergence in d∞.

First, we state the Weierstrass M-test, which is need for our result, which wasproven in 371. In 371, the conclusion was stated in terms of uniform convergence,but this is just convergence in d∞, and this will be discussed in a later section. Thefollowing provised a scenario for which a "series" of functions converge in d∞.

Theorem 2.1.1 (Weierstrass M-test). Let a, b ∈ R, a < b. Let (fn)n∈N be a sequencein B([a, b],R). For each n ∈ N, define for all x ∈ [a, b],

Fn(x) =n∑k=0

fn(x).

If:

(1) for each n ∈ N, there exists Mn ∈ R>0 such that |fn(x)| 6 Mn for allx ∈ [a, b], and

(2)∑∞

n=0Mn <∞,

then the sequence (Fn)n∈N in B(X,Y ) converges to some f ∈ B(X,Y ) with respectto d∞.

Before, we move on to convergence in d∞, we present Taylor’s Theorem, whichwas also in 371.

Theorem 2.1.2 (Taylor’s Theorem). Let a, b ∈ R, a < b. Fix c ∈ (a, b). Let f :

([a, b], d1) → (R, d1) be continuous on [a, b] such that for each n ∈ N, it’s n-thderivative f (n) exists on (a, b), where f (0) = f .

If for each n ∈ N, we define for all x ∈ [a, b]

Tf,c,n(x) =

n∑k=0

f (k)(c)

k!(x− c)k,

then for each n ∈ N and x ∈ [a, b], there exists dn,x ∈ [a, b] such that

f(x) = Tf,c,n(x) +f (n+1)(dn,x)

(n+ 1)!(x− c)n+1.

Theorem 2.1.3 (Taylor’s theorem and d∞ convergence). Let a, b ∈ R, a < b. Fixc ∈ (a, b). Let f : ([a, b], d1) → (R, d1) be continuous on [a, b] such that for each

Page 115: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 115

n ∈ N, it’s n-th derivative f (n) exists on (a, b), where f (0) = f . For each n ∈ N,define for all x ∈ [a, b],

Tf,c,n(x) =n∑k=0

f (k)(c)

k!(x− c)k.

If:

(1) for each n ∈ N, there exists Mn ∈ R>0 such that∣∣∣f (n)(y)

n! (x− c)n∣∣∣ 6 Mn for

all x, y ∈ [a, b] and(2)

∑∞n=0Mn converges,

then the sequence (Tf,c,n)n∈N of polynomials in C([a, b],R) converges to f with respectto d∞.

Proof. Exercise. �

The above gives more conditions than necessary, but to make for an easier state-ment and to focus on what is needed, we chose the above statement. Next, we applythis criteria for convergence to find a nice sequence of polynomials converging to thesquare root function shifted slightly, which will be used in the theorems leading upto the Stone-Weierstrass Theorem.

Example 2.1.4 (square roots and polynomials). Let ε > 0. Consider the functionfε : [0, 1] → R, defined by fε(x) =

√x+ ε. There exists a sequence of polynomials

Pn : [0, 1]→ R and a sequence of real numbers (cn)n∈N such that

Pn(x) =n∑k=0

ck

(x− 1

2

)kfor all x ∈ [0, 1], and the sequence (Pn)n∈N in C([0, 1],R) converges to fε ∈ C([0, 1],R)

with respect to d∞. This follows from Theorem 2.1.3. Indeed:Since ε > 0, the n-th derivative of fε exists on (0, 1) for all n ∈ N. Consider c = 1

2 .Using standard calculus, one can show that there exists a sequence (Mn)n∈N in R>0

such that ∣∣∣∣∣f (n)(y)

n!

(x− 1

2

)n∣∣∣∣∣ 6Mn

for all x, y ∈ [a, b], and for n > 2, we have Mn = 2n+3n!√ε

(12 + 1

)n. By ratio test, one

can show that∑∞

n=0Mn <∞.

Now, in order to build polynomials, one must multiply and add functions. Ingeneral, it is useful to only consider families of functions that are closed under theseoperations to provide us with dense subsets. Let’s define these subsets.

Definition 2.1.5 (algebras). Let (X, d) be a metric space. A subset A ⊆ Cb(X,R)

is a subalgebra if for all f, g ∈ A, the functions f + g, fg ∈ A and for all r ∈ R,

Page 116: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

116 KONRAD AGUILAR

the function rf ∈ A, where (f + g)(x) = f(x) + g(x), (fg)(x) = f(x)g(x), and(rf)(x) = rf(x) for all x ∈ X.

A subalgebra A is called unital if it contains the constant 1 function (and thus allconstant functions by closed under scalar multiplication).

Let’s take a look at some subalgebras of Cb(X,R).

Theorem 2.1.6 (subalgebras of continuous functions). If (X, d) is a metric space,then

(1) Cb(X,R) is a unital subalgebra of Cb(X,R),(2) UCb(X,R) is a unital subaglebra of Cb(X,R), and(3) Lb(X,R) is a unital subalgebra of Cb(X,R).

Also, if A ⊆ Cb(X,R) is a subalgebra, then A is a subalgebra of Cb(X,R).

Proof. The sum of two bounded functions is bounded by the triangle inequality,and the product of two bounded functions is bounded is provided by the fact that|rs| = |r| · |s| for all r, s ∈ R. Check these to be sure. So, all that remains is to worryabout the continuities. We will do (3) and leave the others to exercises, but they willuse similar calculations.

Let f, g ∈ Lb(X,R), then by Theorem 1.4.12, we have that Ld(f) <∞, Ld(g) <∞.Let x, y ∈ X such that x 6= y. Then

|(f + g)(x)− (f + g)(y)|d(x, y)

=|f(x)− f(y) + g(x)− g(y)|

d(x, y)

6|f(x)− f(y)|

d(x, y)+|g(x)− g(y)|

d(x, y)

6 Ld(f) + Ld(g),

and thus taking supremum, we have Ld(f+g) 6 Ld(f)+Ld(g) <∞, and thus f+g ∈Lb(X,R) by Theorem 1.4.12. Now consider and note ‖f‖∞ = supx∈X |f(x)| < ∞and ‖g‖∞ <∞ by boundedness.

|(fg)(x)− (fg)(y)|d(x, y)

=|f(x)g(x)− f(y)g(y)|

d(x, y)

=|f(x)g(x)− f(x)g(y) + f(x)g(y)− f(y)g(y)|

d(x, y)

6|f(x)g(x)− f(x)g(y)|

d(x, y)+|f(x)g(y)− f(y)g(y)|

d(x, y)

= |f(x)| · |g(x)− g(y)|d(x, y)

+ |g(y)| · |f(x)− f(y)|d(x, y)

6 ‖f‖∞ ·|g(x)− g(y)|

d(x, y)+ ‖g‖∞ ·

|f(x)− f(y)|d(x, y)

6 ‖f‖∞ · Ld(g) + ‖g‖∞ · Ld(f).

Page 117: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 117

Hence, taking supremum, we have Ld(fg) 6 ‖f‖∞ ·Ld(g) + ‖g‖∞ ·Ld(g) <∞. (lookslike product rule.) An easier argument shows that Ld(rf) = |r| · L(f) < ∞ for allr ∈ R.

Now, the constant 1 function is an element of Lb(X,R) since its Lipschitz constantis 0, hence this function is in Lb(X,R) ⊆ UCb(X,R) ⊆ Cb(X,R).

(1) and (2) are left as exercises. And, so is the last statement of the theorem. �

First, we show that subalgebras are closed uder taking the max or min of finitelymany functions. This hints at a generalization of the Stone-Weierstrass theorem thatwe will not discuss in this course.

Theorem 2.1.7 (max and min). Let (X, d) be a metric space and let A ⊆ Cb(X,R)

be a unital subalgebra. If A is closed with respect to d∞, then for every f ∈ A, it holdsthat |f | ∈ A, where |f |(x) = |f(x)| for all x ∈ X, and for every f, g ∈ A, it holdsthat max{f, g} ∈ A and min{f, g} ∈ A, where max{f, g}(x) = max{f(x), g(x)} forall x ∈ X and similarly for min{f, g}.

Proof. Now, for any two real numbers r, t ∈ R, it is a standard exercise to show thatmax{r, t} = r+t

2 + |r−t|2 and min{r, t} = r+t

2 −|r−t|

2 . Thus, since A is a subalgebra, itis enough to show that if f ∈ A, then |f | ∈ A, where |f |(x) = |f(x)| for all x ∈ X.Furthermore, we may assume that ‖f‖∞ 6 1 since if not, then we may simply showthe result for 1

‖f‖∞ f and then multiplty by ‖f‖∞, which will still be in A since A isa subalgebra.

So, let f ∈ A such that ‖f‖∞ 6 1. We will show that for all ε > 0, there existsg ∈ A such that g ∈ Bd∞(|f |; ε), which will show that |f | ∈ A = A.

Let ε > 0. Since ε2/64 > 0, by Example 2.1.4, there exists a polynomial p definedby p(r) =

∑nk=0 akr

k for all r ∈ R, where n ∈ N, a0, . . . , an ∈ R, such that

supr∈[0,1]

∣∣∣p(r)−√r + ε2/64∣∣∣ < ε/16,

which implies that

supr∈[−1,1]

∣∣∣p(r2)−√r2 + ε2/64

∣∣∣ < ε/16.

Now, fix r ∈ [−1, 1], we have

|r| − 3ε/16 < |r| − ε/16

=√r2 − ε/16

6√r2 + ε2/64− ε/16 by monotonicity of

√·

< p(r2).

Page 118: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

118 KONRAD AGUILAR

Also, we have that

p(r2) <√r2 + ε2/64 + ε/16

6√r2 +

√ε2/64 + ε/16 by subadditivity of

√·

= |r|+ ε/8 + ε/16 = |r|+ 3ε/16.

Hence

(2.1) supr∈[−1,1]

∣∣p(r2)− |r|∣∣ < 3ε/16.

Define q(r) = p(r2). Now, consider fε = q◦f : X → R. Furthermore, for each x ∈ X,we have that

fε(x) = q ◦ f(x)

= q(f(x))

= p(f(x)2)

=n∑k=0

an(f(x)2)n

=n∑k=0

anf(x)2n

=n∑k=0

an(f2n)(x).

And, thus fε =∑n

k=0 anf2n, where f0 is the constant 1 function. Since f ∈ A and

A is a UNITAL subaglebra, we have that fε ∈ A. We used the unital part since itcould be the case that a0 6= 0.

Let x ∈ X. Now, since ‖f‖∞ 6 1, we have that f(x) ∈ [−1, 1], and thus byEquation (2.1), we have

|fε(x)− |f |(x)| = |q(f(x))− |f(x)|| = |p(f(x)2)− |f(x)|| < 3ε/16.

Thus

d∞(fε, |f |) = supx∈X|fε(x)− |f |(x)| 6 3ε/16 < ε

and therefore fε ∈ Bd∞(|f |; ε) where fε ∈ A, which completes the proof. �

Next, we will show that the property of being closed under max and min operationsallows one to approximate any function at every pair of points. This matches ourintution with approximating slopes since a pair of points is what is needed to createa slope, so approximating only at every single point would not be enough. Here iswhere compactness is key.

Page 119: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 119

Theorem 2.1.8 (approximations of pairs). Let (X, d) be a compact metric space.Let A ⊆ C(X,R) (not necessarily a subalgebra). Define

Ap =

{h ∈ C(X,R)

∣∣∣∣ ∀ε > 0, ∀x, y ∈ X,∃hx,y,ε ∈ A such that|hx,y,ε(x)− h(x)| < ε and |hx,y,ε(y)− h(y)| < ε

}and

Ap =

{h ∈ C(X,R)

∣∣∣∣ ∀ε > 0,∀x, y ∈ X,∃hx,y,ε ∈ A such that|hx,y,ε(x)− h(x)| < ε and |hx,y,ε(y)− h(y)| < ε

}.

If for every f, g ∈ A we have that max{f, g} ∈ A and min{f, g} ∈ A, then

A = Ap = Ap.

Proof. Let’s first show that A ⊆ Ap. Let h ∈ A. Let ε > 0. Let x, y ∈ X. Thereexists h′ ∈ A such that d∞(h, h′) < ε. Hence |h(x)−h′(x)| 6 supz∈Z |h(z)−h′(z)| =d∞(h, h′) < ε, and similarly |h(y)− h′(y)| < ε. Thus h ∈ Ap, and thus A ⊆ Ap.

So, the impressive and difficult part will be somehow showing that d∞ (uniform)approximation can be replaced by only approximation at pairs of points; that is,Ap ⊆ A. This is where max, min, and compactness will be used.

Let f ∈ Ap. Let ε > 0. We will find fε ∈ A such that fε ∈ Bd∞(f ; ε), thusestablishing that f ∈ A. Now, by definition of Ap, for each x, y ∈ X, there existsfx,y,ε ∈ A such that

|f(x)− fx,y,ε(x)| < ε/2 and |f(y)− fx,y,ε(y)| < ε/2.

Note that this is equivalent to

f(x)− ε/2 < fx,y,ε(x) < f(x) + ε/2 and f(y)− ε/2 < fx,y,ε(y) < f(y) + ε/2.

Now, define Ux,y,ε = {z ∈ X | fx,y,ε(z) < f(z) + ε/2}, and note that x, y ∈ Ux,y,ε forall x, y ∈ X.

Next, we have

Ux,y,ε = {z ∈ X | fx,y,ε(z)− f(z) < ε/2}

= {z ∈ X | (fx,y,ε − f)(z) < ε/2}

= (fx,y,ε − f)−1((−∞, ε/2)),

which is open in (X, d) since fx,y,ε − f is continuous and (−∞, ε/2) is open.Now, let x ∈ X. Let y ∈ X, then y ∈ Ux,y,ε. Therefore X = ∪y∈XUx,y,ε, and thus

{Ux,y,ε | y ∈ X} is an open cover of X. Since X is compact, there exists n ∈ N andy0, . . . , yn ∈ X such that X = ∪nj=0Ux,yj ,ε.

Next, define fx,ε = min{fx,y0,ε, . . . , fx,yn,ε}, and note fx,ε ∈ A since a simpleinduction argument shows that A is closed under taking the minumum or maximumfinitely many times. Now, by above, we have that f(x) − ε/2 is a lower bound for

Page 120: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

120 KONRAD AGUILAR

{fx,yj ,ε(x) | j ∈ {0, . . . , n}}, then the minimum of this finite set satisfies

f(x)− ε/2 < min{fx,yj ,ε(x) | j ∈ {0, . . . , n}}

= min{fx,y0,ε, . . . , fx,yn,ε}(x)

= fx,ε(x).

Next, let y ∈ X, then y ∈ ∪nj=0Ux,yj ,ε, and thus there exists j ∈ {0, . . . , n} suchthat y ∈ Ux,yj ,ε and thus by minumum, we have

fx,ε(y) 6 fx,yj ,ε(y) < f(y) + ε/2.

and thus fx,ε(y) < f(y) + ε/2 for all y ∈ X.So, to summarize how far we have gotten, we have for every x ∈ X, there exists

a function fx,ε ∈ A such that f(x) − ε/2 < fx,ε(x) and fx,ε(y) < f(y) + ε/2 for ally ∈ X. So, now we will use compactness again to remove the dependency on x.

Now, define Vx,ε = {y ∈ X | fx,ε(y) > f(y) − ε/2}, and note that x ∈ Vx,ε. Also,we have

Vx,ε = {y ∈ X | (fx,ε − f)(y) > −ε/2}

= {y ∈ X | (fx,ε − f)(y) ∈ (−ε/2,∞)}

= (fx,ε − f)−1((−ε/2,∞)),

which is open in (X, d) since (fx,ε − f) is continuous and (−ε/2,∞) is open.Also, by above, we have that X = ∪x∈XVx,ε, and thus {Vx,ε | x ∈ X} is an open

cover of X, and by compactness, there exists m ∈ N and x0, . . . , xm ∈ X such thatX = ∪mj=0Vxj ,ε.

Next, define fε = max{fx0,ε, . . . , fxm,ε}, and fε ∈ A since finite max is preservedsimilar to finite min by an induction argument.

Finally, let w ∈ X. We have that f(w) + ε/2 is an upper bound for the finite set{fxj ,ε(w) | j ∈ {0, . . . ,m}}, hence by maximum, we have

fε(w) = max{fx0,ε, . . . , fxm,ε}(w) = max{fxj ,ε(w) | j ∈ {0, . . . ,m}} < f(w) + ε/2.

Next, since w ∈ X = ∪mj=0Vxj ,ε, there exists j ∈ {0, . . . ,m} such that w ∈ Vxj ,ε, andthus by maximum

fε(w) > fxj ,ε(w) > f(w)− ε/2.

Thus f(w)− ε/2 < fε(w) < f(w) + ε/2 =⇒ |f(w)− fε(w)| < ε/2. Therefore,

d∞(f, fε) = supw∈X|f(w)− fε(w)| 6 ε/2 < ε,

and thus fε ∈ Bd∞(f ; ε) where fε ∈ A, which completes the proof of A = Ap.What remains is the final equality. Since A ⊆ A, we have Ap ⊆ Ap. Now, let

h ∈ Ap. Let ε > 0. Let x, y ∈ X. Thus, there exists hx,y,ε/2 ∈ A such that

|hx,y,ε/2(x)− h(x)| < ε/2 and |hx,y,ε/2(y)− h(y)| < ε/2.

Page 121: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 121

Now, since hx,y,ε/2 ∈ A, there exists hx,y,ε ∈ A such that d∞(hx,y,ε/2, hx,y,ε) < ε.

Therefore

|hx,y,ε/2(x)− hx,y,ε(x)| < ε/2 and |hx,y,ε/2(y)− hx,y,ε(y)| < ε/2.

Hence

|hx,y,ε(x)− h(x)| 6 |hx,y,ε(x)− hx,y,ε/2(x)|+ |hx,y,ε/2(x)− h(x)| < ε/2 + ε/2 = ε.

Similarly, |hx,y,ε(y) − h(y)| < ε, which shows that h ∈ Ap, and thus Ap ⊆ Ap andthe proof is complete. �

The previous two results suggest that pairwise approximation is the key, but itwould be much better if we can somehow replace this requirement with one of a morealgebraic nature. The idea is that if we allow our unital subalgebra to distinguishevery pair of points in X, then maybe its closure will be enough to fill up all ofC(X,R), which brings us to the next definition.

Definition 2.1.9 (separation of points). Let A ⊆ C(X,R). We say that A separatespoints if for all x, y ∈ X with x 6= y, there exists f ∈ A such that f(x) 6= f(y).

Let’s prove some basic facts about such sets and prove existence of such sets.

Theorem 2.1.10 (separating sets). Let (X, d) be a metric space.

(1) If A ⊆ C(X,R) separates points and A ⊆ B, then B separates points.(2) L(X,R) ⊆ C(X,R) separates points, and thus by part (1), so does UC(X,R)

and C(X,R).

Proof. (1) Let x, y ∈ X such that x 6= y. By assumption there exists f ∈ A ⊆ B

such that f(x) 6= f(y), which completes this proof.(2) Let x, y ∈ X such that x 6= y. Consider the function fx defined by fx(a) =

d(a, x) for all a ∈ X, which is Lipschitz by Theorem 1.4.10, so f ∈ L(X,R), andf(x) = d(x, x) = 0, but f(y) = d(y, x) > 0 = f(x). So L(X,R) separates points.And, since L(X,R) ⊆ UC(X,R) ⊆ C(X,R), the proof is compete. �

Now, let’s begin to see what happens when we combine some of our assumptionson sets of C(X,R). As an aside, a consequence of the next theorem is that if (X, d)

is compact metric, then C(X,R) iself has many interesting continuous function sinceC(X,R) = C(X,R) and separates points.

Theorem 2.1.11 (special functions in special algebras). Let (X, d) be a compactmetric space.

If A ⊆ C(X,R) is unital subalgebra that separates points, then for any a, b ∈ X,a 6= b and µ, ν ∈ R, there exists f ∈ A such that f(a) = µ and f(b) = ν.

Page 122: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

122 KONRAD AGUILAR

Proof. Let a, b ∈ X such that a 6= b, and let µ, ν ∈ R.First, we show that there exists h ∈ A such that h(a) 6= h(b) and h(a) 6= 0.Note that by assumption, there exists p ∈ A such that p(a) 6= p(b). If p(a) 6= 0,

then we would be done. So, assume that p(a) = 0, then it must be the case thatp(b) 6= 0 and thus |p(b)| > 0. Now, define the function g(x) = |p(b)|

2 for all x ∈ X,which is a constant function and thus g ∈ A, since A is unital. Next, by Theorem2.1.6, A is a unital subalgebra closed with respect to d∞, and since p ∈ A ⊆ A, wehave |p| ∈ A by Theorem 2.1.7, and since g ∈ A, by Theorem 2.1.7, we have thath = max{|p|, g} ∈ A.

Now, we have h(a) = max{|p(a)|, g(a)} = max{0, |p(b)|2 } = |p(b)|2 6= 0. Also h(b) =

max{|p(b)|, g(b)} = max{|p(b)|, |p(b)|2 } = |p(b)| 6= 0, and h(a) 6= h(b) and h(a) 6= 0.Therefore h(a)(h(a)− h(b)) 6= 0. Thus, we may define

q(x) =1

h(a)(h(a)− h(b))(h(x)(h(x)− h(b))

for all x ∈ X. Since A is a subalgebra, we have that q ∈ A, since h ∈ A. Also, wehave that q(a) = 1 and q(b) = 0. Following the same process, we may find t ∈ Asuch that t(a) = 0 and t(b) = 1.

Next, define f(x) = µ · q(x) + ν · t(x) for all x ∈ X, then f ∈ A since A is asubalgebra and q, t ∈ A, also f(a) = µ · q(a)+ν · t(a) = µ ·1+ν ·0 = µ and similarly,we have f(b) = ν. �

Finally, let’s prove the Stone-Weierstrass Theorem, which actually uses the exactsame hypotheses as the last Theorem. And, we note that these hypotheses infor-mally capture the ability of approximating slopes at each pair of points. Indeed, theprevious theorem tells us that separation of points and algebraic closure allows us tomatch values of then endpoints of secant lines at any pair of points and this is whatallows for approximation of the slope.

Theorem 2.1.12 (Stone-Weierstrass Theorem). Let (X, d) be a compact metricspace.

If A ⊆ C(X,R) is unital subalgebra that separates points, then A = C(X,R); thatis, A is dense in (C(X,R), d∞).

Proof. By definition, we have A ⊆ C(X,R). Let f ∈ C(X,R). We will show thatf ∈ A. We will use Theorem 2.1.8. Now, by Theorem 2.1.6, we have that A is aunital subalgebra that is closed with respect to d∞. By Theorem 2.1.7, we have thatfor every f, g ∈ A, it holds that max{f, g} ∈ A and min{f, g} ∈ A. Hence A satisifes

Page 123: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 123

the hypotheses of Theorem 2.1.8. Hence, we have

A = (A)

= (A)p

=

{h ∈ C(X,R)

∣∣∣∣ ∀ε > 0, ∀x, y ∈ X,∃hx,y,ε ∈ (A) such that|hx,y,ε(x)− h(x)| < ε and |hx,y,ε(y)− h(y)| < ε

}=

{h ∈ C(X,R)

∣∣∣∣ ∀ε > 0, ∀x, y ∈ X,∃hx,y,ε ∈ A such that|hx,y,ε(x)− h(x)| < ε and |hx,y,ε(y)− h(y)| < ε

}= Ap.

Hence, we only need to show that f ∈ Ap. Let ε > 0. Let x, y ∈ X. If x = y, thenf(x) = f(y), and the constant f(x) function, h, is an element of A since A is unitaland |h(x)− f(x)| = |f(x)− f(x)| = 0 < ε and |h(y)− f(y)| = |f(x)− f(x)| = 0 < ε.So, assume x 6= y. Now, f(x), f(y) ∈ R. Since A is a unital subalgebra that separatespoints, there exists h ∈ A such that h(x) = f(x) and h(y) = f(y) by Theorem 2.1.11.Hence

|h(x)− f(x)| = 0 < ε and |h(y)− f(y)| = 0 < ε,

and thus f ∈ Ap = A. �

As a corollary, we get the Weierstrass Theorem.

Theorem 2.1.13 (Weierstrass Theorem). The set of polynomials in C([0, 1],R) isdense in (C([0, 1],R), d∞).

Proof. It is basic arithmetic that the set of polynomials is a unital subalgebra. Notethat f(x) = x for all x ∈ [0, 1] is a polynomial. And if x, y ∈ [0, 1] such that x 6= y,then f(x) = x 6= y = f(y). Thus the set of polynomials separate points, and theproof is complete by Theorem 2.1.12. �

Now, we see how the Stone-Weierstrass theorem can extend this result to multi-variable polynomials and compact sets that need not be as nice as intervals.

Theorem 2.1.14 (density of multivariable polynomials). Let n ∈ N \ {0}. Let1 6 p 6∞. Consider the metric space (Rn, dp).

If A ⊆ Rn is compact in (Rn, dp), then the set of multivariable polynomials inC(A,R) is dense in (C(A,R), d∞).

Proof. It is basic arithmetic that the set of polynomials is a unital subalgebra. Letx, y ∈ A such that x 6= y. Note x = (x1, . . . , xn), y = (y1, . . . , yn), and the conditionx 6= y implies there exists k ∈ {1, . . . , n} such that xk 6= yk. Now, define f ∈ C(A,R)

by f(z1, . . . , zn) = zk for all (z1, . . . , zn) ∈ A. By definition f is a polynomial andf(x) = f(x1, . . . , xn) = xk 6= yk = f(y1, . . . , yn) = f(y). �

Page 124: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

124 KONRAD AGUILAR

What if one cannot even define polynomials like on the compact set H of 1.6.1Exercises? The next result shows that every C(X,R) for (X, d) compact metricspace, has a very nice and familiar dense subset.

Theorem 2.1.15 (density of Lipschitz). If (X, d) is a compact metric space, thenL(X,R) is dense in C(X,R).

Proof. By Theorem 2.1.6, we have that L(X,R) is a unital subalgebra. By Theorem2.1.10, we have that L(X,R) separates points. The proof is complete by Theorem2.1.12. �

Now, what if L(X,R) = C(X,R), then the above result is not impressive. If turnsout that L(X,R) ( C(X,R) if and only ifX is an interesting/(non-terrible) compactmetric space. We begin by characterizing the interesting compact metric spaces.

Theorem 2.1.16 (compact is discrete if and only if finite). Let (X, d) be a compactmetric space. The following are equivalent:

(1) X is infinite;(2) (X, d) is not topologically discrete.

Proof. (2) =⇒ (1) Contraposition. Let X be finite, then (X, d) is topologically dis-crete by Theorem 1.2.24.

(1) =⇒ (2) Since X is infinite, X contains a countably infinite subset of distinctterms, which we denote by {xn ∈ X | n ∈ N}. Since X is compact, the sequence(xn)n∈N has a convergent subsequence (xnk)k∈N converging to some a ∈ X. ThusX has a non-(eventually constant) convergent sequence, and therefore (X, d) cannotbe topologically discrete by Theorem 1.2.23. �

Now, we are prepared to finally display the impact of Theorem 2.1.15.

Theorem 2.1.17 (Lipschitz functions are non-trivially dense). Let (X, d) be a com-pact metric space. The following are equivalent:

(1) L(X,R) ( C(X,R);(2) X is infinite;(3) (X, d) is not topologically discrete.

Proof. (2)⇐⇒ (3) is Theorem 2.1.16.(1) =⇒ (2). Contraposition. Assume X is finite. So, there exists N ∈ N such that

X = {x0, x1, . . . , xN}. Let f : X → R be a function. Then{|f(x)− f(y)|

d(x, y)

∣∣∣∣ x, y ∈ X,x 6= y

}=

{|f(xj)− f(xk)|

d(xj , xk)

∣∣∣∣ j, k ∈ {0, . . . , N}, j 6= k

},

which is a finite set and thus

Ld(f) = max

{|f(xj)− f(xk)|

d(xj , xk)

∣∣∣∣ j, k ∈ {0, . . . , N}, j 6= k

}<∞.

Page 125: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 125

So, every function on f is Lipschitz and thus continuous, and in particular, everycontinuous function is Lipschitz, and thus L(X,R) = C(X,R) = RX .

(2) =⇒ (1). Assuming X is infinite, to show L(X,R) ( C(X,R), we must find anon-Lipschitz continuous function, f . Just as done in the proof of Theorem 2.1.16,there exists a sequence (xn)n∈N in X of distinct terms converging to an elementa ∈ X and (xn)n∈N is not eventually constant. It could be the case that xn = a foronly one n ∈ N by distinct terms, and if this is the case, then simply remove thisterm, and the resulting sequence, which we still denote by (xn)n∈N, is a sequence ofdistinct terms converging to a such that 0 < d(xn, a) for all n ∈ N.

Now, the function

fa : x ∈ (X, d) 7→ d(x, a) ∈ ([0,∞), d1)

is continuous by Theorem 1.3.4. Also, the function

ρ : x ∈ ([0,∞), d1) 7→√x ∈ ([0,∞), d1)

is continuous by 371.Hence, the function f = ρ◦fa : x ∈ (X, d) 7→

√d(x, a) ∈ ([0,∞), d1) is continuous

by Theorem 1.3.4. Let R ∈ R>0. Now, since (xn)n∈N converges to a, there existsN ∈ N such that d(xN , a) < 1/R2. Since xN 6= a, we may compute

|f(xN )− f(a)|d(xN , a)

=|√

d(xN , a)−√

d(a, a)|d(xN , a)

=

√d(xN , a)

d(xN , a)

=1√

d(xN , a)

>1√

1/R2

= R.

Thus the set{|f(x)−f(y)|

d(x,y)

∣∣∣∣ x, y ∈ X,x 6= y

}is unbounded and thus Ld(f) = ∞,

which implies that f is not Lipschitz by Theorem 1.4.12. �

We summarize our results in the next Theorem.

Theorem 2.1.18 (Lipschitz non-trivially dense). Let (X, d) be a compact metricspace.

(1) If X is infinite (equivalently, not topologically discrete), then L(X,R) (C(X,R) and L(X,R) is dense in (C(X,R), d∞).

(2) If X is finite (equivalently, topologically discrete), then L(X,R) = C(X,R)

and L(X,R) is dense in (C(X,R), d∞).

Proof. This is Theorem 2.1.17 and Theorem 2.1.15. �

Page 126: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

126 KONRAD AGUILAR

2.1.1. Exercises.

(1) Prove Theorem 2.1.3.

Proof. For each n ∈ N, we have that∣∣∣f (k)(c)k! (x− c)k

∣∣∣ 6 Mn for all x ∈ [a, b]

since c ∈ [a, b]. Thus, by Theorem 2.1.1, we have that (Tf,c,n)n∈N convergesto some g ∈ B([a, b],R) in d∞. Now, we will show that f = g.

Next, for each x ∈ [a, b], we have that

0 6 |Tf,c,n(x)− g(x)| 6 supy∈[a,b]

|Tf,c,n(y)− g(y)| = d∞(Tf,c,n, g)

and thus limn→∞ |Tf,c,n(x)− g(x)| = 0 by squeeze theorem.Next, fix x ∈ [a, b]. By Theorem 2.1.2, for each n ∈ N, there exists dn ∈

[a, b] such that

f(x) = Tf,c,n(x) +f (n+1)(dn)

(n+ 1)!(x− c)n+1.

However,

|f(x)− g(x)| =

∣∣∣∣∣(Tf,c,n(x) +

f (n+1)(dn)

(n+ 1)!(x− c)n+1

)− g(x)

∣∣∣∣∣6 |Tf,c,n(x)− g(x)|+

∣∣∣∣∣f (n+1)(dn)

(n+ 1)!(x− c)n+1

∣∣∣∣∣6 |Tf,c,n(x)− g(x)|+Mn.

Hence 0 6 |f(x) − g(x)| 6 limn→∞ (|Tf,c,n(x)− g(x)|+Mn) = 0. Thusf(x) = g(x), and the proof is complete. �

(2) Finish proving Theorem 2.1.6.

Proof. (2). We do not prove (1) since it is even easier than (2), and for (2), weonly prove closure under multiplcation since it is the most difficult property.

Let f, g ∈ UCb(X,R). Let ε > 0. Since f, g are bounded, there existsM,N ∈ R>0 such that ‖f‖∞ 6 M, ‖g‖∞ 6 N . Set K = max{N,M} >0. Since ε/(2K) > 0, there exists δf > 0 such that if d(a, b) < δf , then|f(a) − f(b)| < ε/(2K). Also, there exists δg > 0 such that if d(a, b) < δg,then |g(a)− g(b)| < ε/(2K). Choose δ = min{δa, δb} > 0. Let a, b ∈ X such

Page 127: A COURSE IN METRIC SPACES ASSUMING BASIC REAL ANALYSISkaguilar/MAT472/metric_spaces_k_aguilar_c.pdf · METRIC SPACES 5 Remark 1.1.5. The purpose of this definition for a sequence

METRIC SPACES 127

that d(a, b) < δ. Then

|(fg)(a)− (fg)(b)| = |f(a)g(a)− f(b)g(b)|

= |f(a)g(a)− f(a)g(b) + f(a)g(b)− f(b)g(b)|

6 |f(a)| · |g(a)− g(b)|+ |g(b)| · |f(a)− f(b)|

6 ‖f‖∞ · |g(a)− g(b)|+ ‖g‖∞ · |f(a)− f(b)|

6 K · |g(a)− g(b)|+K · |f(a)− f(b)|

< K · ε/(2K) +K · ε/(2K)

= ε/2 + ε/2 = ε.

Hence fg ∈ UC(X,R), and thus fg ∈ UCb(X,R) by the comments at thebeginning of the proof of Theorem 2.1.6.

Now, for the last statement of the theorem, let A be a subalgebra and letf, g ∈ A. We will show the most difficult property, which is that fg ∈ A.Now, there exists sequences (fn)n∈N, (gn)n∈N in A that converge to f, g,respectively, with respect to d∞. Since convergent sequences form boundessets with their limits, there exists K ∈ R>0 such that supn∈N ‖fn‖∞, ‖g‖∞ 6K.

Let ε > 0. Since ε/(3K) > 0, there exists Nf ∈ N such that d∞(fn, f) <

ε/(3K) for all n > Nf . Also, there exists Ng ∈ N such that d∞(gn, g) <

ε/(3K) for all n > Ng. Choose N = max{Nf , Ng}. Let n > N . Let a ∈ X.

|(fngn)(a)− (fg)(a)| = |fn(a)gn(a)− f(a)g(a)|

= |fn(a)gn(a)− fn(a)g(a) + fn(a)g(a)− f(a)g(a)|

6 |fn(a)| · |gn(a)− g(a)|+ |g(a)| · |fn(a)− f(a)|

6 ‖fn‖∞ · d∞(gn, g) + ‖g‖∞ · d∞(fn, f)

6 K · d∞(gn, g) +K · d∞(fn, f)

< K · ε/(3K) +K · ε/(3K)

= ε/3 + ε/3 = 2ε/3.

Therfore, d∞(fngn, fg) 6 2ε/3 < ε. Hence (fngn)n∈N converges to fg withrespect to d∞. Since A is a subalgebra, we have that fngn ∈ A for all n ∈ N.Therefore fg ∈ A. �

E-mail address: [email protected]