Topology
Topology
Andrea Munaro
Contents
2 Topological Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.1 Convergence 20
2.2 Bases 23
2.3 Continuous functions 27
2.4 Subspace topology 29
2.5 Product topology 30
2.6 Function spaces 32
4 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.1 Compactness in Euclidean spaces 47
4.2 Compactness in metric spaces 48
4.3 Compactness in function spaces 51
5 Baire Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
1. Metric Spaces and Point-Set Topology
Two fundamental and ubiquitous notions in Analysis are continuity and convergence. The word
continuity comes from the latin continere, which can be translated as hold together. Intuitively, a
function f from X ⊆ R to R is continuous if it does not produce any cut: when x varies slightly,
also the image f (x) varies slightly. The reader is certainly familiar with the following precise
definition of continuity at a point x0 :
For every ε > 0, there exists δ > 0 such that | f (x) − f (x0 )| < ε whenever |x − x0 | < δ .
Clearly, this definition relies on the fact that we can measure the “distance” between two
points of the real line. A similar issue appears in the case of convergence. Intuitively, a sequence
{xn } of real numbers converges to a limit x if the elements of the sequence become eventually as
close to x as one wants. More precisely:
For every ε > 0, there exists N such that |x − xn | < ε for each n ≥ N.
Once again, we see that the definition above requires some sort of “distance”. It would
certainly be interesting to generalize the notions of continuity and convergence to “spaces”
different from R. For example, what could it mean for a function f : Rn → Rm to be continuous?
Can we speak about convergence of sequences of functions or of sequences of sequences?
Rather than defining continuity and convergence (and many other interesting concepts) for a
particular “space”, it is certainly desirable (and more efficient) to look for a sufficiently general
notion of “space” in which we can properly define them. But in the first place, as already noticed,
it seems necessary to have a meaningful notion of “distance”. This will lead us to introduce a
general object called metric space: we will see that most of what the reader is already familiar
with can be easily translated into this new setting. On the other hand, it will immediately appear
that continuity and convergence (and many other concepts we are interested in) are in fact
independent of the “distance” and can be further generalized in the setting of a topological space
which is somehow the natural ambient where continuous functions can be defined. This object
will be introduced in Chapter 2 and studied throughout the manuscript.
We now introduce the notion of metric space, which is nothing but a set endowed with a
“distance function”.
4 Chapter 1. Metric Spaces and Point-Set Topology
The property M3 is called triangle inequality, since when considering the usual distance in the
plane it says that the length of one side of a triangle is at most the sum of the lengths of the other
two sides. This distance can be immediately generalized:
Example 1.1 — Euclidean metric. Given x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ) in the Euclidean
n-space Rn , we define the Euclidean distance as
s
n
d(x, y) = ∑ (xi − yi )2 .
i=1
Note that d(x, y) = kx − yk, where k · k is the usual p Euclidean norm associated with the inner
product (·, ·) in Rn , i.e. (x, y) = ∑ xi yi and kxk = (x, x). The Euclidean distance clearly satisfies
M1 and M2. Let us now show it satisfies M3 as well and so, as the name suggests, it is indeed
a distance. Given x, y, z ∈ Rn , we have to show that kx − zk ≤ kx − yk + ky − zk. Therefore,
letting u = x − y and v = y − z, M3 is equivalent to ku + vk ≤ kuk + kvk and further to
0 ≤ (kuk + kvk)2 − ku + vk2 = 2(kukkvk − (u, v)).
It is then enough to show the Cauchy-Schwarz inequality:
kukkvk ≥ |(u, v)|.
For λ ∈ R, we have
0 ≤ (u + λ v, u + λ v) = (u, u) + 2λ (u, v) + λ 2 (v, v) = c + bλ + aλ 2 = f (λ ).
Since the real-valued quadratic function f is non-negative, it must be b2 − 4ac ≤ 0, i.e. 4(u, v)2 −
4(u, u)(v, v) ≤ 0 from which the Cauchy-Schwarz inequality follows.
Therefore, Rn together with the Euclidean distance is a metric space. We will see later a
generalization of this example.
Example 1.3 — SNCF metric. Everyone who has ever tried to take a train from Nantes to Lyon
has surely noticed that a stop in Paris is compulsory. This leads us to define a metric on C, the
SNCF metric1 , as follows:
(
|x − y| if Arg(x) = Arg(y) (mod 2π);
d(x, y) = (1.2)
|x| + |y| otherwise.
Note that | · | is the usual absolute value of a complex number. In our interpretation, Paris is
the origin of the complex plane.
1 SNCF is the acronym for Société nationale des chemins de fer français.
5
x
y
y
x
Let us check d is indeed a metric on C. The only non-trivial verification is M3. Therefore, let
x, y, z ∈ C. Suppose first Arg(x) = Arg(z) (mod 2π). If in addition Arg(y) = Arg(z) (mod 2π), then
Otherwise, we have
d(x, z) = |x − z| ≤ |x| + |z| ≤ (|x| + |y|) + (|y| + |z|) = d(x, y) + d(y, z).
Suppose now Arg(x) 6= Arg(z) (mod 2π). If in addition Arg(y) = Arg(x) (mod 2π), then
Note that, by symmetry, the same holds if Arg(y) = Arg(z) (mod 2π). Therefore, assume Arg(y) 6=
Arg(x) (mod 2π) and Arg(y) 6= Arg(z) (mod 2π), thus obtaining
d(x, z) = |x| + |z| ≤ (|x| + |y|) + (|y| + |z|) = d(x, y) + d(y, z).
This shows that C together with the SNCF metric is a metric space.
d(x,y)
Exercise 1.1 Let (X, d) be a metric space. Show that d 0 (x, y) = 1+d(x,y) defines a metric on X.
Enter
Exercise 1.2 Let G be a connected graph. The distance d(vi , v j ) from the vertex vi to the vertex
v j of G is the minimum length of path between vi and v j . Show that (G, d) is a metric space.
Exercise 1.3 For each integer n 6= 0 and prime number p, let v p (n) = max{r : pr | n}. For each
0 6= a/b ∈ Q, let v p (a/b) = v p (a) − v p (b). Show first that v p (r) is well-defined for each rational
number r 6= 0. Finally, show that
(
p−v p (x−y) if x 6= y;
d(x, y) = (1.3)
0 otherwise.
defines a metric on Q such that d(x, z) ≤ max{d(x, y), d(y, z)} for all x, y, z ∈ Q.
It turns out that the metric defined in Example 1.1 comes from a very general construction
related to the notion of norm:
6 Chapter 1. Metric Spaces and Point-Set Topology
Definition 1.2 — Normed space. Given a vector space E over the field F, where F = R or
F = C, a norm on E is a map k · k : E → R satisfying the following properties:
N1. kxk ≥ 0 for every x ∈ E, with equality if and only if x = 0;
N2. kλ xk = |λ |kxk for every λ ∈ F and x ∈ E;
N3. kx + yk ≤ kxk + kyk for all x, y ∈ E.
A normed space is a pair (E, k · k), where E is a vector space and k · k a norm on E.
An easy but important observation is that a normed space (E, k · k) is in fact a metric space:
just set d(x, y) = kx − yk, for all x, y ∈ E. The vector space Rn with the Euclidean metric is an
example of this kind.
Note that a metric on a normed space defined as above is homogeneous, i.e. d(ax, ay) = |a|d(x, y)
for every a ∈ F and x, y ∈ E, and translation invariant, i.e. d(x + z, y + z) = d(x, y) for every x, y, z ∈ E.
This shows that a metric on a vector space does not necessarily come from a norm as described
above. For example, consider the discrete metric or the SNCF metric.
Exercise 1.4 Let E be a vector space over the field F, where F = R or F = C. Show that if (E, d)
is a metric space such that d is homogeneous and translation invariant, then kxk = d(x, 0)
defines a norm on E. Enter
Let us see some examples of normed spaces. We begin with two norms defined on the
finite-dimensional vector space Rn .
Example 1.4 — Max-norm. Define the function k · k∞ : Rn → R by
n 1/p
p
kxk p = ∑ |xi | .
i=1
The case p = 1 gives rise to the so-called Manhattan norm and verifying N1 to N3 is immediate.
For p = 2, we obtain the usual Euclidean norm (see Example 1.1) and we have already seen
that M3 follows by the Cauchy-Schwarz inequality.
Let us now verify the norm properties in general. In fact, it is easy to check that the p-
norm satisfies N1 and N2. In order to show N3, observe first that the function f : R → R
given by f (t) = |t| p is convex (see Exercise 1.5), i.e. for each x, y ∈ R and λ ∈ [0, 1], we have
7
f (λ x + (1 − λ )y) ≤ λ f (x) + (1 − λ ) f (y). Therefore, for every x, y ∈ Rn and λ ∈ [0, 1], we have
n n
kλ x + (1 − λ )yk pp = ∑ |λ xi + (1 − λ )yi | p ≤ ∑ λ |xi | p + (1 − λ )|yi | p = λ kxk pp + (1 − λ )kyk pp .
i=1 i=1
This implies that if kxk p = kyk p = 1, then kλ x + (1 − λ )yk p ≤ 1. Since N3 is trivial if one of x
and y is 0, we may assume this is not the case. Therefore, x/kxk p and y/kyk p have both p-norm
1 and, by the previous inequality, we have
kx + yk p kxk p x kyk p y
= + ≤ 1.
kxk p + kyk p kxk p + kyk p kxk p kxk p + kyk p kyk p p
Exercise 1.5 Show that the function f : R → R given by f (t) = |t| p is convex as follows:
• Show that f : R → R such that f (t) = |t| is convex.
• Show that if f : R → R is convex and g : R → R is convex and non-decreasing, then g ◦ f
is convex.
Enter
We now concentrate on an infinite-dimensional vector space over R: the vector space of all
continuous functions f : [0, 1] → R.
Example 1.6 — Sup-norm. Let C0 ([0, 1], R) be the vector space of all continuous functions
f : [0, 1] → R. We define the sup-norm k · k∞ on C0 ([0, 1], R) by
k f k∞ = sup | f (x)|.
x∈[0,1]
Weierstrass’ Theorem implies k · k∞ is well-defined. N1 and N2 are an easy check. Moreover, for
each x ∈ [0, 1], we have | f (x) + g(x)| ≤ | f (x)| + |g(x)| ≤ k f k∞ + kgk∞ and so N3 holds as well. We
refer to the corresponding metric as uniform metric and the reason will appear in Example 1.12.
Example 1.7 — L1 -norm. Consider again the vector space C0 ([0, 1], R) of all continuous functions
f : [0, 1] → R. We define the L1 -norm k · kL1 ([0,1]) on C0 ([0, 1], R) by
Z 1
k f kL1 ([0,1]) = | f (t)| dt.
0
It is easy to check that N2 and N3 hold. Consider now N1. Suppose that k f kL1 ([0,1]) = 0, i.e.
R1
0 | f (t)| dt = 0, but | f | is not identically 0. This means that | f (t0 )| > 0, for some t0 ∈ [0, 1], and the
continuity of | f | implies there exists r such that | f (t)| ≥ | f (t20 )| for each t ∈ [t0 − r,t0 + r]. Therefore,
Z 1 Z t0 +r Z t0 +r
| f (t0 )|
0= | f (t)| dt ≥ | f (t)| dt ≥ dt = r| f (t0 )| > 0,
0 t0 −r t0 −r 2
a contradiction. We refer to the corresponding metric as integral metric.
The reader is certainly familiar with the notion of open interval in R. Having a metric at
disposal, it can be easily generalized as follows:
Definition 1.3 — Open ball. Let (X, d) be a metric space, x0 ∈ X and r > 0. The open ball
centered at x0 with radius r is the set Br (x0 ) = {x ∈ X : d(x, x0 ) < r}.
Similarly, it is natural to define an open set as a set such that, for each of its points, there
exists an open ball containing the point and contained in the set:
8 Chapter 1. Metric Spaces and Point-Set Topology
Definition 1.4 — Open set. Let (X, d) be a metric space. A set U ⊂ X is open if, for each x ∈ U,
there exists ε > 0 such that Bε (x) ⊂ U.
Note that, in the definition of open set, it is not the distance that plays a fundamental role,
but rather the notion of “closeness” induced by the distance itself. This will become more evident
by comparing Figure 1.3, Lemma 1.5 and Example 1.15.
Proof. Let (X, d) be a metric space and consider the open ball centered at x0 with radius r. For
x ∈ Br (x0 ), let ε = r − d(x, x0 ) > 0. For each y ∈ Bε (x), we have
Example 1.8 Consider R with the Euclidean metric. The open balls correspond to the open
bounded intervals (a, b). The intervals (−∞, b) and (a, +∞) are open as well as the complements
of finite sets. Examples of non-open sets are [a, b), (a, b], [a, b], Z, Q and R \ Q.
Figure 1.3: The open balls in R2 centered at 0 with radius 1 for the Manhattan metric, the Euclidean
metric and the metric coming from the max-norm.
Proposition 1.1 Let (X, d) be a metric space and F be the family of open sets of (X, d). The
following hold:
(i). ∅ and X are in F ;
(ii). The union of the elements of any subfamily of F is in F ;
(iii). The intersection of the elements of any finite subfamily of F is in F .
for some F0 ∈ F 0 and since F0 is open, there exists ε > 0 such that Bε (x) ⊂ F0 ⊂ {F : F ∈ F 0 }.
S
(iii) It is enough to show that for any two open sets F1 and F2 , the intersection F1 ∩ F2 is open.
Therefore, let x ∈ F1 ∩ F2 . Since F1 and F2 are both open, there exist ε1 , ε2 > 0 such that Bε1 (x) ⊂ F1
and Bε2 (x) ⊂ F2 . Taking ε = min{ε1 , ε2 }, we have Bε (x) ⊂ F1 ∩ F2 .
9
R The intersection of the elements of any subfamily of open sets is not necessarily open.
1 1
T consider R with the Euclidean metric and let In be the open interval (− n , n ). We
Indeed,
have In = {0}.
Example 1.9 All subsets of a discrete metric space (X, d) are open. Indeed, for each S ⊂ X, we
have S = x∈S {x} = x∈S B1 (x).
S S
Lemma 1.2 Every open set in a metric space (X, d) is a union of open balls.
Proof. Let U be an open set. For each x ∈ U, there exists εx such that Bεx (x) ⊂ U. Therefore,
x∈U Bεx (x) ⊂ U. The other inclusion is obvious.
S
Definition 1.5 — Neighbourhood. Let (X, d) be a metric space and let x ∈ X. A subset N of X
is a neighbourhood of x if there exists an open subset U of X such that x ∈ U ⊂ N.
Proposition 1.2 Let (X, d) be a metric space and let x ∈ X. The following hold:
(i). A subset N of X is a neighbourhood of x if and only if there exists ε > 0 such that
Bε (x) ⊂ N;
(ii). If N1 and N2 are neighbourhoods of x, then N1 ∩ N2 is a neighbourhood of x as well;
(iii). A subset U of X is open if and only if U is a neighbourhood of each of its points.
Proof. (i) If there exists ε > 0 such that Bε (x) ⊂ N, then N is a neighbourhood of x by Lemma 1.1.
Conversely, if N is a neighbourhood of x, there exists an open subset U of X such that x ∈ U ⊂ N.
Since U is open, there exists ε > 0 such that Bε (x) ⊂ U ⊂ N.
(ii) is obvious.
(iii) If U is open, then it is clearly a neighbourhood of each of its points. Conversely, let U be a
subset of X which is a neighbourhood of each of its points. This means that, for each y ∈ U, there
exists an open subset Uy of X such that y ∈ Uy ⊂ U. Since U = y∈U Uy , Proposition 1.1 implies
S
that U is open.
Exercise 1.6 Show that every open set in R with the Euclidean metric is an at most countable
union of disjoint open intervals. Enter
Definition 1.6 — Closed set. Let (X, d) be a metric space. A set U ⊂ X is closed if X \U is open.
Exercise 1.7 Let (X, d) be a metric space, x0 ∈ X and r > 0. The closed ball centered at x0 with
radius r is the set {x ∈ X : d(x, x0 ) ≤ r}. Show that it is closed. Enter
Proposition 1.3 Let (X, d) be a metric space and F be the family of closed sets of (X, d). The
following hold:
(i). ∅ and X are in F ;
(ii). The intersection of the elements of any subfamily of F is in F ;
10 Chapter 1. Metric Spaces and Point-Set Topology
Proposition 1.3 shows that the the notions of being open and being closed are not negations
of each other: the empty set and the whole space are always both open and closed. It could also
be that every set of a metric space is both open and closed (see Example 1.9). Moreover, in some
cases, a set could be neither open nor closed: just consider R with the Euclidean metric and the
set [0, 1) or the set of rational numbers Q.
Having extended the notion of distance from R to a general metric space, we can finally do
the same for convergence. Let us first recall the general notion of sequence.
Definition 1.7 — Sequence, subsequence. Let S be any set. A map from N to S is a sequence
in S. Instead of x : N → S, we write {xn }.
A sequence {yk } is a subsequence of {xk } if there exist n1 < n2 < · · · in N such that yk = xnk
for each k ∈ N.
Definition 1.8 — Convergence. Let (X, d) be a metric space. A sequence {xn } in X converges
to x ∈ X if, for each ε > 0, there exists nε ∈ N such that d(xn , x) < ε for every n ≥ nε . The point
x is the limit of {xn } and we write x = limn→∞ xn or xn → x.
In other words, {xn } converges to x if and only if, for each neighbourhood N of x, there exists
nN ∈ N such that xn ∈ N for every n ≥ nN . Indeed, suppose {xn } converges to x and let N be a
neighbourhood of x. There exists εN > 0 such that BεN (x) ⊂ N. On the other hand, by convergence,
there exists nεN ∈ N such that xn ∈ BεN (x) ⊂ N for every n ≥ nεN . Conversely, suppose that for each
neighbourhood N of x, there exists nN ∈ N such that xn ∈ N for every n ≥ nN . Since every open
ball centered at x0 is a neighbourhood of x0 , the convergence immediately follows.
Therefore, convergence can be expressed in terms of open sets (or, more precisely, of neigh-
bourhoods).
Another equivalent formulation is the following: {xn } converges to x if and only if {d(xn , x)}
converges to 0 (in R with the Euclidean metric).
Lemma 1.3 — Uniqueness of limits. Let (X, d) be a metric space, {xn } a sequence in X and
x, x0 ∈ X such that {xn } converges to both x and x0 . We have x = x0 .
Proof. Suppose that x 6= x0 . This implies that ε = d(x, x0 )/2 > 0. By the definition of convergence
there exist n1 ∈ N such that d(xn , x) < ε for every n ≥ n1 and n2 ∈ N such that d(xn , x0 ) < ε for every
n ≥ n2 . Setting n = max{n1 , n2 }, we have
a contradiction.
Example 1.10 Let (X, d) be a discrete metric space and let {xn } be a sequence in X convergent
to x ∈ X. By definition, there exists n1 ∈ N such that d(xn , x) < 1 for every n ≥ n1 and so xn = x for
every n ≥ n1 . In other words, every convergent sequence in a discrete metric space is eventually
constant.
The following example shows that, unsurprisingly, convergence may behave differently when
considering different metrics.
11
Example 1.11 Let us study the convergence of the sequence {ei/n } in C with the Euclidean
metric and with the SNCF metric. We claim that the sequence converges to 1 in the former case,
while it does not converge in the latter.
In the Euclidean metric we have
s 2
i/n i/n 1 1 1 1
d(e , 1) = |e − 1| = cos − 1 + i sin = cos − 1 + sin2 → 0.
n n n n
Suppose now {ei/n } converges to some z ∈ C in the SNCF metric. If z = 0, then d(ei/n , 0) =
= 1, a contradiction. Therefore, it must be z 6= 0. Clearly, Arg(ei/n ) = 1n and so, except for at
|ei/n |
most one value of n, we have d(ei/n , z) = |ei/n | + |z| = 1 + |z|, a contradiction again.
We can now characterize closed sets in terms of convergent sequences. This should explain
the terminology adopted.
Lemma 1.4 Let (X, d) be a metric space. A set U ⊂ X is closed if and only if for every
convergent sequence {xn } with elements in U, its limit x = limn→∞ xn belongs to U.
Proof. Let U ⊂ X be a closed set and suppose first {xn } is a convergent sequence with xn ∈ U,
for each n, but x = limn→∞ xn ∈/ U. Since N = X \U is open, N is a neighbourhood of x. On the
other hand, the convergence implies there exists nN ∈ N such that xn ∈ N for every n ≥ nN , a
contradiction.
Let now U ⊂ X be a set such that for every convergent sequence {xn } with elements in U, its
limit x belongs to U. Suppose that X \U is not open. This implies there exists x ∈ X \U such that
B1/n (x) ∩U 6= ∅, for every n ∈ N. Therefore, we can build a sequence {xn } with xn ∈ B1/n (x) ∩U,
for every n. Clearly, xn → x and so, by assumption, x ∈ U, a contradiction.
Corollary 1.1 The following are equivalent for any two metric spaces (X, d) and (X, d 0 ):
(i). A set U is open in (X, d) if and only if it is open in (X, d 0 ).
(ii). A sequence {xn } converges to x in (X, d) if and only if it converges to x in (X, d 0 ).
Example 1.12 We now provide a “natural” way to view the usual notion of uniform conver-
gence of a sequence of continuous real-valued functions on the interval [0, 1]: it is nothing but
convergence in the metric space C0 ([0, 1], R) equipped with the uniform metric (see Example 1.6).
In other words, a sequence { fn } in C0 ([0, 1], R) with the uniform metric converges to f (in
C0 ([0, 1], R)) if and only if it converges uniformly to f on [0, 1].
Indeed, suppose first k fn − f k∞ → 0. This means that, for every ε > 0, there exists nε ∈ N such
that supt∈[0,1] | fn (t) − f (t)| = k fn − f k∞ < ε for each n ≥ nε . In other words, for every ε > 0, there
exists nε ∈ N such that | fn (t) − f (t)| for each n ≥ nε and t ∈ [0, 1], i.e. { fn } converges uniformly to
f on [0, 1].
Conversely, suppose { fn } converges uniformly to f on [0, 1] and let ε > 0. Uniform convergence
implies there exists nε ∈ N such that, for each n ≥ nε and t ∈ [0, 1], we have | fn (t) − f (t)| < ε/2.
12 Chapter 1. Metric Spaces and Point-Set Topology
Exercise 1.8 Show that the set { f ∈ C0 ([0, 1], R) : f (x) = 0 for every x ∈ [0, 1]} is a closed subset
of C0 ([0, 1], R) with the uniform metric. Enter
We have seen examples of sets equipped with different metrics. It is therefore natural to
compare them:
Definition 1.9 — Equivalence of metrics. Two metrics d and d 0 on X are equivalent if there
exist c1 , c2 > 0 such that
R Note that being equivalent as defined in Definition 1.9 is indeed an equivalence relation.
In the following, we will see that in a metric space (and later in a topological space) many
important properties like continuity, compactness and so on, can in fact be expressed in terms of
open sets. In the context of metric spaces, Lemma 1.5 tells us that if any such property holds for
(X, d), then it also holds for all the metrics on X equivalent to d.
Lemma 1.5 Let d and d 0 be two equivalent metrics on X. A set U is open in (X, d) if and only
if it is open in (X, d 0 ).
Proof. Denote by Br (x0 ) and B0r (x0 ) the open balls in (X, d) and (X, d 0 ), respectively. By assumption,
there exist c1 , c2 > 0 such that c1 d(x, y) ≤ d 0 (x, y) ≤ c2 d(x, y), for every x, y ∈ X. This implies that,
for each x ∈ X and ε > 0, we have
Therefore, if U is open in (X, d 0 ) then, for every x ∈ U, there exists ε > 0 such that Bε/c2 (x) ⊂
B0ε (x) ⊂ U and so U is open in (X, d). Similarly, if U is open in (X, d) then, for every x ∈ U, there
exists ε > 0 such that B0c1 ε (x) ⊂ Bε (x) ⊂ U and so U is open in (X, d 0 ).
Example 1.13 The Euclidean metric and the discrete metric on R are not equivalent. This
follows easily by Lemma 1.5, Example 1.9 and the fact that not every set in R with the Euclidean
metric is open (just consider [a, b) or Q).
We can also argue as follows. The sequence {1/n} converges in R with the Euclidean metric
but it is not eventually constant and so it cannot converge in R with the discrete metric. Therefore,
by Corollary 1.1 and Lemma 1.5, these two metrics are not equivalent.
Example 1.14 The Euclidean metric and the SNCF metric on C are not equivalent. This follows
easily by Example 1.11, the equivalence in Corollary 1.1 and Lemma 1.5.
Example 1.15 The metrics coming from the p-norm and the max-norm on Rn are equivalent
(see Figure 1.3). Indeed, it is easy to see that, for every x ∈ Rn and distinct real numbers p, q ≥ 1,
Example 1.16 The uniform and integral metrics on C0 ([0, 1], R) are not equivalent. Indeed,
consider the sequence of functions { fn } in C0 ([0, 1], R) defined by
(
1 − nx if 0 ≤ x ≤ 1/n;
fn (x) = (1.4)
0 if 1/n < x ≤ 1.
Let us denote by 0 f the identically 0 function (i.e. 0 f (x) = 0 for every x ∈ [0, 1]). We have that
Z 1 Z 1/n
1
k fn − 0 f kL1 ([0,1]) = | fn (t)| dt = (1 − nt) dt = ,
0 0 2n
and so k fn − 0 f kL1 ([0,1]) → 0, i.e. { fn } converges to the identically 0 function in C0 ([0, 1], R) with
the integral metric.
On the other hand, for each n ∈ N, we have k fn − 0 f k∞ = supx∈[0,1] | fn (x) − 0 f (x)| = 1 and so
{ fn } does not converge to the identically 0 function in C0 ([0, 1], R) with the uniform metric. By
Corollary 1.1 and Lemma 1.5, we obtain the desired assertion.
Exercise 1.9 Let (X, d) be a metric space and let d 0 be the metric on X defined in Exercise 1.1
d(x,y)
as d 0 (x, y) = 1+d(x,y) . Show that d and d 0 are not necessarily equivalent but nevertheless define
the same open sets. Enter
We finally conclude this introductory chapter with the fundamental notion of continuity. The
reader is certainly familiar with the notions of vector space, group and graph. Each of these
objects essentially consist of a set together with a specific “structure”2 . In order to understand the
relationship between two vector spaces, one is interested in linear maps. Similarly, for groups and
graphs, one studies group homomorphisms and graph homomorphisms. All these maps respect
the “structure” of the objects in question.
In the case of metric spaces, we have that the property to be preserved is “closeness” and
functions satisfying this property are called continuous. The classical ε, δ -definition of continuity
in R can be easily adapted to the metric setting.
Notation 1.1. Let f : A → B be a function between two sets A and B and let A0 ⊂ A and B0 ⊂ B. We
denote by f (A0 ) the image of A0 under f , i.e. f (A0 ) = {b ∈ B : f (a) = b for some a ∈ A0 }, and by
f −1 (B0 ) the preimage of B0 under f , i.e. f −1 (B0 ) = {a ∈ A : f (a) ∈ B0 }.
Definition 1.10 — Continuous function. Let (X, dX ) and (Y, dY ) be metric spaces and let x0 ∈ X.
The function f : X → Y is continuous at x0 if, for each ε > 0, there exists δ > 0 such that
dY ( f (x), f (x0 )) < ε for every x ∈ X with dX (x, x0 ) < δ .
In other words, f is continuous at x0 if, for each ε > 0, there exists δ > 0 such that
Bδ (x0 ) ⊂ f −1 (Bε ( f (x0 ))).
The function f is continuous if it is continuous at each point of X.
Theorem 1.1 Let (X, dX ) and (Y, dY ) be metric spaces and let x0 ∈ X. The following assertions
are equivalent for f : X → Y :
(i). f is continuous at x0 .
2 We have seen that a metric space is nothing but a set together with a “structure” given by a metric.
14 Chapter 1. Metric Spaces and Point-Set Topology
Proof. (i) ⇒ (ii) Let N be a neighbourhood of f (x0 ). By Proposition 1.2, there exists ε > 0
such that Bε ( f (x0 )) ⊂ N. Moreover, by Definition 1.10, there exists δ > 0 such that Bδ (x0 ) ⊂
f −1 (Bε ( f (x0 ))) ⊂ f −1 (N) and so f −1 (N) is a neighbourhood of x0 .
(ii) ⇒ (iii) Let {xn } be a sequence in X convergent to x0 and let N be a neighbourhood of
f (x0 ). By assumption, f −1 (N) is a neighbourhood of x0 and so, since xn → x0 , there exists nN ∈ N
such that xn ∈ f −1 (N) for every n ≥ nN . Therefore, f (xn ) ∈ N for every n ≥ nN . Since N is an
arbitrary neighbourhood of f (x0 ), we have f (xn ) → f (x0 ).
(iii) ⇒ (i) We proceed by contradiction. Suppose there exists ε0 > 0 such that, for each δ > 0,
there exists xδ ∈ X with dX (xδ , x0 ) < δ but dY ( f (xδ ), f (x0 )) ≥ ε0 . We now define a new sequence
{zn } in X by letting zn = x1/n . By the definition of xδ , we have dX (zn , x0 ) < 1n and so zn converges
to x0 . On the other hand dY ( f (zn ), f (x0 )) ≥ ε0 for each n ∈ N and so { f (zn )} does not converge to
f (x0 ), a contradiction.
f
f (x0 )
x0
Bδ (x0 ) Bε (f (x0 ))
Theorem 1.2 Let (X, dX ) and (Y, dY ) be metric spaces. The following assertions are equivalent
for f : X → Y :
(i). f is continuous.
(ii). f −1 (U) is open in X for each open set U of Y .
(iii). f −1 (U) is closed in X for each closed set U of Y .
Proof. (i) ⇒ (ii) Let U be an open set of Y . For each x ∈ f −1 (U), we have that U is a neigh-
bourhood of f (x). Since f is continuous, Theorem 1.1 implies that f −1 (U) is a neighbourhood
of x, for each x ∈ f −1 (U). Therefore, f −1 (U) is a neighbourhood of each of its points and so
Proposition 1.2 implies it is open.
(ii) ⇒ (i) In view of Theorem 1.1, we show that for each x0 ∈ X and for each neighbourhood N
of f (x0 ), the set f −1 (N) is a neighbourhood of x0 . Therefore, let x0 ∈ X and N be a neighbourhood
of f (x0 ). This means there exists an open set U in Y such that f (x0 ) ∈ U ⊂ N. By (ii), we have
that f −1 (U) is open in X and x0 ∈ f −1 (U) ⊂ f −1 (N). Therefore, f −1 (N) is a neighbourhood of x0 .
(ii) ⇔ (iii) We just show one direction, as the other can just be obatined by changing the word
closed with open. If U is a closed set of Y , then Y \U is open. Therefore, f −1 (Y \U) = X \ f −1 (U)
is open and so f −1 (U) is closed.
Example 1.17 Every function from a discrete metric space to an arbitrary metric space is
continuous. Indeed, in a discrete metric space every set is open.
Example 1.18 — Lipschitz function. Let (X, dX ) and (Y, dY ) be metric spaces. A function f : X → Y
is Lipschitz if there exists L > 0 such that, for every x, y ∈ X, we have dY ( f (x), f (y)) ≤ L · dX (x, y).
Lipschitz functions are continuous. Indeed, for each x ∈ X and ε > 0, we have that f (Bε/L (x)) ⊂
Bε ( f (x)).
Exercise 1.10 Consider the Euclidean spaces Rn and Rm with the Euclidean metric and a linear
map f : Rn → Rm . Show that f is Lipschitz and so continuous. Enter
Exercise 1.11 Let (X, d) be a metric space and A ⊂ X non-empty. The distance of a point x ∈ X
from A is the quantity d(x, A) = infz∈A d(x, z).
Show that the function from (X, d) to R (with the Euclidean metric) defined by x 7→ d(x, A)
is Lipschitz. Enter
Theorem 1.2 is extremely important, as it highlights the fact that in order to talk about
continuity we don’t need to have a metric structure: the only essential requirement is to know
the open (or closed) sets. This suggests that constructions having an apparent “analytic nature”
might carry on in a more general context, provided we can properly define the notion of open
sets. In fact, in the next section, we will define a topological space as a set equipped with some
distinguished subsets, the open sets, satisfying the properties (i) to (iii) in Proposition 1.1.
Exercise 1.12 Let R be equipped with the Euclidean metric. Find an example of a continuous
function f : R → R and an open set U ⊂ R such that f (U) is not open.
Similarly, show there exist a continuous function f : R → R and a closed set V ⊂ R such
that f (V ) is not closed. Enter
Exercise 1.13 Show that the following set is open (in R2 with the Euclidean metric):
2 x
(x, y) ∈ R : >1 .
sin(y) + x2
Exercise 1.14 Give an example of a continuous bijection f of metric spaces such that f −1 is
not continuous. Enter
2. Topological Spaces
We begin this section by defining topological spaces. Their study not only allows to generalize
many familiar results but also helps understanding what are the essential properties that make
certain theorems work.
Rather than by a metric (which is a quantitative notion), a topological space is described by
giving a collection of “open sets” (a qualitative notion). These “open sets” should somehow behave
in the same way as open sets in a metric space and so we use the properties in Proposition 1.1 as
axioms:
Definition 2.1 — Topology and open sets. A topology on a set X is a family T of subsets of X
satisfying the following properties:
(i). ∅ and X are in T ;
(ii). The union of the elements of any subfamily of T is in T ;
(iii). The intersection of the elements of any finite subfamily of T is in T .
A topological space is a pair (X, T ), where X is a set and T is a topology on X. The sets in T
are called open sets.
Notation 2.1. The elements of X are usually called points and when no ambiguity may arise we
refer to the topological space (X, T ) simply as X. If U ∈ T , we say that U is open in X, or that U is
an open set of X.
By construction, every metric space is a topological space:
Example 2.1 — Metric topology. If (X, d) is a metric space, the family of open sets of (X, d) is a
topology on X (Proposition 1.1), the metric topology.
We refer to the metric topology on Rn coming from the Euclidean metric as to the Euclidean
topology and unless stated otherwise Rn will always be equipped with the Euclidean topology.
A set has many topologies:
Example 2.2 — Discrete and indiscrete topology. Given a set X, the family of all subsets of
X is a topology, the discrete topology. The indiscrete topology is another trivial topology on X
consisting of the family {∅, X}.
17
Example 2.3 — Cofinite topology. Given a set X, the family of all subsets U of X such that X \U
is either finite or X is a topology. This follows easily by De Morgan’s laws.
Example 2.4 — Cocountable topology. Given a set X, the family of all subsets U of X such that
X \U is either countable or X is a topology.
Exercise 2.1 — Excluded point topology. Show that, given a non-empty set X and a point
p ∈ X, the family of all subsets of X not containing p together with the set X is a topology.
Enter
Note that Example 2.2 implies that not every topology comes from a metric. Indeed, consider
a set X with more than one element. If the indiscrete topology on X coincides with a metric
topology (i.e. they have the same open sets), then the complement of each one-element subset
of X is open in the indiscrete topology, but this is clearly not the case as |X| > 1. The previous
observation suggests the following:
Definition 2.2 — Metrizable space. A topological space (X, T ) is metrizable if there exists a
metric on X such that the metric topology on X coincides with T , i.e they have the same open
sets.
Let us now provide another example of a topological space which is not metrizable:
Example 2.5 Let (X, T ) be a topological space such that X is finite and T is not the discrete
topology. We claim that (X, T ) is not metrizable. Clearly, it is enough to show that for every
metrizable topological space (X, T ) such that X is finite, T is the discrete topology.
Indeed, since (X, T ) is metrizable, there exists a metric d on X such that T coincides with
the metric topology (induced by d). Moreover, the finitness of X implies that {d(x, y) : x, y ∈ X} is
a finite set and let ε = min{d(x, y) : x, y ∈ X}. But then, for each x ∈ X, we have that Bε (x) ⊂ {x}.
Therefore, {x} is open and so so every subset of X is open.
Definition 2.3 Let T and T 0 be two topologies on X. If T 0 ⊃ T , the topology T 0 is finer than
T or T is coarser than T 0 ; if T 0 properly contains T , the topology T 0 is strictly finer than
T or T is strictly coarser than T 0 . The topology T is comparable with T 0 if either T 0 ⊃ T
or T ⊃ T 0 .
Definition 2.4 — Closed set. Given a topological space (X, T ), a subset U ⊂ X is closed if
X \U ∈ T , i.e. X \U is open.
Definition 2.5 — Neighbourhood. Let (X, T ) be a topological space and let x ∈ X. A subset N
of X is a neighbourhood of x if there exists an open subset U of X such that x ∈ U ⊂ N.
18 Chapter 2. Topological Spaces
Definition 2.6 — Interior, boundary, closure, derived. Given a subset S of a topological space
X and a point x ∈ X, exactly one of the following three possibilities holds:
(i). There exists an open set U in X with x ∈ U ⊂ S.
(ii). There exists an open set U in X with x ∈ U ⊂ X \ S.
(iii). Every open set U with x ∈ U has non-empty intersection with both S and X \ S.
If x satisfies (i), then it is an interior point of S and the set of all interior points of S is the
interior of S, denoted by int(S).
If x satisfies (iii), then it is a boundary point of S and the set of all boundary points of S is
the boundary of S, denoted by ∂ S.
If x is either an interior point or a boundary point of S, then it is an adherent point of S
and the set of all adherent points of S is the closure of S, denoted by S.
If x belongs to the closure of S \ {x}, then it is a limit point of S and the set of all limit
points of S is the derived of S, denoted by D(S).
int(S) int(X \ S)
∂S S
Clearly, X = int(S) ∪ int(X \ S) ∪ ∂ S, where the sets in the union are pairwise disjoint. Moreover,
we have the following chain of inclusions:
int(S) ⊂ S ⊂ int(S) ∪ ∂ S = S.
is any of the intervals (a, b], [a, b), [a, b], (a, b), we have int(S) = (a, b), ∂ S = {a, b} and S = [a, b]. If
S = {1/n : n ∈ N}, then int(S) = ∅ and 0 ∈ S.
Proof. (i) For each x ∈ int(S), there exists an open set Ux in X with x ∈ Ux ⊂ S. Moreover,
Ux ⊂ int(S) and so int(S) = x∈int(S) Ux is open.
S
19
(ii) Since X is the union of the pairwise disjoint subsets int(S), int(X \ S) and ∂ S, we have that
S is the complement of int(X \ S) (in X) and so it is closed by (i).
(iii) S is open if and only if S is a neighbourhood of each of its points (indeed, check that the
proof given in Proposition 1.2 in the context of metric spaces holds unchanged in the context of
topological spaces!). Moreover, S is a neighbourhood of each of its points if and only if S ⊂ int(S)
and the conclusion follows.
(iv) S is closed if and only if X \ S is open. Therefore, by (iii), S is closed if and only if
X \ S = int(X \ S) = X \ S, from which the conclusion follows.
(v) Let U be an open set contained in S. For every x ∈ U, the set U is a neighbourhood of x
and so x ∈ int(S). Similarly, we obtain the other inclusion.
(vi) It follows easily from the fact that S is the complement of int(X \ S) (in X) and (v).
(vii) Clearly, D(S) ∩ int(X \ S) = ∅ and so S ∪ D(S) ⊂ S. Consider now x ∈ S. If x ∈ / S, then
x ∈ ∂ S and so each neighbourhood of x intersects S in a point distinct from x. Therefore, x ∈ D(S)
and S ⊂ S ∪ D(S).
Example 2.7 In R with the cofinite topology the closed sets are the finite sets and R. Therefore,
Example 2.8 Consider R2 with the Euclidean topology and the subset S = {(x, y) ∈ R2 : y = 0}.
We have that S is closed. Indeed, if (x, y) ∈ R2 \ S, then y 6= 0 and B|y| ((x, y)) ⊂ R2 \ S. Therefore,
S = S. Moreover, int(S) = ∅. Indeed, if (x, 0) ∈ int(S) then, for every ε > 0, the open ball Bε ((x, 0))
contains the point (x, ε/2) ∈
/ S. Finally, ∂ S = S.
Example 2.9 In a metric space X, the closure of the open ball Bε (x) is not necessarily the closed
ball centered at x with radius ε.
Indeed, if X is a discrete metric space, then the closed ball centered at x with radius 1 is just
X itself. Therefore, if |X| > 1, we have that B1 (x) = {x} = {x} ( X.
Exercise 2.3 Let A a subset of a topological space. Show that ∂ A = ∅ if and only if A is both
open and closed.
Exercise 2.4 Show that in a normed space the closure of the open ball centered at x with
radius ε is the closed ball centered at x with radius ε. Enter
Exercise 2.5 Let A and B be subsets of a topological space. Show that A ∪ B = A ∪ B and
A ∩ B ⊂ A ∩ B. Enter
Exercise 2.6 — Dyadic rational numbers. The set D of dyadic rational numbers is defined as
follows. D = n≥0 Dn , where D0 = {0, 1} and, for n ≥ 1, Dn = { 2an : a ∈ N, a odd, 0 < a < 2n }.
S
Proposition 2.3 Let X be a topological space and S ⊂ X. The following are equivalent:
(i). S is dense in X, i.e. S = X.
(ii). int(X \ S) = ∅.
(iii). S intersects every non-empty open subset of X.
Proof. (i) ⇒ (ii) It follows from the fact that X is the disjoint union of S and int(X \ S).
(ii) ⇒ (iii) Suppose U is a non-empty open subset such that U ∩ S = ∅ and let x ∈ U. Clearly,
x ∈ int(X \ S), a contradiction.
(iii) ⇒ (i) Obvious.
Example 2.12 Consider the metric space B([0, 1], R) of all bounded functions1 from [0, 1] to R
with the uniform metric. We claim it is not separable.
Indeed, let fa ∈ B([0, 1], R) be given by
(
0 if x 6= a;
fa (x) = (2.1)
1 if x = a.
Clearly, the family { fa }a∈[0,1] is uncountable. Observe now that the open balls B1/4 ( fa ) in
B([0, 1], R) are pairwise disjoint. Indeed, if there exists g ∈ B1/4 ( fa1 ) ∩ B1/4 ( fa2 ), for some a1 6= a2 ,
then
1
sup | fa1 (x) − fa2 (x)| ≤ sup | fa1 (x) − g(x)| + sup |g(x) − fa2 (x)| < ,
x∈[0,1] x∈[0,1] x∈[0,1] 2
a contradiction. Suppose now S is a dense subset of B([0, 1], R). Since it intersects every open
ball, taking ga ∈ S ∩ B1/4 ( fa ), we obtain an uncountable subset {ga }a∈[0,1] of S and so S itself is
uncountable.
On the other hand, it can be shown that C0 ([0, 1], R) is indeed separable.
2.1 Convergence
We can finally introduce the notion of convergence in a topological space. It should come as no
surprise that we adopt a definition in terms of neighbourhoods:
(with |X| > 1) and let p ∈ X be the excluded point. For x 6= p, the constant sequence {xn } with
xn = x for each n ∈ N converges to both x and p. Indeed, the only neighbourhood of p is X, which
clearly contains all the terms of the sequence.
Recalling the proof of uniqueness of limits in a metric space (Lemma 1.3), it should be noticed
that the key property is the fact that any two distinct points have disjoint neighbourhoods. Loosely
speaking, in a metric space we can find “enough” open sets. In order to rule out “pathological”
examples like Example 2.13, we introduce the following:
Definition 2.10 — Hausdorff space. A topological space X is a Hausdorff space if, for each pair
of distinct points x, y ∈ X, there exist disjoint open sets U and V such that x ∈ U and y ∈ V .
Clearly, every metric space is Hausdorff. In fact, most of the topological spaces that one
encounters in Analysis and Geometry are Hausdorff and, in some sense, neighbourhoods in a
Hausdorff space behave like those in a metric space. For example, the following result easily
follows by rephrasing the proof of Lemma 1.3:
Lemma 2.1 Let X be a Hausdorff space, {xn } a sequence in X and x, x0 ∈ X such that {xn }
converges to both x and x0 . We have x = x0 .
Note that the converse of Lemma 2.1 is in general not true, i.e. there exist topological spaces
which are not Hausdorff even though each convergent sequence has a unique limit:
Example 2.14 Let X be an uncountable set with the cocountable topology. X is not Hausdorff
but uniqueness of limits holds.
Clearly, X is not Hausdorff, as every pair of non-empty open sets intersect. Suppose now
there exists a sequence {xn } in X convergent to x and x0 with x 6= x0 . Consider the open set
U = X \ {xi : xi 6= x}. Since x ∈ U, there exists nx ∈ N such that xn ∈ U for every n ≥ nx . This implies
that xn = x for every n ≥ nx . Similarly, there exists nx0 ∈ N such that xn = x0 for every n ≥ nx0 .
Therefore, for every n ≥ max{nx , nx0 }, we have x = xn = x0 , a contradiction.
Exercise 2.7 Consider R and the sequence {xn } with xn = 1/n. Study the convergence of {xn }
in the Euclidean topology, in the indiscrete topology, in the discrete topology and in the cofinite
topology.
Another similarity between (neighbourhoods in) metric spaces and Hausdorff spaces is given
by the following:
Proof. Since finite unions of closed sets are closed, it is enough to show that {x0 } is closed in X,
for every x0 ∈ X. Indeed, if x is a point of X different from x0 , there exist disjoint open sets U and
V containing x and x0 , respectively. Since U does not intersect {x0 }, the point x does not belong
to the closure of {x0 } and so {x0 } = {x0 }. Therefore, {x0 } is closed.
22 Chapter 2. Topological Spaces
Exercise 2.8 Show that the only topology on a finite Hausdorff topological space is the discrete
topology.
Consider now the characterization of closed sets in terms of convergent sequences (Lemma 1.4).
In a general topological space, it does not hold:
Example 2.15 Let X be an uncountable set with the cocountable topology. We claim that every
subset of X contains the limit of each of its convergent sequences.
Indeed, let S ⊂ X and let {xn } be a sequence in S convergent to x. We have that the set
X \ {x1 , x2 , . . . } is open. Since {xn } converges to x, the point x does not belong to X \ {x1 , x2 , . . . }
(for otherwise X \ {x1 , x2 , . . . } is a neighbourhood of x) and so it must be x ∈ {x1 , x2 , . . . } ⊂ S.
Note that a proper uncountable subset of X is not closed and so Lemma 1.4 does not hold for
an arbitrary topological space.
A careful look at the proof of Lemma 1.4 shows in fact that one implication carry on in the
context of topological spaces (with the same proof!):
Lemma 2.3 Let X be a topological space and U ⊂ X a closed subset. If {xn } is a sequence in U
convergent to x, then x ∈ U.
The key property used in the converse implication was that, for every point x in a metric space,
we can find countably many neighbourhoods N1 , N2 , . . . of x such that every neighbourhood of x
contains at least one of the Ni ’s (in the proof we took Ni = B1/i (x)). We have that, in some sense,
if a topological space does not satisfy this property, then there are “too many” neighbourhoods
containing a point x to be able to describe closed sets in terms of sequences (which are by
definition countable). Let us formalize the property above:
Definition 2.11 — First axiom of countability. A topological space X satisfies the first axiom of
countability, or is first countable, if for each x ∈ X there exists a sequence {Nn } of neighbour-
hoods of x such that each neighbourhood of x contains at least one of the Ni ’s.
Clearly, every metric space is first countable. Another example is the following:
Example 2.16 Every space X with the excluded point topology is first countable. Indeed, let
p ∈ X be the excluded point. For each x ∈ X, we define a neighbourhood N of x as follows:
(
X if x = p;
N= (2.2)
{x} otherwise.
Clearly, every neighbourhood of x contains N.
The following result strengthens Lemma 1.4 and provides a characterization of adherent
points in a first countable space.
Example 2.17 An uncountable set X with the cocountable topology does not satisfy the first
axiom of countability.
Indeed, let S be a countable subset of X and let x ∈ S. If X is first countable, Proposition 2.4
implies that x is the limit of a sequence in S. Therefore, by Example 2.15, x ∈ S and so S is closed,
a contradiction.
Exercise 2.9 Let X be a first countable topological space and S ⊂ X. Show that the point x ∈ X
is a limit point of S if and only if there exists a sequence {xn } in S taking distinct values and
converging to x.
Proposition 2.5 Let X be a Hausdorff space and S ⊂ X. The point x ∈ X is a limit point of S if
and only if every neighbourhood of x contains infinitely many points of S.
Proof. If every neighbourhood of x contains infinitely many points of S, then it clearly contains a
point distinct from x and so x is a limit point of S.
Conversely, we show that if x ∈ X has a neighbourhood containing only finitely many points
of S, then x is not a limit point of S. Therefore, suppose N is such a neighbourhood and let
S0 = {s1 , . . . , sn } be the finitely many points distinct from x in N ∩ S. Since X is Hausdorff, S0 is
closed (Lemma 2.2) and so X \ S0 is an open neighbourhood of x which does not intersect S in a
point distinct from x. Therefore, x is not a limit point of S.
The first axiom of countability provides a sufficient condition for the converse of Lemma 2.1.
In other words, in a first countable space, the Hausdorff condition is exactly what guarantees
uniqueness of limits:
Lemma 2.4 If X is a first countable topological space such that every convergent sequence in
X has a unique limit, then X is Hausdorff.
Proof. Suppose, to the contrary, X is not Hausdorff. This implies there exist two distinct points x
and y such that, for every open sets U and V with x ∈ U and y ∈ V , we have U ∩V 6= ∅. Since X is
first countable, there exist sequences of neighbourhoods {Un } and {Vn } of x and y, respectively,
such that each neighbourhood of x contains one of the Ui ’s and each neighbourhood of y contains
one of the Vi ’s. As in the proof of Proposition 2.4, for each i ∈ N, consider the neighbourhoods
Ni = U1 ∩ · · · ∩Ui of x and Mi = V1 ∩ · · · ∩Vi of y. For each i ∈ N, choose zi ∈ Ni ∩ Mi . Clearly, the
sequence {zn } converges to both x and y, a contradiction.
2.2 Bases
We have seen that in a metric space a subset is open if and only if it is a union of open balls. This
motivates the following:
Definition 2.12 A family B of open subsets of a topological space X is a base for the topology
of X if every open subset of X is a union of sets in B.
Example 2.18 If (X, d) is a metric space, then B = {Br (x) : x ∈ X, r > 0} and B 0 = {B1/n (x) : x ∈
X, n ∈ N} are bases.
24 Chapter 2. Topological Spaces
Exercise 2.10 Let X be a topological space. A subset S ⊂ X is dense if and only if there exists a
base B for the topology of X such that S intersects every non-empty open subset in B. Enter
Note that the notion of base for a topology is conceptually different from the well-known
basis in linear algebra, as a given open subset can be a union of sets in a base in many different
ways.
Lemma 2.5 A family B of open subsets of a topological space X is a base for the topology of
X if and only if for each x ∈ X and each neighbourhood N of x, there exists U ∈ B such that
x ∈ U ⊂ N.
Proof. Let B be a base, x ∈ X and N a neighbourhood of x. There exists an open subset V such
that x ∈ V ⊂ N and V is a union of open sets in B. Therefore, there exists U ∈ B such that
x ∈ U ⊂ N.
Conversely, suppose that for each x ∈ X and each neighbourhood N of x, there exists U ∈ B
with x ∈ U ⊂ N. Let V be an open subset of X. By assumption, for each x ∈ V , there exists Vx ∈ B
such that x ∈ Vx ⊂ V . Therefore, V = x∈V Vx and so B is a base.
S
A topological space can have many different bases, as the following examples show. Moreover,
these bases may have different cardinalities.
Example 2.19 Consider Rn with the Euclidean topology. We claim that B = {B1/n (q) : q ∈ Qn , n ∈
N} is a base for the Euclidean topology.
Indeed, let x ∈ X and N be a neighbourhood of x. By definition, there exist an open subset
U such that x ∈ U ⊂ N and ε > 0 such that Bε (x) ⊂ U ⊂ N. Moreover, we can find n0 ∈ N with
1/n0 < ε/2 (by the Archimedean property of R) and q ∈ Qn such that d(x, q) < 1/n0 (as Qn is dense
in Rn ). This implies that x ∈ B1/n0 (q). We now show that B1/n0 (q) ⊂ Bε (x). Indeed, if y ∈ B1/n0 (q),
then d(y, q) < 1/n0 and so d(y, x) ≤ d(y, q) + d(q, x) < 1/n0 + 1/n0 = 2/n0 < ε.
Example 2.20 Consider R2 with the Euclidean topology and, for ε > 0 and x ∈ R2 , the subset
2 ε ε
Qε (x) = (y1 , y2 ) ∈ R : |y1 − x1 | < , |y2 − x2 | < .
2 2
We claim that B = {Qε (x) : x ∈ R2 , ε > 0} is a base for the Euclidean topology.
y Bδ (y)
Qε√2 (x)
x
Qε (x) Bε (x)
Figure 2.2:
Let us first show that Qε (x) is open, for each ε > 0 and x ∈ R2 . It is enough to show that
if y ∈ Qε (x) and δ = min{ε/2 − |y1 − x1 |, ε/2 − |y2 − x2 |}, then Bδ (y) ⊂ Qε (x). Indeed, if z ∈ Bδ (y)
then, for each i ∈ {1, 2}, we have that |zi − xi | ≤ |zi − yi | + |yi − xi | < δ + |yi − xi | ≤ ε/2.
Let us finally show that, for each x ∈ R2 and each neighbourhood N of x, there exists U ∈ B
such that x ∈ U ⊂ N. Clearly, it is enough to show that, for each x ∈ R2 and ε > 0, the open
2.2 Bases 25
√
ball Bε (x)pcontains Qr (x) for somepr > 0. But then just take r = ε 2. Indeed, if y ∈ Qr (x), then
d(y, x) = |y1 − x1 |2 + |y2 − x2 |2 < r2 /2 = ε.
This example can be obviously generalized to higher dimensions.
The following exercise gives a handy criterion to check the relation between two topologies
when we have knowledge of the corresponding bases:
Exercise 2.11 Let B and B 0 be bases for the topologies T and T 0 , respectively, on a set X.
We have that T 0 ⊃ T if and only if, for every x ∈ X and every B ∈ B containing x, there exists
B0 ∈ B 0 such that x ∈ B0 ⊂ B. Enter
We have seen how a base can be determined starting from a topological space X. It is
sometimes useful to proceed the other way round. Namely, given a set X and a family B, under
what conditions is B a base for a topology on X?
Proposition 2.6 A family B of subsets of X is a base for a topology of X if and only if the
following hold:
(i). Each x ∈ X is contained in at least one set in B;
(ii). If U,V ∈ B and x ∈ U ∩V , then there exists W ∈ B such that x ∈ W ⊂ U ∩V .
Proof. If B is a base, then (i) and (ii) follow from the fact that X and U ∩V are open.
Conversely, suppose that the family B satisfies (i) and (ii). Let T be the family of all subsets
of X that are unions of sets in B. We show that T is a topology. Clearly, ∅ ∈ T , X ∈ T by (i)
and every union of sets in T is in T . It remains to show that finite intersections of sets in T are
in T and it is clearly enough to show this for intersections of two sets.
Therefore, let U,V ∈ T and x ∈ U ∩ V . Since U and V are unions of sets in B, there exist
U0 ,V0 ∈ B such that x ∈ U0 ⊂ U and x ∈ V0 ⊂ V and so x ∈ U0 ∩ V0 . By (ii), there exists Wx ∈ B
such that x ∈ Wx ⊂ U0 ∩V0 ⊂ U ∩V . Therefore, U ∩V = x∈U∩V Wx and so U ∩V ∈ T .
S
The reader should notice that, given a family B of subsets of X satisfying the conditions in
Proposition 2.6, there is a unique topology T of X for which B is a base. We say that T is the
topology generated by B.
Before showing an example let us recall the following:
Definition 2.13 — Ordered set. Given a set X, a linear order on X is a relation < satisfying the
following properties:
1. (Comparability) For every x and y in X such that x 6= y, either x < y or y < x.
2. (Non-reflexivity) There is no x ∈ X such that x < x.
3. (Transitivity) If x < y and y < z, then x < z.
The pair (X, <) is an ordered set.
Clearly, the usual order relation on R is a linear order. Given a linear order on X, we use
the notation x ≤ y for the statement “x < y or x = y”. The conditions above imply that, for every
x, y ∈ X, exactly one of the three relations x < y, y < x, x = y holds.
Let a, b ∈ X such that a < b. The open interval (a, b) is the set {x ∈ X : a < x < b}. The closed
interval [a, b] is the set {x ∈ X : a ≤ x ≤ b}. The half-open intervals [a, b) and (a, b] are the sets
{x ∈ X : a ≤ x < b} and {x ∈ X : a < x ≤ b}, respectively. Finally, the open rays (a, +∞) and (−∞, a)
are the sets {x ∈ X : a < x} and {x ∈ X : x < a}, respectively.
Example 2.21 — Order topology. Let (X, <) be an ordered set. The family B of all open
intervals, open rays and X itself is a base for a topology on X. Trivially, each x ∈ X is contained in
26 Chapter 2. Topological Spaces
the open set X. Moreover, an easy case checking shows that condition (ii) in Proposition 2.6 is
satisfied.
Note that the Euclidean topology and the order topology on R coincide. Indeed, if a set U is
open in the Euclidean topology, then it is a union of open balls and each open ball is an open
interval in the sense described above. Conversely, all open intervals and open rays are clearly
open sets in the Euclidean topology.
Example 2.22 — Sorgenfrey line. Consider R and the family B of all half-open intervals of
the form [a, b) = {x ∈ R : a ≤ x < b}. Proposition 2.6 immediately implies that B is a base for
a topology on R and the topological space consisting of R and the topology generated by B is
called the Sorgenfrey line, denoted by R` .
Note that the topology generated by B is strictly finer than the Euclidean topology. Indeed,
we have (a, b) = a<c<b [c, b) and every open set in the Euclidean topology is union of open
S
intervals. Moreover, the open subset [a, b) in the Sorgenfrey line is not open in R with the
Euclidean topology.
In particular, R` is Hausdorff. On the other hand, we will see that it is not metrizable.
A natural question arises: How small (in terms of cardinality) can a base be? Clearly, T
admits a finite base if and only if T is a finite family.
Definition 2.14 — Second axiom of countability. A topological space X satisfies the second
axiom of countability, or is second countable, if there exists a countable base for the topology
of X.
Second countability, similarly to first countability, limits the number of open sets in a topolog-
ical space: if X is second countable, the cardinality of the topology is at most that of the power
set of N.
Example 2.23 Rn with the Euclidean topology is second countable by Example 2.19.
Note that every second countable space is first countable. Indeed, if B is a countable base for
the topology of X then, for each x ∈ X, we can build a sequence of neighbourhoods of x by taking
those sets in B containing x.
On the other hand, the second axiom of countability is in fact much stronger than the first
and there exist metric spaces which are not second countable:
Example 2.24 Consider an uncountable set X with the discrete metric. It is clearly first countable
but not second countable.
Proof. Let B be a countable base for the topology of X. For each non-empty open set B in B,
choose a point xB and let S = {xB : B ∈ B}. Clearly, S is countable. Moreover, S is dense by
Exercise 2.10, as it intersects every non-empty subset in a base.
A closer look at Example 2.19 suggests that in a metrizable space the converse indeed holds:
2.3 Continuous functions 27
Lemma 2.7 If X is a separable and metrizable topological space, then X is second countable.
Proof. We proceed as in Example 2.19. Let S be a countable dense subset in X and let B =
{Bq (x) : x ∈ S, q ∈ Q, q > 0}. Since B is clearly countable, it remains to show it is a base for the
topology of X and so we rely on Lemma 2.5. It is then enough to show that, for each x ∈ X and
ε > 0, there exist y ∈ S and a rational q > 0 such that x ∈ Bq (y) ⊂ Bε (x). Since S is dense, there
exists y ∈ Bε/3 (x) ∩ S. But then, choosing q0 ∈ (ε/3, 2ε/3) ∩ Q, we have x ∈ Bq0 (y) ⊂ Bε (x).
Proposition 2.7 Let X and Y be topological spaces and f : X → Y . Moreover, let B be a base
for Y . The following are equivalent:
(i). f is continuous.
(ii). f −1 (U) is open in X for each open set U of Y .
(iii). f −1 (U) is closed in X for each closed set U of Y .
(iv). f −1 (U) is open in X for each U ∈ B.
Proof. (i) ⇔ (ii) ⇔ (iii) The proof is exactly the same as in Theorem 1.2.
(ii) ⇒ (iv) Obvious.
(iv) ⇒ (ii) If U is an open subset of Y , then U = Bα , where each Bα belongs to B. Therefore,
S
Example 2.26 Consider R with the Euclidean topology and the Sorgenfrey line R` . The identity
function f : R → R` (i.e. f (x) = x, for each x ∈ R) is not continuous. Indeed, f −1 ([a, b)) = [a, b) is
not open in the Euclidean topology.
On the other hand, the identity function g : R` → R is clearly continuous.
Exercise 2.12 — Subbase. A subbase for a topological space X is a family S of open sets such
that the family of all finite intersections of sets in S is a base for Y .
Let X and Y be topological spaces and S a subbase for Y . A function f : X → Y is continuous
if and only if f −1 (S) is open in X for each S ∈ S . Enter
Proof. (i) There exists y0 ∈ Y such that f (x) = y0 for each x ∈ X. Given an open subset V in Y ,
f −1 (V ) is either X or ∅, depending on whether V contains y0 or not. In either case, the preimage
is open.
28 Chapter 2. Topological Spaces
(ii) If U is open in Z, then g−1 (U) is open in Y and f −1 (g−1 (U)) is open in X. But clearly
f −1 (g−1 (U)) = (g ◦ f )−1 (U).
Proof. The proof of sufficiency is exactly the same as the one in Theorem 1.1!
Therefore, suppose X is first countable. We proceed by contradiction. Let N be a neighbour-
hood of f (x0 ) and suppose that f −1 (N) is not a neighbourhood of x0 . Let {Nn } be a sequence of
neighbourhoods of x0 as in the definition of first countability and let Bn = N1 ∩ · · · ∩ Nn . Since
f −1 (N) is not a neighbourhood of x0 , we have that Xn = (X \ f −1 (N)) ∩ Bn is non-empty for each
n ∈ N and so we construct a sequence {xn } in X with xn ∈ Xn for each n ∈ N. Clearly, {xn } converges
to x0 (see the proof of Proposition 2.4) and so { f (xn )} converges to f (x0 ). On the other hand, for
each n ∈ N, xn ∈ / f −1 (N) and so f (xn ) ∈
/ N, contradicting the fact that f (xn ) → f (x0 ).
The following lemma generalizes the well-known fact that continuous real-valued functions
agreeing at rational points agree everywhere.
Lemma 2.8 Let X and Y be two topological spaces with Y Hausdorff. If f : X → Y and g : X → Y
are two continuous functions such that f (x) = g(x) for each x ∈ D, where D is dense in X, then
f (x) = g(x) for each x ∈ X.
Proof. Suppose f (x) 6= g(x) for some x ∈ X. Since Y is Hausdorff, there exist disjoint open
sets U and V of Y such that f (x) ∈ U and g(x) ∈ V . Moreover, x belongs to the open subset
f −1 (U) ∩ g−1 (V ) of X and so, since D is dense in X, there exists d ∈ D ∩ f −1 (U) ∩ g−1 (V ). But then
f (d) = g(d) ∈ U ∩V , a contradiction.
Exercise 2.13 Let f : R → R be a continuous function such that f (x) f (y) = f (x + y) for every
x, y ∈ R. Show that f (x) = ecx for some constant c.
To visualize Definition 2.16, the space X can be thought of as made of some elastic material
and the space Y is homeomorphic to X if it can be obtained from X by changing its shape without
tearing the material (by stretching, bending, ...).
2 Note that the two possible meanings of f −1 (U) coincide: the preimage is the same as the image of the inverse
function.
2.4 Subspace topology 29
We close this section by introducing the notion of a topological property. A property of topo-
logical spaces is a topological property if it is invariant under homeomorphisms, i.e. whenever
a space X has the property, then every space homeomorphic to X has the property as well.
Exercise 2.14 Show that being first countable, second countable or Hausdorff are topological
properties. Enter
We leave as an easy exercise to check that TS satisfies the three properties in Definition 2.1.
Note that an open subset of the subspace S (i.e. a set in TS ) need not be open in the space X: for
example, S ∈ TS but it may not belong to T . Therefore, it should be stressed that openness and
closedness are not properties of a set by itself, but rather of a set in relation to a certain topology.
If S is a subspace of X, we say that a set U is open in S if it belongs to the topology of S, while U
is open in X if it belongs to the topology of X. A similar vocabulary will be used for closed sets.
Example 2.27 Consider X = R with the Euclidean topology and S = [0, 1] with the subspace
topology. The sets (0, 1] and [0, 1) are open in S but not in X. The set (0, 1) is open both in X and
S. The set [0, 1] is not open in X but it is open in S.
Example 2.28 Consider X = R with the Euclidean topology and S = Z with the subspace
topology. The subspace topology on S coincides with the discrete topology. Indeed, for every
n ∈ Z, we have that {n} = Z ∩ (n − 21 , n + 12 ).
On the other hand, if S = Q the situation is different. Indeed, let V be an open subset of S
containing a given rational number q. We have that V = U ∩ S, for some open subset U of R.
Since U contains an interval (q − ε, q + ε), for some ε > 0, the open subset V of S contains rational
numbers distinct from q (as Q is dense in R).
Exercise 2.15 Let S be a subspace of X. Show that a set C is closed in S if and only if it is the
intersection of a closed set of X with S. Enter
As one would expect (and desire) the metric topology behaves well with respect to subspaces:
Lemma 2.9 The metric topology on a subset S of a metric space X coincides with the subspace
topology.
Proof. Note that the intersection of an open ball Bε (x) in X with S consists of those points in S
with distance less than ε from x and so it is an open ball in S. But since every open set in X is a
union of open balls and S ∩ ( i Bεi (xi )) = i (S ∩ Bεi (xi )), the two topologies have indeed the same
S S
open sets.
Exercise 2.16 Let X be a topological space and S ⊂ X. If B is a base for the topology of X,
30 Chapter 2. Topological Spaces
Example 2.29 For each a < b, the subspaces [a, b] and [0, 1] of R are homeomorphic.
Indeed, the function f : [a, b] → [0, 1] given by f (x) = (x − a)/(b − a) is a continuous function
with continuous inverse f −1 : [0, 1] → [a, b] given by f −1 (y) = y(b − a) + a.
Figure 2.3: Homeomorphisms between the “empty square” and the “empty circle” (as subspaces in R2 )
and between the open intervals (0, 1) and (a, b).
In Analysis, we often encounter continuous functions that are defined differently on different
intervals. The following result gives us a way to paste them together into a continuous function:
Lemma 2.10 — Pasting Lemma. Let X and Y be topological spaces and A and B two open
subsets of X such that X = A ∪ B. Moreover, let f : A → Y and g : B → Y be continuous functions.
If f (x) = g(x) for every x ∈ A ∩ B, then the function h : X → Y defined by
(
f (x) if x ∈ A;
h(x) =
g(x) if x ∈ B.
is continuous.
Proof. Clearly, h is well-defined. Let now U be an open subset of Y . It is easy to see that
h−1 (U) = f −1 (U) ∪ g−1 (U). Moreover, since f is continuous, f −1 (U) is open in the subspace
topology on A, i.e. there exists an open subset V of X such that f −1 (U) = V ∩ A. Therefore, f −1 (U)
is an open subset of X. Similarly, g−1 (U) is an open subset of X and the conclusion follows.
The reader should notice that the Pasting Lemma holds even if A and B are both closed.
Definition 2.18 — Product topology. Let (X1 , T1 ), . . . , (Xn , Tn ) be topological spaces. The prod-
uct topology for the Cartesian product X1 × · · · × Xn is the topology with base
π −1
j (U j ) = X1 × · · · × X j−1 ×U j × X j+1 × · · · × Xn .
The following important property translates the continuity of a function into a product space
to the continuity of its component functions.
Proposition 2.9 — Characteristic property of the product. Let Y be a topological space and
X1 × · · · × Xn a product space. A function f : Y → X1 × · · · × Xn is continuous if and only if, for
each 1 ≤ j ≤ n, the function π j ◦ f : Y → X j is continuous.
We now introduce a natural way to build continuous real-valued functions from a certain
topological space X given existing ones. If f , g : X → R are continuous functions, then f + g : X →
32 Chapter 2. Topological Spaces
f
R, f g : X → R and g : X → R are defined as follows:
Proof. We just consider the case of f + g and leave the others as an exercise.
Observe first that the function s : R × R → R defined by s(a, b) = a + b is Lipschitz and so
continuous. Indeed, for every (a, b), (a0 , b0 ) ∈ R2 , we have
q
|s(a, b) − s(a0 , b0 )| = |(a − a0 ) + (b − b0 )| ≤ |a − a0 | + |b − b0 | ≤ 2 (a − a0 )2 + (b − b0 )2 .
Example 2.32 In general, projections need not be closed functions, i.e. images of closed sets
need not be closed.
Indeed, consider R2 with the Euclidean topology and the set C = {(x, y) ∈ R2 : xy = 1}. The
set C is closed, being the preimage of {1} under the continuous function p : R2 → R defined by
p(x, y) = xy. On the other hand, π1 (C) = R \ {0}, which is not closed.
Exercise 2.19 Let X and Y be two topological spaces and consider the product space X ×Y .
Show that, for every y ∈ Y , the space X × {y} (with the subspace topology) is homeomorphic
to X. Enter
Definition 2.19 — Pointwise convergence. Let X be a topological space and (Y, d) a metric
space. A sequence of functions { fn } with fn : X → Y converges pointwise to the function
f : X → Y if, for every x ∈ X, the sequence { fn (x)} converges to f (x) in Y .
Definition 2.20 — Uniform convergence. Let X be a topological space and (Y, d) a metric space.
A sequence of functions { fn } with fn : X → Y converges uniformly to the function f : X → Y if,
for any ε > 0, there exists N ∈ N such that d( fn (x), f (x)) < ε for every n > N and x ∈ X.
Clearly, uniform convergence implies pointwise convergence but the following standard
example shows the converse is not true.
Example 2.33 Consider [0, 1] and R with the Euclidean metric and fn : [0, 1] → R defined by
fn (x) = xn . We have that { fn } converges pointwise to
(
0 if 0 ≤ x < 1;
f (x) =
1 if x = 1.
p
On the other hand, the convergence is not uniform. Indeed, taking ε = 1/100 and xn = n
1/2, we
have that there is no N such that | fn (xn ) − 0| < ε for every n ≥ N. 3
Theorem 2.2 — Uniform Limit Theorem. Let X be a topological space, (Y, d) a metric space and
{ fn } a sequence of continuous functions fn : X → Y . If { fn } converges uniformly to f , then f is
continuous.
Proof. Let x0 be an arbitrary point of X and U be a neighbourhood of f (x0 ). We show that f −1 (U)
is a neighbourhood of x0 . Indeed, choose ε > 0 such that Bε ( f (x0 )) ⊂ U. Clearly, f −1 (Bε ( f (x0 ))) ⊂
f −1 (U). Since { fn } converges uniformly to f , there exists N ∈ N such that d( fn (x), f (x)) < ε/3
for every n > N and x ∈ X. Therefore, let n > N. Since fn is continuous at x0 , we have that
fn−1 (Bε/3 ( fn (x0 ))) is a neighbourhood of x0 and so it is enough to show that
Finally, by the triangle inequality, d( f (x), f (x0 )) < ε and so x ∈ f −1 (Bε ( f (x0 ))).
Example 2.33 shows that a similar statement does not hold for pointwise convergence.
Moreover, Theorem 2.2 gives a quick way to see that the sequence in Example 2.33 cannot
converge uniformly: if { fn } converges uniformly to f , then it converges pointwise to f and f
must be continuous (as the fn ’s are).
The function space we want to construct consists of bounded functions:
3 Note that in the reasoning we are implicitly using uniqueness of limits in a metric space (why?).
34 Chapter 2. Topological Spaces
Definition 2.21 — Bounded set, bounded function. Let (X, d) be a metric space. A subset A of
X is bounded if there exists M ∈ R such that d(a1 , a2 ) ≤ M, for every a1 , a2 ∈ X.
Let X be a topological space and (Y, d) a metric space. A function f : X → Y is bounded if
the image f (X) is a bounded subset of Y .
Note that boundedness is not a topological property, as it depends on the particular metric
considered.
We can finally define a metric on the set B(X,Y ) of bounded functions from X to (Y, d). Since
our aim is to encode the notion of uniform convergence, it is natural to consider the function ρ
given by ρ( f , g) = supx∈X d( f (x), g(x)). It clearly satisfies all the properties of a metric.
Definition 2.22 — Uniform metric. Let X be a topological space and (Y, d) a metric space. The
uniform metric on B(X,Y ) is the metric ρ defined by ρ( f , g) = supx∈X d( f (x), g(x)).
We denote by Cb0 (X,Y ) the subspace of B(X,Y ) consisting of the continuous functions. It will
turn out that if X has a certain property called compactness, every continuous function from X to
Y is bounded and so, in accordance with the familiar case of C0 ([0, 1], R), we will simply write
C0 (X,Y ) if this holds.
The restriction to bounded functions is due to the fact that sup might not exist. We just
remark, en passant, that this issue can in fact be easily fixed:
Lemma 2.11 — Standard bounded metric. Let (X, d) be a metric space. The map d : X × X →
R defined by d(x, y) = min{d(x, y), 1} is a metric, the standard bounded metric. Moreover,
(X, d) ∼
= (X, d).
Proof. We leave to the reader to check that d is a metric. The second assertion follows from the
fact that, in any metric space, the family of open balls with radius less than 1 is a base for the
metric topology (Lemma 2.5). Since this family is the same in (X, d) and (X, d), the two spaces
are homeomorphic.
R In the following, B(X,Y ) and Cb0 (X,Y ) will always be equipped with the uniform metric.
Proposition 2.10 Let X be a topological space and (Y, d) a metric space. A sequence of functions
{ fn } in B(X,Y ) converges to f if and only if it converges uniformly to f .
Proof. The proof is exactly the same as the one in Example 1.12 once we show that if { fn }
converges uniformly to f , then f is bounded. In order to verify this, observe that uniform
convergence implies there exists N ∈ N such that d( fn (x), f (x)) < 1 for every n ≥ N and x ∈ X.
Fix now n ≥ N. Since fn is bounded, there exists M ∈ R such that d( fn (x), fn (y)) ≤ M, for every
x, y ∈ X. Therefore, for every x, y ∈ X, we have
and so f is bounded.
Corollary 2.2 Let X be a topological space and Y a metric space. Cb0 (X,Y ) is a closed subset of
B(X,Y ).
Proof. By Lemma 1.4, Cb0 (X,Y ) is closed if and only if every convergent sequence in Cb0 (X,Y ) con-
verges to an element of Cb0 (X,Y ). But the convergence in B(X,Y ) is just the uniform convergence
and so Theorem 2.2 implies that the limit of a sequence in Cb0 (X,Y ) is continuous, as desired.
3. Complete Metric Spaces
The notion of convergence of a sequence in a metric space clearly depends not only on the
sequence itself but also on the limit. The following notion gives us a way to talk about convergence
avoiding any reference to the limit:
Definition 3.1 — Cauchy sequence. Let (X, d) be a metric space. A sequence {xn } of points of
X is a Cauchy sequence in (X, d) if, for each ε > 0, there exists N such that d(xn , xm ) < ε for
every n, m ≥ N.
The metric space (X, d) is complete if every Cauchy sequence in X converges.
Note that every convergent sequence is Cauchy. Indeed, for a given ε > 0, if {xn } converges to
x, choose N such that d(x, xn ) < ε/2 for every n ≥ N. This gives d(xn , xm ) ≤ d(xn , x) + d(x, xm ) < ε
for every n, m ≥ N.
In other words, complete metric spaces are those metric spaces for which convergent and
Cauchy sequences are the same. In this case, the nice feature is that we know the existence of the
limit without any need to explicitly present it.
Example 3.1 The reader is certainly familiar with the fact that R with the Euclidean metric is
complete. On the other hand, the subspace (0, 1) is not: just consider the Cauchy sequence {1/n}.
Similarly, the subspace Q is not complete: just consider any sequence which converges to an
irrational number.
Every discrete metric space is complete, as in such a space every Cauchy sequence is eventually
constant and so convergent.
Lemma 3.1 A metric space (X, d) is complete if every Cauchy sequence in X has a convergent
subsequence.
Proof. Let {xn } be a Cauchy sequence in (X, d) and suppose that it admits a subsequence {xni }
convergent to x. We show that {xn } converges to x as well.
Let ε > 0. Since {xn } is Cauchy, we can find N such that d(xn , xm ) < ε/2 for every n, m ≥ N.
Moreover, since {xni } converges to x, there exists an index i such that ni ≥ N and d(xni , x) < ε/2.
37
It is clear from the definition of equivalence between two metrics d, d 0 on X (Definition 1.9)
that {xn } is a Cauchy sequence in (X, d) if and only if it is a Cauchy sequence in (X, d 0 ). We use
this fact to show that the Euclidean metric space is complete:
Proposition 3.1 Rk with the Euclidean metric (or any other metric equivalent to it) is complete.
Proof. We have seen in Example 1.15 that the Euclidean metric and the metric induced by the
max-norm k · k∞ are equivalent and so they give rise to the same Cauchy sequences and to the
same convergent sequences (Lemma 1.5). It is therefore enough to show that Rk with the metric
induced by the max-norm is complete.
Let {xn } be a Cauchy sequence in Rk with xn = (xn1 , . . . , xnk ). Given ε > 0, there exists N such
that
kxn − xm k∞ = max{|xn1 − xm
1
|, . . . , |xnk − xm
k
|} < ε,
for every n, m ≥ N. This implies that, for every 1 ≤ j ≤ k, {xnj } is a Cauchy sequence in R and so,
since R is complete, it converges to some x j . Therefore, it is easy to see that {xn } converges to
x = (x1 , . . . , xk ).
R Completeness is not a topological property. Indeed, we have seen that R ∼ = (0, 1) but while
R is complete, (0, 1) is not. Even more: in contrast to convergent sequences, Cauchy
sequences are not preserved under homeomorphisms. Indeed, tan : (−π/2, π/2) → R is a
homeomorphism (Example 2.30). On the other hand, even though the sequence {yn } with
yn = arctan n is Cauchy in (−π/2, π/2) (Exercise 3.1), the sequence {xn } with xn = n is clearly
not Cauchy in R.
Exercise 3.1 Show that the sequence {yn } with yn = arctan n is Cauchy in (−π/2, π/2).
Exercise 3.2 Show that if F is a family of complete subspaces of a metric space X, then
F is complete.
T
F∈F
We have seen in Example 3.1 that a subspace of a complete metric space need not be complete.
However, closedness implies completeness:
Proof. Let {yn } be a Cauchy sequence in Y . Clearly, {yn } is a Cauchy sequence in X as well and
so, since X is complete, there exists x ∈ X such that {yn } converges to x in X. On the other hand,
since Y is closed, Lemma 1.4 implies that x ∈ Y . Therefore, {yn } converges to x in Y and Y is
complete.
Theorem 3.1 If (Y, d) is a complete metric space, then B(X,Y ) and Cb0 (X,Y ) are complete.
Proof. Clearly, since Cb0 (X,Y ) is a closed subset of B(X,Y ), it is enough to show that B(X,Y ) is
complete.
Therefore, let { fn } be a Cauchy sequence in B(X,Y ) and let ε > 0. Since { fn } is Cauchy, there
exists N ∈ N such that ρ( fn , fm ) = supx∈X d( fn (x), fm (x)) < ε/3 for every n, m ≥ N. This implies that
{ fn (x)} is a Cauchy sequence in (Y, d) for every fixed x ∈ X, and so, by the completeness of (Y, d),
{ fn (x)} converges in Y . We can therefore define a function f : X → Y by letting f (x) = limn→∞ fn (x).
We claim that { fn } converges to f in B(X,Y ).
We begin by showing that fn → f . Observe first that, for each x ∈ X, there exists nx ≥ N such
that d( fnx (x), f (x)) < ε/3 (as fn (x) → f (x)). Therefore, for every n ≥ N and x ∈ X, we have
d( f (x), fn (x)) ≤ d( f (x), fnx (x)) + d( fnx (x), fn (x)) < 2ε/3.
But this implies that, for every n ≥ N, we have ρ( fn , f ) = supx∈X d( fn (x), f (x)) ≤ 2ε/3 < ε and so
fn → f .
It remains to show that f is indeed bounded. Since each fn is bounded, there exists M ∈ R
such that d( fn (x), fn (y)) ≤ M, for every x, y ∈ X. Therefore, for every x, y ∈ X, fixing n ≥ N, we
have
and so f is bounded.
As the uniform metric and the integral metric on C0 ([0, 1], R) are not equivalent (Exam-
ple 1.16), it is interesting to check whether C0 ([0, 1], R) equipped with the integral metric is
complete. It turns out this is not the case:
Example 3.2 The space C0 ([0, 1], R) with the integral metric (see Example 1.7) is not complete.
Indeed, consider the sequence { fn }n≥2 in C0 ([0, 1], R) defined as follows:
0
if 0 ≤ x ≤ 1/2 − 1/n;
fn (x) = n(x − 1/2) + 1 if 1/2 − 1/n < x ≤ 1/2;
1 if 1/2 < x ≤ 1.
( 12 , 1) (1, 1)
( 12 − n1 , 0)
Suppose now there exists f ∈ C0 ([0, 1], R) such that fn → f , i.e. d( fn , f ) → 0. Observe first that
Z 1/2 Z 1/2 Z 1/2 Z 1/2
1
| f (t)| dt ≤ | fn (t) − f (t)| dt + | fn (t)| dt = | fn (t) − f (t)| dt + .
1/2−1/n 1/2−1/n 1/2−1/n 1/2−1/n 2n
Therefore,
Z 1 Z 1 Z 1−1 Z 1 Z 1
2 2 n 2
| f (t)| dt + 1
|1 − f (t)| dt = | f (t)| dt + 1 1
| f (t)| dt + 1
|1 − f (t)| dt
0 2 0 2−n 2
Z 1−1 1 Z 1
1
Z
2 n 2
≤ | f (t)| dt + | fn (t) − f (t)| dt + + |1 − f (t)| dt
0 1
2−n
1 2n 1
2
1
= d( fn , f ) + .
2n
Since the RHS tends to 0 as n → ∞ and the LHS is a sum of non-negative terms which is
R 1/2 R1
independent of n, it must be 0 | f (t)| dt = 0 and 1/2 |1 − f (t)| dt = 0. Therefore, since the
function | f | is continuous in [0, 1/2] and the function |1 − f | is continuous in [1/2, 1], we conclude
that they both are the identically zero functions in the respective intervals (by the reasoning
adopted in Example 1.7). In other words, f (x) = 0 for each x ∈ [0, 1/2] and f (x) = 1 for each
x ∈ (1/2, 1], a contradiction to the continuity of f .
We mention that there is a general construction for “completing” a metric space, similar to
the one in which R can be obtained from Q. Indeed, given an arbitrary metric space (X, d),
there exists a complete metric space (X̂, d) ˆ containing X as a dense subset. The idea is to define
an equivalence relation on the set of Cauchy sequences in X: two Cauchy sequences {xn } and
{yn } are equivalent if d(xn , yn ) → 0 as n → ∞. The points of X̂ are then the equivalence classes of
Cauchy sequences (see, e.g. [8]).
We conclude this chapter by introducing the ubiquitous Banach’s Fixed Point Theorem,
guaranteeing the existence of fixed points for some special functions on complete spaces.
Definition 3.2 — Fixed point. Let X be a non-empty set and f : X → X a function. A point x ∈ X
is a fixed point for f if f (x) = x.
Example 3.3 Every continuous function f : [a, b] → [a, b] has at least one fixed point.
Indeed, f (x) − x is a continuous function and since f (a) ≥ a and f (b) ≤ b, we have f (b) − b ≤
0 ≤ f (a) − a. Therefore, by the Intermediate Value Theorem, there exists x ∈ [a, b] such that
f (x) − x = 0 and so x is a fixed point for f .
This is the one-dimensional case of the Brouwer’s Fixed Point Theorem asserting that every
continuous function from a closed ball in Rn to itself has at least one fixed point. This theorem
can be proved combinatorially via the Sperner’s Lemma, a result on triangulations of simplices
(see, e.g., [5, 10]).
40 Chapter 3. Complete Metric Spaces
Banach’s Fixed Point Theorem has plenty of deep applications (see, e.g., [2, 12]) but we will
content ourselves with the following elementary motivation. Solving an equation f (x) = 0, for
some f : R → R, can be viewed as a fixed point problem. Indeed, setting g(x) = f (x) + x, we have
that x is a zero of f if and only if it is a fixed point for g.
It is easy to see that a contraction f on X can have at most one fixed point. Indeed, if f (x) = x
and f (y) = y, we have that d(x, y) = d( f (x), f (y)) ≤ L · d(x, y), for some L < 1. This implies that
d(x, y) = 0 and so x = y.
Theorem 3.2 — Banach’s Fixed Point Theorem. A contraction on a complete metric space has
exactly one fixed point.
Proof. Let (X, d) be a complete metric space and let f be a contraction on X such that, for every
x, y ∈ X,
d( f (x), f (y)) ≤ L · d(x, y).
By the previous remark, it is enough to show the existence of such a fixed point. Therefore, fix an
arbitrary point x1 of X and, for each n ≥ 1, define xn+1 = f (xn ). We claim that {xn } is a Cauchy
sequence. Observe first that
and, by an easy induction, d(xn , xn+1 ) ≤ d(x1 , x2 ) · Ln−1 . Therefore, for m ≥ n + 1, the triangle
inequality and the fact that L < 1 imply that
Example 3.4 Let f : R → R be a differentiable function such that there exists k ∈ (0, 1) with
| f 0 (x)| ≤ k for every x ∈ R. We claim that f has a unique fixed point. In view of Theorem 3.2 it is
enough to show that f is a contraction. But for every x, y ∈ R with x < y, the Mean Value Theorem
implies there exists c ∈ (x, y) such that f (y) − f (x) = (y − x) f 0 (c). Therefore, | f (y) − f (x)| ≤ k|y − x|,
as desired.
Note that Theorem 3.2 does not hold if the space is not complete. Indeed, consider the
subspace (0, 1) of R and the contraction f : (0, 1) → (0, 1) given by f (x) = x/2.
Moreover, Theorem 3.2 does not hold if the function f just satisfies the weaker condition
√ f (x), f (y)) < d(x, y), for every distinct x, y ∈ X. Indeed, consider f : R → R given by f (x) =
d(
x2 + 1. By the Mean Value Theorem, it is easy to see that | f (x) − f (y)| < |x − y| for every pair of
distinct x, y ∈ R. On the other hand, f (x) > x for each x ∈ R.
41
Exercise 3.3 Let (X, d) be a complete metric space and f : X → X be a function such that f k is
a contraction for some k ≥ 1, where f k denotes the composition of f with itself k times. Show
that f has a unique fixed point. Enter
4. Compactness
A fundamental result in Real Analysis is the Extreme Value Theorem: a continuous real-valued
function on a closed interval attains its maximum and minimum values. This theorem is blatantly
false for general metric spaces and we have seen that the notion of boundedness is not a
topological one. In fact, it turns out that the key property involved in the proof of the Extreme
Value Theorem is the so-called compactness. This is a completely general notion which is
somehow an approximation of finiteness: many arguments which hold for finite sets can be
extended to compact sets1 . Another important aspect of compactness is that it allows to pass
from local properties to global ones. We will see this phenomenon throughout the chapter.
Definition 4.2 — Compact space. A topological space X is compact if every open covering of
X has a finite subcovering, i.e. a finite subfamily which is a covering of X.
A subset of a topological space is compact if it is a compact space with the subspace
topology.
element.
43
Example 4.3 The prototype of a compact subspace of R (with the Euclidean topology) is the
closed interval [0, 1]. This might already be familiar to the reader but we will reprove it in the
next section (together with a generalization).
On the other hand, [0, 1] is not a compact subspace of R with the cocountable topology.
Indeed, for every q ∈ Q, the set Uq = R \ (Q \ {q}) is open in R with the cocountable topology
and so U = {[0, 1] ∩Uq }q∈Q is an open covering of [0, 1]. Since Uq ∩ Q = {q} and [0, 1] contains
infinitely many rationals, U has no finite subcovering.
The following two results show that the Hausdorff property and compactness are in some
sense “dual” notions:
Lemma 4.1 Let X be a compact topological space. Every closed subspace of X is compact.
Proof. Let Y be a closed subspace of the compact space X, i.e. Y is closed as a subset of X. Let
U be an open covering of the subspace Y . This means that U = {Y ∩Ui }i∈I , where each Ui is an
open set in X. Since Y is closed, we have that U 0 = U ∪ (X \Y ) is an open covering of X. The
compactness of X implies there exists a finite subfamily of U 0 covering X. By removing the set
X \Y from the subfamily, we obtain a finite open covering of Y .
R In the proof of Lemma 4.1 we have used the little trick of adding X \ Y to U , invoking
compactness and then removing X \Y . This reasoning can be useful in many situations (see
[1]):
A father left 17 camels to his three sons and, according to the will, the eldest son should
be given a half of all camels, the middle son one-third of all camels and the youngest son
one-ninth. This is hard to do but a wise man helped the sons. He added his own camel so
that the oldest son took 18/2 = 9 camels, the middle son 18/3 = 6 camels and the youngest
son 18/9 = 2 camels. The wise man then took his own camel and went away.
Lemma 4.2 Let X be a Hausdorff topological space. Every compact subspace of X is closed.
R In other words, the proof of Lemma 4.2 shows that we can “separate” points and compact
subspaces of a Hausdorff space X by open sets. If X is in addition compact, Lemma 4.1 tells
us that we can even separate points and closed subspaces by open sets.
44 Chapter 4. Compactness
Uy2
Uy1 Vy 1
xx00
Uy3
Y
Vy 3
Vy 2
Lemma 4.3 The image of a compact topological space under a continuous function is compact.
Proof. It suffices to show that images of closed sets of X under f are closed. Therefore, let U be
a closed in X. By Lemma 4.1, U is compact and so, by Lemma 4.3, f (U) is compact. Since Y is
Hausdorff, Lemma 4.2 implies that f (U) is closed in Y .
We can now provide a general version of the Extreme Value Theorem. Recall that the order
topology for an ordered set Y is the topology generated by the open intervals, the open rays and
Y itself.
Theorem 4.1 — Extreme Value Theorem. Let X be a compact topological space and Y an
ordered set with the order topology. If f : X → Y is a continuous function, then there exist
points c and d in X such that f (c) ≤ f (x) ≤ f (d) for every x ∈ X.
Proof. Since f is continuous and X is compact, the set A = f (X) is compact. We show that A has
a largest element M and a smallest element m. Since m, M ∈ A, it must be m = f (c) and M = f (d)
for some points c, d ∈ X.
Suppose A has no largest element. This implies that the family {(−∞, a)}a∈A is an open
covering of A and so, since A is compact, there exists a finite subfamily {(−∞, a1 ), . . . , (−∞, an )}
covering A. If ai is the largest element in {a1 , . . . , an }, then ai does not belong to any of these sets,
a contradiction.
Similarly, it can be shown that A has a smallest element.
As with most properties involving open sets, compactness can be checked by looking at bases:
45
Lemma 4.4 Let X be a topological space and B be a base for the topology of X. If every open
covering of X with sets in B has a finite subfamily which is a covering, then X is compact.
Proof. Let U be an open covering of X. For each x ∈ X, there exists Ux ∈ U such that x ∈ Ux . On
the other hand, by Lemma 2.5, we can find Bx ∈ B such that x ∈ Bx ⊂ Ux . Since B 0 = {Bx }x∈X is
an open covering of X with sets in B, there exists a finite subfamily of B 0 which is a covering of
X and so a finite subfamily of U with the same property.
Theorem 4.2 — Tychonoff’s Theorem, finite case. Let X1 , . . . , Xn be topological spaces. The
product space X1 × · · · × Xn is compact if and only if X j is compact for each 1 ≤ j ≤ n.
Proof. Suppose first that X1 × · · · × Xn is compact. Since the projections are continuous functions,
Lemma 4.3 implies that each X j is compact.
Let us show the converse. It is clearly enough to consider the case n = 2. Therefore, let X1
and X2 be compact spaces. In view of Lemma 4.4, it is enough to consider open coverings with
elementary open sets, i.e. sets of the form U ×V with U open of X1 and V open of X2 . Let U be
such an open covering.
For a fixed x2 ∈ X2 , we have that X1 × {x2 } ∼ = X1 is compact and so there exists a finite
subfamily {U1 ×V1 , . . . ,Um ×Vm } of U covering X1 × {x2 }. By eventually discarding some sets, we
may assume that x2 ∈ V j , for each 1 ≤ j ≤ m. Therefore Vx2 = V1 ∩· · ·∩Vm is an open neighbourhood
of x2 in X2 . Moreover, π2−1 (Vx2 ) is covered by {U1 ×V1 , . . . ,Um ×Vm }.
Since X2 is compact and the family {Vx2 }x2 ∈X2 is an open covering of X2 , there exists a finite
subfamily {Vx2,1 , . . . ,Vx2,k } covering X2 and so
Since each π2−1 (Vx2,i ) is covered by {U1 × V1 , . . . ,Um × Vm }, we have that the finite subfamily
{U1 ×V1 , . . . ,Um ×Vm } of U is a covering of X1 × X2 .
We have the following partial converse of the Uniform Limit Theorem (Theorem 2.2):
Theorem 4.3 — Dini’s Theorem. Let X be a compact topological space, let { fn } be a sequence
of continuous functions fn : X → R such that fn (x) ≤ fn+1 (x) for every n ∈ N and x ∈ X (i.e., the
sequence is monotone increasing) and let f : X → R be a continuous function.
If fn (x) → f (x) for each x ∈ X, then { fn } converges uniformly to f .
Proof. Let ε > 0 and, for each n ≥ 1, let Un = {x ∈ X : | f (x) − fn (x)| < ε}. Note that Un is open, as
both f and fn are continuous. Moreover, since the sequence { fn } is monotone increasing, we
have that Un ⊂ Un+1 , for each n ≥ 1.
Consider now an arbitrary point x ∈ X. Since fn (x) → f (x), there exists N such that | f (x) −
fn (x)| < ε, for every n ≥ N. Therefore, X = Un and so U = {Un } is an open covering of X. By
S
compactness, there exists a finite subfamily of U covering X and so, since Un ⊂ Un+1 for each
n ≥ 1, there exists N such that X = UN . Therefore, for each n ≥ N, Un = UN = X. This implies that
| f (x) − fn (x)| < ε for every n ≥ N and x ∈ X, i.e. { fn } converges uniformly to f .
We now formulate the notion of compactness in terms of closed sets. This is done by
introducing the following set-theoretic property:
46 Chapter 4. Compactness
Definition 4.3 — Finite intersection property. A family C of subsets of X has the finite inter-
section property if for every finite subfamily {C1 , . . . ,Cn } of C , the intersection C1 ∩ · · · ∩Cn is
non-empty.
Theorem 4.4 A topological space X is compact if and only if for every family C of closed
subsets of X with the finite intersection property, the intersection C is non-empty.
T
C∈C
Proof. Suppose first X is compact and let C be a family of closed subsets of X with the finite
intersection property. Consider the family of open sets U = {X \C : C ∈ C }. We claim that no
finite subfamily of U is a covering of X. Indeed, for every finite subfamily {X \C1 , . . . , X \Cn } ⊂ U ,
we have X \C1 ∪ · · · ∪ X \Cn = X \ (C1 ∩ · · · ∩Cn ) 6= X. Since X is compact, U is not an open covering
of X and so X \ C∈C C = C∈C X \C 6= X. Therefore, C∈C C 6= ∅.
T S T
The formulation of compactness given above allows to pass from the finite version of the
Helly’s Theorem to the infinite one: If C is an infinite family of compact convex sets in Rd
such that any d + 1 of them have non-empty intersection, then all the sets in C have non-empty
intersection (see the beautiful [6]).
The definition of compactness in terms of open coverings allows to obtain simple proofs of
powerful theorems. There are two other formulations of compactness having a more analytic
flavour and which will turn out to be equivalent in metric spaces (see Theorem 4.9):
Definition 4.4 — Limit point compact. A space X is limit point compact if every infinite subset
of X has a limit point.
Limit point compactness is the weakest among these three forms of compactness:
Proof. Let X be a compact space. We show that if a subset has no limit points, then it is finite.
Therefore, suppose A ⊂ X has no limit points. By Proposition 2.2, A is closed. Moreover, for
each a ∈ A, there exists a neighbourhood Na of a such that Na ∩ A = {a} and so an open set Ua such
that a ∈ Ua and Ua ∩ A = {a}. Consider now the open covering U of X given by (X \ A) ∪ {Ua }a∈A .
Since X is compact, there exists a finite subfamily of U covering X and so A is finite.
Proof. Let X be a sequentially compact space and A an infinite subset of X. Build a sequence {an }
in A such that {an : n ∈ N} is infinite. By assumption, {an } has a subsequence {ank } converging to
some a ∈ A. Therefore, a is a limit point of {an : n ∈ N} and so of A.
For a general topological space no other relation between compactness, limit point compact-
ness and sequential compactness hold, but it is somehow difficult to come up with the appropriate
counterexamples.
4.1 Compactness in Euclidean spaces 47
Theorem 4.5 Let X be an ordered set having the least upper bound property. Each closed
interval in X with the order topology is compact.
Recall that an ordered set X has the least upper bound property if every non-empty subset A
of X which is bounded above has a least upper bound, the supremum of A.
Proof. Let a and b be elements of X with a < b. Let U be an open covering of [a, b] and let
We show that A = [a, b]. Clearly, A 6= ∅, as a ∈ A. Moreover, A is bounded above, as A ⊂ [a, b].
Therefore, since X has the least upper bound property, there exists c = sup A ∈ [a, b].
Observe now that c > a. Indeed, a ∈ U, for some open set U ∈ U and so, by Exercise 2.16 and
Lemma 2.5, there exists x > a with a ∈ [a, x) ⊂ U. But then [a, x] can be covered by two elements
of U and so c ≥ x > a.
We now claim that A = [a, c]. Clearly, A ⊂ [a, c] and so let us show the other containment.
Since c ∈ [a, b] and c ∈ U, for some U ∈ U , there exists x < c such that c ∈ (x, c] ⊂ U. On the
other hand, there exists y ∈ A ∩ (x, c], for otherwise x is a smaller upper bound for A. But then
[a, c] = [a, y] ∪ (x, c] can be covered by finitely many elements of U and so A ⊃ [a, c].
We finally show that c = b. Indeed, suppose that c < b. As in the previous paragraph, we have
that c ∈ (x, y), for some a ≤ x < y ≤ b, and there exists z ∈ A ∩ (x, y) (for otherwise, x is a smaller
upper bound). But then [a, y] = [a, z] ∪ (z, y] can be covered by finitely many elements of U and so
y > c belongs to A, a contradiction.
Since the order topology and the Euclidean topology on R have the same open sets (Exam-
ple 2.21), we immediately obtain the following:
Theorem 4.6 Let (X, d) be a metric space. If A ⊂ X is compact, then it is closed and bounded.
Proof. Let A be a compact subspace of X. Since a metric space is Hausdorff, Lemma 4.2 implies
that A is closed. Moreover, for a fixed ε > 0, consider the covering {Bε (x)}x∈X of X by open
balls. Since A is compact, there exists a finite subfamily {Bε (x1 ), . . . , Bε (xm )} covering A. Let
M = max{i, j}⊂{1,...,m} d(xi , x j ) and consider a1 , a2 ∈ A. We have that a1 ∈ Bε (xi ) and a2 ∈ Bε (x j ) for
some 1 ≤ i, j ≤ m and so
Therefore, A is bounded.
The covering considered in the proof of Theorem 4.6 motivates the following:
Definition 4.6 — Totally bounded space. A metric space (X, d) is totally bounded if, for every
ε > 0, there exists a finite covering of X by open balls of radius ε.
48 Chapter 4. Compactness
As we have seen in the proof above, every totally bounded subspace of a given space is
bounded. However, the converse is in general not true. Indeed, R with the standard bounded
metric is clearly bounded but not totally bounded. For otherwise, R can be covered by finitely
many open balls with centers in S = {x1 , . . . , xm } and radius 1/2. If x j = max{x1 , . . . , xm } and xi ∈ S,
then d(x j + 1, xi ) = min{|x j + 1 − xi |, 1} = 1 and so x j + 1 6∈ y∈S B1/2 (y).
S
Exercise 4.1 Show that a totally bounded metric space is separable. Enter
Exercise 4.2 Let (X, d) be a metric space. Show that if X is totally bounded, then every A ⊂ X
is totally bounded. Moreover, show that A ⊂ X is totally bounded if and only if A is totally
bounded. Enter
Proof. Note that, by Example 1.15 and Lemma 1.5, the Euclidean metric and the metric coming
from the max-norm induce the same topology and have the same bounded sets. Therefore, we
just consider the metric coming from the max-norm.
If X ⊂ Rn is compact then, by Theorem 4.6, it is closed and bounded. Conversely, suppose
that X is closed and bounded in the metric d coming from the max-norm. Boundedness implies
there exists M such that, for every x1 , x2 ∈ X, d(x1 , x2 ) ≤ M. Let x0 be a fixed point of X and let
a = d(x0 , 0). For each x ∈ X, we have d(x, 0) ≤ d(x, x0 ) + d(x0 , 0) ≤ M + a. Therefore, since the
closed ball in the metric d centered at 0 and with radius M + a is exactly the set [−(M + a), M + a]n ,
we have that X is contained in [−(M + a), M + a]n .
On the other hand, Theorem 4.5 implies that [−(M + a), M + a] is compact and so, by Ty-
chonoff’s Theorem, [−(M + a), M + a]n is compact2 . But then, since X is a closed subset of the
compact [−(M + a), M + a]n , it is a compact subspace by Lemma 4.1.
Definition 4.7 — Diameter. Let (X, d) be a metric space. If A is a bounded and non-empty
subset of X, the diameter of A is the quantity diam(A) = supa1 ,a2 ∈A d(a1 , a2 ).
Lemma 4.5 — Lebesgue Number Lemma. Let U be an open covering of the metric space
(X, d). If X is compact, there exists δ > 0 (called the Lebesgue number of U ) such that each
subset of X having diameter less than δ is contained in an element of U a .
a Clearly, if δ > 0 is a Lebesgue number of U , then any other 0 < δ 0 < δ is.
The idea behind the notion of a Lebesgue number of a covering U of X is that we know each
point x ∈ X belongs to some U ∈ U and this should be true as well for “small” sets containing x,
2 Note that, by Example 2.31, the product topology for Rn is the same as the topology coming from the max-norm.
4.2 Compactness in metric spaces 49
Proof. Let U be a fixed open covering. If X is an element of U , then every positive number is a
Lebesgue number for U . Therefore, suppose X ∈ / U and choose a finite subfamily {U1 , . . . ,Un } of
U covering X. For each i, let Ci = X \Ui and f : X → R defined by
1 n
f (x) = ∑ d(x,Ci ).
n i=1
We first show that f (x) > 0 for each x ∈ X. Given x ∈ X, choose an index i such that x ∈ Ui and
an ε > 0 such that Bε (x) ⊂ Ui . Observe now that, for each y ∈ Ci = X \ Ui , we have d(x, y) ≥ ε
and so d(x,Ci ) = infy∈Ci d(x, y) ≥ ε. Therefore, f (x) ≥ ε/n > 0. Since f is continuous, Theorem 4.1
implies it admits a minimum value δ and we now show that such value is in fact the desired
Lebesgue number.
Indeed, consider a subset B of X of diameter less than δ and choose a point x0 ∈ B. Clearly,
B ⊂ Bδ (x0 ). Moreover, if j is an index such that max1≤i≤n d(x0 ,Ci ) = d(x0 ,C j ), we have that
δ ≤ f (x0 ) ≤ d(x0 ,C j ). Therefore, B ⊂ Bδ (x0 ) ⊂ U j . Indeed, if y ∈ X \ U j = C j , then d(x0 , y) ≥
d(x0 ,C j ) ≥ δ . But then U j ∈ U is the desired open set containing B.
It is worth noticing that coverings of non-compact spaces may not have any Lebesgue
number: just consider the non-compact subspace (0, 1) of R together with the open covering
U = {(1/n, 1)}n≥2 . Suppose δ is a Lebesgue number of U and consider n ∈ N such that 1/n < δ .
We have that the subset (0, 1/n) of (0, 1) has diameter less than δ but is not contained in any
element of U .
Using the Lebesgue Number Lemma, we now show that continuous function from a compact
metric space satisfy the following stronger property:
Definition 4.8 — Uniformly continuous function. Let (X, dX ) and (Y, dY ) be metric spaces. A
function f : (X, dX ) → (Y, dY ) is uniformly continuous if, for each ε > 0, there exists δ > 0 such
that dY ( f (x1 ), f (x2 )) < ε for every x1 , x2 ∈ X with dX (x1 , x2 ) < δ .
The reader should notice that uniform continuity is a global property, while continuity
(Definition 1.10) is a local one.
Example 4.4 A canonical example of uniformly continuous functions is given by Lipschitz
functions (Example 1.18). Recall that f : (X, dX ) → (Y, dY ) is Lipschitz if there exists L > 0 such
that, for every x1 , x2 ∈ X, we have dY ( f (x1 ), f (x2 )) ≤ L · dX (x1 , x2 ).
Example 4.5 The function f : (0, +∞) → R given by f (x) = 1/x is continuous but not uniformly
continuous. Continuity is clear. Therefore, let ε > 0 and suppose there exists δ > 0 such that
| f (x) − f (y)| < ε for every x, y ∈ (0, +∞) with |x − y| < δ . Choose now x0 = 1+δ
δ 0 δ
ε and y = 2(1+δ ε) .
Clearly, |x0 − y0 | < δ and | f (x0 ) − f (y0 )| = 1+δ ε
δ > ε, a contradiction.
Theorem 4.8 — Uniform Continuity Theorem. Let (X, dX ) and (Y, dY ) be metric spaces with
(X, dX ) compact. If f : (X, dX ) → (Y, dY ) is continuous, then it is uniformly continuous.
Proof. For ε > 0, consider the open covering of Y given by {Bε/2 (y)}y∈Y . Since f is continuous,
U = { f −1 (Bε/2 (y))}y∈Y is an open covering of X. Since X is compact, Lemma 4.5 guarantees the
existence of a Lebesgue number δ for U . But then, if x1 and x2 are two points of X such that
dX (x1 , x2 ) < δ , the set {x1 , x2 } has diameter less than δ and so it is contained in an element of U ,
i.e. { f (x1 ), f (x2 )} ⊂ Bε/2 (y) for some y ∈ Y . By the triangle inequality, we have dY ( f (x1 ), f (x2 )) < ε
and so f is uniformly continuous.
50 Chapter 4. Compactness
Exercise 4.3 Let (X, dX ) and (Y, dY ) be metric spaces with (X, dX ) compact. Show that if
f : (X, dX ) → (Y, dY ) is a bijective continuous function, then f −1 is uniformly continuous.
Enter
Theorem 4.9 Let (X, d) be a metric space. The following are equivalent:
(i). X is compact.
(ii). X is limit point compact.
(iii). X is sequentially compact.
Every open covering of a sequentially compact metric space admits a Lebesgue number.
Indeed, let X be a sequentially compact metric space and U an open covering of X. Suppose,
to the contrary, there is no δ > 0 such that each set of diameter less than δ is contained in
an element of U . In particular, for each positive integer n, there exists a non-empty set Cn
of diameter less than 1/n not contained in any element of U . For each n, choose xn ∈ Cn
and consider the sequence {xn }. By assumption, it contains a subsequence {xni } convergent
to some point x ∈ X. But then x ∈ U, for some open set U ∈ U , and we can find ε > 0 such
that Bε (x) ⊂ U. For a large enough index ni , we have 1/ni < ε/2 and d(xni , x) < ε/2. Therefore,
Cni ⊂ B1/ni (xni ) ⊂ Bε/2 (xni ) ⊂ Bε (x) ⊂ A, a contradiction. 3
Let X be a sequentially compact metric and suppose, to the contrary, there exists ε > 0 such
that X cannot be covered by finitely many open balls of radius ε. We recursively construct a
sequence {xn } in X as follows. First, let x1 ∈ X be arbitrary. Since Bε (x1 ) does not cover X, choose
x2 ∈ X \ Bε (x1 ). Given x1 , . . . , xn , choose xn+1 ∈ X \ (Bε (x1 ) ∪ · · · ∪ Bε (xn )). Note that d(xn+1 , xi ) ≥ ε,
for each 1 ≤ i ≤ n. Therefore, {xn } has no convergent subsequence, since every open ball of radius
ε/2 contains at most one xn , a contradiction. 3
We can finally conclude our proof: If X is a sequentially compact metric space, then it is
compact. Let U be an open covering of X. We have seen U admits a Lebesgue number δ . For
ε = δ /3, we can find a finite covering of X by open balls of radius ε. Moreover, each of these
balls is contained in an element of U (as they have diameter 2δ /3 < δ ). Therefore, choosing one
such element for each of them, we obtain a finite subfamily covering X.
3 Alternatively, simply use Proposition 2.5.
4.3 Compactness in function spaces 51
There is yet another characterization of compactness in metric spaces. Theorem 4.9 and
Lemma 3.1 imply that every compact metric space is complete. The converse is blatantly false
(just consider R with the Euclidean metric). On the other hand, every compact metric space is
totally bounded (see Theorem 4.6) and it turns out that completeness and totally boundedness
are sufficient conditions:
Theorem 4.10 A metric space (X, d) is compact if and only if it is complete and totally bounded.
Proof. Suppose first (X, d) is compact. By Theorem 4.9, it is sequentially compact and so
Lemma 3.1 implies it is complete. Moreover, for every ε > 0, the open covering {Bε (x)}x∈X of X
admits a finite subcovering and so X is totally bounded.
Conversely, let X be complete and totally bounded. In view of Theorem 4.9, we show that
X is sequentially compact. Therefore, let {xn } be a sequence in X. It is enough to construct a
subsequence which is Cauchy.
Consider a covering of X with open balls of radius 1, whose existence is guaranteed by totally
boundedness. At least one of the balls in this covering contains infinitely many terms of the
sequence, say B1 is such a ball, and let J1 = {n : xn ∈ B1 }. Consider now a covering of X by
finitely many open balls with radius 1/2. Since J1 is infinite, at least one of the balls in this new
covering contains infinitely many terms with indices in J1 . Say such a ball is B2 . We then let
J2 = {n : n ∈ J1 , xn ∈ B2 }. In general, given an infinite set Jk , we let Jk+1 to be an infinite subset of
Jk such that there exists a ball Bk+1 of radius 1/(k + 1) containing xn for every n ∈ Jk+1 .
We now build the desired subsequence by choosing indices from the Ji ’s. Let n1 ∈ J1 be
arbitrary. Given nk , choose nk+1 ∈ Jk+1 such that nk+1 > nk (such an index exists since Jk+1 is
infinite). Since J1 ⊃ J2 ⊃ · · · , we have that, for i, j ≥ k, the indices ni and n j both belong to Jk .
This means that, for all i, j ≥ k, the points xni and xn j are both contained in a ball Bk of radius 1/k.
Therefore, {xni } is a Cauchy sequence.
Corollary 4.3 Let (X, d) be a complete metric space. A subset of X is compact if and only if it
is closed and totally bounded.
Proof. It follows from the fact that a closed subspace of a complete metric space is complete
(Lemma 3.2) and that a complete subspace of a metric space is closed (Lemma 3.3).
Corollary 4.4 Let (X, d) be a complete metric space. A subset of X has compact closure if and
only if it is totally bounded.
at 0 f with radius 1. It is clearly closed and bounded but it is not sequentially compact (or,
equivalently, compact). Indeed, let { fn } be the sequence in B1 (0 f ) with fn (x) = xn , for each
x ∈ [0, 1], and suppose it has a convergent subsequence { fnk }. Since { fnk } converges to the same
limit as { fn }, it must converge to
(
0 if 0 ≤ x < 1;
f (x) =
1 if x = 1.
as we have seen in Example 2.33. But f does not belong to C0 ([0, 1], R), a contradiction.
The problem with the sequence { fn } above is that it oscillates too much. Indeed, an additional
necessary condition for a subspace of C0 (X, Rn ) to be compact is that its elements are somehow
all close to each other. This is formalized by the notion of equicontinuity:
Definition 4.9 — Equicontinuous family. Let X be a topological space, (Y, d) a metric space and
x0 ∈ X. A family of functions F in C0 (X,Y ) is equicontinuous at x0 if, for every ε > 0, there
exists a neighbourhood U of x0 such that d( f (x), f (x0 )) < ε for every x ∈ U and f ∈ F .
F is equicontinuous if it is equicontinuous at each point of X.
Note that continuity of a function f : X → Y at x0 ∈ X means that, for every ε > 0, there exists
a neighbourhood U of x0 such that d( f (x), f (x0 )) < ε for every x ∈ U. Therefore, the point of the
definition above is that the same neighbourhood U can be chosen for all the functions in F .
In particular, every finite family F of continuous functions is equicontinuous. Moreover, every
subfamily of an equicontinuous family is equicontinuous.
Example 4.6 The family { fn : n ∈ N} ⊂ C0 ([0, 1], R) with fn (x) = xn is not equicontinuous at
x0 = 1.
Indeed, suppose it is equicontinuous at x0 = 1. This means that, given ε = 1/2, there exists
δ > 0 such that |xn −1| < 1/2 for every x ∈ [0, 1]∩(1−δ , 1] and every n ∈ N. But taking x ∈ (1−δ , 1),
we can find n ∈ N such that xn < 1/2, a contradiction.
Let us immediately show that equicontinuity is indeed a necessary condition for compactness
in C0 (X, Rn ). Recall that a metric space is compact if and only if it is complete and totally bounded
(Theorem 4.10).
Proposition 4.3 Let X be a compact topological space and let (Y, d) be a metric space. If the fam-
ily F in C0 (X,Y ) is totally bounded (under the uniform metric ρ), then F is equicontinuous
(under d).
Proof. Suppose F ⊂ C0 (X,Y ) is totally bounded and let x0 ∈ X and ε > 0. We know there exists a
finite covering {Bε/3 ( f1 ), . . . , Bε/3 ( fk )} of F by open balls in the uniform metric ρ. Since each fi
is continuous, we can choose a neighbourhood U of x0 such that d( fi (x), fi (x0 )) < ε/3 for every
x ∈ U (for each fixed i there exists such a neighbourhood Ui and taking the finite interesection of
the Ui ’s we obtain a feasible U).
We now show that for every x ∈ U and f ∈ F , we have d( f (x), f (x0 )) < ε, thus concluding
the proof. Indeed, let x ∈ U and f ∈ F . Clearly, f ∈ Bε/3 ( fi ), for some i. Therefore,
Let us now pause for a moment and make some further observations related to equicontinuity
when X is a metric space. In this case, it is instructive to compare the notion of a family of
uniformly continuous functions with that of an equicontinuous family. Recall that f : (X, dX ) →
(Y, dY ) is uniformly continuous if, for each ε > 0, there exists δ > 0 such that dY ( f (x1 ), f (x2 )) < ε for
every x1 , x2 ∈ X with dX (x1 , x2 ) < δ . We have seen in Theorem 4.8 that every continuous function
on a compact metric space is uniformly continuous. It turns out that a similar phenomenon
occurs for equicontinuity:
Theorem 4.11 — Uniform equicontinuity theorem. Let (X, dX ) and (Y, dY ) be metric spaces with
(X, dX ) compact. If F ⊂ C0 (X,Y ) is equicontinuous, it satisfies the following property:
For each ε > 0, there exists δ > 0 such that dY ( f (x1 ), f (x2 )) < ε for every x1 , x2 ∈ X with
dX (x1 , x2 ) < δ and f ∈ F .
Proof of Theorem 4.11. Let ε > 0. By equicontinuity, for each x ∈ X, there exists an open ball
Brx (x) such that dY ( f (x), f (y)) < ε/2 for every y ∈ Brx (x) and f ∈ F . The family U = {Brx (x)}x∈X
is an open covering of X and so, since X is compact, let δ > 0 be a Lebesgue number of U
(Lemma 4.5). Therefore, if x, y ∈ X are such that dX (x, y) < δ , then they are contained in an
open ball Brz (z), for some z ∈ X. This implies that dY ( f (x), f (z)) < ε/2 and dY ( f (y), f (z)) < ε/2
for every f ∈ F and so dY ( f (x), f (y)) < ε for every f ∈ F .
Exercise 4.4 Let F be a family of differentiable functions f : R → R such that, for each x ∈ R,
there exists a neighbourhood U of x and M > 0 with | f 0 (x)| ≤ M for every f ∈ F and x ∈ U.
Show that F is equicontinuous. Enter
Coming back to the problem of characterizing compact subspaces of C0 (X, Rn ), we can finally
formulate the first version of Ascoli-Arzelà Theorem. It essentially states that the three necessary
conditions we have encountered so far (closedness, boundedness and equicontinuity) are also
sufficient:
Theorem 4.12 — Ascoli-Arzelà Theorem, first version. Let X be a compact topological space
and let (Rn , d) be the Euclidean metric space. A subspace F of C0 (X, Rn ) (with the uniform
metric) is compact if and only if it is closed, bounded (under ρ) and equicontinuous (under
54 Chapter 4. Compactness
d).
Instead of directly proving Theorem 4.12, we will derive it from a characterization of subspaces
of C0 (X, Rn ) having compact closure (Ascoli-Arzelà Theorem, second version). We have already
seen in Corollary 4.4 that a subset of a complete metric space has compact closure if and only if
it is totally bounded. Since checking totally boundedness (and boundedness) is in general not
an easy task, in our second version of Ascoli-Arzelà Theorem we look for equivalent conditions
which might be easier to handle. It turns out that we can indeed substitute totally boundedness
with equicontinuity plus pointwise boundedness:
Definition 4.10 — Pointwise bounded family. Let X be a topological space, (Y, dY ) a metric
space and let F a family of functions f : X → Y . The family F is pointwise bounded if, for
every x ∈ X, the set Fx = { f (x) : f ∈ F } is bounded (under dY ).
It is easy to see that every bounded family is pointwise bounded and we have the following
implications:
totally bounded =⇒ bounded =⇒ pointwise bounded.
We can finally state the second version:
Proof of Theorem 4.12. If F is compact, then it is closed and bounded (Theorem 4.6) and
equicontinuous as well (Theorem 4.13).
Conversely, if F is closed, it coincides with its closure. If it is bounded (under ρ), it is
pointwise bounded (under d). If it is in addition equicontinuous (under d), Theorem 4.13 implies
it is compact.
The main feature of the second version with respect to the first is that we have replaced
boundedness with the formally weaker condition of pointwise boundedness, often easier to check.
Let us now pass to the proof of Theorem 4.13. Showing necessity is easy:
Proof of Theorem 4.13, ⇒. Let G denote the closure of F in C0 (X, Rn ). We have to show that if
G is compact, then F is equicontinuous and pointwise bounded (under d). Since F ⊂ G , it is
enough to show that G is equicontinuous and pointwise bounded.
Observe that the compactness of G implies it is totally bounded (Theorem 4.10) and so, by
Proposition 4.3, equicontinuous. Moreover, totally boundedness implies that G is bounded and
so pointwise bounded. Indeed, if ρ( f , g) ≤ M for every f , g ∈ G , then d( f (x), g(x)) ≤ M for every
x ∈ X and f , g ∈ G , and therefore Gx = { f (x) : f ∈ G } is bounded.
The proof of sufficiency is more involved and requires several steps. Denoting by G the
closure of F in C0 (X, Rn ), we have to show that if F is equicontinuous and pointwise bounded
(under d), then G is compact. By Theorem 4.10, it is enough to show that G is complete and
totally bounded (under the uniform metric ρ). The steps are as follows:
1. G is complete (easy by Lemma 3.2);
2. G is equicontinuous and pointwise bounded (under d);
3. There exists a compact subspace Y of Rn such that G ⊂ C0 (X,Y );
4.3 Compactness in function spaces 55
4. G is totally bounded.
To obtain 4. from 3. and 2., we prove the following partial converse of Proposition 4.3:
Proposition 4.4 Let X be a compact topological space and let (Y, d) be a compact metric space.
If the family F in C0 (X,Y ) is equicontinuous (under d), then F is totally bounded (under the
uniform metric ρ).
Proof. Suppose F ⊂ C0 (X,Y ) is equicontinuous. We show that, for every ε > 0, there exists a
finite covering of F by open balls of radius ε in the uniform metric ρ.
Therefore, consider ε > 0. By equicontinuity, for any x ∈ X, there exists a neighbourhood Ux
of x such that d( f (x0 ), f (x)) < ε/3 for every x0 ∈ Ux and f ∈ F . Clearly, we may assume each Ux is
open and so the family {Ux }x∈X is an open covering of X. By compactness, there exists a finite
subfamily {Ux1 , . . . ,Uxk } covering X and to simplify the notation let Ui = Uxi . Since Y is compact
as well, we can find finitely many open sets V1 , . . . ,Vm of diameter less than ε/3 covering Y .
Clearly the set of maps from {1, . . . , k} to {1, . . . , m} is finite and consider such a map
α : {1, . . . , k} → {1, . . . , m}. If there exists f ∈ F such that f (xi ) ∈ Vα(i) for each i ∈ {1, . . . , k},
we label it fα and say it represents α (the choice of f is arbitrary). Therefore, { fα } is a finite
family. We claim that {Bε ( fα )} is the desired covering of F by open balls in the uniform metric
ρ.
Indeed, let f ∈ F and, for each i ∈ {1, . . . , k}, choose an integer α(i) such that f (xi ) ∈ Vα(i) .
We show that f belongs to the ε-ball with center the representative of α: more precisely, we
show that f ∈ Bε ( fα ) or, equivalently, ρ( f , fα ) = supx∈X {d( f (x), fα (x))} < ε. Therefore, let x ∈ X
and choose an index i such that x ∈ Ui . We have that
We can finally conclude the proof of the second version of Ascoli-Arzelà Theorem:
Proof of Theorem 4.13, ⇐. Let G denote the closure of F in C0 (X, Rn ). We have to show that if F
is equicontinuous and pointwise bounded (under d), then G is compact. In view of Theorem 4.10,
it is enough to show that G is complete and totally bounded (under the uniform metric ρ). Since
G is a closed subspace of the complete metric space C0 (X, Rn ) (Exercise 2.9), it is complete
(Lemma 3.2). Let us finally show total boundedness. We proceed with the following two
observations:
Let us prove equicontinuity first. Let x0 ∈ X and ε > 0. Since F is equicontinuous, there exists
a neighbourhood U of x0 such that d( f (x), f (x0 )) < ε/3 for every x ∈ U and f ∈ F . Consider now
an arbitrary g ∈ G . Since g belongs to the closure of F , every neighbourhood of g intersects F
and so there exists f ∈ F such that ρ( f , g) < ε/3. But then, for every x ∈ U, we have
d(g(x), g(x0 )) ≤ d(g(x), f (x)) + d( f (x), g(x0 )) ≤ d(g(x), f (x)) + d( f (x), f (x0 )) + d( f (x0 ), g(x0 )) < ε.
d(g(x), g0 (x)) ≤ d(g(x), f (x))+d( f (x), g0 (x)) ≤ d(g(x), f (x))+d( f (x), f 0 (x))+d( f 0 (x), g0 (x)) < M +2.
radius N (in Rn ). Moreover, if x ∈ X, then x ∈ Ux j for some j and d(g(x), g(x j )) < 1 for each g ∈ G .
Therefore, d(g(x), 0) ≤ d(g(x), g(x j )) + d(g(x j ), 0) < 1 + N and g∈G g(X) is contained in the open
S
ball BN+1 (0). The closure of BN+1 (0) is the desired subspace by Theorem 4.7, being closed and
bounded. 3
We can finally show that G is totally bounded. Indeed, we have seen there exists a compact
subspace Y of Rn such that G ⊂ C0 (X,Y ) and so, since G is equicontinuous, Proposition 4.4
implies that G is totally bounded.
The reader should notice that the only special property of Rn used in the proof of Theorem 4.13
is the fact that a closed and bounded subspace is compact and so the theorem still holds when
substituting Rn with any metric space satisfying this property.
Exercise 4.5 Let F ⊂ C0 ([0, 1], R) be closed, bounded and equicontinuous. Show that there
exists g ∈ F such that
Z 1 Z 1
g(x) dx ≥ f (x) dx,
0 0
for every f ∈ F .
Hint: Consider the function G : C0 ([0, 1], R) → R given by G( f ) = 01 f (x) dx.
R
Enter
We finally state yet another version of Ascoli-Arzelà Theorem, this time involving sequential
compactness:
Theorem 4.14 — Ascoli-Arzelà Theorem, third version. Let X be a compact topological space,
(Rn , d) the Euclidean metric space and { fn } a sequence of functions in C0 (X, Rn ). If the family
F = { fn : n ∈ N} is pointwise bounded and equicontinuous, then the sequence { fn } has a
convergent subsequence.
Proof. By Theorem 4.13, the closure of F is compact and so sequentially compact (Theorem 4.9).
Example 4.8 Let { fn } be a sequence of functions in C1 ([0, 1], R) such that, for every n ∈ N,
Z 1
1
| fn0 (x)| ≤ √ (for every 0 < x ≤ 1) and fn (x) dx = 0.
x 0
Exercise 4.6 Let { fn } be a family of functions in C0 ([0, 1], R) such that there exists M > 0 with
| fn (x)| < M, for every n ∈ N and x ∈ [0, 1]. Moreover, let Fn : [0, 1] → R given by
Z x
Fn (x) = fn (t) dt.
0
Show that the sequence {Fn } has a subsequence converging uniformly on [0, 1].
5. Baire Spaces
Nowhere dense subsets of a topological space can be somehow considered to be “very small”.
Example 5.1 Z is nowhere dense in R. The set {1/n : n ∈ N} is nowhere dense in R.
Proposition 5.1 Let X be a topological space and S ⊂ X. The following are equivalent:
(i). S is nowhere dense, i.e. int(S) = ∅.
(ii). S contains no non-empty open subset.
(iii). X \ S is dense.
Proof. (i) ⇒ (ii) It follows from the fact that int(S) is the union of all open sets contained in S
(Proposition 2.2).
(ii) ⇒ (iii) Since S contains no non-empty open subset, X \ S intersects every non-empty open
subset and so it is dense (Proposition 2.3).
(iii) ⇒ (i) Again by Proposition 2.3, every non-empty open subset intersects X \ S and so S
has no interior points.
Lemma 5.1 Let X be a topological space. The union of finitely many nowhere dense sets in X
is a nowhere dense set in X.
Proof. We just prove the statement for two nowhere dense sets A and B. The general case
easily follows. Since A ∪ B = A ∪ B (Exercise 2.5), we have that int(A ∪ B) ⊂ A ∪ B. Therefore,
int(A ∪ B) ∩ (X \ B) is an open subset contained in A and so, since A is nowhere dense, it must be
empty. But then int(A ∪ B) ⊂ B and since B is nowhere dense, we have that int(A ∪ B) = ∅.
59
Note that the union of countably many nowhere dense sets need not be nowhere dense.
Indeed, the subset Q of R is a countable union of one-point sets (which are clearly nowhere
dense) but it is not nowhere dense as int(Q) = R. This motivates the introduction of the following:
Definition 5.2 — Meager set, non-meager set, residual set. Let X be a topological space and
A a subset of X. The subset A is meager in X if it can be written as a countable union of
nowhere dense sets. A is non-meager if it is not meager. A is residual if it is the complement
of a meager set.
It follows immediately from the definition that a subset of a meager set is meager and that a
union of countably many meager sets is meager.
Meager sets are in some sense “small” and residual sets are in some sense “large” (i.e. their
complements are “small”). However, note that non-meager sets are not necessarily large (they
are just not “small”).
Example 5.2 It is important to stress that a set is meager, non-meager or residual in a certain
topological space. For example, Z is non-meager in itself. Indeed, every subset of Z is open and
so there are no non-empty nowhere dense subsets. On the other hand, Z is meager in R, being
nowhere dense in R.
Example 5.3 The set S of points with at least one rational coordinate in R2 is meager. Indeed, if
{qn } is an enumeration of Q, we have that the lines An = {(qn , x) : x ∈ R} and Bn = {(x, qn ) : x ∈ R}
are nowhere dense. But then S = An ∪ Bn is meager.
S S
Definition 5.3 — Baire space. A topological space X is a Baire space if every meager set in X
has empty interior.
(iv) ⇒ (v) Let Un be an intersection of countably many open subsets of X which are dense
T
in X. Therefore, X \Un has empty interior in X, for each n. But then X \ Un = X \Un is a union
T S
of countably many closed subsets of X with empty interior and so, by assumption, X \ Un has
T
(v) ⇒ (i) Let S be a meager set, i.e. S = An is a countable union of nowhere dense sets
S
are dense in X and so, by assumption, X \ An is dense. This means that int( An ) = ∅ and the
S S
In this chapter, we provide two sufficient conditions for a space to be Baire. We begin by
showing that every complete metric space is Baire, which is one version of the celebrated Baire
Category Theorem. In order to do so, we first need a useful result on decreasing sequences of
non-empty closed sets in a topological space X, namely sequences {Cn } such that C1 ⊃ C2 ⊃ · · · .
Clearly, for every finite decreasing sequence, the intersection Cn is non-empty. By using
T
the formulation of compactness in terms of the finite intersection property (Theorem 4.4), it
is easy to see that if X is compact, the intersection is non-empty. However,√this is not √ true in
general. For example consider X = R and Cn = [n, +∞) or X = Q and Cn = Q ∩ [ 2 − 1/n, 2 + 1/n].
The following result tells us that these are essentially the only two obstructions to a non-empty
intersection:
Theorem 5.1 — Cantor’s Intersection Theorem. Let (X, d) be a complete metric space and
let {Cn } be a sequence of non-empty closed subsets of X such that C1 ⊃ C2 ⊃ · · · and
limn→∞ diam(Cn ) = 0. Then Cn contains precisely one point of X.
T
Proof. For each n ∈ N, let xn ∈ Cn . We show that the sequence {xn } is Cauchy. Therefore, let ε > 0.
Since {diam(Cn )} converges to 0, there exists nε such that diam(Cn ) < ε, for every n ≥ nε . Let
now n, m ≥ nε . Since C1 ⊃ C2 ⊃ · · · , we have that xn , xm ∈ Cnε and so d(xn , xm ) ≤ diam(Cnε ) < ε.
Therefore, {xn } is a Cauchy sequence in X and by completeness it converges to some x ∈ X.
Observe now that, for a fixed k, the subsequence {xi }i≥k converges to x and so, since Ck is closed,
Lemma 1.4 implies that x ∈ Ck . Therefore, x ∈ Cn .
T
Let us now show that in fact Cn = {x}. Suppose, to the contrary, there exists x0 6= x with
T
x ∈ Cn . Let ε = d(x, x0 ) > 0 and choose n sufficiently large such that diam(Cn ) < ε. Since
0 T
We now prove Baire Category Theorem by playing the following topological game!
Definition 5.4 — Choquet game. The Choquet game is a (infinite) two-player game played
in a given metric space X as follows. Antoine moves first by choosing a non-empty open
set U1 ⊂ X. Then Bertrand moves by choosing a non-empty open set V1 ⊂ U1 . Antoine then
chooses a non-empty open set U2 ⊂ V1 , etc. This gives two decreasing sequences {Un } and
{Vn } of non-empty open sets with Un ⊃ Vn ⊃ Un+1 , for each n, and Un = Vn . Antoine wins if
T T
Theorem 5.2 — Baire Category Theorem, first version. If X is a complete metric space, then it
is a Baire space.
Proof. We prove the theorem with the aid of the Choquet game played by Antoine and Bertrand
in an arbitrary metric space X. We say that a player has a winning strategy if he has a method
allowing him to win no matter what the opponent does. The statement is immediately obtained
from the following two claims:
Indeed, suppose (X, d) is complete. Let Bε (x) denote the closed ball centered at x with radius
ε. After each play Ui of Antoine, Bertrand simply chooses a non-empty open ball B1/ni (xi ) ⊂ Ui ,
with ni ∈ N, such that B1/ni (xi ) ⊂ Ui (it is easy to see such a ball indeed exists). But then we have a
61
decreasing sequence B1/n1 (x1 ) ⊃ B1/n2 (x2 ) ⊃ · · · of closed balls such that limi→∞ diam(B1/ni (xi )) = 0.
Therefore, by Theorem 5.1, ∅ 6= B1/ni (xi ) ⊂ Ui . 3
T T
Indeed, if X is not Baire, there exists a countable family {Cn } of closed subsets of X having
empty interior in X such that their union Cn has non-empty interior in X (Proposition 5.2).
S
Therefore, there exists a non-empty open subset U of X contained in Cn . Antoine then proceeds
S
as follows. First, he chooses U1 = U. At the n + 1-th play, he chooses Un+1 = Vn \Cn , where Vn is
the n-th play of Bertrand. It is easy to see this is indeed a legal move, i.e. that Un+1 is a non-empty
open set contained in Vn . Using this strategy, Antoine forces the plays of Bertand to satisfy:
V1 ⊂ U1 = U and Vn+1 ⊂ Vn \Cn , for every n ≥ 1. But then Un = Vn ⊂ U \ Cn = ∅. 3
T T S
The Baire Category Theorem provides an extremely powerful device for showing that some-
thing exists (or not).
Corollary 5.1 A complete metric space is not a countable union of nowhere dense sets.
The previous corollary gives a proof of the fact that R is uncountable. Indeed, R is complete
and {x} is nowhere dense for each x ∈ R.
Example 5.4 Consider the Euclidean metric space R. The subset Q cannot be written as a
countable intersection of open sets.
Indeed, suppose this is not the case. Then R \ Q is a countable union of closed sets and since
Q is clearly a countable union of closed sets as well, we have that R is a countable union of closed
sets such that each of them belongs to either Q or R \ Q. On the other hand, by Baire Category
Theorem, one of these sets has non-empty interior, a contradiction.
We now show a first application of Baire Category Theorem. Recall that a family of functions
F from a topological space X to the Euclidean metric space R is pointwise bounded if, for every
x ∈ X, the set Fx = { f (x) : f ∈ F } is bounded (under the Euclidean metric), i.e. there exists
Mx > 0 such that | f (x)| ≤ Mx for every f ∈ F . If we can find a bound M independent of x, we
obtain the following notion:
Definition 5.5 — Uniformly bounded family. Let X be a topological space and F a family of
functions f : X → R. The family F is uniformly bounded on X if there exists M > 0 such that
| f (x)| ≤ M for every f ∈ F and x ∈ X.
have that, for each x ∈ X, there exists Mx > 0 such that f (x) ∈ [−Mx , Mx ] for every f ∈ F . This
implies that each x ∈ X belongs to some Cn and so X = n∈N Cn . But since X is Baire (being
S
complete), there exists Ck with non-empty interior and so Ck contains an open set U. Therefore,
| f (x)| ≤ k for every f ∈ F and x ∈ U ⊂ Ck .
We now give yet another application of Baire Category Theorem. Note that Rn , although not
compact, can be written as a countable union of compact sets. It turns out this is not the case of
C0 ([0, 1], R):
Proof. The proof nicely combines several results. Suppose C0 ([0, 1], R) = Kn is a countable
S
union of compact sets Kn . Since each compact in a metric space is closed (Lemma 4.2) and
C0 ([0, 1], R) is complete (Theorem 3.1), Baire Category Theorem implies there exists Kn with
non-empty interior. Therefore, Kn contains an open ball Bε (g). Moreover, the closure of Bε (g) in
Kn is compact (Lemma 4.1). But we know that in a normed space the closure of an open ball
is just the corresponding closed ball (Exercise 2.4), and let us denote it by Bε (g). Recall now
that the closed ball in C0 ([0, 1], R) centered at 0 f (the identically 0 function) with radius 1 is not
compact. On the other hand, it is easy to see that Bε ( f ) is homeomorphic to B1 (0 f ) and since
compactness is invariant under homeomorphisms (Lemma 4.3), we obtain a contradiction.
Does there exist a function f : R → R which is continuous at the rationals and discontinuous
at the irrationals? We briefly sketch how a negative answer can be obtained from the Baire
Category Theorem. The reader is invited to work out the details.
For every open interval I of R, define the oscillation of f over I as ω( f , I) = supx∈I f (x) −
infx∈I f (x). Moreover, for x ∈ R, the oscillation of f at x is ω( f , x) = infI3x ω( f , I). It is not difficult
to see that f is continuous at x if and only if ω( f , x) = 0. Consider now the set S of points of R at
which f is not continuous and let Sn = {x ∈ R : ω( f , x) ≥ 1/n}. We have that each Sn is closed and
S = n≥1 Sn . But then the reasoning in Example 5.4 implies that S cannot be R \ Q.
S
However, there exists a function f : R → R which is continuous at the irrationals and discon-
tinuous at the rationals. One famous example is given by the following, known as Thomae’s
function:
1 if x ∈ Q and x = p with gcd(p, q) = 1;
f (x) = q q
if x ∈ R \ Q.
0
Theorem 5.4 — Baire Category Theorem, second version. If X is a compact Hausdorff space,
then it is a Baire space.
Proposition 5.4 Let X be a compact Hausdorff topological space, C a closed subset of X and
x ∈ X \C. If U is an open neighbourhood of x not contained in C, then there exists an open
neighbourhood V of x such that V ⊂ U \C.
Proof. We first show there exist two disjoint open subsets V and W of X such that x ∈ V and
C ∪ (X \U) ⊂ W . Let B = C ∪ (X \U) and observe that x ∈
/ B. Since X is Hausdorff, for every y ∈ B,
there exist disjoint open subsets Vy and Wy such that x ∈ Vy and y ∈ Wy . Moreover, since B is a
63
closed subset of the compact space X, it is compact (Lemma 4.1). This implies that the open
covering {Wy ∩ B}y∈B of B (in the subspace topology) admits a finite subcovering. Therefore, there
exist Wy1 , . . . ,Wyn such that B ⊂ ni=1 Wyi . But W = ni=1 Wyi ⊃ B is an open set, V = ni=1 Vyi is an
S S T
Proof of Theorem 5.4. We show that, given a countable family {Cn } of closed sets of X with empty
interiors, their union Cn has empty interior in X. In other words, we show that each open set of
S
of X has the finite intersection property and so, since X is compact, Theorem 4.4 implies that
Un 6= ∅. But then, if x ∈ Un , we have that x ∈ U1 ⊂ U0 and since Un ∩Cn = ∅ for each n, we
T T
have x ∈/ Cn .
S
Bibliography