Metric Spaces (Bath Lecture Notes)

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

Brief Notes on Metric Spaces, MATH0041

1. Metrics and Norms

1.1 De nition: A non-empty set X with a function d : X  X ! R is a metric space if


a) d(x; x) = 0;
b) d(x; y ) > 0 if x 6= y ;
c) d(x; y ) = d(y; x);
d) d(x; y ) + d(y; z )  d(x; z ) for all x; y; z 2 X .
Condition (d) is called the triangle inequality.

1.2 Examples: Rn with d(x; y) = jx yj, the Euclidean metric; any nonempty set X with d(x; y ) = 1 if
1 if pk divides (n m) and pk+1 does not (p a
x 6= y, the discrete metric; Z with the metric d(n; m) = k+1
prime), the p-adic metric.

1.3 A norm on a real vector space V (possibly in nite-dimensional) is a function k  k : V ! R such that
a) k0k = 0;
b) kvk > 0 if v 6= 0;
c) kvk = jjkvk if  2 R;
d) kv + wk  kvk + kwk.

1.4 Examples: the Euclidean norm kxk = jxj on Rn ; the max-norm kxk = max(jxi j) on Rn ; the max- or
sup-norm kf k = maxfjf (t)j j t 2 [0; 1]g on C [0; 1] (the set of continuous functions f : [0; 1] ! R).

1.5 Proposition. If V is a vector space and k  k is a norm then d(x; y) = kx yk is a metric on V .


Proof: We need to check 1.1(a{d). 1.1(a) follows immediately from 1.3(a) and 1.1(b) from 1.3(b). For 1.1(c),

notice that
d(x; y) = kx yk
= k( 1)(y x )k
=j 1jky x k
= ky xk
= d(y; x):
For 1.1(d)
d(x; z) = kx z k
= k(x y ) + (y z )k
 kx y k + ky z k
= d(x; y) + d(y; z):

1.6 Lemma. If x; y; z 2 X then jd(x; y ) d(y; z )j  d(x; z )


Proof: Use the triangle inequality twice:

d(x; y)  d(x; z ) + d(z; y) and d(y; z )  d(x; y) + d(x; z )

1
so
d(x; y) d(y; z )  d(x; z ) and d(y; z ) d(x; y)  d(x; z ):

1.7 De nition. If Y  X then the subspace metric on Y is just the restriction of d to Y Y.
1.8 De nition. If X; dX and Y; dY are metric spaces then the product metric on X  Y is d given by

d ((x; y); (x0 ; y0 )) = maxfdX (x; x0 ); dY (y; y0)g:

It is a metric on X  Y . To check the triangle inequality (the other three conditions are immediate)

d ((x1 ; y1); (x2 ; y2)) + d ((x2 ; y2 ); (x3 ; y3 ))


= max(dX (x1 ; x2 ); dY (y1 ; y2 )) + max(dX (x2 ; x3 ); dY (y2 ; y3 ))
 max(dX (x1 ; x2 ) + dX (x2 ; x3 ); dY (y1 ; y2) + dY (y2 ; y3 ))
 max(dX (x1 ; x3 ); dY (y1 ; y3 ))
= d ((x1 ; y1 ); (x3 ; y3 )):

We can also do this for any nite product X = X1      Xn of metric spaces, setting d (x; y) =
maxi dXi (xi ; yi ).

1.9 The distance between two nonempty subsets A and B of a metric space X is de ned to be d(A; B ) =
inf fd(a; b) j a 2 A; b 2 B g. If A = fag is a set with just one point we write d(a; B ) (the distance from a to
B ) instead of d(fag; B ).
The distance function d(A; B ) on sets is not a metric itself: it can be zero even though A 6= B . In fact it
can be zero even when A \ B = ;, for instance A = ( 1; 0) and B = (0; 1) in R.

1.10 A subset A  X is said to be bounded if there exists M 2 R such that d(x; y ) < M for all x; y 2 A. The
diameter of A is de ned to be supfd(x; y ) j x; y 2 Ag. A bounded metric space is one for which X itself is
bounded.
Bounded intervals in R are bounded sets. A discrete metric space is bounded (take M = 1).

1.11 The (open) ball of radius r > 0 around, or centred at, c 2 X is

Br (c) = fx 2 X j d(c; x) < rg:

1.12 Every ball is bounded: in fact the diameter of Br (c) is at most 2r. Small balls around c are contained
in bigger ones, that is, Br (c)  BR (c) if R > r.

2. Sequences and convergence.

2.1 A sequence in a metric space X is a function f : N ! X. More usually one expresses this by writing
f (n) = an and calling the sequence (an ).

2
2.2 A sequence (an ) in X tends or converges to a 2 X if

8 > 0 9N 8n > N d(an ; a) < :


In this case we write an ! a as n ! 1, or lim an = a. The point a is called the limit of the sequence: we
n!1
shall see shortly that a sequence has at most one limit. A sequence that has a limit is said to be convergent.

2.3 A subsequence of a sequence f : N ! X is f Æ g : N ! X , where g : N ! N is a strictly increasing


function. Again one usually expresses this di erently: a subsequence of (an ) is (ani ) with ni+1 > ni for all
i 2 N.

2.4 Proposition. In a metric space X , a sequence (an ) tends to a if and only if d(an ; a) ! 0 in R.
Proof: d(an ; a) ! 0 means 8 > 0 9N 8n > N jd(an ; a)j < . But d(an ; a)  0 so we can drop the modulus

signs, and then we see the de nition of convergence in 2.2.

2.5 A sequence (an ) is said to be bounded if and only if fan g is a bounded subset of X , that is,

9M 8n; m d(an ; am ) < M:

2.6 Theorem. Let X be a metric space and let (an ); (bn ) be sequences in X .
a) if an ! a and bn ! b then d(an ; bn ) ! d(a; b);
b) the sequence (an ) has at most one limit;
c) if (an ) is convergent then it is bounded;
d) if (ani ) is a subsequence of (an ) and an ! a then ani ! a.
Proof: (a) We calculate directly, using 1.6:

jd(an ; bn ) d(a; b)j = jd(an ; bn ) d(an ; b) + d(an ; b) d(a; b)j


 jd(an ; bn ) d(an ; b)j + jd(an ; b) d(a; b)j
 d(b; bn ) + d(an ; a)
! 0 as n ! 1:
(b) If an ! a and an ! b then put bn = an in part (a). Then 0 = d(an ; bn ) ! d(a; b) so d(a; b) = 0 so a = b.
(c) Choose  > 0: it doesn't matter what  is at all, so let us take  = 1. Then if an ! a we can nd N 2 N
such that d(an ; a) < 1 for n > N . Now take

M = maxf max d(ai ; aj ); 1 + max d(ai ; a); 2g:


i;j N iN

I claim that for any m; n 2 N d(am ; an )  M . If m and n are both less than or equal to N then d(am ; an ) 
max d(ai ; aj )  M . If m  N < n then d(am ; an )  d(am ; a)+ d(a; an )  1+max d(ai ; a)  M . If m; n > N
i;j N iN
then d(am ; an )  d(am ; a) + d(a; an )  2  M .
(d) We must show that given  > 0 there is an N such that if j > N then d(anj ; a) < . For this  there is
an N 0 such that if n > N 0 then d(an ; a) < : but then if j > N 0 we have nj > N 0 so d(anj ; a) < . So all we
have to do is take N = N 0 .

3
2.7 We shall show that a sequence in Rk converges in the Euclidean metric if and only if each sequence of
coeÆcients converges. Take a sequence (an ) with an = (a(1) (k)
n ; : : : ; an ). Then an ! a = (a(1) ; : : : ; a(k) ) if
and only if r
X (i)
8 > 0 9N 8n > N (an a(i) )2 < :
i
q
I claim that this is the same as saying that a(ni) ! a(i) for each i = 1; 2; : : : ; k . If
P (i)
i (an a(i) )2 <  then
P (i) ( i ) ( i )
i (an a(i) )2 < 2 so for each i we have (an a(i) )2 < 2 , and then jan a(i) j < . So
8 > 0 9N 8n > N ja(ni) a(i) j < :
p
Conversely suppose a(ni) ! a(i) for each i. Then, given  > 0, we can choose N so large that ja(ni) a(i) j < = k
for all i if n > N . If we do that then as long as n > N we have
r
X q p
(a(i) a(i) )2 < k(= k)2 = :
i n

2.8 If d is the discrete metric on X then an ! a if and only if there is an N such that an = a for n > N .
This is because if   1 then d(an ; a) <  implies an = a.

2.9 Proposition: If Y  X , a 2 Y and (an ) is a sequence in Y , then an ! a in Y with the subspace metric
if and only if an ! a in X . If X1 ; : : : ; Xk are metric spaces and X = X1     Xk with the product metric,
then the sequence (an ) in X tends to a 2 X if and only if a(ni) ! a(i) in Xi for each i.
Proof: an ! a in Y means dY (an ; a) ! 0 as n ! 1. But dY (an ; a) = d(an ; a) so dY (an ; a) ! 0 if
and only if d(an ; a) ! 0. Similarly, an ! a means d (an ; a) ! 0, that is maxi dXi (a(ni) ; a(i) ) ! 0. But
maxi dXi (a(ni) ; a(i) ) ! 0 if and only if dXi (a(ni) ; a(i) ) ! 0 for each i.

2.10 The max norm k  k1 on C [0; 1] is de ned by kf k1 = max jf (t)j. Of course we can replace 0 and 1 by
0t1
any a; b 2 R with a  b. More generally can de ne a norm k  ki nfty , called the sup norm or the uniform
norm, on the set of bounded and continuous (or even just bounded), real-valued functions on any interval I ,
closed or not. It is de ned by k  ki nfty = sup jf (t)j.
t2I
We need to check that kk1 really is a norm. This means checking 1.3(a){(d). First (a): k0k1 = max(0) = 0.
t2I
Then (b): if f is not the zero function then there is some  2 I such that f ( ) 6= 0, and kf k1 = max jf (t)j 
t2I
jf ( )j > 0. For (c), note that jf (t)j = jjjf (t)j so
kf k1 = max
t2I
jf (t)j
= jj max jf (t)j
t2I
= jjkf k1 :
Finally, the triangle inequality, (d):
kf + gk1 = max
t2I
jf (t) + g(t)j
 max
t2I
(jf (t)j + jg (t)j)
 max
t2I
jf (t)j + max
t2I
jg(t)j
= kf k1 + kg k1 :

4
k  k1 is called the uniform norm because fn ! f in this normed space if and only if fn tends uniformly to
f in the usual sense.

2.11 Two metrics d1 , d2 on the same set X are said to be equivalent if there are positive constants c1 ; c2 > 0
such that
8x; y 2 X c1 d1 (x; y)  d2 (x; y)  c2 d1 (x; y):
The idea here is that if two metrics are equivalent they will give us the same notion of convergence: see 2.13.
It's not quite true that if two metrics give the same notion of convergence they are equivalent: however,
equivalence has the virtue of being easy to check. In any case examples where two inequivalent metrics give
the same notion of convergence are usually arti cial.
In the same way, one says that two norms k  k1 and k  k2 on a real vector space X are equivalent if there
are positive constants c1 ; c2 > 0 such that for all x 2 X

c1 kxk1  kxk2  c2 kxk1 :

To justify the use of the word \equivalent" we need to show that equivalence of metrics (resp. norms) is
indeed an equivalence relation. We also need to show that the two uses of the word are compatible. Let us
do that rst.
Lemma. Two norms on a vector space X are equivalent if and only if the corresponding metrics are

equivalent.
Proof: If the metrics d1 (x; y ) = kx yk1 and d2 (x; y) = kx yk2 are equivalent then

8x; y 2 X c1 kx yk1  kx yk2  c2 kx yk1 :


and in particular if we take y = 0 we see that the norms are equivalent. Conversely, if k  k1 and k  k2 are
equivalent we need only to write this down for the vector x y to get the statement that the metrics are
equivalent.
In view of this we need only show that equivalence of metrics on a given set X is an equivalence relation:
equivalence of norms is just a special case of that.
Proposition. Equivalence of metrics on a given non-empty set X is an equivalence relation.

Proof: Re exivity: take c1 = c2 = 1.

Symmetry: if d1 is equivalent to d2 then, for all x; y 2 X , c1 d1 (x; y )  d2 (x; y ) so, since c1 > 0, d1 (x; y ) 
1 1
c1 d2 (x; y ). Similarly d1 (x; y )  c2 d2 (x; y ) so d2 is equivalent to d1 .
Transitivity: if c1 d1 (x; y )  d2 (x; y )  c2 d2 (x; y ) and c01 d2 (x; y )  d3 (x; y )  c02 d2 (x; y ) for all x; y 2 X , so
d1 is equivalent to d2 and d2 is equivalent to d3 , then

c01 c1 d1 (x; y)  c01 d2 (x; y)  d3 (x; y)  c02 d2 (x; y)  c02 c2 d1 (x; y)

and hence d1 is equivalent to d3 .

2.12 Proposition. The norms k  kk and k  k1 on Rn are equivalent, for any k. In particular the di erent
k  kk are all equivalent to each other.

5
pP
Proof: Recall that kxkk = k i jxi jk , k 2 N , and kxk1 = max jxi j. Now

kxkk1 = (max jxi j)k


X
 jxi jk = kxkkk
i
 n max jxi jk
= n(kxk1 )k

and, taking k th roots


kxk1  kxk  pk nkxk1 :
Since kk1 corresponds to the product metric and kk2 corresponds to the Euclidean metric this, together with
2.13 below, shows that convergence in the Euclidean metric is the same as convergence in each coordinate.
We proved this by hand in 2.7.

2.13 Theorem. If d1 and d2 are equivalent metrics on a non-empty set X then an ! a in (X; d1 ) if and
only if an ! a in (X; d2 ).
Proof: By symmetry it is enough to show this in one direction only. Suppose an ! a in (X; d1 ). We want

to show that an ! a in (X; d2 ). Given  > 0, we choose N such that d1 (an ; a) < =c2 if n > N . Then
d2 (an ; a)  c2 d1 (an ; a) < , so we have what we want.

2.14 We should check that what we are doing is not trivial: how do we know that there are any inequivalent
pairs of metrics? In fact there are lots: here are two examples.
X = R, d1 is the Euclidean metric, d2 is the discrete metric. We have seen that in the discrete metric
the only convergent sequences are the eventually constant sequences (see 2.8). On the other hand there are
plenty of convergent sequences in the Euclidean metric that are not eventually constant, for instance an = n1 .
So d1 and d2 cannot be equivalent, because if they were then according to 2.13 they ought to give the same
convergent sequences.
R
If X = C (0; 1) then k  k1 and k  k1 are inequivalent, where kf k1 = 01 jf (t)jdt. (It is easy to check that
k  k1 is a norm.) Consider the function
 1
an (t) = 01 nx ifif 01 <<xx < n1.
n
This is the function that comes down from 1 to 0 linearly with slope n and then stays at 0. Clearly
kan k1 = 1 for all n, so an does not tend to 0 in the uniform norm, but kank1 = 21n so an ! 0 in k  k1 . So
again the two metrics give di erent convergent sequences and must be inequivalent.
Finally, a pathology (that is, an unpleasant counterexample that you don't really want to think about but
you have to know exists). Take X = N , d1 the discrete metric and de ne d2 by d2 (n; n + 1) = n1 , so that
P 11
more generally, d2 (n; m) = m r=n r if n < m. Then the convergent sequences in both cases are the same,
namely the eventually constant sequences. For d1 we saw this in 2.8: for d2 , suppose an ! a. Choose
 = 21a . Then 9N 8n > N d2 (a; an ) < 21a , but if b 6= a then d2 (a; b)  a1 { the nearest point to a is a + 1.
So an = a so the sequence an is eventually constant. Looking at 2.13 you might hope that the converse
would also be true, that if two metrics give the same convergent sequences then they are equivalent. But
here d1 and d2 do give the same convergent sequences, as we've just checked, and they aren't equivalent.

6
Suppose they were, so 8x; y 2 Xc1 d1 (x; y )  d2 (x; y )  c2 d1 (x; y ). Choose x > 1=c1 and y = x + 1. Then
d2 (x; y) = x1 > c1 = c1 d1 (x; y), a contradiction.
Fortunately this doesn't matter much because it practically never happens. In particular (we aren't going
to prove this, though it's not especially hard) it doesn't happen for metrics given by norms.

3. Open and closed sets.

3.1 A subset U  X of a metric space (X; d) is said to be open in X if


8x 2 U 9 > 0 B(x)  U:
Remember that B (x) = fy 2 X j d(x; y ) < g: it depends on X , and so does openness. It's not a property
of U on its own.
A subset Z  X is closed if X n Z  X is open.
Notice that closed does not mean \not open". It is quite possible for a set to be both open and closed in X ,
and usually most subsets of X are neither open nor closed.

3.2 Examples. X  X is open: you may take  to be anything. ;  X is also open: this is true according
to the de nition above, because of a logical quibble about the meaning of 8x 2 ;, but if you prefer you may
modify youir de nition so that it says explicitly that ;  X is open. As a result, ;  X and X  X are also
both closed.
Open balls are open, as you would hope. But this is not quite trivial to prove. Take U = Br (c)  X and
suppose x 2 U . Then d(x; c) < r. Choose  = r d(x; c) >, which is positive. I claim that B (x)  U .
Suppose y 2 B (x): then
d(y; c)  d(y; x) + d(x; c) <  + d(x; c) = r
so y 2 Br (c) = U .
If X is a discrete metric space then every subset of X is open, and therefore every subset of X is closed as
well. If U  X and X is discrete, suppose x 2 U : then B1 (x) = fxg  U , so U is open.

3.3 Theorem. Let X be a metric space.


S
a) If A is nonempty and U  X is open for every 2 A then U is open in X .
2A
n
T
b) If U1 ; : : : ; Un are nitely many sets, each open in X , then Ui is open in X .
S i=1
Proof: (a) Suppose x 2 U . Then x is in one of the U s, say x 2 U 0 . So for some  > 0 we have
S 2A
S
B (x)  U 0  U , so U is open.
2A 2A
n
T
(b) Suppose x 2 Ui . Then x 2 Ui for each i, so there is an i > 0 such that Bi (x)  Ui . Take
i=1
n
T
 = minf1; : : : ; n g. Then B (x)  Bi (x)  Ui for all i, so B (x)  Ui as required.
i=1
Part (b) breaks down if there are in nitely many of the Ui because the minimum no longer exists (and the
in mum is no good as it might be zero). The intersection of all the open intervals ( n1 ; n1 )  R is f0g which
is not open in R.

7
From (a) and (b) it follows (by De Morgan's rules) that
T
a0 ) If A is nonempty and Z  X is closed for every 2 A then Z is closed in X.
2A
n
S
b0 ) If Z1 ; : : : ; Zn are nitely many sets, each closed in X , then Zi is open in X .
i=1

3.4 The collection of all the open subsets of a metric space X is called the topology of (X; d).
Proposition. A nonempty set U  X is open if and only if U can be written as a union of open balls.

Proof: If U can be written as a union of open balls then U is open by 3.3(a), since the open balls are open

themselves (3.2). Conversely, supose U is open. Then for each x 2 U there is a positive number x such that
S
Bx (x)  U . Consider W = Bx (x). By de nition W is a union of open balls: I claim W = U . If w 2 W
x2U
then there is an x 2 U such that w 2 Bx (x)  U , so W  U . If x 2 U then x 2 Bx (x)  W , so U  W .
3.5 Theorem. If two metrics d, d0 on X are equivalent then the metric spaces (X; d) and (X; d0 ) have the
same topology.
Proof: Suppose U  (X; d) is open in the sense of d. Then there exists  > 0 such that B (x)  U . We

need to show that U is also open in the sense of d0 . Let us use B 0 rather than B to denote a ball in the
sense of d0 : thus Br0 (c) = fy 2 X j d0 (c; y ) < rg. Then we must show that there exists 0 > 0 such that
B0 (x)  U . Since d and d0 are equivalent, there exist c1 ; c2 > 0 such that c1 d(x; y) < d0 (x; y) < c2 d(x; y).
0

Choose 0 = c1 . Then if y 2 B0 (x) we have


0

d(x; y) < d0 (x; y)=c1 < 0 =c1 = 

so y 2 B (x)  U , as required. Thus every open subset in the sense of d is also open in the sense of d0 : the
other way round follows by symmetry.
If two metrics d and d0 on a set X yield the same topology we say they are topologically equivalent. We have
just proved that equivalent metrics are topologically equivalent. In order to prove this what we had to do
was check that every ball in the sense of d contained a ball in the sense of d0 (and vice versa).
It is not true that if d and d0 are topologically equivalent then they are equivalent. The pathology in 2.14 is
a counterexample: in that example the metrics are not equivalent but the topology is the same (every set is
open) in both cases.

3.6 If Y  X the interior of Y , written Int(Y ) or Y Æ , is de ned by


[
Int(Y ) = fU  X j U is open in X; U  Y g:
The closure of Y , written Y , is de ned by
\
Y = fZ  X j Z is closed in X; Z  Y g:
By 3.3, Int(Y ) is open and Y is closed. You can think of Int(Y ) as being the biggest open set contained
in Y , and Y as being the smallest open set containing Y . Directly from the de nitions it follows that if
U  Y is open in X (the quali cation \in X ") is essential then U  Int(Y ), and similarly that if Z  Y is
closed in X then Z  Y .
In X = R, take Y = (0; 1]. Then Int(Y ) = (0; 1) and Y = [0; 1]. But Int(Y ) can be very much smaller than
Y : for instance, if X = R2 and Y is the x-axis then Int(Y ) = ;, because no ball is contained in Y .
8
The boundary of a subset Y  X is denoted @Y and is de ned to be @Y = Y n Int(Y ).

3.7 Theorem. Suppose X is a metric space and Y  X . Then


a) Int Y  Y  Y ;
b) @Y and Y are closed and Int(Y ) is open in X ;
c) Int(Y ) = Y if and only if Y is open, Y = Y if and only if Y is closed, and @Y  Y if and only if Y is
closed;
d) Int(X n Y ) = X n Y and X n Y = X n Int(Y ).
Proof: (a) follows directly from the de nitions of Int(Y ) and Y .
(b) follows from the de nitions and 3.3: notice that @Y = Y \ (X n Int(Y )) and is therefore the intersection

of two closed sets, so it is closed by 3.3(b0 ).
(c) If Y = Int(Y ) then certainly Y is open because Int(Y ) is open by part (b); if Y is open then Y 2 fU 
X j U is open in X; U  Y g so the union of all those sets contains Y and is therefore equal to Y . The
argument for Y is similar. If Y is closed then @Y Y = Y : if Y is not closed then there is a point in Y n Y
(since Y 6= Y ) and this point is also in @Y n Y .
(d) X n Y is open and contained in X n Y , so X n Y  Int(X n Y ). Also, X n Int(X n Y ) is closed and contains
Y , so X n Int(X n Y )  Y , that is, Int(X n Y )  X n Y . So Int(X n Y ) = X n Y . Applying this to X n Y we
get X n X n Y = Int X n (X n Y ) = Int Y so X n Y = X n Int Y .

3.8 Theorem. If Z  X then Z is closed in X if and only if the following holds: if an 2 Z for all n 2 N
and an ! a in X , then a 2 Z .
Proof: Suppose rst that Z is closed, so U = X n Z is open. If an ! a but a 62 Z then a 2 U , so there exists

 > 0 such that B (a)  U . So if d(an ; a) <  then an 2 U , and this is a contradiction. Therefore a 2 Z .
Conversely, suppose Z is not closed. Then U is not open so 9a 2 U forall > 0B (a) 6 U . Choose such
an a 2 U and take  = n1 . Then B (a) 6 U so B (a) \ Z 6= ;. Choose an 2 B (a) \ Z . Then an ! a, but
an 2 Z and a 62 Z .
This means that a set Z is closed in X if you don't fall out of it by taking limits. The limit of a sequence of
points of Z might not exist at all (in X ), but if it does and Z is closed then it's in Z .

3.9 A subset Y  X is dense if Y = X . It is sparse of Int(Y ) = ;. A metric space X is said to be separable


if there is a countable (or nite) dense subset Y  X . For instance R with the Euclidean metric is separable
because Q  R is a countable dense set.

3.10 If x 2 X a subset Y  X is called a neighbourhood of x if x 2 Int(Y ). If Y is itself open it is called an


open neighbourhood of x.
Proposition. A sequence an converges to a in X if and only if for every open neighbourhood U of x there

exists N such that an 2 U for n > N .


Proof: If an ! a and U 3 a is open, choose  > 0 such that B (a)  U . Then choose N such that if n > N

then d(an ; a) < . Then for n > N we have an 2 B (a)  U , as required. For the converse, suppose that
for every open neighbourhood U of x there exists N such that an 2 U for n > N . Then in particular this is
true for U = B (a) for every  > 0, which is precisely what the de nition of convergence to a requires.

3.11 If X is a metric space and D  A  X , we say that D is relatively open in A if D is open in A with the
subspace metric dA .

9
For example if D = (0; 1)  A = R  X = C (or A is the x-axis in R2 ) then D is relatively open in A,
though D is not open in X .
Theorem. If D  A  X then D is relatively open in A if and only if D = A \ U for some open set U  X .

Proof: The point is that a ball in (A; dA ) is a ball in X intersected with A. More precisely, if Br (x) = fy 2
A
A j dA (y; x) < rg then BrA (x) = Br (x) \ A where Br (x) = fy 2 X j d(y; x) < rg is the usual ball in X .
If D = A \ U then 8x 2 D 9x > 0 Bx (x)  U . So Bx (x) \ A  D; but Bx (x) \ A is the ball in (A; dA )
with centre x and radius x , so we have shown that D is open in A.
Conversely, if D is relatively open in A then there is a ball in the sense of (A; dA ) centred at x which
is contained in D. So there is an epsilonx such that BAx (x)  D, that is Bx (x) \ A  D. Now take
S
U= Bx (x): we have
x2D
[ [
A\U =A\ Bx (x) = (A \ Bx (x))  D:
x2D x2D

For eample, [0; 12 ) is relatively open in [0; 1) as it is [0; 1) \ ( 1; 1).


3.12 If A  X and A is open in X then D  A is relatively open in A if and only if D is open in X .
Proof: If D is relatively open in A then D = A \ U for some open U  X , and the intersection of two open

sets is open so D is open in X . If D is open in X then we can write D = A \ U simply by taking U = D.

4. Continuity.

4.1 Let (X; d) and (X 0 ; d0 ) be metric spaces and f : X ! X a function. Then the following conditions are
equivalent:
i) 8x 2 X 8 > 0 9Æ > 0 (d(x; y ) < Æ ) =) (d0 (f (x); f (y )) < );
ii) for all x 2 X , if (xn ) is a sequence in (X; d) and xn ! x, then f (xn ) ! f (x) in (X 0 ; d0 );
iii) if U  X 0 is open in X 0 then f 1 (U )  X is open in X .
If one of these conditions holds then f is said to be continuous on X .
Proof: (i) =) (ii). Suppose Xn ! x and  > 0. Then there exists Æ > 0 such that if d(xn ; x) < Æ then

d(f (xn ); f (x)) < . But 9N 8n > N d(xn ; x) < Æ so 9N 8n > N d(f (xn ); f (x)) < , i.e. f (xn ) ! f (x).
(ii) =) (iii). If U  X 0 is open then Z = X 0 n U is closed and f 1 (Z ) = X n f 1 (U ) = W . It is enough to
show that W is closed. By 3.8 it is enough to show that if wn 2 W and wn ! w 2 X then w 2 W . But if
wn ! w then f (wn ) ! f (w) 2 X 0 , and f (wn ) 2 Z and Z is closed, so by 3.8 f (w) 2 Z , i.e. w 2 W .
(iii) =) (i). Choose  > 0. U = B (f (x)) is an open subset of X 0 so f 1 (U ) is an open subset of X .
Moreover x 2 f 1 (U ), so by the de nition of an open set 9Æ > 0 BÆ (x)  f 1 (U ). But that means precisely
that if d(y; x) < Æ (so y 2 BÆ (x)) then d(f (y ); f (x)) <  (so f (y 2 U )).
One sometimes says that f is continuous at a particular x 2 X if (i) or (ii) holds for that particular value
of x (strictly, we haven't checked that these two statements are equivalent, because we went via (iii) which
doesn't mention a particular x). But continuity at just one point is almost never any use: what one needs
is continuity in a neighbourhood of a point, and we say that f : X ! X 0 is continuous near x 2 X is there
is a neighbourhood Y of x such that the restriction of f to Y is continuous.
4.2 This agrees with all previous de nitions of continuity of maps R ! R, C ! C , etc., because condition (i)
is the usual de nition in those cases.

10
If t 2 [0; 1] the evaluation map evt : C [0; 1] ! R given by evt (f ) = f (t) is continuous when R had the
Euclidean metric and C [0; 1] has the uniform metric (or anything else sensible). It is easiest to check this using
(ii): if fn ! f in C [0; 1] with the uniform metric then fn ! f pointwise, so fn (t) = evt (fn ) ! f (t) = evt (f ),
for any t 2 [0; 1].
R
The map I : C [0; 1] ! C [0; 1] (with the uniform metric) given by I (f )(t) = 0t f (x) dx is continuous. This is
most easily checked using (i): if kf g k1 <  then
 Z t Z t 

kI (f ) I (g)k = sup
f ( x ) dx g ( x ) dx

0t1 0 0
Z t

= sup (f (x) g (x))dx
0t1 0
Z t
 sup jf (x) g(x)jdx
0t1 0
Z 1
 jf (x) g(x)jdx
0
 sup jf (x) g(x)j
0x1
= kf g k

so we can simply take Æ = .


4.3 If A  X then the inclusion map (A; dA ) ! (X; d) is continuous. We can check any of the three conditions
easily: for instance, condition (iii) is just 3.12 and (ii) is 2.9. If (X1 ; d1 ) and X2 ; d2 ) are metric spaces then
the projection map 1 : X1  X2 ! X1 , where X1  X2 has the product metric d , is continuous. Again
there is nothing new to check here: condition (ii) is part of 2.9.
n
Q
4.4 Either by induction or by a direct calculation, the projection maps i : Xi ! Xi are continuous (with
i=1
the product metric) for any nite product. One way of thinking about the product metric is to say that it
is de ned precisely so as to make this be the case. But we can't really deal with the product of in nitely
Q
many Xi . For one thing the set X is problematic (it is an axiom rather than a theorem that it isn't
2A
empty: this is the Axiom of Choice); for another, the de nition of product metric we had breaks down
because the maximum may not exist.
4.5 We could also use this to prove 2.9. If instead of appealing to 2.9 to prove that the projections are
continuous we check condition (i) directly then we know condition (ii) must also be true, and that is 2.9
(an converges if and only if a(ni) converges for each i). Let us check (i) directly. If d (a; b) <  then
max di (a(i) ; b(i) ) <  so d1 (1 (a); 1 (b)) = d1 (a(1) ; b(1) ) < . So we can simply take Æ = .
4.6 If X , Y and Z are metric spaces and f : X ! Y and g : Y ! Z are continuous then gf : X ! Z is
continuous. This is easy if you use condition (iii): suppose U  Z is open. Then g 1 (U )  Y is open, so
f 1 (g 1 (U ))  X is open, but f 1 (g 1 (U )) = (gf ) 1 (U ).
4.7 De nition. A continuous map f : (X; d) ! (X 0 ; d0 ) is called a homeomorphism (do not confuse with
\homomorphism") if f is bijective (so it has a 2-sided inverse function f 1 ) and f 1 : X 0 ! X is also
continuous.
The metric spaces X and X 0 are said to be homeomorphic if there is a homeomorphism f : X ! X 0 . You
should think of homeomorphism as being \isomorphism of topology".

11
4.8 De nition. A continuous map f : (X; d) ! (X 0 ; d0 ) is called an isometry if

8x; y 2 X d0 (f (x); f (y)) = d(x; y):


The metric spaces X and X 0 are said to be isometricic if there is a bijective isometry f : X ! X 0 . You
should think of homeomorphism as being \isomorphism of metrics".
4.9 Proposition. If f : (X; d) ! (X 0 ; d0 ) is a bijective isometry then f is a homeomorphism. Consequently,
if X and X 0 are isometric, they are homeomorphic.
Proof: If f is a bijective isometry then it is continuous, and an inverse function f
1 : X 0 ! X exists. We
need to check that f is continuous. We will check condition 4.1(ii). Suppose an ! a0 in (X 0 ; d0 ). Then
1 0

d(f 1 (a0n ); f 1 (a0 )) = d0 (f (f 1 (a0n )); f (f 1 (a0 )) = d0 (a0n ; a0 ):


But 8 9N 8n > N d0 (a0n ; a0 ) < , so, taking the same N , we get 8 9N 8n > N d(f 1 (a0n ); f 1 (a0 )) < .
So f 1 (a0n ) ! f 1 (a0 ).
4.10 If d1 and d2 are two metrics on the same non-empty set X then d1 is topologically equivalent to d2 if
and only if the identity map id : (X; d1 ) ! (X; d2 ) is a homeomorphism.
Proof: Two metrics are topologically equivalent if and only if they have the same open sets (this was the
de nition, see 3.7), that is, if and only if id 1 (U ) = U is d1 -open exactly when U is d2 -open.
4.11 Examples of homeomorphisms. The identity map (R2 ; k  k2 ) ! (R2 ; k  ki nfty ) is a homeomorphism,
because the convergent sequences are the same in both cases so 4.1(ii) holds. The map x 7! ex is a
homeomorphism R ! R+ (with Euclidean metrics), since it has the continuous inverse log.
4.12 Examples of isometries. The most interesting isometries are isometries from a metric space (X; d) to
itself, which can be thought of as the symmetries of the metric space. Translation in R2 (with the usual
norm) by a xed vector, x 7! x + a, is an example. So are rotation and re ection. In fact any linear
transformation of Rn such that kT xk = kxk is an example.

5. Completeness.

5.1 De nition. A sequence (an ) in a metric space (X; d) is said to be Cauchy if

8 > 0 9N 8n; m > N d(an ; am ) < :


This means that all points far down the sequence are close together; so the sequence ought to be converging,
if only there were anything there for it to converge to.
5.2 Theorem. In any metric space (X; d), every convergent sequence is Cauchy and every Cauchy sequence
is bounded.
Proof: Suppose (an ) is convergent, so an ! a 2 X . Given  > 0 we choose N such that 8n > N d(an ; a) <

=2. Now, if n; m > N we have


d(an ; am)  d(an ; a) + d(a; am ) < =2 + =2 = 
so (an ) is Cauchy.
Suppose (an ) is Cauchy. Choose N such that d(an ; am ) < 1 for n; m > N , and put

M = 1 + maxfd(an ; am ) j n; m  N + 1g:
12
Then, if n; m  N we have d(an ; am )  maxfd(an ; am ) j n; m  N + 1g < M ; if n  N < m we have

d(an ; am )  d(an ; aN +1 ) + d(aN +1 ; am )


< maxfd(an ; am ) j n; m  N + 1g + 1 = M ;
and if n; m > N then d(an ; am ) < 1  M . So in all cases d(an ; am ) < M so the sequence is bounded.
What we want to do now is to get some idea of how much di erence there is between Cauchy and convergent.
The rst thing we have is a criterion which tells us, sometimes, that a Cauchy sequence is in fact convergent.
5.3 Proposition. If a Cauchy sequence has a convergent subsequence then it is convergent itself.
Proof: Suppose (an ) is a Cauchy sequence in some metric space (X; d) and anj ! a 2 X . Given  > 0 we

choose N such that d(an ; am ) < =2 if n; m > N and d(ani ; a) < =2 if i > N . Now suppose n > N and
choose i > n, so that ni > n also. Then

d(an ; a)  d(an ; ani ) + d(ani ; a) < =2 + =2 = 

so an ! a.
5.4 A metric space (X; d) is said to be complete if every Cauchy sequence in (X; d) is convergent.
This means, roughly, that everything that ought to have a limit, does. If we know that a metric space is
complete then we can tell that a sequence is convergent without having to know rst what the limit is going
to be. This means we can use convergence as a way of constructing or nding things we didn't previously
know about: completeness actually asserts that under certain circumstances some point of X exists, rather
than just telling us more things about points we already knew existed.
5.5 R with the usual metric is complete. It is probably best to regard this as an axiom: in one rather
popular approach this is pretty close to being the de nition of R. Rn is complete (with the Euclidean,
or equivalently with the product, metric { if two metrics are equivalent then they give the same Cauchy
sequences). If (an ) is a Cauchy sequence in Rn with respect to the product metric d then for m; n > N we
have maxi ja(ni) a(mi) j = d (an ; am ) < ; but then for each i we get ja(ni) a(mi) j < , so the sequence (a(ni) ) is
a Cauchy sequence in R and therefore converges. So an converges also.
Q is not complete, because 3; 3:1; 3:14; 3:141; 3:1415 : : : is obviously Cauchy but does not converge in Q since
 62 Q . R n f0g (with the usual metric) is also not complete, because the Cauchy sequence 1=n no longer
converges (somebody has taken the limit). The p-adic metrics on Z and Q are not complete metrics (that
is, they do not yield complete metric spaces) either: you can easily check that an = pn is Cauchy but not
convergent.
5.6 Proposition. If (X; d) is a complete metric space and ; = 6 A  X then (A; dA ) is complete if and only
if A is a closed subset of X .
Proof: If A is complete, take a sequence (an ) in A that converges to a 2 X . We need to show that in fact

a 2 A. But since (an ) is convergent in X it is Cauchy in X and therefore it is Cauchy in A too, since
d(am ; an ) <  if and only if dA (am ; an ) < . So (an ) must converge in A, and the limit it has in A must be
the same as its limit in X , since a sequence has at most one limit. So a 2 A.
Conversely, suppose A is closed and (an ) is a Cauchy sequence in A. Then (an ) is a Cauchy sequence in X
also, so it has a limit a 2 X . Since A is closed, a 2 A, but now an ! a 2 A so (an ) is a convergent sequence
in A and A is complete.
5.7 Theorem. If a; b 2 R and a < b then the space C [a; b] with the uniform metric is complete.
For this we need the following lemma from real analysis.

13
Lemma. If (fn ) is a sequence of continuous functions on some interval [a; b] and fn tends to f uniformly
(that is, sup jfn (t) f (t)j ! 0 as n ! 1), then f is also continuous on [a; b].
One expresses this informally by saying that \a uniform limit of continuous functions is continuous".
Proof of Lemma: Choose N so large that 8n > N 8t 2 [a; b] jfn (t) f (t)j < =3 (by the uniform convergence
this is possible). If n > N we have

jf (t) f (s)j = jf (t) fn (t) + fn (t) fn (s) + fn (s) f (s)j


 jf (t) fn (t)j + jfn (t) fn (s)j + jfn (s) f (s)j
 =3 + =3 + =3 = 
for s 2 (t Æ; t + Æ ), where Æ is such that 8s 2 (t Æ; t + Æ ) jfn (t) fn (s)j < =3. Such a Æ exists because fn
is continuous.
This proves the lemma.

Proof of the theorem: Suppose that (fn ) is a Cauchy sequence in C [a; b]; k  k1 . Choose N such that
8n; m > N kfn fmk < . Then if n; m > N , for any t 2 [a; b]
jfn (t) fm (t)j  supfjfn (t) fm(t)jg = kfn fm k < ;

so the sequence fn (t) is a Cauchy sequence in R, and this is true for any t 2 [a; b]. So we can take the
limit. We de ne f (t) to be lim fn (t).
n!1
So far there is absolutely no reason why f should be continuous (and if it isn't it's no good to us). When
we de ned f (t) we did so without paying any attention to f (s) for s close to t, which might have ended up
being something totally di erent. But if we can prove that fn in fact converges uniformly to f , which we
haven't done yet, then by the lemma f will be continuous, and we'll have nished. So we need to know that
kfn f k = sup jfn (t) f (t)j tends to zero as n ! 1. 
We know by the fact that (fn ) is a Cauchy sequence in C [a; b]; k  k1 that

8 > 0 9N 8t 2 [a; b] 8n; m > N jfn (t) fm (t)j < =2:


We x n, t and  and simply take the limit of this as m ! 1, a limit in R:

8 > 0 9N 8t 2 [a; b] 8n > N jfn (t) f (t)j  =2:


But this is exactly what we want: 8 > 0 9N 8n > N sup jfn (t) f (t)j  =2 < .
5.8 Completion. (Not really part of the course, but: : : ) If (X; d) is any metric space there is a metric space
^ d^), such that (X;
(X; ^ d^) is complete and there is a dense subset Y  X^ such that (Y; d^Y ) is isometric to
(X; d). Moreover, there is only one such (X; ^ d^) up to isometry (in other words, any other such space is
isometric to that one).
This means that if I've got an incomplete metric space there is a unique way to make it a little bit bigger so
that it becomes complete. (X; ^ d^) is called the completion of X with respect to the metric d. You only need
to know one example: R, with the usual metric, is (by de nition if you like) the completion of Q with the
usual metric. If you do this with the p-adic metric on Q instead you get a kind of alternative Reality called
Q p : this unlikely-looking object turns out to be very important in number theory.
The way you make X^ is this: you de ne it to be the set of all Cauchy sequences in X , modulo an equivalence
relation that says that two Cauchy sequences are the same if they really ought to have the same limit. So

14
(an ) (bn ) (where (an ) and (bn ) are Cauchy sequences in (X; d)) if and only if nlim
!1 d(an ; bn ) = 0, and
elements of X^ are equivalence classes: X is inside X^ because you think of x 2 X as corresponding to the
constant sequence at x. To de ne d^ you simply say that d^([(an )]; [(bn )]) = lim d(an ; bn ). You then have to
n!1
check that this all makes sense and really de nes a metric space, etc. It isn't hard.
5.9 Completeness, unlike most other things we've mentioned, is not a topological property. That is, in order
to tell whether a metric space is complete or not it's not enough to know what the open sets are: you
really have to know what the metric is. For instance, take N with the discrete metric. That is complete,
because the only Cauchy sequences are the eventually constant sequences and they converge. Every subset
S S
is open because fng = B1 (n) for any n 2 N and if A  N then A = n2A fng = n2A B1 (n), which is
open. But if we take the metric on N where the distance between successive points is d(n; n + 1) = 1=n2 ,
P 1
so d(n; m) = m 2 Pm 1 2 P1 2
r=n 1=r , then the sequence (an ) = n is Cauchy (because r=n 1=r < r=n 1=r <  if n
is large enough). On the other hand every set is still open, because fng = B1=2n2 (n). So this new metric
space has exactly the same open sets as the old one, and therefore exactly the same convergent sequences,
but not the same Cauchy sequences: in particular, (n) does not converge though it is Cauchy.

6. Contractions.

6.1 Suppose (X; d) and (X 0 ; d0 ) are metric spaces. We say that a map f : X ! X 0 satis es a Lipschitz
condition if there is a a constant k , 0  k < 1 (the Lipschitz constant) such that

8x; y 2 X d0 f (x); f (y)  kd(x; y):
For instance, if f is an isometry then f satis es a Lipschitz condition with k = 1 (and moreover the inequality
is actually an equality).
If f satis es a Lipschitz condition then f is automatically continuous, so we don't need to specify this in
the de nition. It is easy to see this: if k = 0 then f is constant and therefore continuous, and if k > 0 then,

given  > 0, we take Æ = =k . Then if d(x; y ) < Æ we have d0 f (x); f (y ) < kÆ =  so f is continuous.
6.2 A contraction or contraction mapping is a map f : X ! X 0 which satis es a Lipschitz condition with
0  k < 1.

To say that f is a contraction is not the same as saying 8x; y 2 X d0 f (x); f (y ) < d(x;y ): it's stronger
 d0 f (x); f (y)
than that. If all we know is that d0 f (x); f (y ) < d(x; y ) then possibly sup = 1, but for a
 x;y d(x; y)
d0 f (x); f (y)
contraction we have sup < 1.
x;y d(x; y)
6.3 If f : R ! R is di erentiable and jf 0 (t)j  k for all t 2 R then f satis es a Lipschitz condition with
constant k . This follows from the Mean Value Theorem: if a < b then

d f (a); f (b)
=
jf (b) f (a)j = jf 0 ( )j
d(a; b) b a

d f (a); f (b)
for some  2 (a; b), so  k. If k < 1 then f is a contraction.
d(a; b)
6.4 If X is any set and f : X ! X is any map then a xed point of f is an element x 2 X such that f (x) = x.
6.5 Theorem. (The Contraction Mapping Theorem, also known as the Banach Fixed-Point Theorem.) If
(X; d) is a complete metric space and f : X ! X is a contraction then

15
(i) f has a unique xed point  2 X ;
(ii) if a0 2 X and an = f (an 1 ) for n 2 N then an !  as n ! 1.
Proof: Let k < 1 be the Lipschitz constant (we may as well assume k > 0 as the case k = 0 is the trivial

case of a constant map). We shall prove (ii) rst, so we choose a point a0 2 X .


Notice rst of all that
d(an ; an+1 )  kn d(a0 ; a1 ):
This is easy to prove by induction: the case n = 0 is trivial and

d(an+1 ; an+2 ) = d f (an ); f (an+1 )
 kd(an ; an+1 )
 kn+1 d(a0 ; a1 ):
I claim that the sequence (an ) is Cauchy. If m > n we have

X1
m
d(an ; am )  d(ar ; ar+1 )
r=n
X1
m
 kr d(a0 ; a1 )
r=n
1 n
mX
= k n d(a0 ; a1 ) kr
r=0
kn
< d(a0 ; a1 )
1 k
which is less than  if n is large enough.
So, since (X; d) is complete, (an ) converges and we may write  = lim an . We need to check that  is a
n!1
xed point. But  
d ; f ( )  d(; an ) + d an ; f ( )

= d(; an ) + d f (an 1 ); f ( )
 d(; an ) + kd(an 1 ;  )
<  if n is suÆciently large.

So d ; f ( ) = 0, so  = f ( ).
It remains to show that there is no other xed point. If  0 is a xed point then

d(;  0 ) = d f ( ); f ( 0 )  kd(;  0 )

so either 1  k , which is impossible, or d(;  0 ) = 0.


6.6 In the case of a function f : R ! R with jf 0 (t)j  k < 1 this means that the equation f (x) = x always
has a unique solution. This can be proved directly using the mean value theorem, so what we have found
can be thought of as an extension of the mean value theorem. (There are other ways of thinking of it which
may be more illuminating.)
6.7 Simple iteration. In the case above the contraction mapping theorem tell us how to solve f (x) = x: make
a guess, a0 , and repeatedly apply f so as to get a better guess. For example, suppose f (x) = 13 ex on [0; 1].
Then f : [0; 1] ! [0; 1] since 31  13 ex  13 e < 1 if 0  x  1, and f 0 (x) = f (x) so jf 0 (x)j  13 e < 1. In other

16
words f : [0; 1] ! [0; 1] is a contraction mapping. Take a0 = 12 ; then a1 = f ( 21 ) = 13 e 2  0:5496, etc. But
1

it's rather slow: ten iterations gives a10  0:6182 and the correct solution is 0:61906 : : :.
6.8 The Newton-Raphson method. This is another way of solving equations iteratively and tends to be quite
quick. We are now in a position to say when it works (and why). Suppose f : R ! R is twice di erentiable.
Suppose that f 0 (x) 6= 0 for all x 2 R and that there is a k with 0  k < 1 such that

f (x)f 00 (x)

f 0 (x)2
k
for all x 2 R. Then f (x) = 0 has a unique solution  2 R, obtained by taking some starting value a0 and
putting an+1 = an ff ((aann)) (and then  = lim an ).
0
n!1
The point is that g ; R ! R given by g (x) = x ff ((xx)) is a contraction mapping because g 0 (x) = f (fx)(fx)(2x) ,
00

0 0

and g (x) = x if and only if f (x) = 0.


In actual practice one usually doesn't have such good behaviour for all x 2 R but only for x in some closed
interval X : then you have to check that g (x) is still in X .
6.9 Theorem. (Picard's Theorem ) If f : R2 ! R has continuous rst derivative then given x0 ; t0 2 R the
di erential equation with initial condition

x_ = f (t; x); x(t0 ) = x0

has a unique solution for t0 Æ  t  t0 + Æ if Æ is small enough.


By x_ I mean dxdt . This theorem means that we can always nd a solution locally to a simple di erential
equation like this, but things may go wrong after a long time.
Proof: We give R and R
2 the Euclidean metric and put

D = [t0 1; t0 + 1]  [x0 1; x0 + 1]  R2 ;
c = 1 + max fjf (t; x)j; (t; x) 2 Dg
 
@f
c0 = 1 + max (t; x) ; (t; x) 2 D :
@x
These maxima exist (because D is compact, see the next section): this is why we need to restrict attention
to D rather than working with the whole of R2 . However there is nothing very special about the precise
choice of D we have made. Choose Æ such that 0 < Æ < min( 1c ; c1 ): note that Æ < 1. Now we look at a closed
0

ball in C [t0 Æ; t0 + Æ ], putting

Z = fx 2 C [t0 Æ; t0 + Æ] j jx(t) x0 j  cÆ if jt t0 j  Æg:

Thus Z = BcÆ (x0 ), the closed ball in C [t0 Æ; t0 + Æ ] of radius cÆ with centre the constant function x0 .
Because Z is closed, it is complete. We de ne a map T : Z ! Z by
Z t

T (x)(t) = x0 + f s; x(s) ds
t0

for x 2 X , t 2 [t0 Æ; t0 + Æ ]. If we can prove that T has a xed point in Z we shall have solved our di erential
equation, because T (x) = x if and only if x_ = f (t; x) and x(0) = x0 . So we need to check that T : Z ! Z is
a contraction mapping.

17
First of all we need to check that T is indeed a map from Z to Z . So we must check that T (x) 2 Z if x 2 Z .
But Z t

jT (x)(t) x0 j = f s; x(s) ds

t0
Z t


jf s; x(s) j ds
t0
Z t


c ds
t0
 cÆ:
Then we need to check that T is a contraction mapping. If x; y 2 Z then for some t 2 [t0 Æ; t0 + Æ]
kT (x) T (y)k1 = jT (x)(t) T (y)(t)j
Z t
 
=
f s; x(s) f s; y(s) ds
t
Z 0 (Z )
t x(s) @f (s; w)

= dw ds
t0 y(s) @w
Z Z
t x(s)
@f (s; w)


t0


y(s) @w
dw ds

Z Z
t x(s)
@f (s; w)


t0


y(s) @w
dw ds

Z Z
t x(s)



c0 dw ds
t0 y(s)
Z t

=
c0 x(s) y(s) ds
j j
t0
Z t
0

k k c x y 1 ds
t0
 Æc0 kx yk1
and Æc0 < 1 so T is a contraction.

7. Compactness.

7.1 The Bolzano-Weierstrass theorem in real analysis says that a bounded sequence in R has a convergent
subseqence.
7.2 A metric space (X; d) is said to be sequentially compact if every sequence in X has a convergent subse-
quence. If A  X we say that A is compact if A is empty or if (A; dA ) is compact, where dA is the subspace
metric.
7.3 Any bounded closed interval [a; b]  R is sequentially compact. This is one way of stating the Bolzano-
Weierstrass theorem: if a  an  b and (anj ) is convergent then a  lim anj  b, so any sequence in [a; b]
j !1
has a subsequence which converges in [a; b]. But (0; 1] is not compact because the sequence an = 1=n does
not have a subsequence which converges in (0; 1].
7.4 Proposition. Suppose (X; d) is sequentially compact. Then
(i) X is complete;

18
(ii) X is bounded;
(iii) if Z  X is closed then Z is sequentially compact.
Proof: (i) If (an ) is a Cauchy sequence in X , then by sequential compactness it has a convergent subsequence

so by 5.3 (an ) is convergent.


(ii) Suppose X is not bounded. Then, given a1 ; : : : ; an 1 we can always choose an with d(an ; am ) > 1 for all
m < n. This sequence has no Cauchy subsequence since the distance between any two points of the sequence
is at least 1, so it has no convergent subsequence so X is not sequentially compact.
(iii) If (an ) is a sequence in Z then since X is sequentially compact there is a subsequence (anj ) such that
anj ! a 2 X as j ! 1. But since Z is closed, a 2 Z , so (anj ) is a convergent subsequence in Z .
7.5 Proposition. If (X; d) is any metric space and Z  X is sequentially compact then Z is closed and
bounded.
Proof: Z is bounded by 7.4(ii). Suppose Z is not closed. Then there is a sequence (an ) such that an ! a 62 Z ,

by 3.8. If Z is sequentially compact then there is a subsequence (anj ) with anj ! a0 2 Z . But by 2.6(d),
anj ! a, so a = a0 , so a 2 Z . This is a contradiction.
7.6 A complete bounded metric space need not be sequentially compact: for instance N with the discrete
metric is complete and bounded but an = n is an example of a sequence with no convergent subsequence.
7.7 For subsets of Rn (with the usual metric) things are simpler. By the Bolzano-Weierstrass theorem, a
closed bounded subset of R is sequentially compact: indeed, by 7.1 and 7.4 a subset Z  R is sequentially
compact if and only if it is closed and bounded (and closed subsets of R are the same as complete subsets of
R, by 5.6). It is easy to see that R can be replaced by Rn here (see 7.8 below). Thus \sequentially compact"
is the same as \closed and bounded" for subsets of Rn . However, this is a special fact about Rn (or C n ): it
doesn't work for all complete metric spaces.
7.8 Z1  Z2  X1  X2 is sequentially compact if and only if Z1 and Z2 are both sequentially compact.
This is quite straightforward. We may assume Z1 and Z2 are non-empty. If (an ; bn ) is a sequence in Z1  Z2
and (ani ; bni ) is a convergent subsequence then (ani ) is a convergent subsequence of (an ) in Z1 . So if Z1  Z2
is sequentially compact and (an ) is a sequence in Z1 , we take any point b 2 Z2 and take a convergent
subsequence (ani ; b) of the sequence (an ; b) in Z1  Z2 : then (ani ) is a convergent subsequence of (an ) in Z1 .
Conversely, suppose Z1 and Z2 are sequentially compact: let (an ; bn ) be a sequence in Z1  Z2 . Then (an )
has a convergent subsequence (ani ) tending to a, and bni has a convergent subsequence (bnij ) tending to b.
The subsequence (anij ; bnij ) tends to (a; b) in Z1  Z2 so Z1  Z2 is sequentially compact.
7.9 De nition. An open cover of a metric space (X; d) is a collection fU g 2A of open subsets of X such
S
that U = X .
2A
If Z  X we can say that an open cover of Z is an open cover of (Z; dZ ); but it is sometimes more useful
to think of an open cover of Z in this case as being a collection fU g 2A of open subsets of X such that
S
U  Z . By 3.12 this is essentially the same thing.
2A
7.10 De nition. A metric space (X; d) is said to be compact if every open cover has a nite subcover. That
S
is, given any open cover fU g of X there is a nite collection fU 1 ; : : : ; U N g such that N
i=1 U i = X .
This means that whenever you have an open cover you only actually need nitely many of the sets in it. It
cannot be emphasised strongly enough that this has to be true for every open cover, not just one you happen
to know about.
7.11 The way to use this is very often as follows: you have a condition which involves the choice of some
number Æ , depending on where in your metric space you are. You would like to be able to make the choice

19
uniformly, without having to know where you are rst (compare being able to chosse N rst in the de nition
of uniform convergence). You do know that once you've made a choice of Æ , say Æ , at a point x 2 X it will
work in some small neighbourhood of x (usually a ball), and you take these neighbourhoods to be your U s.
(For this reason the index set A is most often simply X .) Then you want to take the inf (or sup) of the Æ s:
in general you can't (or you can but you might get zero). But if you know that in practice you only need
nitely many of the U s you can take the sup or inf of those nitely many Æ s, which is all right.
7.12 Theorem A metric space (X; d) is compact if and only if it is sequentially compact.
We'll prove this later on (7.17).
7.13 Proposition. If Z is a compact metric space and f : Z ! R is continuous then f is bounded and
attains its bounds.
That is, there exists  2 Z such that f ( ) = sup f (x).
x2Z
Proof: If f is unbounded we can nd an 2 Z such that jf (an )j ! 1. But then we can nd a convergent
subsequence (ani ) with limit a 2 Z , and f (ani ) ! f (a) < 1, which is a contradiction.
If no such  exists then g (x) = (f (x) supt f (t)) 1 is a continuous (negative) function so it is bounded
below by M say. But then f (x)  supt f (t) 1=M for all x 2 Z and that contradicts the de nition of the
supremum.
7.14 A continuous image of a compact set is compact. That is, if f : X ! Y is continuous and Z  X is
compact then f (Z )  Y is compact.
This is easiest via sequential compactness. If (an ) is a sequence in f (Z ) then choose an 2 Z such that
f (an ) = bn . Then (an ) has a convergent subsequence ani ! a 2 Z and, applying f , we have bni ! f (a) 2
f (Z ).
7.15 The Heine-Borel theorem states (in the language we have now) that [0; 1] is a compact subset of R.
7.16 A circle is compact; so is a sphere or a torus. A sphere with a point missing is not compact. A closed
disc in C is compact; an open disc is not.
7.17 We shall now prove 7.12.
(Compact =) sequentially compact.) Suppose (an ) is a sequence in a compact metric space X and (an )
has no convergent subsequence. Then for each x 2 X there is an rx > 0 such that fn 2 N j an 2 Brx (x)g
is nite: if this were not true for some x we could choose a subsequence tending to x. The Brx (x) between
N
S
them cover X , so we choose a nite subcover, X = Brxi (xi ). If m > max (maxfn 2 N j an 2 Brx (x)g),
i=1 1iN
which exists since the sets are nite, then am 62 X , which is a contradiction.
(Sequentially compact =) compact.) Take any open covering fU j 2 Ag of X . For each x 2 X we de ne

r(x) = supfr > 0 j 9 such that Br (x)  U g:

This means that Br(x) (x) is (roughly speaking) the biggest ball around X that can be tted into one of the
patches in the cover. A really big ball might spread outside all the patches that contain x. It's possible that
r(x) = 1, that is, the set is unbounded, but that will make no di erence.
We then put s(x) = min( 12 r(x); 1). The 1 is put there to make sure that we are writing something nite:
the 21 (which could as well be any constant less than 1) is there to make sure s(x) isn't as big as r(x). By
de nition there are U s which contain Bs(x) (x): choose one of them for each x 2 X and call it U (x).
The idea is that we shall cover X with nitely many of the Bs(x) (x)s and therefore with nitely many of the
U (x)s. If we can do this we'll have shown that fU g has a nite subcover.

20
Suppose we can't do this. Then we can pick a sequence (an ) in X by starting with any a1 and requiring that
S
an 62 Bs(ai ) (ai ). Such an an must always exist, otherwise the rst n 1 of the Bs(ai ) (ai ) have covered X ,
i<n
which we supposed couldn't be done. Having got this sequence we can apply sequential compactness to
extract a subsequence (anj ) tending to a 2 X .
If m > n we have d(am ; an )  s(an ) since if d(am ; an ) < s(an ) then am 2 Bs(an ) (an ) which we forbade. So

d(a; anj ) = lim d(ank ; anj )  s(anj );


k!1
and, taking the limit as j ! 1, we get

0 = d(a; a)  lim s(anj )  0


j !1

so s(anj ) ! 0 as j ! 1.
On the other hand we can choose j 2 N such that d(anj ; a) < 21 s(a), and if we do that then Bs(a)=2 (anj ) 
Bs(a) (a)  U (a). (Check: if y 2 Bs(a)=2 (anj ) then d(y; a)  d(y; anj ) + d(anj ; a) < 12 s(a) + 12 s(a) = s(a), so
y 2 Bs(a) (a).) This means that r(anj )  12 s(a), since r(anj ) is as big as a ball centred at anj can be without
needing another patch to cover it, and the 12 s(a)-ball, we have just checked, needs only one patch, namely
U (a) . So
 
s(anj ) = min r(anj )=2; 1  min s(a)=4; 1 ;
but this is a positive constant so s(anj ) does not tend to zero.
Now we have reached a contradiction, so our assumption that we couldn't cover X with the Bs(x) (x)s must
have been false. This gives a nite subcover of fU g, so X is compact.

8. Connectedness.

8.1 Theorem. The following conditions on a metric space (X; d) are equivalent:
(i) X = X0 [ X1 with X0 ; X1 open and nonempty and X0 \ X1 = ;.
(ii) X = X0 [ X1 with X0 ; X1 closed and nonempty and X0 \ X1 = ;.
(iii) There exists a continuous function f : X ! E , where E has the discrete metric, such that f is not
constant.
Proof: (i) is equivalent to (ii) because if X0 and X1 are both open (or both closed) then X0 = X n X1 and

X1 = X n X0 are both closed (or both open).


(i) implies (iii) because f (x) = i if x 2 Xi is such a function; (iii) implies (i) because we can take Xi = f 1 (i)
(calling two of the points of E by the names 0 and 1).
8.2 A metric space X is said to be disconnected if one (and hence all) of the conditions 8.1(i){(iii) holds. If
they do not hold (that is if no such decomposition or function exists) then X is said to be connected. X is
said to be locally connected if every point of X has a connected neighbourhood.
8.3 If a discrete metric space has more than one point then it is disconnected, since we can take X0 = fxg.
R with the usual metric is connected because of the intermediate value theorem: the function that takes the
value 0 on X0 and 1 on X1 is continuous so by the intermediate value theorem it takes some other values as
well, which is a contradiction. Rn is also connected, as we shall see in a moment (it follows at once from 8.4).
8.4 Proposition. If X and Y are connected then X  Y is connected.

21
Proof: If X  Y is disconnected let f : X  Y ! E be nonconstant, E discrete. Choose y 2 Y and consider
gy (x) = f (x; y). This is a continuous function gy : X ! E , so it is constant, say gy (x) = h(y). But now
h : Y ! E is continuous, as h(y) = f (x; y) for any x 2 X , and so it is also constant. But that means f is
constant.
8.5 If X 0  X is closed, open and connected then X 0 is said to be a connected component of X . Any locally
connected metric space X can be written uniquely as a disjoint union of connected components, namely as
the union of all the connected components of X . Any two di erent connected components X 0 , X 00 of X
must be disjoint, as if X 0 \ X 00 6= ;; X 0 then X 0 is disconnected as X 0 = (X 0 \ X 00 ) [ (X 0 n X 00 ). By \locally
connected" I mean that every point x 2 X has a connected neighbourhood.
8.6 A metric space X is path-connected if given any two points x0 ; x1 2 X there is a continuous map
: [0; 1] ! X such that (0) = x0 and (1) = x1 .
8.7 Proposition. If X is path-connected then it is connected.
Proof: If X is disconnected then there is a nonconstant continuous function f : X ! E . Put h(x) = 1 if

x > 1, 0 if x < 0, x otherwise: this is a continuous function h : R ! [0; 1]. Then f Æ Æ h : R ! E is a


nonconstant continuous function R ! E , contradicting 8.3.
8.8 The converse is false: the set

f(x; y) 2 R2 j x  0; y = sin(1=x) if x 6= 0g
is connected but not path-connected. But this doesn't often happen.

22

You might also like