Metric Space Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

THE UNIVERSITY OF MELBOURNE

Department of Mathematics and


Statistics

620-311
Metric Spaces
Lecture Notes
Semester 1, 2007
Notes by:
Revised by:

Kris Wysocki
Hyam Rubinstein

This compilation has been made in accordance with the provisions of Part
VB of the copyright act for the teaching purposes of the University for the
use of students of the University of Melbourne enrolled in the subject

620-311.

Metric and Topological Spaces

Contents
1 Introduction

Metric Spaces

3 Continuity

17

4 Complete Spaces

22

5 Compact Metric Spaces

35

6 Topological Spaces

40

7 Compact Topological Spaces

44

8 Connected Spaces

46

9 Product Spaces

51

10 Urysohns and Tietzes Theorems

57

11 Appendix

60

Introduction

The ideas of limit and continuity which we encounter in Euclidean spaces


occur in various other contexts, e.g in function spaces. Point set topology is
the study of limits and continuity in a general setting. The notion of limit
is based on the idea of nearness. These concepts are easier to understand
when the notion of nearness is defined in terms of some distance function.
The corresponding spaces are called metric spaces. These are introduced
in Chapter 2 and applications to function spaces are discussed early. The
desirability of finding limits leads to the notion of completeness and compactness. As we go on, we find that many of the arguments do not really
need the notion of distance. This leads to the concept of topological spaces
which are discussed from Chapter 6 onward. The idea of compactness is
discussed in a general setting in Chapter 7 and the notion of connectedness (which is related to the intermediate value theorem) is discussed in
Chapter 8. Under mild assumptions we can study abstract toplogical spaces
by constructing continuous functions to the real line; the results known as
Urysohn and Tietzes theorem are discussed in Chapter 10. The concepts
of completeness and compactness come again in the guise of the important
Ascoli-Arzela theorem discussed in Chapter 9. The necessary preliminary
material is collected in Chapter 11. This set of notes is only a brief introduction to the subject and we refer to the books by Munkres [M] or Patty
[P] for more comprehensive treatment.

Metric Spaces

Basic Concepts
Consider a non-empty set X, whose elements will be refered to as points. A
distance function or a metric on a set X is a function d : X X R which
assigns to each pair of points x and y in X a real number d(x, y) having the
following properties:
M1. d(x, y) 0 and d(x, y) = 0 if and only if x = y;
M2. d(x, y) = d(y, x) for all x, y X;
M3. d(x, z) 6 d(x, y) + d(y, z) for all x, y and z X.
Definition 2.1. A metric space is a pair (X, d) where d is a metric defined
on the set X.
The axiom M2 says that a metric is symmetric, and the axiom M3 is called
the triangle inequality since it reflects the geometrical fact that the length
of one side of a triangle is less than or equal to the sum of the lengths of the
other two sides.
Examples.
(1) Let X be any nonempty set. The discrete metric on X is defined by
(
0 x = y,
d(x, y) =
1 x 6= y.
(2) If (X, d) is a metric space and Y is a non-empty subset of X, then
for all x, y Y

dY (x, y) = d(x, y)

is a metric on Y . The pair (Y, dY ) is called a metric subspace of (X, d).


(We will usually refer to Y as a subspace of X, rather than (Y, dY ) as a
subspace of (X, d).)
(3) The standard metric in C is defined by
d(z, w) = |z w|,

z, w C.

The set of real numbers R inherits the metric from C, namely d(x, y) =
|x y|, x, y R. Identifying C = {x1 + ix2 | x1 , x2 R} with R2 =
{(x1 , x2 )| x1 , x2 R}, the standard metric takes the form
p
d((x1 , x2 ), (y1 , y2 )) = (x1 y1 )2 + (x2 y2 )2 .
5

(4) Cartesian product of a finite number of metric spaces. Consider a finite collection of metric spaces (Xi , di ) , 1 6 i 6 n, and let X =
Q
n
i=1 Xi = X1 . . . Xn . For x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ) X,
set
n
X
di (xi , yi ).
d(x, y) =
i=1

Then d is a metric on X. The pair (X, d) defined above is called a metric


product (or just a product) of (Xi , di ), 1 6 i 6 n, andQthe metric d is called
a product metric. (Other metrics are also used on ni=1 Xi ).

Norms and normed vector spaces

We next define the class of metric spaces which are the most interesting in
analysis. Let X be a vector space over R (or C).

Definition 2.2. A norm is a function : X R having the following
properties:


N1. x 0 and x = 0 if and only if x = 0.


N2. x = || x for all x X and R (or C).


N3. x + y 6 x + y for all x, y X.

The pair (X, ) is called a normed vector space.
Proposition 2.3. Let X be a normed space. Then


d(x, y) = x y , x, y X,

defines a metric on X.

Proof. The axioms M1 and M2 are clear. If x, y and z X, then, in view


of N3,



d(x, z) = x z = (x y) + (y z)



6 x y + y z = d(x, y) + d(y, z),

and so the triangle inequality follows.

Examples of normed spaces


Example. (1) Euclidean Space. For x = (x1 , . . . , xn ) Rn , define
#1/2
" n
X

2
x =
xi
.
i=1

Clearly, N1 and N2 are satisfied. To see that N3 holds we need the following
lemma.
Lemma 2.4. Cauchy inequality. If x, y Rn , then
X
X
1/2
1/2 X
n
n

n
2
2


|yi |
.
|xi |

xi y i 6

i=1

i=1

i=1

Proof.

06
=
=
=

n
X

(xi yj xj yi ) =

n
X

(x2i yj2 2xi xj yi yj + x2j yi2 )

i,j=1
n
n X
n
n
X
XX
xi xj yi yj
x2j yi2 2
x2i yj2 +
i=1 j=1
i=1 j=1
i=1 j=1
X
2
n
n
n
X
2 2 X
2 2
y x +
x y 2
xi yi
i
j
i=1
i=1
j=1
2
X
n
2 2




xi yi .
2 x y 2
i=1
i,j=1
n
n X
X

As a corollary we have
Corollary 2.5.



x + y 6 x + y

for all x, y Rn .

Proof. In view of the Cauchy inequality we have


n
n
n
n
X
X
X
X


x + y 2 =
yi2
xi yi +
x2i + 2
|xi + yi |2 =

2
= x + 2

i=1

i=1

i=1

n
X

i=1

2
2 2
xi yi + y 6 x + 2 x y + y

i=1

= ( x + y )2 .

By taking square roots of both sides the desired inequality follows.


7

Consequently,
#1/2
" n
X


(xi yi )2
d(x, y) = x y =
i=1

defines a metric on Rn . We shall call this metric the Euclidean metric or


the standard metric on Rn .
Example. (2) Space of bounded functions. Let X be a non-empty
set. A function f : X R is bounded if |f (x)| 6 M for some M and all
x X. Introduce the set B(X) = B(X, R) of all bounded functions from X
to R, and define

f = sup{|f (x)| : x X}.

Then k k is a norm on B(X), and, in view of Proposition 2.3, this norm


defines a metric on B(X) by


d(f, g) = f g = sup{|f (x) g(x)| : x X},
for f, g B(X).

Example. (3) Let X be the set of all continuous functions f : [a, b] R.


For any f X, we set
Z b

f =
|f (x)|dx.
a

Then k k defines a norm on X which induces a metric on X by


d(f, g) =

b
a

|f (x) g(x)|dx,

f, g X.

Balls and diameter


If x is an element of X and r is a positive real number, then we write B(x, r)
for the open ball in X with centre at x and radius r > 0, defined by
B(x, r) = {y X | d(x, y) < r}.
Similarly, the closed ball with centre at x and radius r > 0 is denoted by
B(x, r) and defined by
B(x, r) = {y X | d(x, y) 6 r}.

The diameter of a non-empty subset A of X is defined as


diam A = sup{d(x, y) | x, y A}.
Clearly, if A B, then diam A 6 diam B. A subset A X is bounded if
its diameter is finite, that is, diam A < . This is equivalent to saying that
A is contained in some ball.
We can also define the concept of distance between subsets of a metric space.
If A and B are non-empty subsets of X, then the distance between A and
B is defined as
d(A, B) = inf{d(x, y) | x A, y B}.
In particular, if x X, then the distance between sets {x} and A
d(x, A) := d({x}, A) = inf{d(x, y) | y A}
is called the distance between x and A.

Sequences and Convergence


Convergence of a sequence in a metric space is defined as in calculus.
Definition 2.6. The sequence {xn } is said to converge to a point x in X,
if for every > 0 there exists a positive integer k such that
for all n k.

d(xn , x) <
In this case we write
lim xn = x

or

xn x.

The point x is called the limit of {xn }.


The definition can be expressed in terms of the convergence of sequences of
real numbers. Namely, a sequence {xn } converges to x X if and only if
d(xn , x) 0 as n . We are justified in referring to the limit because of
the following proposition.
Proposition 2.7. Let {xn } be a sequence in a metric space (X, d).
Then there is at most one point x X such that {xn } converges to x.
If {xn } is convergent then it is bounded.
9

if {xn } converges to x and {yn } converges to y then d(xn , yn ) converges


to d(x, y).
Proof. Arguing by contradiction we assume that xn x and xn y with
x 6= y. Then d(x, y) > 0. Take = d(x, y)/2. Then we find a positive
integer k such that
d(xn , x) <

and d(xn , y) < ,

for n k.

By the triangle inequality


d(x, y) 6 d(x, xn ) + d(xn , y) < + = d(x, y)
which gives a contradiction. Hence we conclude that it is impossible for a
sequence {xn } to converge to two different points.
Next, if {xn } converges to x, then we know that there is a positive integer
k so that
d(xn , x) < for n k.
Then picking M = max{|x1 |, , |xk1 |, |xk | + }, it is easy to see that
M is a bound for all numbers in {|xn |}. So the sequence is bounded.
Finally, by the quadrilateral inequality,
|d(xn , yn ) d(x, y)| d(xn , x) + d(yn , y) 0
(To check this, note that either sign for the absolute value gives an inequality
which follows by two applications of the triangle inequality).

Given a sequence {xn } of points in X, consider a sequence of indices {nk }
such that n1 < n2 < n3 < . Then {xnk } is called a subsequence of
{xn }.
Q
Proposition 2.8. If X = ni=1 Xi is the product of metric spaces (Xi , di ),
m
m
m
1 6 i 6 n, and xm = (xm
1 , x2 , . . . , xn ) X, then x x = (x1 , . . . , xn )
m
X if and only if xi xi in Xi for i = 1, . . . , n.
Proof. Recall that we consider X with the metric
d(x, y) =

n
X

di (xi , yi )

i=1

for x = (x1 , . . . , xn ), y = (y1 , . . . , xn ) X. Observe that


di (xi , yi ) 6 d(x, y) 6 n max{di (xi , yi ) | 1 6 i 6 n},
10

x, y X.

(1)

Let xm x, where x = (x1 , . . . , xn ). Then given > 0 there exists k N


such that
d(xm , x) < for m k.
By (1) we have

dj (xm
j , xj ) <

for m k and j = 1, . . . , n.

m
So xm
j xj as required. Conversely, assume that xj xj for j = 1, . . . , n.
Hence for a given > 0, there exists k(j) N such that

dj (xm
j , xj ) < /n

for m k(j).

In view of the right hand side inequality in (1) we get


d(xm , x) 6 n max{dj (xm
j , xj ) | j = 1, . . . , n} <
for all m > k := max{k(j) | j = 1, . . . , n}. Hence xn x as required.

Definition 2.9. Two metrics d and d in X are called equivalent if


d(xn , x0 ) 0

if and only if

d (xn , x0 ) 0.

Examples. (1) Let d be any metric on X. Define


d (x, y) =

d(x, y)
,
1 + d(x, y)

x, y X.

(2)

Then d is a metric on X (show this!) which is equivalent to d. Indeed, if


d(xn , x0 )
0. Conversely, d(x, y) =
d(xn , x0 ) 0, then d (xn , x0 ) =
1 + d(xn , x0 )

d (x, y)
. So if d (xn , x0 ) 0, then d(xn , x0 ) 0. Note that with
1 d (x, y)
respect to this equivalent metric, the space X is bounded since d (x, y) < 1
for all x, y X.
(2) Consider the product (X, d) of metric spaces (Xi , di ). Recall that
d(x, y) =

n
X
i=1

Set

di (xi , yi ),

x = (x1 , . . . , xn ), y = (y1 , . . . , yn ) X.

(x, y) = max{di (xi , yi )| 1 6 i 6 n}


X
1/2
n
di (xi , yi )2
.
(x, y) =
i=1

Then d is equivalent to and .

11

Open and closed sets


Definition 2.10. Let A X. A point x A is called an interior point
of A if B(x, r) A for some r > 0. The collection of all interior points of
a set A is called the interior of A, and is denoted by A or intA. A set A
is called open if A = A .
Note that if x is an interior point of A X, then it is also an interior point
of any set B such that A B.
Examples. (1) The empty set and the whole space X are open in any
metric space X. If X is equipped with the discrete metric d, then any subset
of X is open.
(2) The set Q is not open in R with the usual metric but it is open in (R, d),
where d is the discrete metric in R. Indeed, if x Q and r > 0, then for
large n N, we have

2
<x+r
x<x+
n

so that x + 2/n B(x, r) but x + 2/n 6 Q. In the case of the discrete


metric, for every x Q, B(x, 1/2) = {x} Q, so Q is open in (R, d).
Proposition 2.11. Let X be a metric space. Then
(a) Every open ball B(x, r) is an open set.
(b) The intersection of a finite collection A1 , . . . , Ak of open sets is open.
(c) The union of any collection of open sets is open.
Proof. (a) Take any point y B(x, r) and set R := r d(x, y) > 0. If
z B(y, R), then the triangle inequality
d(x, z) 6 d(x, y) + d(y, z) < d(x, y) + R = d(x, y) + [r d(x, y)] = r
shows that z B(x, r), that is, B(y, R) B(x, r) and y is an interior point
of B(x, r) as claimed.
T
(b) If x 16i6k Ai , then there are numbers ri > 0 such that B(x, ri )
Ai for 1 6
T i 6 k. Take r to be the smallest of the numbers rj . Then
B(x, r) 16i6k Ai .
(c) If x belongs to the union of open sets, then it belongs to one of these
sets, say to A. Since x is an interior point of A, it is also an interior point
of the union.

12

R := r d(x, y)

x
r

Figure 1: An open ball is an open set

Proposition 2.12. The interior A of a set A is an open set and it is the


largest open set contained in A.
Proof. Let x A . Since x is an interior point of A, B(x, r) A for some
r > 0. In view of Proposition 2.11 (a), every point in B(x, r) is an interior
point of B(x, r) and therefore of A. Hence every point of B(x, r) is an
interior point of A implying that B(x, r) A .
If B A is open, then each point of B is an interior point of A and so
belongs to A .

If x X, then a set A X is called a neighbourhood of x if x A .
Definition 2.13. A point x X is called an adherent point of a subset
A if for every > 0 there exists a point y A such that y B(x, ). The
closure A of A is the set consisting of all the adherent points of A. If
A = A, then A is called closed.
If x is an adherent point of A, then it is also an adherent point of every
larger set B, A B X. An adherent point x is either a limit point or an
isolated point of a set A. An isolated point satisfies x A and there is an
open set U with A U = {x}. (See Definition 2.22) An equivalent definition
to adherent point is contained in the following proposition.
Proposition 2.14. A point x is an adherent point of A if and only if there
exists a sequence of points xn A converging to x.
13

Proof. Suppose that x is an adherent point of A. Then for every positive


integer n, there is xn A such that d(xn , x) < 1/n. But this implies that
xn x. Conversely, suppose that {xn } A and xn x. Let > 0. Then
d(xn , x) < for n greater than some k. Hence x is an adherent point of
A.

Examples. (1) A closed ball B(x, r) is closed set in X. Indeed, let y be
an adherent point of B(x, r). Then there exists a sequence {yn } in B(x, r)
such that yn y. By the triangle inequality
d(y, x) 6 d(y, yn ) + d(yn , x) 6 d(y, yn ) + r r.
Hence y B(x, r) as claimed. Note that the closure of an open ball B(x, r)
does not have to coincide with a closed ball B(x, r). Indeed, let X be a set
containing at least two points and let d be the discrete metric on X. Then
B(x, 1) = {x} =
6 X = B(x, 1).
(2) A subset of a metric space may be neither open nor closed. For instance,
[0, 1) is neither open nor closed in R. The same is true for Q. On the other
hand, a subset may be open and at the same time closed. In a metric space
equipped with the discrete metric any subset is both open and closed.
Proposition 2.15. A subset A of X is open if and only if its complement
Ac is closed in X.
Proof. The proof is based on the following observation. A point x in A is
either an adherent point of Ac or an interior point of A, but not both. Hence,
if A is open, then its points are not adherent points of Ac which implies that
adherent points of Ac belong to Ac , That is, Ac is closed. Conversely, if Ac
is closed, then the points of A cant be adherent points of Ac . Hence they
are interior points of A and A is open.

Proposition 2.16. Let X be a metric space. Then
(a) The union of a finite collection of closed sets A1 , . . . , Ak is closed.
(b) The intersection of arbitrary collection of closed sets is closed.
S
T
Proof. (a) Let A = 16j6k Aj . Then Ac = 16j6k Acj is open in view of
Proposition 2.11 (b) and Proposition 2.15. Using again Proposition 2.15 the
set A is closed.
T
S
(b) Let A = iI Ai be the intersection of closed sets. Then Ac = iI Aci
is open in view of Proposition 2.11 (b) and Proposition 2.15. By Proposition
2.15 again the set A is closed.

14

Proposition 2.17. The closure A of a set A is closed and it is the smallest


closed set containing A.
Proof. If x (A)c , then there is r > 0 such that B(x, r) Ac . None of the
points of B(x, r) belongs to A since B(x, r) is open. Thus, B(x, r) (A)c
and (A)c is open, so A is closed.
If A B and B is closed, then every adherent point of A is also an adherent
point of B, hence belongs to B. Thus, A B.

Theorem 2.18. Let Y be a subspace of X.
(a) B Y is open in Y if and only if B = Y A for some open set A in
X.
(b) B Y is closed in Y if and only if B = Y F , where F is closed in
X.
Proof.
(a) First assume that B = Y A for some open set A in X. Take x B.
Then there exists an open ball B(x, r) in X such that B(x, r) A. But
then Y B(x, r) Y A = B. Since the open ball in the subspace Y with
centre x X and radius r > 0 is the intersection Y B(x, r), the set B is
open in Y . Conversely, suppose that B is an open subset of the subspace Y .
Then for every x B there exists rx such that the
S open ball B(x, rx ) Y in
Y is contained in B. Then the open subset A = xB B(x, rx ) of X satisfies
Y A B. Since any x B also belongs to A, Y A = B as required.
(b) A set B is closed in Y if and only if Y \ B is open in Y , hence if and
only if Y \ B = Y A for some open subset A of X. Let F = X \ A. Then
F is closed in X and B = Y \ [Y A] = Y \ A = Y [X \ A] = Y F , as
required.

Theorem 2.19. Let X be the product of metric spaces (Xi , di ), 1 6 i 6 m.
Q
(a) If Ai is open in Xi ,Q
1 6 i 6 m, then the product A = ni=1 Ai is an
open subset of X = ni=1 Xi .
Q
(b) If Fi is closedQin Xi , 1 6 i 6 m, then F = m
i=1 Fi is closed in the
m
product X = i=1 Xi .

Proof.
(a) We prove the result for the product of two metric spaces X1 and X2 .
Let a = (a1 , a2 ) A X. Since Ai is open in Xi , there exists ri such that
an open ball B(ai , ri ) in Xi is contained in Ai . Let r = min{r1 , r2 }. We
15

claim that B(a, r) A. Indeed, if x = (x1 , x2 ) B(a, r), then d(a, x) < r
where x = (x1 , x2 ), and since di (ai , xi ) < d(a, x) < r 6 ri we conclude that
xi B(ai , ri ). Hence xi Ai , i = 1, 2, so that x A.
(b) The proof follows from Proposition 2.8.

Definition 2.20. The boundary of A in X, denoted by A, is the set
A X \ A.

Hence x A if for every r > 0 the open ball B(x, r) intersects A and X \ A
as well. Clearly, the boundary is a closed set as it is an intersection of closed
sets.
Example 2.21. Consider R with the usual metric. Then
([0, 1]) = ((0, 1)) = {0, 1}
(Q) = (R \ Q) = R.

We shall show the last equality. Fix x R. If x Q, then

1
2
x 6= x + Q and x 6= x +
Qc , for n N.
n
n
Since

x = lim(x + 1/n) = lim(x + 2/n),


n

it follows that x QQc . So Q QQc = Q. If x Qc , then x+1/n Qc


and there exists a sequence of rational numbers xn such that
x = lim(x + 1/n) = lim xn .
n

Hence x Q Qc and (Q) = (Qc ) = Q Qc = R.


Definition 2.22. A point x X is called isolated if {x} is open. A space
X is called discrete if all of its points are isolated.
If x is an isolated point, then for some > 0, an open ball B(x, ) {x},
that is, B(x, ) = {x} and if y 6= x, then d(x, y) . Conversely, if
inf{d(x, y) | y 6= x} > 0, then {x} is open. Note also that {x} is always closed. For example, consider N as subspace of R. Then it is discrete.
Also the space J = {1/n | n N} is discrete. In a discrete space any set
is open, since it is a union of one-point sets which are open. Also any set
is closed being a complement of an open set. Finally, a space is discrete
if and only if the only convergent sequences are those which are eventually
constant (Prove this!).

16

Definition 2.23. A subset A of a metric space is dense if A = X.


Example 2.24. The sets Q and Qc are dense in R with the usual metric.

Proposition 2.25. Let X be a metric space and A X. Then A is dense if


and only if for every non-empty open set U of X, the intersection U A 6= .
Definition 2.26. A subset A of X is called nowhere dense if (A) = .
Example 2.27. The sets of all natural numbers N or all integers Z are
nowhere dense in R with the usual metric. The set of real numbers R is
nowhere dense in R2 with the standard metric.

Example 2.28. [Cantor set] The Cantor set is a subset of [0, 1] constructed
as follows:
Consider the interval C0 = [0, 1].
Step 1. We divide C0 into three equal intervals [0, 1/3], [1/3, 2/3] and [2/3, 1]
and remove the middle open interval (1/3, 2/3). Denote the remaining intervals by C1 = [0, 1/3] [2/3, 1]. The length of intervals which constitute
C1 is equal to 2/3.
Step 2. We perform the same operations as in the first step on each of the
intervals of C1 . We remove intervals (1/9, 2/9) and (7/9, 8/9). Denote the
four remaining intervals by C2 .
Having finished the step (n 1), we perform the nth step and obtain the
set Cn consisting of 2n intervals.
Each of the sets Cn is closed and bounded, and Cn+1 Cn . The Cantor set
is defined as

\
Cn
C=
n=1

It is non-empty and since for every n, Cn is closed, C is closed. The set


C does not contain any open interval (show this!), and so, C has empty
interior. Hence C is nowhere dense.

Continuity

The definition of continuity is the definition of calculus.


17

Definition 3.1. Let (X, d) and (Y, ) be metric spaces and let f : X Y be
a function. The function f is said to be continuous at the point x0 X
if the following holds: for every > 0, there exists > 0 such that for all
x X if d(x, x0 ) < , then (f (x), f (x0 )) < . The function f is said to be
continuous if it is continuous at each point of X.
The following proposition rephrases the definition in terms of open balls.
Proposition 3.2. Let f : X Y be a function from a metric space X to
another metric space Y and let x0 X. Then f is continuous at x0 if and
only if for every > 0 there exists > 0 such that
f (B(x0 , )) B(f (x0 ), ).
Theorem 3.3. Let f : X Y be a function from a metric space (X, d)
to another metric space (Y, ) and let x0 X. Then f is continuous at x0
if and only if for every sequence {xn } such that xn x0 , f (xn ) f (x0 ).
Also, f is continuous if and only if for every convergent sequence {xn } in
X,
lim f (xn ) = f (lim xn ).
n

Proof. Suppose that f is continuous at x0 and let xn x0 . We will prove


that f (xn ) f (x0 ). Let > 0 be given. By the definition of continuity at
x0 , there exists > 0 such that for all x X,
if d(x, x0 ) < , then (f (x), f (x0 )) < .

(3)

Since xn x0 , there exists an integer k such that for all n k,


d(xn , x0 ) < .

(4)

Combining (3) and (4), we get


(f (xn ), f (x0 )) <

for all n k.

(5)

Hence f (xn ) f (x0 ) as required. Conversely, arguing by contradiction


assume that f is not continuous at x0 . To obtain a contradiction we will
construct a sequence {xn } such that xn x0 but the sequence {f (xn )}
does not converge to f (x0 ). Since f is not continuous at x0 , there is positive
> 0 such that for all > 0 there exists x satisfying d(x, x0 ) < but
(f (x), f (x0 )) . For each n, take = 1/n and then choose xn so that
d(xn , x0 ) < 1/n but (f (xn ), f (x0 )) . Hence xn x0 but the sequence
{f (xn )} does not converge to f (x0 ). The second part of the theorem is an
immediate consequence of the first.

18

Global continuity has a simple formulation in terms of open and closed sets.
Theorem 3.4. Let f be a function from a metric space (X, d) to (Y, ).
Then
(a) f is continuous if and only if for every open set U Y , the preimage
f 1 (U ) of U is open in X. (Recall that the preimage f 1 (U ) is defined
as f 1 (U ) = {x X | f (x) U }).
(b) f is continuous if and only if for every closed set F Y , f 1 (F ) is
closed in X.
Proof. (a) Suppose first that f is continuous and U is open in Y . If
x f 1 (U ), then f (x) U . Since U is open in Y and f (x) U , there
exists a positive number such that B(f (x), ) U . In view of Proposition
3.2, there exists > 0 such that f (B(x, )) B(f (x), ). Hence B(x, )
f 1 (f (B(x, ))) f 1 (U ), so f 1 (U ) is open in X. Conversely, suppose
that f 1 (U ) is open in X for every open set U in Y . Let x X and let
> 0 be given. Since B(f (x), ) is open in Y , the set f 1 (B(f (x), ))
is open in X. Since x f 1 (B(f (x), )), there exists > 0 such that
B(x, ) f 1 (B(f (x), )). This implies that f (B(x, )) B(f (x), ), and
in view of Proposition 3.2, f is continuous.
(b) The proof is left as an exercise

Theorem 3.5. Let X, Y and Z be three metric spaces.
(a) If f : X Y and g : Y Z are continuous, then the composition
g f is continuous.
(b) If f : X Y is continuous, and A is a subspace of X, then the
restriction of f to A, f |A : A Y , is continuous.
Proof. (a) Let xn x0 . Since f is continuous at x0 , f (xn ) f (x0 ). Since
g is continuous at f (x0 ), g(f (xn )) g(f (x0 )). Hence g f (xn ) g f (x0 ).
The second statement follows from the first. Here is another proof of (a).
Let U be an open subset of Z. Since g is continuous, g1 (U ) is open in Y ,
and since f is continuous, f 1 (g1 (U )) is open in X. But f 1 (g1 (U )) =
(g f )1 (U ) and so, (g f )1 (U ) is open in X. Hence g f is continuous.
(b) Note that f |A = f j, where j : A X is the inclusion, i.e., defined by
j(x) = x for x A. Since for any open set U in X, j 1 (U ) = U A which
is open in A, it follows that j is continuous. So (b) follows from (a).


19

Theorem 3.6. Let (X, d), (Y1 , 1 ) and (Y2 , 2 ) be metric spaces. Let f be
a function from X to Y1 and g a function from X to Y2 .
Define the function h from X to the product Y1 Y2 by
h(x) = (f (x), g(x)),

for x X.

Then h is continuous at x0 if and only if f and g are continuous at


x0 . Thus h is continuous if and only if both functions f and g are
continuous.
If f and g are continuous functions from (X, d) to R, so are f +
g, f g, f g. Similarly f /g is also continuous so long as g(x) 6= 0 for
all x.
d : X X R is continuous.
The similar statement about functions from the direct product does not hold
in general. Suppose that f is a function from X Y to Z. It may happen
that f is discontinuous, though the maps x 7 f (x, y) for every y Y and
y 7 f (x, y) for every x X are all continuous. For example, consider a
function from R R to R defined by
xy

for (x, y) 6= (0, 0);


f (x, y) = x2 + y 2
0
for (x, y) = (0, 0).
The function f is discontinuous at (0, 0) but all the functions x 7 f (x, y)
and y 7 f (x, y) are continuous.
Theorem 3.7 (The pasting lemma). Let X = A B, where A and B
are closed subspaces of X. Let f : A Y and g : B Y be continuous. If
f (x) = g(x) for all 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. Let C be a closed subset of Y . Then h1 (C) = f 1 (C) g1 (C).
Since f is continuous, f 1 (C) is closed in A. But since A is closed f 1 (C)
is closed in X. Similarly, g1 (C) is closed in X. So h1 (C) is closed in X
and the proof is finished.

20

Uniform Continuity and Uniform Convergence


Definition 3.8. A mapping f from a metric space (X, d) to a metric space
(Y, ) is said to be uniformly continuous if for every > 0, there exists
> 0 such that (f (x), f (y)) < for all x, y X satisfying d(x, y) < .
Obviously, a uniformly continuous function is continuous.
Examples. (1) The function f (x) = x/(1 + x2 ) from R to R is uniformly
continuous. To see this observe that for any x < y, in view of the mean
value theorem of calculus, there exists t (0, 1) such that


1 t2

|x y| 6 |x y|.

|f (x) f (y)| = |f (t)| |x y| =
(1 + t2 )2
since |f (t)| 6 1. Hence for given , choose = . Then for any x, y such
that d(x, y) = |x y| < , we have
d(f (x), f (y)) = |f (x) f (y)| 6 |x y| = d(x, y) < = .
So f is uniformly continuous.
(2) The function f (x) = x2 for x R is not uniformly continuous. Indeed,
choose > 0 and set
x = 1/ + /2

and

y = 1/.

Then |x y| = /2 < but |x2 y 2 | > 1. However, if we consider the


same function on some bounded interval, say [a, a], then the function is
uniformly continuous since if < /2a and x, y [a, a] with |x y| < ,
then |x2 y 2 | = |x y| |x + y| < 2a|x y| < .
Let (X, d) and (Y, ) be metric space. Consider a sequence {fn } of functions
fn : X Y and let f : X Y .
Definition 3.9. The sequence {fn } is said to converge pointwise to f
if for every x X and for every > 0, there exists an index N = N (x, )
such that
(fn (x), f (x)) <
for all n N .

The sequence {fn } is said to converge uniformly to f if for every > 0,


there exists an index N = N () such that
(fn (x), f (x)) <

for all n N and all x X.

Equivalently, {fn } converges uniformly to f on X if


sup{(fn (x), f (x)) | x X} 0.
21

The notion of uniform convergence of a sequence of functions is, in general,


more useful than that of pointwise convergence.
Theorem 3.10. Let {fn } be a sequence of continuous functions from a
metric space (X, d) to a metric space (Y, ). Suppose that {fn } converges
uniformly to f from X to Y . Then f is continuous.
In words, the uniform limit of a sequence of continuous functions is continuous.
Proof. Let x0 X and let > 0 be given. Since {fn } converges uniformly
to f , there exists an index N such that for all n N and all x X,
(fn (x), f (x)) < /3.

(6)

Since fN is continuous at x0 , we can choose > 0 so that


(fN (x), fN (x0 )) < /3

(7)

for all d(x, x0 ) < . Now if d(y, x0 ) < , then


(f (y), f (x0 )) 6 (f (y), fN (y)) + (fN (y), fN (x0 )) + (fN (x0 ), f (x0 )).
Each term of the right-hand side is less than /3, the first and the third in
view of (6) and the second in view of (7). Thus
(f (y), f (x0 )) <
for all d(y, x0 ) < . This proves that f is continuous.

Complete Spaces

Definition 4.1. Let (X, d) be a given metric space and let {xn } be a sequence of points of X. We say that {xn } is Cauchy (or satisfies the
Cauchy condition) if for every > 0 there exists k N such that
d(xn , xm ) <

for all n, m k.

Properties of Cauchy sequences are summarized in the following propositions.


Proposition 4.2. If {xn } is a Cauchy sequence, then {xn } is bounded.
22

Proof. Take = 1. Since {xn } is Cauchy, there exists an index k such that
d(xn , xk ) < 1 for all n k. Let R > 1 be such that than d(xi , xk ) < R for
1 6 i 6 k 1. Then xn B(xk , R) for all n, so {xn } is bounded.

Proposition 4.3. If {xn } is convergent, then {xn } is a Cauchy sequence.
Proof. Assume that xn x. Then for a given > 0 there exists k N such
that d(xn , x) < /2 for all n k. Hence taking any n, m k,
d(xn , xm ) 6 d(xn , x) + d(x, xm ) < /2 + /2 = .
So {xn } is Cauchy.

Proposition 4.4. If {xn } is Cauchy and it contains a convergent subsequence, then {xn } converges.
Proof. Assume that {xn } is Cauchy and xkn x. We will show that xn
x. Let > 0. Since {xn } is Cauchy, there exists k such that d(xn , xkn ) < /2
for all n k . Also since xkn x, there exists k such that d(xkn , x) < /2
for all n k . Set k = max{k , k }. Then for n k,
d(xn , x) 6 d(xn , xkn ) + d(xkn , x) < /2 + /2 =
showing that xn x.

A Cauchy sequence need not converge. For example, consider {1/n} in the
metric space ((0, 1), | |). Clearly, the sequence is Cauchy in (0, 1) but does
not converge to any point of the interval.
Definition 4.5. A metric space (X, d) is called complete if every Cauchy
sequence {xn } in X converges to some point of X. A subset A of X is called
complete if A as a metric subspace of (X, d) is complete, that is, if every
Cauchy sequence {xn } in A converges to a point in A.
By the above example, not every metric space is complete; (0, 1) with the
usual metric is not complete. Also Q is not complete.
Theorem 4.6. The space R with the usual metric is complete.
Proof. Let {xn } be a Cauchy sequence in R. Then it is bounded, say |xn | 6
M . Set Sn = {xk | k n} and yn = inf Sn . Then Sn+1 Sn and so {yn }
is increasing and yn 6 M for all n. Hence {yn } converges, say to x (see

23

Proposition 11.11 in Appendix). We claim that also xn x. To see this


choose N so that |xn xm | < /2 for n, m N . In particular,
xN /2 < xk < xN + /2

for all k N .

xN /2 6 yn 6 xN + /2

for all n N .

Hence
Let n . Then

xN /2 6 x 6 xN + /2,

or equivalently, |xN x| 6 /2. Hence for n N ,


|xn x| 6 |xn xN | + |xN x| < /2 + /2 = .
Thus {xn } converges to x.

A subspace of a complete metric space may not be complete. However, the


following holds.
Theorem 4.7. If (X, d) is a complete metric space and Y is a closed subspace of X, then (Y, d) is complete.
Proof. Let {xn } be a Cauchy sequence of points in Y . Then {xn } also
satisfies the Cauchy condition in X, and since (X, d) is complete, there
exists x X such that xn x. But Y is also closed, so x Y showing that
Y is complete.

Theorem 4.8. If (X, d) is a metric space, Y X and (Y, d) is complete,
then Y is closed.
Proof. Let {xn } be a sequence of points in Y such that xn x. We have
to show that x Y . Since {xn } converges in X, it satisfies the Cauchy
condition in X and so, it also satisfies the Cauchy condition in Y . Since
(Y, d) is complete, it converges to some point in Y , say to y Y . Since any
sequence can have at most one limit, x = y. So x Y and Y is closed. 
Theorem 4.9. If (Xi , di ) are complete metric spaces for i = 1, . . . , m, then
the product (X, d) is a complete metric space.
Proof. Let xn = (x1n , . . . , xm
n ) and {xn } be a Cauchy sequence in (X, d).
Then for a given > 0 there exists k such that d(xn , xm ) < for all n, m k.
Since
dj (xjn , xjm ) 6 d(xn , xm ) < ,
24

it follows that {xjn } is Cauchy in (Xj , dj ) for j = 1, . . . m. Since (Xj , dj ) is


complete, for j = 1, . . . , m there exists xj Xj such that xjn xj . Then,
in view of Proposition 2.8, xn x, where x = (x1 , . . . , xm ).

We write C(X, Y ) for the space of continuous functions from X to Y . A
function f : X Y is said to be bounded if the image of X, f (X), is
contained in a bounded subset of Y , and we write Cb (X, Y ) for the space of
bounded continuous function f : X Y . If Y = R, we simply write C(X)
instead of C(X, R) and Cb (X) instead of Cb (X, R). For f, g Cb (X, Y ), we
set
(f, g) := sup{d (f (x), g(x)) | x X},
where d denotes the metric on Y .

Theorem 4.10. The space (Cb (X, Y ), ) is a complete metric space if (Y, d )
is complete.
Proof. The verification that is a metric is left as an exercise. Suppose that
Y is complete, and suppose that {fn } is a Cauchy sequence in Cb (X, Y ).
Then for every x X,
d (fn (x), fm (x)) 6 (fn , fm )
so that {fn (x)} is a Cauchy sequence on Y . Hence there exists a point,
denoted by f (x) Y , such that d (fn (x), f (x)) 0. In this way we obtain
a function f : X Y which associates with a point x X a point which is
the limit of {fn (x)}. We must check that f is continuous and bounded, and
that (fn , f ) 0. Let x X, and > 0. Then there exists N such that
d (f (x), fN (x)) < /3, and an open ball B(x, ) such that d (fN (x), fN (y)) <
/3 for every y B(x, ). It follows that for every y B(x, ),
d (f (x), f (y)) 6 d (f (x), fN (x)) + d (fN (x), fN (y)) + d (fN (y), f (y)) < .
Hence f is continuous. Now given > 0, chose n0 such that (fn , fm ) <
for all n, m n0 . Then for every x X,
d (fn (x), f (x)) = lim d (fn (x), fm (x)) 6
m

for n n0 . This says that (fn , f ) 6 for n n0 . It remains to show that


f is bounded. Take x, y X and let N N be such that
d (f (x), fN (x)) < 1/2

and d (f (y), fN (y)) < 1/2


25

Note that we can find such an N since (fn , f ) 0. Then


d (f (x), f (y)) 6 d (f (x), fN (x)) + d (fN (x), fN (y)) + d (fN (y), f (y))
< 1 + d (fN (x), fN (y)) 6 1 + diamfN (X).
Since x, y X were arbitrary, diamf (X) 6 1 + diamfN (X). Hence f is
bounded. The proof is completed.

Corollary 4.11. The space (Cb (X), ) is complete.

Structure of complete metric spaces: Baires theorem


Let (X, d) be a metric space. If U and V are open and dense, then U V
is also open and dense. To see that U V is dense, we have to show that
O U V is non-empty for any non-empty open set O. Since U is dense,
there is u O U , and since O U is open, B(u, r) O U for some r > 0.
Since V is dense, B(u, r) V 6= so that, =
6 B(u, r) V O U V .
If U and V are assumed to be dense but not necessarily open, then the
intersection U V does not have to be dense. For example, let U be the set
of rational numbers and V the set of irrational numbers Qc . Then both sets
are dense in R with the usual metric, however, U V = . Consider,
T now
a sequence of dense and open sets Un . In general, the intersection n1 Un
may be empty. For example, consider (Q, d) with the usual metric d. Let
{qn |n N} be an enumeration of rational numbers, and let Un = Q \ {qn }.
Then each Un is open

 of a closed
T since it is
T a complement
S set {qn }, and is
dense . However, n1 Un = n1 Q \ {qn } = QT\ n1 {qn } = . The
Baire theorem says that if (X, d) is complete, then n1 Un is dense.
Theorem 4.12 (Baire). Let (X, d) be a complete metric
T space, and let
{Un } be a sequence of open and dense subsets of X. Then n1 Un is dense.

Proof. It suffices
to show that every open ball B(x, r) contains a point beT
longing to n1 Un . Since U1 is open and dense, B(x, r) U1 is non-empty
and open. So, there exists an open ball B(x1 , R) with R < 1 such that
B(x1 , R) B(x, r) and B(x1 , R) U1 . Taking r1 < R, we get that
B(x1 , r1 ) B(x, r) and B(x1 , r1 ) U1 . Similarly, since U2 is open and
dense, there exists x2 and r2 < 1/2 such that B(x2 , r2 ) B(x1 , r1 ) U2 .
Continuing in this way we find a sequence of balls B(xn , rn ) with rn < 1/n
and B(xn+1 , rn+1 ) B(xn , rn ) Un+1 . We claim that {xn } is Cauchy. By

26

construction, Bn (xn , rn ) B(xk , rk ) for all n k. Given > 0 choose


k N so that 1/k < /2. Then, if n, m k,
d(xn , xm ) 6 d(xn , xk ) + d(xk , xm ) < 1/k + 1/k < .
Because (X, d) is complete, {xn } converges, say to y. The point y lies in
all balls B(xk , rk ) since xn B(xk , rk ) for all n k and B(xk , rk ) is closed
for all k, so that after taking a limit as n , y B(xk , rk ) for all k. In
particular, y B(x1 , r1 ) B(x,
T r) and y B(xn+1 , rn+1 ) Un+1 for all n.
Consequently, y B(x, r) n1 Un , and the proof is finished.

As a consequence we obtain the following theorem.

Theorem 4.13. If (X, d) is a complete metric space and


S {Fn } is a sequence
of nowhere dense subsets of X, (i.e int Fn = ) then Fn has empty interior.
S
Proof. Arguing
S by contradiction assume that Fn has non-empty interior.
So B(x, r) Fn for some x and r > 0. Define Un = X \ Fn . Clearly, Un is
open and we claim that it is dense. Indeed, if for some non-empty open set V
we have V Un = , then V X \Un = Fn contradicting
T that Fn has empty
interior. Consequently, in view of the above theorem, n1 Un is dense. So
T
S
S
B(x, r) n1 Un 6= . On the other hand, B(x, r) Fn Fn so that



T 
T
S
= B(x, r) X \ n1 Fn = B(x, r) n1 X \ Fn = B(x, r) n1 Un ,
a contradiction.

Example 4.14. The metric space R with the standard metric cannot be
written as a countable union of nowhere dense sets since it is complete. By
contrast, Q with the standard metric can be written as the union of one
point sets {qn }, where {qn | n N} is an enumeration of Q. Every one point
set {qn } is closed in Q and its interior is empty, so nowhere dense. This
does not contradict Baires theorem since Q with the standard metric is not
complete.

Applications
Theorem 4.15. Let (X, d) be a complete metric space, and let {fn } be a
sequence of continuous functions fn : X R. Assume that the sequence
{fn (x)} is bounded for every x X. Then there exists a non-empty open set
U X on which the sequence {fn } is bounded, that is, there is a constant
M such that |fn (x)| 6 M for all x U and all n N.
27

Proof. Since the function fn is continuous, the set fn1 ([m, m]) = {x X |
|fn (x)| 6 m} is closed for any pair of positive integers n and m. Thus,
\
Em = {x X | |fn (x)| 6 m for all n N} =
fn1 ([m, m])
n

is closed for every m N. If x is any point in X, then |fS


n (x)| 6 k for some
k N and all n because {fn (x)} is bounded. Hence X = m Em . In view of
the Baire theorem, one of the sets, say Em , has non-empty interior. Setting
the conclusion follows.
U = Em

Theorem 4.16. There exists a continuous function f : [0, 1] R which is
not differentiable at any point x [0, 1).
Proof. Recall that f has a right-hand derivative at x if
lim [(f (x + h) f (x))/h] exists.

h0+

We denote this limit by f+ (x). In particular, if f is differentiable at x [0, 1)


then f+ (x) exists and is equal to f (x). Consider the complete metric space
C([0, 1], R) = Cb ([0, 1], R) with a metric d given by
d(f, g) = sup{|f (x) g(x)||x [0, 1]}.
Let
M = {f C([0, 1], R)| there exists x [0, 1) such that f+ (x) exists}
and let Mm , for m 2, be the set of all f C([0, 1], R) for which there
exists some x [0, 1 1/m] such that
|f (x + h) f (x)| 6 m h for all h [0, 1/m].
S
Claim 1: M m2 Mm . Let f M . Then there exists x [0, 1) such
that f+ (x) exists. We will show that |f (x + h) f (x)| 6 m h for some
m N and all 0 6 h 6 1/m. Since
lim

h0+

we have

f (x + h) f (x)
= f+ (x),
h



f (x + h) f (x)
= |f+ (x)|.

lim

h
h0+
28

(1)

Take an integer k 2 such that |f+ (x)| < k and x [0, 1 1/k]. In view of
(1), there exists 0 < < 1/k such that
|f (x + h) f (x)| 6 k h for all 0 6 h 6 .
Since f is continuous on a closed and bounded interval, there is C > 0 such
that |f (x)| 6 C for all x [0, 1] (this will be proved later on in the section on
compactness). Let k be any integer so that 2C/ < k . Then, for 6 h 6 1
such that x + h 6 1,
|f (x + h) f (x)| 6 |f (x + h)| + |f (x)| 6 2C =

2C
2C
6
h 6 k h.

Taking m = max{k, k }, we have x [0, 11/m] and |f (x+h)f (x)| 6 mh


for all h [0, 1/m], so that f Mm .
Claim 2: Mm is closed for all m 2. To see this, take f Mm . We will
show that f Mm , that is, |f (x+h)f (x)| 6 mh for some x [0, 11/m]
and all h [0, 1/m]. There exists a sequence (fk ) Mm such that d(fk , f ) =
sup{|fk (x) f (x)|| x [0, 1]} 0 as k . Since fk Mm , there exists
xk [0, 1 1/m] such that
|fk (xk + h) fk (xk )| 6 m h

(2)

for all h [0, 1/m]. Since {xk } [0, 1 1/m] we may assume that there
exists a subsequence, again denoted by {xk }, such that xk x [0, 11/m].
Hence, by the triangle inequality and by (2),
|f (x + h) f (x)| 6 |f (x + h) f (xk + h)| + |f (xk + h) fk (xk + h)|

+ |fk (xk + h) fk (xk )| + |fk (xk ) fk (x)| + |fk (x) f (x)|

6 |f (x + h) f (xk + h)| + d(fk , f ) + m h


+ |fk (xk ) fk (x)| + d(fk , f )

for all 0 6 h 6 1/m. Since d(fk , f ) 0, |f (x + h) f (xk + h)| 0, and


|f (x) f (xk )| 0, as k , we conclude that
|f (x + h) f (x)| 6 m h
for all 0 6 h 6 1/m. Consequently, f Mm and Mm is closed.
= . Let f M , and let > 0. Then there exists a pieceClaim 3: Mm
m
wise linear function g : [0, 1] R such that d(f, g) = sup{|f (x) g(x)| |
(x)| > m for all x [0, 1]. (See Figure 2.) That is,
0 6 x 6 1} < and |g+
g B(f, ) and g 6 Mm . (Here B(f, ) is a ball in C([0, 1], R) with centre
29

g
f

Figure 2: The black curve is the graph of f and the grey curve is the graph
of g.

= .
at f and radius ). So Mm

S
In
view
of
the
Baires
theorem,
C([0,
1],
R)
=
6
m2 Mm since otherwise
S
M
has
non-empty
interior.
Hence
there
exists
f C([0, 1], R) so
m
m2
S
S
that f 6 m2 Mm . Since M m2 Mm , f 6 M . Since M contains
all functions which are differentiable at least at one point in [0, 1), f is not
differentiable at any x [0, 1).


Contraction mapping principle: Banach fixed point theorem


Let (X, d) be a metric space and let f : X X. A point x X is a fixed
point of f if f (x) = x. The solution of many classes of equations can be
regarded as fixed points of appropriate functions. In this section we give
conditions that guarantee the existence of fixed points of certain functions.
A function f : X X is called a contraction if there exists (0, 1) such
that
d(f (x), f (y)) 6 d(x, y)
(8)
for all x, y X. Note that a contraction is uniformly continuous.
Theorem 4.17 (Banach Fixed Point Theorem). Let f : X X be a
contraction of a complete metric space. Then f has a unique fixed point p.
For any x X, define x0 = x and xn+1 = f (xn ) for n 0. Then xn p,
and
d(x, f (x))
.
(9)
d(x, p) 6
1
30

Proof. We start with the uniqueness of the fixed point of f . Assume that
p 6= q and that f (p) = p and f (q) = q. Then
d(p, q) = d(f (p), f (q)) 6 d(p, q)
so that d(p, q) = 0 since (0, 1). So p = q, contradicting our assumption.
Hence f has at most one fixed point. Fix any point x X, and let x0 = x
and xn+1 = f (xn ) for n 0. Then for any n,
d(xn+1 , xn ) = d(f (xn ), f (xn1 )) 6 d(xn , xn1 )
and,
d(xn+1 , xn ) 6 d(xn , xn1 ) 6 2 d(xn1 , xn2 ) 6 6 n d(x1 , x0 ).
For m > n,
d(xm , xn ) 6 d(xn , xn+1 ) + d(xn+1 , xn+2 ) + + d(xm1 , xm )

X


i d(x1 , x0 )
6 n + n+1 + + m1 d(x1 , x0 ) 6
i=n

= n

X
i=0


n d(x1 , x0 )
i d(x1 , x0 ) =
.
1

Since n 0 as n (recall (0, 1)), the sequence {xn } is Cauchy in


X. Since (X, d) is complete, there exists p X such that xn p. Taking
a limit m in the last inequality we find that
d(p, xn ) 6

n d(x1 , x0 )
.
1

(10)

Thus,
d(f (p), p) 6 d(f (p), xn+1 ) + d(xn+1 , p) = d(f (p), f (xn )) + d(xn+1 , p)
6 d(p, xn ) + d(xn+1 , p) 6
= n

n d(x1 , x0 ) n+1 d(x1 , x0 )


+
1
1

(1 + )d(x1 , x0 )
0 as n ,
1

and therefore p = f (p). The inequality (9) follows from (10) by taking
n = 0.

Here is an application of the Banach fixed point theorem to the local existence of solutions of ordinary differential equations.
31

Theorem 4.18 (Picards Theorem). Let U be an open subset of R2 and


let f : U R be a continuous function which satisfies the Lipschitz condition
with respect to the second variable, that is,
|f (x, y1 ) f (x, y2 )| 6 |y1 y2 |
for all (x, y1 ), (x, y2 ) U , and some > 0. Then for a given (x0 , y0 ) U
there is > 0 so that the differential equation
y (x) = f (x, y(x))
has a unique solution y : [x0 , x0 + ] R such that y(x0 ) = y0 .
Proof. Note that it is enough to show that there are > 0 and a unique
function y : [x0 , x0 + ] R such that
Z x
y(x) = y0 +
f (t, y(t))dt.
x0

Fix (x0 , y0 ) U . Then we find > 0 and b > 0 such that if I = [x0 , x0 +]
and J = [y0 b, y0 + b], then I J U . Since f is continuous and I J is
closed and bounded, f is bounded on I J. That is, |f (x, y)| 6 M for some
M and all (x, y) I J. Replacing by a smaller number we may assume
that < 1 and M < b. Denote by X the set of all continuous functions
g : I J. The set X with the metric d(g, h) = sup{|g(x) h(x)|, x I} is
a complete metric space. For g X, let
Z x
(T g)(x) = y0 +
f (t, g(t))dt.
x0

Then T g : I R is continuous since if x1 , x2 I and x2 > x1 , then


Z x2
Z x2


|(T g)(x2 ) (T g)(x1 )| =
f (t, g(t))dt 6
|f (t, g(t))|dt 6 M |x2 x1 |.
x1

x1

For x0 6 x 6 x0 + ,
Z x
Z


|(T g)(x) y0 | =
f (t, g(t))dt 6
x0

x0

|f (t, g(t))|dt 6 M |x x0 | M < b

The same inequality holds for x0 6 x 6 x0 , and so T g X for any


g X. Since f is Lipschitz with respect to the second variable, we obtain

32

for g, h X and x [x0 , x0 + ],

Z x




|(T g)(x) (T h)(x)| =
[f (t, g(t)) f (t, h(t))] dt
Z xx0
6
|f (t, g(t)) f (t, h(t))|dt
x0

6 |x x0 |d(g, h) < d(g, h).

Similarly, |(T g)(x) (T h)(x)| 6 |x x0 |d(g, h) < d(g, h) for x [x0


, x0 ]. Since < 1, T is a contraction and in view of Banachs fixed point
theorem there exists a unique continuous function y : I J such that
Z x
y(x) = (T y)(x) = y0 +
f (t, y(t))dt.
x0

Completions
The space (0, 1) with the usual metric is not complete but is a subspace
of the complete metric space [0, 1] with the usual metric. This example
illustrates the general situation: every metric space X may be regarded as
e
e in such a way that X = X.
a subspace of a complete metric space X
We will need the following concept.
Definition 4.19. A map f from (X, d) to (Y, ) is called an isometry if
(f (x), f (y)) = d(x, y)

for all x, y X.

Note that an isometry is always injective. An isometry is distance preserving.


If f : X Y is a surjective isometry, then the inverse f 1 : Y X is
also an isometry, and the spaces (X, d) and (Y, ) are called isometric.
Two isometric spaces can be regarded as indistinguishable for all practical
purposes that involve only distance.
Definition 4.20. A completion of a metric space (X, d) is a pair consiste and an isometry : X X
e d)
e such that
ing of a complete metric space (X,
e
(X) is dense in X.

Theorem 4.21. Let (X, d) be a metric space. Then (X, d) has a completion. The completion is unique in the following sense: If ((X1 , d1 ), 1 ) and
((X2 , d2 ), 2 ) are completions of (X, d), then (X1 , d1 ) and (X2 , d2 ) are isometric. That is, there exists a surjective isometry f : X1 X2 such that
f 1 = 2 .
33

Proof.
Existence: Let B(X) be the space of bounded real valued functions defined
on X equipped with the uniform norm (f, g) = supyX |f (y) g(y)|. Fix a
point a X. With every x X we associate a function fx : X R defined
by
fx (y) = d(y, x) d(y, a),
y X.
We have
|fx (y)| = |d(y, x) d(y, a)| 6 d(x, a)
so that fx is bounded. Since
|fx1 (y) fx2 (y)| 6 d(x1 , x2 )

for all y X,

(fx1 , fx2 ) = supyX {|fx1 (y) fx2 (y)|} 6 d(x1 , x2 ). On the other hand,
(fx1 , fx2 ) |fx1 (x2 ) fx2 (x2 )| = d(x1 , x2 ).
Hence
(fx1 , fx2 ) = d(x1 , x2 ),
and the map f : X B(X) defined by f (x) = fx is an isometry onto f (X),
(f (x1 ), f (x2 )) = d(x1 , x2 ).
Denote by X the closure of f (X) in B(X) and let d be the metric on X
induced by . Since (B(X), ) is complete and X is closed in B(X), the
space (X , d ) is complete.
Uniqueness:
The isometry 1 : X 1 (X) has an inverse 1
1 : 1 (X) X. Then
is
an
isometry
from

(X)
onto

(X
).
Since 1 (X) is dense in
2 1
1
2
2
1
1
(X1 , d1 ), 2 1 extends to a map : X1 X2 satisfying
d2 ((x), (y)) = d1 (x, y),

for all

x, y X1 .

Since X1 is complete, in view of the above equation, (X1 ) is closed in


X2 . Since 1 = 2 , 2 (X) (X1 ). This implies that X2 = 2 (X)
(X1 ) = (X1 ) since (X1 ) is closed in X2 . Consequently, (X1 ) = X2 ,
i.e., is surjective and the proof is completed.


34

Compact Metric Spaces

We start with the classical theorem of Bolzano-Weierstrass.


Theorem 5.1 (Bolzano-Weierstrass). Let I be a closed and bounded interval in R, and let {xn } be a sequence in I. Then there exists a subsequence
{xnk } which converges to a point in I.
Proof. Without loss of generality we may assume that I = [0, 1]. Bisect the
interval [0, 1] and consider the two intervals [0, 1/2] and [1/2, 0]. One of these
subintervals must contain xn for infinitely many n. Call this subinterval I1 .
Now bisect I1 . Again, one of the two subintervals contains xn for infinitely
many n. Denote this subinterval by I2 . Proceeding in this way we find a
sequence of closed intervals In , each one contained in the preceding one,
each one half of the length of the preceding one, and each containing xn
for infinitely many n. Choose an integer n1 so that xn1 I1 . Then choose
n2 > n1 such that xn2 I2 . Then choose n3 > n2 such that xn3 I3 , and
so on. Continuing this way we choose we find a sequence {xnk } such that
xnk Ik . If i, j k, then xni , xnj Ik and so
|xni xnj | 6 1/2k .
Hence {xnk } is Cauchy and since [0, 1] is complete, {xnk } converges to a
point in [0, 1].

Definition 5.2. A metric space (X, d) is called compact if every sequence
in X has a convergent subsequence. A subspace Y of X is compact if every
sequence in Y has a subsequence converging to a point in Y .
Proposition 5.3. Let (X, d) be compact and Y a closed subset of X. Then
Y is compact.
Proof. Let {xn } be a sequence in Y . Since X is compact, the sequence {xn }
has a converging subsequence, say xnk x. Since Y is closed, x Y .

Proposition 5.4. Let X be a metric space and Y a compact subset of X.
Then Y is closed and bounded.
Proof. Take any x Y . There exists a sequence {xn } in Y converging to
x. Since Y is compact, the sequence {xn } has a converging subsequence,
say xnk y with y Y . In view of the uniqueness of the limit, y = x.
Hence Y is closed. To see that Y is bounded, we argue by contradiction and
construct a sequence {xn } which does not have a converging subsequence.
35

Fix any point y X. For every n N, there exists a point xn Y so that


d(xn , y) n since otherwise Y B(y, n) for some n. The sequence {xn }
contains a converging subsequence since Y is compact. Say xnk x Y .
Let = d(x, y). Then d(xnk , x) 6 1 for all k N . Hence by the triangle
inequality,
d(x, y) d(y, xnk ) d(x, xnk ) nk 1 k 1
for all k N ; contradiction. Consequently, Y is bounded.

Combining Proposition 5.4 with Theorem 5.1 we get


Theorem 5.5. A subset Y of R is compact if and only if Y is bounded and
closed.
The result is also valid in Rn with the standard metric: A subset of Rn is
compact if and only if it is bounded and closed. This follows from the fact
that if Ai is a compact subset of (Xi , di ) for 1 6 i 6 n, then A1 A2 An
is compact in the product space X1 X2 Xn . In particular, using
Theorem 5.1, [a, a]n is compact in Rn . So if A is bounded and closed in
Rn , then A is a subset of a compact set [a, a]n , and then Proposition 5.3
implies that A is compact.
Theorem 5.5 does not hold true for general metric spaces.
Example 5.6. Consider the metric space (C([0, 1], R), d) consisting of all
continuous real valued functions on the interval [0, 1] with the supremum
metric d(f, g) = sup{|f (x) g(x)| | x [0, 1]}. Let A = {f | d(f, 0) 1}
be the closed unit ball in C([0, 1], R). Then A is closed since the distance
function is continuous, and bounded since A B(0, 2). Let fi (x) = xi for
x [0, 1]. Then the sequence {f1 , f2 , f3 , } lies in A but has no convergent
subsequence. To see this, note that any subsequence converges pointwise to
(
0
if 0 x < 1,
f (x) =
1
if x = 1,
so this is the only possible limit. But convergence in the supremum metric
is the same as uniform convergence, and uniform limits of continuous functions are continuous (Theorem 3.10). So no subsequence has a limit.
Theorem 5.7. Let (X, d) and (Y, d ) be metric spaces and let f : X Y be
continuous. If a subset K X is compact, then f (K) is compact in (Y, d ).
In particular, if (X, d) is compact, then f (X) is compact in Y .
36

Proof. Let {yn } be any sequence in f (K), and let {xn } be a sequence in K
of points such that f (xn ) = yn . Since K is compact, {xn } has a converging
subsequence to a point in K; say xnk x with x K. Since f is continuous,
f (xnk ) f (x). That is, ynk f (x) and since f (x) f (K), f (K) is
compact.

As a corollary we get
Corollary 5.8. Let f : X R be a continuous function on a compact
metric space. Then f attains a maximum and a minimum value, that is,
there exist a and b X such that f (a) = inf{f (x) | x X} and f (b) =
sup{f (x) | x X}.
Proof. By Theorem 5.7, f (X) is compact, so it is bounded and sup{f (x) |
x X} is finite. Set C = sup{f (x) | x X}. By definition of supremum,
for every n N, there exists xn such that C 1/n 6 f (xn ) 6 C. The
sequence {xn } has a converging subsequence, xnk b because X is compact.
In view of the continuity of f , f (xnk ) f (b), and since C1/n 6 f (xn ) 6 C
for all n, f (b) = C. Similarly, there exists a X such that f (a) = inf{f (x) |
x X}.

Theorem 5.9. Suppose f : (X, d) (Y, d ) is a continuous mapping defined
on a compact metric space X. Then f is uniformly continuous.
Proof. Suppose not. Then there is some > 0 such that for all > 0 there
exist points x, y with d(x, y) < but d (f (x), f (y)) > 0. Take = 1/n
and let xn , yn be points such that d(xn , yn ) < 1/n but d (f (xn ), f (yn )) .
Compactness of X implies that there is a subsequence {xnk } converging to
some point x X. Since d(xnk , ynk ) < 1/nk 0 as k , the sequence
{ynk } converges to the same point x. Continuity of f implies that the
sequences {f (xnk )}, {f (ynk )} converge to f (x). Then d (f (xnk ), f (x)) < /2
and d (f (ynk ), f (x)) < /2 for k large, and so,
d (f (xnk , f (ynk )) 6 d (f (xnk ), f (x)) + d (f (x), f (ynk )) <
for k large, a contradiction to the fact that d (f (xn ), f (yn )) for all n. 

Characterization of Compactness for Metric Spaces


Definition 5.10. Let (X, d) be a metric S
space and let A X. If {Ui }iI
is a family of subsets of X such that A iI Ui , then it is called a cover
of A, and A is said to be covered by the Ui s. If
S each Ui is open, then
{Ui }iI is an open cover. If J I and still A iJ Ui , then {Ui }iJ is
a subcover.
37

Definition 5.11. Let (X, d) be a metric space and let A X. Then A has
the Heine-Borel property if S
for every open cover {Ui }iI of A, there is a
finite set F I such that A iS Ui .
Example 5.12. Consider a set X with a discrete metric. Then every onepoint set is open and the collection of all one-point sets is an open cover of
X. Clearly, this cover does not have any proper subcover. Hence, a discrete
metric space X has the Heine-Borel property if and only if X consists of a
finite number of points.

Definition 5.13. Let (X, d) be a metric space


S and A X. Let > 0. A
subset S is called an -net for A if A xS B(x, ). A set A is called
totally bounded if, for every > 0, there is a finiteS-net for A. That is,
for every > 0, there is a finite set S such that A xS B(x, ).
S
Every totally bounded set is bounded, for if x, y ni=1 B(xi , ), say x
B(x1 , ), y B(x2 , ), then
d(x, y) 6 d(x, x1 ) + d(x1 , x2 ) + d(x2 , y) 6 2 + max{d(xi , xj )| 1 6 i, j 6 n}.
The converse is in general false.
Example 5.14. Consider (R, d) with d(x, y) = min{|x y|, 1}. Then (R, d)
is bounded since d(x, y) 6 1 for all x, y R. But (R, d) is not totally
bounded since it cannot be covered by a finite number of balls of radius 1/2.
Indeed, let S be any finite subset of R, and let x be the largest number in
S. If y S, then d(x + 1, y) = min{|x + 1 y|, 1} = 1 and so there is no
1/2-net for R.

Theorem 5.15. Let A be a subset of a metric space (X, d). Then the
following conditions are equivalent:
(a) A is compact.
(b) A is complete and totally bounded.
(c) A has the Heine-Borel property.
Proof. We will show that (a) implies (b), (b) implies (c), (c) implies (a).
(a) implies (b). Let {xn } be a Cauchy sequence in A. We have to show
that it converges to a point in A. By compactness of A, some subsequence,
38

{xnk }, converges to x A. Then xn x by Proposition 4.4. Hence we


have proved that A is complete.
Next assume that A is not totally bounded. Then there exists r > 0 so
that A cannot be covered by finitely many balls of radius r. We construct
a sequence {xn } in A which does not have a converging subsequence. Take
any x1 A. Since B(x1 , r) does not cover A, there is at least one point in
A \ B(x1 , r). Choose one such point and call it x2 . S
Having chosen points
x1 , . . . ,xn , we choose xn+1 so that it belongs to X \ ni=1 B(xi , r). This is
possible since A is not covered by B(x1 , r), . . . , B(xn , r). Continuing in this
way we get a sequence {xn } such that d(xn , xm ) r for all n and m. Such
a sequence cannot have a convergent subsequence since if {xnk } converges,
then it is Cauchy and d(xnk , xnm ) < r for large k and m. Hence A is not
compact; contradiction.
(b) implies (c). Let U = {Ui }iI be a collection of open sets covering
A. Arguing by contradiction we assume that U does not contain a finite
subcover. Total boundedness of A implies that there is a finite set of closed
balls B1 , . . . ,Bn of radius 1 which cover A. If each of the sets A Bi can be
covered by a finite number of sets from U, then A can also be covered by a
finite subcollection of sets from U. Therefore some A Bi , , denoted by B 1 ,
cannot be covered by a finite number of sets from U. Since B 1 is a subset
1
of A and A is totally bounded, B 1 is totally bounded. So let B11 , . . . , Bm
1
i
be a finite set of closed balls of radius 1/2 which cover B . If each Bi B 1
can be finitely covered by sets from U, the same is true for B 1 . Therefore,
some Bj1 B 1 , denoted by B 2 , cannot be covered by a finite number of sets
from U. Continuing in this way we obtain a sequence of closed sets B n such
that B n B n1 B 1 , none of which can be finitely covered
and diam B n 6 1/n. From each B n choose a point xn . The sequence {xn }
is Cauchy since for n, m k, xn , xn Bk and
d(xn , xm ) 6 diam B k 6 1/k.
By completness of A, the sequence {xn } converges, say xn x. In fact,
x B k for all k since xn B k for all n k and since B k is closed. In
particular, x A . Since U covers A, the point x belongs to some Ui , and
therefore, B(x, ) Ui for some . If y B n , then
d(x, y) 6 d(x, xn ) + d(xn , y) 6 d(x, xn ) + diam B n 6 d(x, xn ) + 1/n.
For large n, the right side is less than . So for large n, B n B(x, ). Hence
B n Ui which shows that B n can be finitely covered by sets from U. This
contradiction shows that A has the Heine-Borel property.
39

(c) implies (a). Suppose that A is not compact. Then there exists a
sequence {xn } in A with no convergent subsequence in A. Then for every
x A, there exists a ball B(x, x ) which contains xn for at most finitely many
n. Otherwise, there exists x such that for every r > 0, B(x, r) contains xn
for infinitely many n. Then, in particular, for every k, B(x, 1/k) contains
xn for infinitely many n. Choose n1 so that xn1 B(x, 1). Since B(x, 1/2)
contains xn for infinitely many n, there is n2 > n1 such that xn2 B(x, 1/2).
In this way we construct a subsequence {xnk } such that xnk B(x, 1/k).
This implies xnk x contradicting our assumption on {xn }. Now the family
{B(x, x )}xA is an open cover of A from which it is impossible to choose
a finite number of balls which will cover A since any finite cover by these
balls contains xn for finitely many n and since A contains xn for all positive
integers. Consequently, A is compact.


Topological Spaces

Our next aim is to push the process of abstraction a little further and define
spaces without distances in which continuous functions still make sense.
The motivation behind the definition is the criterion of continuity in terms
of open sets. This criterion tells us that a function between metric spaces
is continuous provided that the preimage of an open set is open. We make
the following definition.
Definition 6.1. Let X be a set. A topology on X is a collection T of
subsets of X satisfying the following properties:
O1 and X T .

Ui T .
T
O3 If U1 , U2 , . . . , Un T , then ni=1 T .

O2 If {Ui }iI T , then

iI

The pair (X, T ) is called a topological space. If X is a topological space


with topology T , we say that a subset U of X is an open set in X if U T .
Here are some examples of topological spaces.
Example 6.2. Let (X, d) be a metric space. Then the family of open subsets of X with respect to the metric d is a topology on X.

40

Example 6.3. Let X be any set. The collection of all subsets of X, P(X),
is a topology on X. This topology is called the discrete topology. Every
subset U of X is an open set. On the other extreme, consider X and the
collection {, X}. It is also a topology on X, and is called the indiscrete
topology or the trivial topology.

Example 6.4. Let X = R and let Tu be the collection of subsets of X


consisting of , R, and the unbounded open intervals (, a) for all a R.
Then Tu is a topology on R. Similarly, we can define a topology Tl consisting
of , R and all unbounded intervals (a, ), a R.
Example 6.5. Let (X, T ) be a topological space and Y X. Then
TY = {U Y | U T } is a topology on Y . It is called the subspace
topology or relative topology induced by T .
Definition 6.6. Suppose that T and T are two topologies on X. If T T
we say that T is finer or larger than T . In this case we also say T is
coarser or smaller than T . Topologies T and T are comparable if
T T or T T .
Along with a concept of open sets there is the companion concept of closed
set. If X is a topological space, then a set F X is closed if F c = X \ F
is open. By de Morgans laws, the family of closed sets is closed under
arbitrary intersection of closed sets and finite unions. More precisely, the
class of closed sets has the following properties:
C1 X and are closed.

T
C2 If Fi is a closed set for every i I, then iI Fi is closed.
S
C3 If F1 , . . . Fn are closed, then ni=1 Fi is closed.

Given a subset A of a topological space X, its closure is the intersection


of all closed subsets of X containing A. The closure of A is denoted by A.
The interior of A, denoted by A , is the union of all open subsets of A.
If x X, then a set A X is called a neighbourhood of x if x A .

41

Basis
If X is a topological space with topology T , then a basis for T is a collection
B T such that every member of T , i.e., every open set, is a union of
elements of B. (We allow the empty union giving the empty set.)
Example 6.7. The collection of all open balls forms a basis for the topology
of any metric space.

Theorem 6.8. Let X be a set. Then a collection B of subsets of X is a


basis for a topology of X if and only if B has the following two properties:
(1) For every x X, there exists B B such that x B.
(2) If B1 , B2 B and x B1 B2 , then there exists B3 B such that
x B 3 B1 B2 .

B1

x
B3
B2

Proof. Any basis satisfies (1) since the whole space X is open, and (2) since
the intersection of two open sets B1 B2 is open. Conversely, assume that
B is a collection of subsets of X with properties (1) and (2). Define T to be
the collection of all subsets of X that are unions of sets in B. We shall show
that T is a topology. The condition (1) guarantees that X T . Clearly,
an arbitrary union of sets in T belongs to T in view of the definition of T .
Assume that U, V T . We have to show that U V is the union of sets
in B. Take any x U V . Since U and V are unions of sets in B, there
exist B1 , B2 B such that x B1 U and x B2 V . So x B1 B2 ,
42

and, in view of (2), there exists Bx B such that x Bx B1 B2 . Hence


Bx U V , and consequently,
[
U V =
Bx .
xU V

This shows that U V T .

Example 6.9. Given two sets X, Y with topologies S, T respectively, the


product topology is defined on the Cartesian product set X Y by taking as
a basis B = {U V : U T , V S}.

Hausdorff and normal spaces


Definition 6.10. A topological space X is called a Hausdorff space if for
every two points x, y X such that x 6= y, there exist disjoint open sets U
and V satisfying x U and y V . A space X is normal if for each pair
A, B of disjoint closed subsets of X, there exist disjoint open sets U and V
such that A U and V V .
U
x

V
y

Continuity
Continuous functions in metric spaces were characterized in terms of open
and closed sets. This suggests the definition of continuity in topological
spaces.
Definition 6.11. Let X and Y be topological spaces and let f : X Y .
The map f is continuous at a point x0 if for every neighbourhood U of
f (x0 ) in Y there exists a neighbourhood V of x0 in X such that f (V ) U .
Global continuity of f is defined in terms of open sets: f is continuous if
f 1 (U ) is open in X for every open set U in Y .
43

Equivalently, f is continuous if f 1 (C) is closed in X for every closed set


C in Y . If f : X Y is bijective and f and f 1 are both continuous, f is
called a homeomorphism and X and Y are said to be homeomorphic.
We call a property topological if it is invariant under homeomorphism.

Elementary properties of continuous functions


(1) If f : X Y and g : Y Z are continuous maps between topological
spaces, then the composition g f : X Z is continuous.
(2) If f : X R and g : X R are continuous, then h : X R2 given
by h(x) = (f (x), g(x)) is continuous.
(3) If A is a subspace of X, then the inclusion map i : A X is continuous. This follows from the definition of the topology on the subspace
A. If f : X Y is continuous, where Y is another topological space,
then the restriction map h = f |A : A Y defined by h(x) = f (x)
for x A, is continuous. This follows from (1) using the fact that
h = f i.

Compact Topological Spaces

Theorem 5.15 gives three equivalent characterizations of compactness for


metric spaces: the Bolzano-Weierstrass property (every sequence has a convergent subsequence with limit in the space - often called sequential; compactness), completeness together with total boundedness, and the HeineBorel property. In the case of general topological spaces the most useful is
the Heine-Borel property. A subset Y of a topological space (X, T ) is called
compact
S if for every collection U = {Ui }iI of openS sets of X such that
Y iI Ui , there is a finite J I for which Y iJ Ui . De Morgans
laws lead to the following characterization of compactness in terms of closed
sets.
Definition 7.1. A family {Fi }iI T
of closed subsets of X is said to have the
finite intersection property if iJ Fi 6= for all finite J I.

Theorem 7.2. A topological space X has is compact if and only if for every
family
{Fi }iI of closed subsets of X having the finite intersection property,
T
F
6= .
i
iI
Proof. Assume that X is compact. Let {Fi }iI be a collection of closed sets
having the finite intersection property. Arguing by contradiction assume
44

T
S
S
that T iFi = . Writing Ui = X \ Fi we have iI Ui = iI [X \ Fi ] =
X \ iI Fi = X. So {Ui }iI is an open cover of X. Hence there are
Ui1 , . . . , Uik such that X = Ui1 Uik . But then = X \ X = X \
Sk
Tn
l=1 Uil =
l=1 Fil , contradicting the assumption that {Fi } has the finite
intersection property. Conversely, suppose that T
for every collection {Fi }iI
having the finite intersection property we have iI Fi 6= . Take any open
cover {Ui }T
iI of X, and define
T
SFi = X \ Ui . Then the Fi s are closed and
iI Fi =
iI [X \ Ui ] = X \ iI
T Ui = . So {Fi } does not have the finite
intersection
property
(otherwise
iI F
T
Si 6= ). So thereSis a finite set J I
such that iJ Fi = . But then X = iJ [X \ Fi ] = iJ Ui showing that
X is compact.

Theorem 7.3. A closed subspace of a compact topological space is compact.
Proof. Let K be a closed subset of a topological space X, and let {U }iJ be
an open cover of K. Then the collection {U }iJ {K c } is a family of open
subsets of X that covers X. Since X is compact, there is a finite subfamily
of this family that covers X. The corresponding subfamily of {U }iJ covers
K.

Theorem 7.4. If X is a Hausdorff space, then every compact subset of X
is closed.
Proof. Let K be a compact subset of X. Since X is Hausdorff, for every
x K c and every y K, there are disjoint open sets Uxy and Vxy such that
x Uxy and y Vxy . Then for every x K c , {Vxy }yK is anS
open cover of
n
K. Since
Tn K is compact, there exist y1 , . . . , yn K such K i=1 Vxyi . Setc
U = i=1 Uxyi . Then U is open, U K = , and x U . Thus x U K
showing that K c is open, and consequently, that K is closed.

Theorem 7.5. A compact Hausdorff space is normal.
Proof. Let A and B be disjoint closed subsets of a compact Hausdorff space.
In view of Theorem 7.3, the sets A and B are compact. Proceeding like we
did in the proof of the previous theorem, we find for every x B disjoint
open sets Vx and Ux such that x Vx and A Ux . Then the open sets
{Vx }xB cover B. Consequently, there exist x1 , . . . , xn B such that B
Vx1 Vxn := V . Then U := Ux1 Uxn is open, U V = , and
A U, B V .


45

Theorem 7.6. Suppose that f : X Y is a continuous map between


topological spaces X and Y . If K X is a compact set, then f (K) is a
compact subset of Y . In particular, if X is compact, then f (X) is compact.
Proof. Let U be an open cover of f (K). That is, U consists of open subsets
of Y such that their union contains f (K). The continuity of f implies that
for any set U U, f 1 (U ) is an open subset of X. Moreover, the family
{f 1 (U ) | U U } is an open cover of K. Indeed, if x K, then f (x)
f (K), and so f (x) SU for some U U. This implies that x f 1 (U ).
S Since
K is compact, K ni=1 f 1 (Ui ) for some n. It follows that f (K) ni=1 Ui
which proves that f (K) is a compact subset of Y . This completes the proof
of the theorem.

Theorem 7.7. Let f be a continuous bijective function from a compact
topological space X to a Hausdorff topological space Y . Then the inverse
function f 1 : Y X is continuous.
Proof. Denote the inverse function by g, i.e., g = f 1 : Y X. We
have to show that g1 (K) is closed in Y for any closed set K in X. Since
f is a bijection with inverse g, g1 (A) = f (A) for any subset of Y . So
g1 (K) = f (K). Since K is closed and X compact, K is also compact. By
the previous result, f (K) is compact in Y and since Y is Hausdorff, f (K)
is closed. So g1 (K) is closed in Y , as required.

Example 7.8. Let S 1 be the unit circle in R2 of radius 1 and centre (0, 0).
We consider S 1 as a subspace of R2 . Let f : [0, 2) S 1 be given by
f (x) = (cos x, sin x) for x [0, 2). Show that f is a continuous bijection
but the inverse map f 1 : S 1 [0, 2) is not continuous. Why doesnt this
contradict Theorem 7.7?

Connected Spaces

A pair of non-empty and open sets U , V of a topological space X is called


a separation of X if U V = and X = U V . A topological space X is
called disconnected if there is a separation of X, and otherwise is called
connected. A subset Y of X is said to be connected if it is connected as a
subspace of X, that is, Y is not the union of two non-empty sets U, V TY
such that U V = .

46

Example 8.1. The set X containing at least two points and considered
with the discrete topology is disconnected. However, X with the indiscrete
topology is connected.

Example 8.2. The subspace R \ {0} of R is disconnected since R \ {0} =


A B, where A = {r R | r < 0} and B = {r R | r > 0}. If X = Q is
considered as subspace of R, then X is disconnected since X = A B with
A = Q (, r) and B = Q (r, ), where r is irrational.
A 2-valued function is a function from X to {0, 1}, where {0, 1} is considered with discrete topology.
Theorem 8.3. A space X is connected if and only if every 2-valued continuous function on X is constant. Equivalently, X is disconnected if and only
if there exists a 2-valued continuous function from X onto {0, 1}
Proof. Suppose that X is connected and f : X {0, 1} is continuous. Let
A = f 1 ({0}) and B = f 1 ({1}). The sets A, B are open, disjoint and
X = A B. So one of A, B has to be empty. Conversely, assume that every
continuous 2-valued function is constant. Assume that X = A B, A and
B are open, and A B = . Define
(
0
if x A,
f (x) =
1
if x B.
Clearly, the function f is continuous. So f is constant, say f (x) = 0 for all
x X. But then A = X and B = . Hence X is connected as claimed. 
Theorem 8.4. Let f : X Y be a continuous function between spaces X
and Y . If X is connected, then the image f (X) is connected.
Proof. Let g : f (X) {0, 1} be continuous. Then the composition g f :
X {0, 1} is continuous, hence constant since X is connected. Hence g is
constant on f (X) and the result follows in view of Theorem 8.3.

Theorem 8.5. If A is a connected subset of a space X, then A is also
connected.
Proof. Let f : A {0, 1} be continuous. Then f|A is continuous, and so,
f is constant on A. Say f = 0 on A. We claim that f = 0 on A. Suppose
f (x) = 1 for some x A. The set {1} is open in {0, 1} and since f is
47

continuous f 1 ({1}) is an open subset of A. Thus say f 1 ({1}) = U A


for some open set U in X. This mean that f = 1 on U A. Since x A,
U A 6= , say y U A. Then f (y) = 1 since y U A U A, but
one the other hand f (y) = 0 since f = 0 on A. Therefore, A is connected
as claimed.

Example 8.6. The union of connected subspaces does not have to be connected. Consider R with the usual topology. Then the sets (, 0) and
(0, ) are connected subspaces of R, but the union (, 0)(0, ) = R\{0}
is disconnected.

Theorem
8.7. If {Ai }S
iI is a family of connected subsets of X such that
T
A
=
6
,
then
A
=
iI i
iI Ai is connected.

Proof. Let f : A {0, 1} T


be continuous. Then f|Ai is continuous for every
i, so it is constant. Since iI Ai 6= , we must have the same constant on
every Ai . Hence f is constant and A is connected.

As an application of this theorem we have the following
Theorem 8.8. Suppose that for any two points in a space X there exists a
connected subspace of X containing these two points. Then X is connected.
Proof. Fix a point a X. For b X, S
denote by C(b) a connected
subspace
T
of X containing a and b. Then X = bX C(b). Since a bX C(b), the
result follows from the previous theorem.

Let x X and let Cx be the union of all the connected subsets of X
containing x. Each Cx is called a component (or connected component)
of X.
Proposition 8.9. Let Cx be the connected component of X containing x.
Then
(a) for each x X, Cx is connected and closed; and
(b) for any two x, y X, either Cx = Cy or Cx Cy = .

Proof. The set Cx is connected in view of Theorem 8.7, and by Theorem


8.5, Cx is connected. Hence by the definition of Cx , Cx Cx , so Cx = Cx
and Cx is closed. If Cx Cy 6= , then Cx Cy is connected by Theorem 8.7.
So again by the definition of Cx , Cx Cy Cx . Hence Cy Cx . Similarly,
Cx Cy , so Cx = Cy as required.

48

Example 8.10. If X is equipped with the discrete topology, then every


subset of X is open and closed. Hence the connected components of X are
sets consisting of one point.

Example 8.11. X, Y are connected spaces if and only if X Y , with the


product topology, is connected. In fact, if X is disconnected by disjoint open
sets U, V , then X Y is disconnected by U Y.V Y . Conversely, if X Y
is disconnected by disjoint open sets W, Z, then X (or Y ) is disconnected,
by considering X {y} intersecting W, Z. For more details, see Theorem
9.6.
Next we shall determine the connected subsets of R. By an interval I R
we mean a subset of R having the following property: if x, y I and x 6
z 6 y, then z I.
Theorem 8.12. A subset of R is connected if and only if it is an interval.
Proof. Suppose that J R is not an interval. Then there are x, y J and
z 6 J with x < z < y. Then define A = (, z) J and B = (z, ) J.
Clearly, A, B are disjoint, non-empty, relatively open, and A B = J. So
J is not connected. Conversely, suppose that J is an interval. We will show
that J is connected. Let f : J {0, 1} be continuous, and suppose that
f is not constant. Then there are x1 and y1 J such that f (x1 ) = 0 and
f (y1 ) = 1. For simplicity assume that x1 < y1 . Let a be the midpoint
of [x1 , y1 ]. If f (a) = 0, then set x2 = 0 and y2 = y1 , and otherwise,
x2 = x1 and y2 = a. So x1 6 x2 6 y2 < y1 , |x2 y2 | 6 21 |x1 y1 |,
and f (xi ) 6= f (yi ). Iterating this procedure we find sequences {xn } and
{yn } with the following properties: x1 6 x2 6 6 xn < yn 6 6 y1 ,
|xn yn | 6 21 |xn1 yn1 | 6 2n1 |x1 y1 |, and f (xn ) = 0, f (yn ) = 1.
Since R is complete, {xn } converges to some z, and since |xn yn | 0,
yn z. Clearly, z J. Hence 0 = limn f (xn ) = f (z) = limn f (yn ) = 1, a
contradiction. So f is constant, and this implies that J is connected.

We can apply the last theorem to analyze the structure of open subsets of R.
We claim that any open set U R is a countable union of pairwise disjoint
open intervals. Indeed, let x U and let Ix be the connected component of
U containing x. Thus, Ix is an interval. If y Ix , then there is > 0 such
that (y , y + ) U since U is open. Hence Ix (y , y + ) is connected
and since Ix is a connected component, (y , y + ) Ix . So Ix is an open
interval, and U is a union of open intervals (its components). Since each
49

must contain a different rational number, U is at most a countable union of


disjoint open intervals.
Here is an important application of Theorem 8.12.
Theorem 8.13 (Intermediate Value Theorem). Let f : X R be a
continuous function defined on a connected space X. Then for any x, y X
and any r R such that f (x) 6 r 6 f (y) there exists c X such that
f (c) = r.
Proof. The set f (X) is a connected subset of R. Hence f (X) is an interval,
and since f (x), f (y) f (X), it has to contain r.

Definition 8.14. A space X is called path connected if for any two points
p and q X, there exists a continuous function f : [0, 1] X such that
f (0) = p and f (1) = q. The function f is called a path from f (0) to f (1).
If X is path connected, then X is connected but the converse is false in
general as the following example shows.
Example 8.15. Write X = {(t, sin(/t)) | t (0, 2]} R2 . Let : R2 R
be the projection onto the first coordinate, that is, (x, y) = x. Then
: X (0, 2] is a homeomorphism and since (0, 2] is connected so is X.
Therefore, X = ({0} [1, 1]) X = J X is connected, where we abbreviated J = {0} [1, 1]. We shall show that X is not path connected.
Arguing by contradiction assume that f : [0, 1] X is a continuous path in
X such that f (0) J and f (1) X. Consider f 1 (J). It is closed in [0, 1]
and contains 0. Let a = sup{t [0, 1], t f 1 (J)}. Since f (1) X, a < 1.
Since f is continuous, there exists > 0 such that f (a + ) X. Write
f (t) = (x(t), y(t)). Then x(a) = 0, x(t) > 0, and y(t) = sin(/x(t)) for
t (0, a + ]. For every large n we can find rn such that 0 < rn < x(a + 1/n)
and sin(/rn ) = (1)n . Since the function x is continuous by the Intermediate Value Theorem there is tn (a, a + ] such that x(tn ) = rn and
y(tn ) = (1)n . So tn a but y(tn ) does not converge contradicting the
fact that f is continuous. Hence X is not path connected.

Theorem 8.16. An open subset of a normed space is connected if and only


if it is path connected.
Proof. We give a sketch of this important result. As above, we know that
path connected spaces are always connected. So lets assume that a normed
space X has a connected open set U and show it is path connected. The
50

idea is that an open ball in a normed space is always path connected, by


just connecting each point back to the centre of the ball. But then we can
show that the largest open path connected subset of U is in fact all of U .
To do this, note that if two open path connected sets A, B have a non
empty intersection, then their union is path connected. Given a A, b B
construct a path from a to b by going through an intermediate point c
A B. We can apply this to any proper open path connected subset A of
U together with an open ball B inside U centred at a point of the closure
of V . We leave this as an exercise to check the details.


Product Spaces

We define a topology on a finite product of topological spaces. Consider a


finite collection X1 , . . . , Xn of topological spaces. The product topology
on the product X = X1 Xn is the topology for which a basis of open
sets is given by rectangles
{U1 Un | Uj is open in Xj for 1 6 j 6 n}.

(11)

Observe that the intersection of two such sets is again a set of this form.
Indeed,
(U1 Un ) (V1 Vn ) = (U1 V1 ) (Un Vn ).

(U1 V1 ) (U2 V2 )

X2
U2

V2
U1
V1
X1
Consequently, the family (11) forms a basis. Let j : X Xj be the
projection of X onto the jth factor, defined by
j (x1 , . . . , xn ) = xj ,
51

(x1 , . . . , xn ) X.

For an open set Uj Xj , we have


j1 (Uj ) = X1 Xj1 Uj Xj+1 Xn
which is a basic open set. Hence each projection j is continuous.
Theorem 9.1. Let X be the product of the topological spaces X1 , . . . , Xn ,
and let j be the projection of X onto Xj . The product topology for X is
the smallest topology for which each of the projections j is continuous.
Proof. Let T be another topology on X such that the projections j are
T -continuous. Take open sets Uj Xj , 1 6 j 6 n. Then each j1 (Uj )
belongs to T since j is T -continuous. Since
11 (U1 ) n1 (Un ) = U1 Un
the basic set U1 Un belongs to T and T includes the product topology.

Call a function f from one topological space to another open if it maps
open sets onto open sets.
Theorem 9.2. Let X be the product of the topological spaces X1 , . . . , Xn .
Then each projection j of X onto Xj is open.
Proof. Let U = U1 Un be a basic open set in X. Then j (U ) = Uj ,
and since the maps preserve unions, the image of any open set is open.

Theorem 9.3. Let Y be a topological space and let f be a continuous map
from Y to the product X = X1 Xn . Then f is continuous if and only
if j f is continuous for all 1 6 j 6 n.
Proof. If f is continuous, the j f is continuous as a composition of continuous maps. Conversely, suppose that j f is continuous for all 1 6 j 6 n.
Take a basic open set U = U1 Un in X. Then
f 1 (U ) = (1 f )1 (U1 ) (n f )1 (Un )
is a finite intersection of open sets and hence is open. Since the inverses of
functions preserve unions, the inverse image of any open set is open, and
consequently, f is continuous.

We next study which properties of topological spaces are valid for the product X = X1 Xm whenever they hold for X1 , . . . , Xm .
52

Theorem 9.4. Let X be the product of Hausdorff spaces X1 , . . . , Xn . Then


X is Hausdorff.
Proof. Take two different points x = (x1 , . . . , xn ), y = (y1 , . . . , yn ), and
choose an index i so that xi 6= yi . Since Xi is Hausdorff, there exist open
sets Ui and Vi in Xi such that Ui Vi = . Then i1 (Ui ) and i1 (Vi ) are
open and disjoint sets containing x and y, respectively. Consequently, X is
Hausdorff as required.

Theorem 9.5. Let X be the product of path-connected spaces X1 , . . . , Xn .
Then X is path-connected.
Proof. Take two points x = (x1 , . . . , xn ), y = (y1 , . . . , yn ) in X. Since each
Xj is path-connected, for each 1 6 j 6 n there exists a path j : [0, 1] Xj
from xj to yj . Define : [0, 1] X by setting
(t) = (i (t), . . . , n (t)),

t [0, 1].

Then is a path connecting x with y. So X is path-connected.

To study connectedness of the product of connected spaces we will need


the following fact. Fix points x2 X2 , . . . , xn Xn and define a map
h : X1 X by setting h(x1 ) = (x1 , . . . , xn ). Then h is a homeomorphsim of
X1 onto the slice X1 {x2 } {xn } of X. Indeed, if U = U1 Un
is a basic open set in X, then h1 (U ) = U1 is open so that h is continuous.
Since the inverse of h is equal to 1 |X1 {x2 }{xn } , h1 is continuous and
h is a homeomorphism. Similarly, for each fixed j and fixed points xi Xi ,
i 6= j, the map Xj {x1 } {xj1 } Xj {xj+1 } {xn } is a
homeomorphism.
Theorem 9.6. Let X be the product of connected spaces X1 , . . . , Xn . Then
X is connected.
Proof. We prove the theorem for the product of two connected spaces X1 and
X2 . We apply Theorem 8.8. Take any two points a = (a1 , a2 ), b = (b1 , b2 )
X and consider sets C1 = {(x, b2 ) X | x X1 } and C2 = {(a1 , y) X |
y X2 }. By the above remark, the sets C1 , C2 are connected. Then, in
view of Theorem 8.7, C = C1 C2 is connected since C1 C2 = {(a1 , b2 )}.
Applying Theorem 8.8, the space X is connected since a, b C.

To study compactness of the product of compact spaces we need the following lemma.
53

Lemma 9.7. Let Y be a topological space and let B be a basis for the topology
of Y . If every open cover of Y by sets in B has a finite subcover, then Y is
compact.
Proof. Let {Ui }iI be an open cover of Y . For each y Y , choose Vy B
and an index j so that y Vy Uj . The family {Vy }yY forms an open
cover of Y by sets belonging to B. In view of the assumption, there exists a
finite number of the Vy s that cover Y . Since each of these Vy s is contained
in at least one of the Uj s, we obtain a finite number of Uj s that cover Y .
Hence Y is compact.

Theorem 9.8 (Tychonoff s Theorem for the finite product). Let X
be the product of compact spaces X1 , . . . , Xn . Then X is compact.
Proof. We consider only the product of two compact spaces X1 and X2 . let
R be a cover of X1 X2 by basic open sets of the form U V , U open in X1
and V open in X2 . In view of Lemma 9.7, it is enough to show that R has a
finite subcover. Fix z X2 . The slice X1 {z} is compact. Hence there are
finitely many sets U1 V1 , . . . , Un Vn in R covering the slice X {z}. We
may assume that z Vj for all 1 6 j 6 n, by throwing out products where
the second factor does not contain z. The set V (z) = V1 Vn is an open
set containing z, and the set 21 (V (z)) is covered by sets Uj Vj , 1 6 j 6 n.
The collection {V (z)}zX2 is an open cover of X2 , and since X2 is compact,
X2 = V (z1 ) V (zl ) for some finite number of points zj X2 . Then
X = 21 (V (z1 )) 21 (V (zl )). Each 21 (V (zj )) is covered by finitely
many sets in R. Consequently, X can be covered by finitely many sets in
R, and, in view of Lemma 9.7, X is compact.


Compactness in function spaces: Ascoli-Arzela theorem


Next we study compact subsets of the space of continuous functions. Let
X be a compact topological space and (M, ) a complete metric space. By
C(X, M ) we denote the set of all continuous functions from X to M . We
consider C(X, M ) with the metric
d(f, g) = sup{(f (x), g(x)) | x X}

54

Definition 9.9. Let X be a topological space and (M, ) a metric space,


and let F be a family of functions from X to M . The family F is called
equicontinuous at x X if for every > 0 there exists a neighbourhood
U of x such that
(f (y), f (x)) < for all y U and all f F.
The family F is called equicontinuous if it is equicontinuous at each x
X.
Example 9.10. Consider two metric spaces (X, ) and (M, ). Given M >
0 let F be a set of all functions f : X Y such that
(f (x), f (y)) 6 M (x, y)
for all x, y X. Then F is an equicontinuous family of functions. Indeed,
take > 0 and let U = B(x, /M ). Then if y U and f F, we have
(f (x), f (y)) 6 M (x, y) < M /M = .

Theorem 9.11 (Ascoli-Arzela Theorem). Let X be a compact topological space and let (M, ) be a complete metric space. Let F C(X, M ).
Then the closure F is compact in C(X, M ) if and only if the two following
conditions hold:
(1) F is equicontinuous.
(2) For every x X, the set F(x) = {f (x) | f F} has a compact closure
in M .
Proof. Since C(X, M ) is a complete metric space, F is compact if and only
if F is totally bounded. Assume first that the conditions (1) and (2) are
satisfied. In view of the above remark we have to show that F is totally
bounded. Given > 0, for each x X there exists an open neighbourhood
V (x) such that if y V (x), then (f (x), f (y)) < for all f F. Since
{V (x)}xX is an open cover of X and X is compact by assumption, there
exist a finite number of points x1 , . . . , xn such that V (x1 ), . . . , V (xn ) cover
X. The sets F(xj ) are totally bounded in M , hence so is the union S =
F(x1 ) F(xn ). Let {a1 , . . . , am } be an -net for S. For every map
: {1, . . . , n} {1, . . . , m} denote by
B = {f F | (f (xj ), a(j) ) < for all j = 1, . . . , n}.
55

Observe that there is only a finite number of sets B and every f F


belongs to one of such sets. Moreover, if f, g F, then
(f (y), g(y)) 6 (f (y), f (xk )) + (f (xk ), a(k) )
+ (a(k) , g(xk )) + (g(xk ), g(y))
< + + + = 4
for all y V (xk ). So if f, g B , then d(f, g) < 4. Consequently, the
diameter of B is less than 4, and since there are finitely many such B
and they cover F, the set F is totally bounded.
Conversely, assume that F is totally bounded. Note that the mapping :
F M given by (f ) = f (x) is distance decreasing, i.e.,
((f ), (g)) = (f (x), g(x)) 6 d(f, g).
It follows that for every x X, the set F(x) M is totally bounded
and (2) holds. To see that (1) holds, let > 0 and let f1 , . . . , fn be an
-net of F. Given x X we find open neighbourhood V (x) of x such that
(fj (x), fj (y)) < for all y V (x) and all j = 1, . . . , n. Then if f F
choose an index j so that d(f, fk ) < . It follows that if y V (x), then
(f (x), f (y)) 6 (f (x), fj (x)) + (fj (x), fj (y)) + (fj (y), f (y))
< + + = 3.
Therefore, the family F is equicontinuous at x, and since x was an arbitrary
point of X, F is equicontinuous as required.

Corollary 9.12. Let X be a compact topological space and Y a compact
metric space. Let F C(X, Y ) be an equicontinuous family. Then every
sequence in F has a uniformly convergent subsequence.
Definition 9.13. A family F of maps f : X Y , where Y is a metric
space is called pointwise bounded if {f (x) | f F} is bounded in Y for
every x X.
Lemma 9.14. Assume that X is a compact metric space and let F be an
equicontinuous and pointwise bounded family in C(X). Then there is a
constant M such that f (X) [M, M ] for all f F.
Proof. For every x X, there exists Mx such that |f (x)| 6 Mx for all
f F. Since F is equicontinuous, for each x there is an open set Ux such
that |f (x) f (y)| 6 1 for all f F and y Ux . Then
|f (y)| 6 |f (y) f (x)| + |f (x)| 6 1 + Mx = Kx
56

for all y Ux . The sets Ux form an open covering of X and since X


is compact, there exists a finite subcovering Ux1 , . . . , Uxn . Set now M =
max{Kx1 , . . . , Kxn }. Then |f (x)| 6 M for all x M .

Corollary 9.15 (Ascoli-Arzela Theorem, classical version). Let X
be a compact topological space. Assume that F is a pointwise bounded and
equicontinuous subset of C(X). Then every sequence in F has a uniformly
convergent subsequence.
Proof. By Lemma 9.14, the set F is uniformly bounded, that is, |f (x)| 6 M
for all f F and x X. Set Y = [M, M ]. Then Y is compact in R, and
F is a subset of C(X, Y ). So the corollary follows from Corollary 9.12. 

10

Urysohns and Tietzes Theorems

We show the existence of continuous functions on normal topological spaces.


We start with the following characterisation of normal spaces.
Lemma 10.1. A topological space X is normal if and only if for every closed
subset A X and every open subset B X containing A , there exists an
open set U such that A U U B.
Proof. Assume first that X is normal and A and B are as above. Then the
sets A and X \ B are closed and disjoint. So, in view of the normality of X,
there exist open disjoint sets U and V such that A U and X \ B V .
Then U X \ V B, so that U has the required properties.
Conversely, let A and B be closed disjoint subsets of X. Then V = X \ B
is open and A V . By assumption there exists an open set U such that
A U U V . Then U and X \ U are disjoint open sets satisfying A U

and B X \ U . So X is normal and the proof is completed.
Theorem 10.2 (Urysohns Lemma). Let A and B be disjoint closed subspaces of a normal space X. Then we can find a continuous function
f : X [0, 1] such that f (a) = 0 for all a A and f (b) = 1 for all
b B.
Proof. For the proof recall that a dyadic rational number is a number which
m
can be written in the form p = n with n, m being integers. Set V = X \ B,
2
an open set which contains A. By Lemma 10.1, there exists an open set
U1/2 such that
A U1/2 U 1/2 V.
57

Applying Lemma 10.1 again to the open set U1/2 containing A and to the
open set V containing U 1/2 , we obtain open sets U1/4 and U3/4 such that
A U1/4 U 1/4 U1/2 U 1/2 U3/4 U 3/4 V.
Continuing in this way, we associate to every such dyadic rational number
p (0, 1) an open subset Up X having the following properties
Up Uq ,
A Up ,
Up V,

0 < p < q < 1,

(12)

0 < p < 1,

(13)

0 < p < 1.

(14)

Next we shall construct a function f which is continuous and such that the
sets Up are level sets of f on which f assumes the value p. Define f (x) = 0
if x Up for all p > 0 and f (x) = sup{p| x 6 Up } otherwise. Clearly,
0 6 f 6 1, f (x) = 0 for all x A and f (x) = 1 for all x B. It remains
to show that f is continuous. Take x X. We only consider the case
that 0 < f (x) < 1. (The remaining cases f (x) = 0 and f (x) = 1 are left
as an exercise.) Let > 0 and choose dyadic rationals p and q such that
0 < p, q < 1 and
f (x) < p < f (x) < q < f (x) + .
Then x 6 Ur for dyadic rationals r between p and f (x) so that, in view of
(12), x 6 U p . On the other hand, x Uq . So W = Uq \ U p is an open
neighbourhood of x. Then p 6 f (y) 6 q for any y W which shows that
|f (x) f (y)| < for all y W . Hence f is continuous and the proof is
completed.

Theorem 10.3 (Tietzes extension theorem). Let A be a closed subset of a
normal space X and let f be a bounded continuous real valued function on
A. Then there exists a bounded continuous function h : X R such that
f = h on A.
Proof. Set a0 = sup{|f (a)|| a A}. Since f is bounded, the number a0 is
finite. Define sets
B0 = {a A| f (a) 6 a0 /3}

C0 = {a A| f (a) a0 /3}.

Since f is continuous and A is closed, the sets B0 and C0 are closed and
disjoint subsets of X. Taking a linear combination of the function from
Urysohns lemma and a suitable constant function we find a continuous
58

function g0 : X R satisfying a0 /3 6 g0 6 a0 /3 on X, g0 = a0 /3 on B0
and g0 = a0 /3 on C0 . Thus,
|g0 | 6 a0 /3

on X

|f g0 | 6 2a0 /3

on A.

Iterating this process we construct the sequence of functions {gn } satisfying


|gn | 6 2n a0 /3n+1

on X

(15)

|fn | = |f g0 g1 gn | 6 2 a0 /3

on A.

(16)

Indeed, suppose that the functions g0 , . . . , gn1 have been constructed. To


construct gn , set
an1 = sup{|f (a) g0 (a) g1 (a) gn1 (a)|| a A},
and repeat the above argument with an1 replacing a0 and f g0 g1
gn1 replacing f . This gives the function gn such that
|gn | 6 an1 /3

|f g0 g1 gn | 6 2an1 /3

on A.

Since an1 6 2n a0 /3n , the function gn satisfies (15)-(16). Set


hn = g0 + + gn ,

n 1.

If n > m, then
 n 
 m+1
2
a0
2
+ +

|hn hm | = |gm+1 + + gn | 6
3
3
3
 m+1
2
a0 .
6
3
Consequently, {hn } is Cauchy in C(X, R). Hence there exists a continuous
function h : X R such that hn h. In addition,
 
n
X
a0 X 2 n
= a0 ,
|gk | 6
|h| = |lim hn | = lim|hn | 6 lim
3
3
k=0

k=1

so that h is bounded. Finally, in view of (16), |f h| = lim|f hn | 6


lim 2n a0 /3n+1 0 on A, so that f = h on A. The proof is completed.


59

11

Appendix

Sets
A set is considered to be a collection of objects. The objects of a set A are
called elements (or members) of A. If x is an element of a set A we write
x A, and if x is not an element of A we write x 6 A. Two sets A and B
are called equal, A = B, if A and B have the same elements. A set A is a
subset of a set B, written A B, if every element of A is also an element
of B. The empty set has no elements; it has the property that it is a
subset of any set, that is, A for any set A. Given two sets A and B we
define:
(a) the union A B of A and B as the set
A B = {x | x A or x B};
(b) the intersection A B of A and B as the set
A B = {x | x A and x B};
(c) the set difference A \ B (or A B) of A and B as the set
A \ B = {x | x A and x 6 B}.
Sets A and B are called disjoint if A B = . The concept of union
and intersection of two sets extends to unions and intersections of arbitrary
families of sets. By a family of sets we mean a nonempty set F whose
elements are sets themselves. If F is a family of sets, then
[
A = {x | x A for some A F}
AF

AF

A = {x | x A for all A F }.

If F = {Ai | i I} is a family of sets Ai indexed by elements of a set I,


then we also write
[
Ai = {x | x Ai for some i I}
iI

iI

Ai = {x | x Ai for all i I}.


60

When it is understood that all sets under consideration are subsets of a


fixed set X, then the complement Ac of a set A X is defined by
Ac = X \ A = {x X | x 6 A}.
In this situation we have de Morgans laws:
!c
!c
[
\
\
[
c
Ai
Ai =
=
Ai ,
Aci .
iI

iI

iI

iI

The set of all subsets of a given set X is called the power set and is denoted
by P(X).
If X and Y are sets, their cartesian product X Y is the set consisting
of all ordered pairs (x, y) with x X and y YQ. Similarly, given n sets
X1 , . . . , Xn we can define their cartesian product ni=1 Xi = X1 . . . Xn .
Given two sets X and Y , a relation from X to Y is a subset R of X Y . We
say that R is a relation on X if R is a subset of X X, that is, R X X.
Quite often we write xRy instead of (x, y) R.
The most important example of a relation is a function. A relation f from
X to Y is called a function if for each x X there exists exactly one y Y
such that xf y. If xf y, we write y = f (x); y is called the value of f at x.
We also will write f : X Y to mean that f is a function from X to Y .
Here X is called the domain of f , Y is called the codomain of f , and the
set {f (x) | x X} is called the range of f . If f : X Y is a function,
A X and B Y , then the image of A and the preimage (or inverse
image) of B under f are sets defined by
f 1 (B) = {x | f (x) B}.

f (A) = {f (x) | x A},

Unions and intersections behave nicely under inverse image:


!
[
[
1
f 1 (Ai ).
Ai =
f
iI

f 1
f

iI

(A ) = f

iI
c

Ai

f 1 (Ai ).

iI

c
(A) .

Given two functions f : X Y and g : Y Z, we define the composition


g f of f and g as the function g f : X Z defined by the equation
g f (x) = g(f (x)).
61

We say that f is injective, or one-one, if f (x) = f (y) only when x = y,


and we say that f is surjective, or onto, if f (X) = Y , that is, if the image
of f is the whole of Y . A function which is both injective and surjective
is called bijective. Sometimes we will use words a map or a mapping
instead of a function.
If f : X Y is bijective, then f has an inverse f 1 : Y X. This is
given by the formula f 1 (y) = x if and only if f (x) = y.

Countable and Uncountable Sets


A set A is called finite if for some n N, there is a bijection f from
{1, . . . , n} to A. The number n is uniquely determined and is called the
cardinality of A. We denote this fact by A = n or card(A) = n. If
A is not finite, then it is called infinite. If A is infinite, then there is an
injective function f from the set of natural numbers N into A. If there exists
a bijection between N and A, then we say that X is countably infinite.
So A is countably infinite if and only if its elements can be listed without
repetitions in an infinite sequence X = {x1 , x2 , . . .}. A set A is called countable if it is finite or countably infinite; otherwise A is called uncountable.
Example 11.1. The set Z of all integers is countably infinite. To see this
consider the function f : N Z defined by
(
n/2
if n is even;
f (n) =
(n 1)/2
if n is odd.
Check that the function f is a bijection from N to Z so that Z is countably
infinite.

Example 11.2. Consider the interval I = [0, 1]. We shall show that I is
uncountable. Seeking a contradiction, suppose that I is countable. Hence all
elements of I can be listed as an infinite sequence {x1 , x2 , . . .} with decimal
expansions:
x1 = 0.a11 a12 a13

x2 = 0.a21 a22 a23

x3 = 0.a31 a32 a33


..
..
.
.
62

Define

(
1
bn =
2

if ann 6= 1,
if ann = 1

and x = 0.b1 b2 b3 . Then x [0, 1] but it is not a member of {xn }; contradiction.

Proposition 11.3. Let A be a non-empty set. Then the following are equivalent:
(a) A is countable.
(b) There exists a surjection f : N A.
(c) There exists an injection g : A N.
Proof. Assume that A is countable. If A is countably infinite, then there
exists a bijection f : N A. If A is finite, then there is a bijection h :
{1, . . . , n} A for some n. Define f : N A by
(
h(i)
if 1 6 i 6 n,
f (i) =
h(n)
if i > n.
Check that f is a surjection. So the implication (a) = (b) is proved. Next
we prove the implication (b) = (c). Let f : N A be a surjection. Define
g : A N by the equation g(a) = smallest number in f 1 (a). Since f is
a surjection, f 1 (a) is non-empty for any a A, so that g is well-defined.
Next check that if a 6= a , then f 1 (a) and f 1 (a ) are disjoint, so they have
different smallest elements. The injectivity of g follows. Now the implication
(c) (a). Assume that g : A N is injective. We want to show that A is
countable. Note that g from A to g(A) is a bijection. So it suffices to show
that any subset B of N is countable. This is obvious when B is finite. Hence
assume that B is an infinite subset of N. We define a bijection h : N B.
Let h(1) be the smallest element of B. Since B is infinite, it is non-empty
and so h(1) is well-defined. Having already defined h(n 1), let h(n) be
the smallest element of the set {k B | k > h(n 1)}. Again this set
is non-empty, so h(n) is well-defined. Now check that the function h is a
bijection from N to B.


63

Corollary 11.4. The set N N is countable.


Proof. In view of the previous proposition, it is enough to construct an
injective function f : NN N. For example, let f (n, m) = 2n 3m . Suppose
that f (n, m) = f (k, l), i.e. 2n 3m = 2k 3l . If n < k, then 3m = 2kn 3l . The
left side of this equality is an odd number whereas the right is an even
number. So n = k, and 3m = 3l . But then also m = l. Hence f is injective
as required.

Proposition 11.5. If A and B are countable, then A B is countable.
Proof. Since A and B are countable, there exist surjective functions f : N
A and g : N B. Define h : NN AB by h(n, m) = (f (n), g(m)). The
function h is surjective and N N is countable, so A B is countable. 
Corollary 11.6. The set Q of all rational numbers is countable.
Proposition
S 11.7. If I is a countable set and Ai is countable for every
i I, then iI Ai is countable.

Proof. For each i I, there exists a surjection fi : N Ai . Moreover, since


ISis countable, there exists a surjection g : N I. Now define h : S
NN
ii Ai is
iI Ai by h(n, m) = fg(n) (m). Check that h is surjective so that
countable.


Real numbers, Sequences


The set of all real numbers, R, has the following properties:
(a) the arithmetic properties;
(b) the ordering properties; and
(c) the completeness property.
The arithmetic properties start with the fact that any two real numbers a, b
can be added to produce a real number a + b, the sum of a and b. The rules
for addition are a + b = b + a, (a + b) + c = a + (b + c). There is a real number
0, called zero, such that a + 0 = 0 + a = a for all real numbers a. Each
real number a has a negative a such that a + (a) = 0. Besides addition,
we have multiplication; two real numbers a, b can be multiplied to produce
the product of a and b, a b. The rules for multiplication are ab = ba and
(ab)c = a(bc). There is a real number 1, called one, such that a1 = 1a = a,
and for each a 6= 0, there is a reciprocal 1/a such that a(1/a) = 1.
64

The ordering properties start with the fact that there is a subset R+ of R, the
set of positive real numbers. The set R+ is characterized by the property:
if a, b R+ , then a + b and ab R+ . The fact that a R+ is denoted by
0 < a or a > 0. The set of negative real numbers R = R+ is the set of
negatives of elements in R+ . For every a R, we have a R+ or a = 0 or
a R . The notation a < b (or b > a) means that b a R+ . We also
write a 6 b to mean a < b or a = b. The order properties of real numbers
are as follows:
(a) a < b and b < c, then a < c.
(b) a < b and c > 0, then ac < bc.
(c) a < b and c R, then a + c < b + c.
(d) a < b and a, b > 0, then 1/b < 1/a.
If A R, a number M is called an upper bound for A if a 6 M for all
a A. Similarly, m is a lower bound for A if m 6 a for all a A. A
subset A of R is called bounded above if it has an upper bound, and is
called bounded below if it has a lower bound. If A has an upper and lower
bound, then it is called bounded. A given subset of R may have several
upper bounds. If A has an upper bound M such that M 6 b for any upper
bound b of A, then we call M a least upper bound of A or supremum
of A, and denote it by M = sup A. Similarly, a real number m is called a
greatest lower bound of A or an infimum of A if m is a lower bound of
A and b 6 m for all lower bounds b of A. If m is the greatest lower bound
of A, we write m = inf A.
The completeness property of R asserts that every non-empty subset
A R that is bounded above has a least upper bound, and that every nonempty subset S R which is bounded below has a greatest lower bound.
Useful characterisations of a least upper bound and a greatest lower bound
are contained in the following propositions:
Proposition 11.8. Let A R be bounded above. Then a = sup A if and
only if x 6 a for any x A, and for any > 0 there exists x A such that
a < x + .
Proof. Assume first that a = sup A. Clearly, x 6 a for any x A. Take
> 0. If for all x A, x + 6 a, then x 6 a for all x. Hence a
is an upper bound of A contradicting the definition of a as the least upper
bound of A. Conversely, from x 6 a for any x A follows that a is an upper
65

bound of A. Assume that there is an upper bound b such that b < a. Then
we get a contradiction with the fact that for any > 0 there exists x A
such that a < x + . Let := (a b)/2 and choose such an x A. Then
x + 6 b + = (a + b)/2 < a.

There is also a similar characterisation of inf A provided that A is bounded
from below.
Proposition 11.9. Let A R be bounded from below. Then a = inf A if
and only if a 6 x for any x A, and for any > 0 there exists x A such
that x < a.
The proof of the proposition follows from the previous one by observing
two facts: if A is bounded from below then the set A = {x | x A} is
bounded from above and that sup(A) = inf A.
It is useful to introduce the extended real number system, R = R
{, } by adjoining symbols and subject to the ordering rule
< a < for all a R. If A is not bounded above, then we write
sup A = , and if A is not bounded below we write inf A = . For
example, we have inf R = and sup R = . We also have sup =
and inf = , and for all non-empty sets A, inf A 6 sup A. With this
terminology, the completeness property asserts that every subset of R has a
least upper bound and a greatest lower bound.
The arithmetic operations on R can be partially extended to R. In particular
we have:
+ r = r + = for r R
() + () = ,

and () + () = .

Subtraction is defined in a similar way with the exception that


() + () and

() + ()

are not defined. We also define multiplication by


(
, if r > 0,
r() = ()r =
, if r < 0,
and
()() = ,

()() = .

The multiplication 0 () is not defined.


66

If a is an upper bound of A and a A, then a is a maximum of A, and


we write a = max A. Similarly, if a A is a lower bound of A, then a is a
minimum of A and this fact is denoted by a = min A. If A and B R,
then A + B = {a + b | a A, b B}, A + a = {x + a | x A}, and
aA = {ax | x A}. Here are some properties of supremum and infimum:
(a) monotonicity property: A B, then sup A 6 sup B and inf B 6
inf A.
(b) reflection property: sup(A) = inf A and inf(A) = sup A.
(c) translation property: sup(A + a) = sup A + a and inf(A + a) =
inf A + a.
(d) dilation property: sup(aA) = a sup A and inf(aA) = a inf A, provided that a > 0
(e) addition property: sup(A + B) = sup A + sup B and inf(A + B) =
inf A + inf B.
A sequence of real numbers is a function f : N R. We often write the
sequence as {f (n)} or {fn }. A sequence {an } of real numbers is said to
converge to a real number a if for every > 0 there is an integer n0 such
that if n n0 , then |an a| < . In this situation we call a the limit of
{an }; a convergent sequence has a unique limit. We also write an a or
limn an = a. A sequence {an } which does not converge to any limit in
R is said to diverge. We say that an if for every M > 0, there is
n0 such that an > M for all n n0 . Similarly, an , if for every
M < 0 there exists n0 such that an < M for all n n0 . A sequence {an }
is bounded if |an | < M for some number M and all n N. A convergent
sequence is always bounded. Here are some elementary properties of limits
of sequences:
Proposition 11.10. Let {an } and {bn } be sequences converging to a and
b, respectively. Let c R. Then
(a) {can } converges to ca;
(b) the sequence {an + bn } converges to a + b;
(c) the sequence {an bn } converges to a b;
(d) if bn 6= 0 for all n and b 6= 0, then the sequence {an /bn } converges to
a/b.
67

A sequence {an } is called monotone increasing if an 6 an+1 for all n N.


It is monotone decreasing if an an+1 for all n N.
Proposition 11.11. If {an } is a monotone increasing sequence that is
bounded above, an 6 M for all n, then {an } is convergent. If {an } is
monotone increasing and it is not bounded from above, then an . If
{an } is monotone decreasing and it is bounded below, M 6 an for all n, then
{an } is convergent, and if {an } is not bounded from below, then an .
Proof. If {an } is unbounded from above, then for every M there is k such
that ak > M . Since the sequence is increasing, an ak M for all
n k. Thus an . Next assume that {an } is bounded above. Then
a := sup{an | n N} < . Let > 0. By the definition of supremum,
an 6 a for all n and there is an integer n0 such that a < an0 +. Since {an } is
monotone increasing, an 6 a < an + for all n n0 , that is, |an a| < for
all n n0 . Thus the sequence converges to a. The proof for monotonically
decreasing sequences is similar and is left as an exercise.

Let {an } be a sequence. If 0 < n1 < n2 < . . . are positive integers, then
{ank } is called a subsequence of {an }.
Proposition 11.12. If {an } is a convergent sequence with the limit a, then
every subsequence of {an } converges to a. Conversely, if a sequence {an }
has the property that each of its subsequences is convergent, then {an } itself
converges.
Proof. Let {ank } be a subsequence of {an }. For a given > 0, choose n0
such that |an a| < for all n > n0 . Note that if k > n0 , then nk > n0
and so |ank a| < for all k > n0 . Therefore, {ank } converges to a. The
converse follows from the fact that the sequence {an } is a subsequence of
itself.

Let {an } be a bounded sequence. For each n N, let bn = supmn am =
sup{an , an+1 , . . .}. Then {bn } is monotone decreasing, and it is bounded
since {an } is bounded. In view of Proposition 11.11, {bn } converges. The
limit is called the upper limit of {an }. Similarly, let cn = inf mn am =
inf{an , an+1 , . . .}. Then {cn } is monotone increasing, and it is bounded since
{an } is bounded. The limit of {cn } is called the lower limit of {an }. If
{an } is not bounded above, then its upper limit is equal to , and if {an }

68

is not bounded below, then its lower limit is equal to . Summarizing


lim sup an = lim an = inf sup ak = lim sup ak
nm kn

n kn

lim inf an = lim an = sup inf ak = lim inf ak ,


nm kn

n kn

for any fixed integer m N. A useful characterisation of the upper limit is


the following proposition.
Proposition 11.13. Let {an } be a sequence in R. Then the following are
equivalent:
(a) lim an = a.
(b) For every b > a, an < b for all but finitely many n and for every c < a,
an > c for infinitely many n.
Proof. Assume lim an = a. Then for any b > a, there exists m such that
supnm an < b. In particular, an < b for all n m. Since the sequence
{supnm an } is decreasing and convergent to a, it follows that a 6 supnm an
for all m. Hence if c < a, then for every m there exists n m such that
c < an . This shows the implication (a) = (b). Conversely, assume that
(b) holds. Then for every b > a, there exists m such that an < b for all
n m. Hence supnm an 6 b. This implies that lim sup an 6 b for every
b > a so that lim sup an 6 a. If for every c < a and for every m there
exists n m such that an > c, then for every m, supnm an c. This gives
lim sup an > c and since this holds for every c < a, we have lim sup an a.
Thus lim sup an = a and the implication (b) = (a) is proved.

As an exercise formulate and prove the corresponding statement for the
lower limit. The basic properties of the upper and the lower limits are listed
in the following proposition:
Proposition 11.14. If {an } and {bn } are sequences of real numbers, then:
(a) lim sup(an ) = lim inf an and lim inf(an ) = lim sup an ;
(b) lim sup(can ) = c lim sup an and lim inf(can ) = c lim inf an for any c >
0;
(c) lim sup(an + bn ) 6 lim sup an + lim sup bn and lim inf an + lim inf bn 6
lim inf(an + bn );

69

(d) lim inf an 6 lim sup an , with equality if and only if {an } converges (in
this case lim sup an = lim an );
(f ) If {ank } is a subsequence of {an }, then lim inf an 6 lim inf ank 6
lim sup ank 6 lim sup an .
The proof is left as an exercise.
Theorem 11.15 (Bolzano-Weierstrass Theorem).
Let {an } be a bounded sequence in R. Then it has a subsequence that converges.
Proof. Set a = lim sup an . We will construct inductively a subsequence
{ank } of {an } which converges to a. In view of Proposition 11.13, there
exists n1 such that an1 > a 1. Having obtained n1 < n2 < < nk such
that anj > a 1/j for 1 6 j 6 k, we find, again by applying Proposition
11.13, nk+1 > nk such that ank+1 > a 1/(k + 1). Hence a 6 lim inf ank 6
lim sup ank 6 lim sup an = a. So lim ank = a and the proof is finished.


References
[Me] B. Mendelson, Introduction to Topology.
[M] J. R. Munkres, Topology: A First Course.
[P] C. W. Patty, Foundations of topology.
[S] W. A. Sutherland. Introduction to metric and topological spaces.

70

You might also like