18
2. Metric Spaces 2.1 Definitions etc. The procedure in Section 0 for regarding R as a topological space may be generalized to many other sets in which there is some kind of distance (formally, sets with a metric). For example in R 2 the distance between (x 1 ,y 1 ) and (x 2 ,y 2 ) is (x 1 - x 2 ) 2 +(y 1 - y 2 ) 2 . Notation For sets X and Y the product X × Y is {(x, y ) | x X,y Y }, i.e. the set of pairs (x, y ) with first entry in X and the second entry in Y . Definition Let X be a set. A metric on X is a map d : X × X R satisfying the properties: (i) d(x, y ) 0 for all (x, y) X × X and d(x, x) = 0 if and only if x = y; (ii) d(x, y)= d(y, x) for all x, y X ; (iii) d(x, z) d(x, y)+ d(y,z) for all x, y, z X . Definition A metric space if a pair (X, d), where X is a set and d is a metric on X . Condition (iii) is called the triangle inequality. Examples 1. X = R , d(x, y)= |x - y|. 16

2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Embed Size (px)

Citation preview

Page 1: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

2. Metric Spaces

2.1 Definitions etc.

The procedure in Section 0 for regarding R as a topological space may be generalized

to many other sets in which there is some kind of distance (formally, sets with a metric).

For example in R 2

the distance between (x1, y1) and (x2, y2) is√

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

Notation For sets X and Y the product X × Y is {(x, y) |x ∈ X, y ∈ Y }, i.e. the set of

pairs (x, y) with first entry in X and the second entry in Y .

Definition Let X be a set. A metric on X is a map d : X × X → R satisfying the

properties:

(i) d(x, y) ≥ 0 for all (x, y) ∈ X ×X and d(x, x) = 0 if and only if x = y;

(ii) d(x, y) = d(y, x) for all x, y ∈ X;

(iii) d(x, z) ≤ d(x, y) + d(y, z) for all x, y, z ∈ X .

Definition A metric space if a pair (X, d), where X is a set and d is a metric on X.

Condition (iii) is called the triangle inequality.

Examples 1. X = R , d(x, y) = |x− y|.

16

Page 2: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

(Properties (i),(ii) are obvious and |x− z| = |(x− y) + (y − z)| ≤ |x− y|+ |y − z| proves

(iii).)

2. X = C , d(z, ω) = |z − ω| (where |z| =√x2 + y2 for z = x+ iy).

Exercise Suppose A,B,C ∈ R and Ax2 − 2Bx+ C ≥ 0 for all x ∈ R . Show A ≥ 0 and

B2 ≤ AC.

3. Let X = R n, where n is a positive integer.

For x = (x1, x2, . . . , xn) and y = (y1, y2, . . . , yn) let

d(x, y) =

√√√√n∑

i=1

(xi − yi)2.

Lets prove (iii) in this case ((i) and (ii)) are obvious. We have to prove that

√√√√n∑

i=1

(xi − zi)2 ≤

√√√√n∑

i=1

(xi − yi)n +

√√√√n∑

i=1

(yi − zi)2

for all real numbers xi, yi, zi. Let si = xi − yi, ti = yi − zi so the above is true provided

that, for all real numbers si, ti, we have

√√√√n∑

i=1

(si + ti)2 ≤

√√√√n∑

i=1

s2i +

√√√√n∑

i=1

t2i .

This true provided that the inequality is still satisfied when we square both sides, i.e. we

need only shown∑

i=1

(si + ti)2 ≤

n∑

i=1

s2i +

n∑

i=1

t2i + 2

√√√√n∑

i=1

s2i

√√√√n∑

i=1

t2i

i.e.∑n

i=1 siti ≤√∑n

i=1 s2i

√∑ni=1 t

2i , or

(n∑

i=1

siti)2 ≤ (

n∑

i=1

s2i )(n∑

i=1

t2i ) (†).

This is a well known inequality (called the Cauchy-Schwartz inequality) and we now demon-

strate its validity. We haven∑

i=1

(ti − xsi)2 ≥ 0

17

Page 3: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

i.e.

x2n∑

i=1

s2i − 2xn∑

i=1

siti +n∑

i=1

t2i ≥ 0

for all x ∈ R . Setting A =∑n

i=1 s2i , B =

∑ni=1 siti, C =

∑ni=1 t

2i we get B2 ≤ AC , by the

exercise above. Hence (†) holds.

4. Take X = R n again with

d(x, y) = max{|xi − yi| : 1 ≤ i ≤ n}

for x = (x1, x2, . . . , xn), y = (y1, y2, . . . , yn), where max{a1, a2, . . . , ar} denotes the maxi-

mum value of real numbers a1, a2, . . . , ar.

Again (i),(ii) are obvious. Now show (iii). Let z = (z1, z2, . . . , zn) then we have

d(x, z) = max{|xi − zi| : 1 ≤ i ≤ n}

= |xj − zj |

for some j and we have

|xj − zj | ≤ |xj − yj |+ |yj − zj |

≤ max{|xi − yi| : 1 ≤ i ≤ n}+ max{|yi − zi| : 1 ≤ i ≤ n}

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

so that d(x, z) ≤ d(x, y) + d(y, z), as required.

5. Take X = R n again with d(x, y) =∑n

i=1 |xi − yi|. It is easy to check that this is

metric.

So we now have three ways to regard R n as a metric space. Note that if n = 1 the

metrics are all the same, otherwise they are different.

6. Let X = C[0, 1], the set of all continuous real-valued functions on the closed interval

[0, 1]. For f, g ∈ X we define

d(f, g) =

∫ 1

0

|f (t)− g(t)|dt.

To check property (i) we shall need the following:

18

Page 4: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

(*) If q : [0, 1] → R is continuous, if q(t) ≥ 0 for all t ∈ [0, 1] and if∫ 1

0f (t)dt = 0 then

q(t) = 0 for all t ∈ [0, 1].

So lets prove (*). Assume q(t) 6= 0 for some t and derive a contradiction. Thus q(t0) 6= 0

for some t0 ∈ [0, 1]. Let α = q(t0). Since q is continuous there exists a δ > 0 such that

|q(t) − q(t0)| < α/2 for all t ∈ [0, 1] such that |t− t0| < α/2 (1).

Since t0 ∈ [0, 1] we can choose δ so small that either [t0− δ/2, t0] ⊂ [0, 1] or [t0, t0 + δ/2] ⊂[0, 1] (or both).

By (1) we have −α/2 < q(t)− q(t0) < α/2, i.e.

−α/2 < q(t)− α < α/2

for all t ∈ [0, 1] such that |t− t0| < δ/2. Thus we have q(t) ≥ α/2 for all such t. Hence if

[t0 − δ/2, t0] ⊂ [0, 1] then

∫ 1

0

q(t)dt ≥∫ t0

t0−δ/2q(t)dt ≥

∫ t0

t0−δ/2

α

2dt =

δ/2.α

2> 0

- a contradiction.

Similarly, if [t0, t0 + δ/2] ⊂ [0, 1] we get

∫ 1

0

q(t)dt ≥∫ t0+δ/2

t0

q(t)dt ≥∫ t0+δ/2

t0

α

2dt =

α/2.δ

2> 0

- a contradiction. So the claim (*) is proven.

Now check that d(f, g) =∫ 1

0|f (t)− g(t)|dt is a metric.

(i) Clearly d(f, g) ≥ 0. If d(f, g) = 0 then∫ 1

0|f (t)− g(t)|dt = 0 so that

∫ 1

0q(t) = 0, where

q(t) = |f(t)− g(t)| and by (*) we get q(t) = 0 for all t, i.e. f(t) = g(t) for all t, i.e. f = g.

(ii) d(f, g) = d(g, f ) is clear.

(iii) For f, g, h ∈ X we have

d(f, h) =

∫ 1

0

|f(t)− h(t)|dt

=

∫ 1

0

|f(t)− g(t) + g(t)− h(t)|dt

≤∫ 1

0

(|f (t)− g(t)|+ |g(t)− h(t)|)dt

= d(f, g) + d(g, h).

19

Page 5: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

7. Let X be any set. Define d : X ×X → R by

d(x, y) =

{1, if x 6= y;0, if x = y.

It is easy to check that d is a metric. It is called the discrete metric on X.

8. Let X be a set and let x0 be some fixed element of X. We define d : X ×X → R be

d(x, y) =

{2, if x 6= y, x 6= x0 and y 6= x0;1, if x 6= x0 and y = x0 or if x = x0 and y 6= x0;0, if x = y.

Check d is a metric. It is called the star metric.

9. More generally let G = (V,E) be a connected graph (with vertex set V and edge set

E). For x, y ∈ V we define d(x, y) to be the smallest length n of a sequence of vertices

v0, v1, . . . , vn such that v0 = x, vn = y and {vi, vi+1} is an edge for 0 ≤ i < n. (So

v0, v1, . . . , vn is an edge sequence joining x to y.) Then d : V × V → R is a metric on V .

Suppose that (X, d) is a metric space. We want to regard X as a topological space. For

x ∈ X and r > 0 we define

Bd(x; r) = {y ∈ X | d(x, y) < r}

the open ball around x of radius r. We define U ⊂ X to be “open” if for each x ∈ U

there exists some r > 0 such that Bd(x; r) ⊂ U . (Since we haven’t yet proved that the

“open” sets form a topology we call them “open” rather than open.) Write simply B(x; r)

for Bd(x; r) when no confusion is likely to result.

20

Page 6: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

(2.1a) Proposition The “open” sets form a topology.

Proof (i) ∅ is “open” (there is nothing to check) and X is open since for each x ∈ X we

have B(x; 1) ⊂ X .

(ii) Suppose that U and V are “open”. We must show that U⋂V is too. Let x ∈ U

⋂V .

Since U is “open” we have B(x; r1) ⊂ U for some r1 > 0. Since V is “open” we have

B(x; r2) ⊂ V for some r2 > 0. Thus B(x; r) = B(x; r1)⋂B(x2; r2) ⊂ U

⋂V , where

r = min{r1, r2} and so U⋂V is “open”.

(iii) Suppose that {Ui | i ∈ I} is a collection of “open” sets. Let U =⋃i∈I Ui and let x ∈ U .

Then we have x ∈ Uj for some j ∈ I and hence B(x; r) ⊂ Uj for some r > 0 and we get

B(x; r) ⊂ Uj ⊂ U and U is “open”.

Note Since “open” sets form a topology we call them open sets now.

Remark For x ∈ X and r > 0, B(x; r) is open.

Proof Let U = B(x; r). Let y ∈ U . Then d(x, y) = α, say, with α < r. Then

B(y; r−α) ⊂ U (for t ∈ B(y; r− α) implies d(x, t) ≤ d(x, y) + d(y, t) < α+ (r−α) = r so

B(y; r − α) ⊂ U).

Definition Let (X, d) be a metric space. Let Td be the collection of subsets U of X

such that for each x ∈ U there exists r > 0 with B(x; r) ⊂ U . Then (X,Td) is called the

topological space defined by the metric d and call Td the topology on X defined by d.

Sometimes different metrics on a set give rise to the same topology.

Definition Let d1, d2 be metrics on a set X . We say that d1 and d2 are equivalent if

they define the same topology, i.e. if Td1 = Td2 .

(2.1b) Proposition Suppose that metrics d1, d2 on X are such that for some λ > 0 we

have1

λd1(x, y) ≤ d2(x, y) ≤ λd1(x, y)

for all x, y ∈ X. Then d1 and d2 are equivalent.

Proof Let T1 be the topology defined by d1 (i.e. T1 = Td1) and let T2 be the topology

defined by d2 (i.e. T2 = Td2). We must show that a subset U of X belongs to T1 if and

only if it belongs to T2.

21

Page 7: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Suppose U belongs to T1. Let x ∈ U . There there exists some r > 0 such that Bd1(x; r) ⊂U , i.e.

{y ∈ X | d1(x, y) < r} ⊂ U.

Consider B2(x; r/λ). If y ∈ Bd2(x; r/λ) then d2(x, y) < r/λ. But 1λd1(x, y) ≤ d2(x, y) and

so, for y ∈ Bd2(x; r/λ) we have d1(x, y) ≤ λd2(x, y) < λ.r/λ = r. Hence y ∈ Bd1(x; r)

whenever y ∈ Bd2(x; r/λ). But Bd1(x; r) ⊂ U and so Bd2(x; r/λ) ⊂ Bd1(x; r) ⊂ U . Thus,

for x ∈ U , there exists some r′ > 0 (namely r′ = r/λ) such that Bd2 ⊂ U . Thus U is open

in the topology determined by d2, i.e. U ∈ T1 implies U ∈ T2.

Now suppose that U ∈ T2. For x ∈ U there exists some r > 0 with Bd2(x; r) ⊂ U . Now

if d1(y, x) < r/λ we have

d2(x, y) ≤ λd1(x, y) < λ.r

λ= r

so Bd1(x; r/λ) ⊂ Bd2(x; r) ⊂ U , and so U ∈ T1.

Thus U ∈ T1 if and only if U ∈ T2 and hence T1 = T2.

(2.1c) Proposition The three metrics on R n, of examples 3,4,5 above, are equivalent.

Proof We have three metrics d1, d2, d3 given by

d1(x, y) =

√√√√n∑

i=1

(xi − yi)2

d2(x, y) = max{|xi − yi| : i = 1, 2, . . . , n}

d3(x, y) =

n∑

i=1

|xi − yi|

for x = (x1, x2, . . . , xn), y = (y1, y2, . . . , yn).

Note that

d1(x, y) =

√√√√n∑

i=1

(xi − yi)2

√√√√n∑

i=1

d2(x, y) (since |xi − yi| ≤ d2(x, y) for all i)

=√nd2(x, y) ≤ nd2(x, y)

22

Page 8: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

so that

d1(x, y) ≤ nd2(x, y) (1).

Also we haved2(x, y) = max{|xi − yi| : i = 1, 2, . . . , n}

= |xj − yj | for some j

=√

(xj − yj)2

√√√√n∑

i=1

(xi − yi)2 = d1(x, y)

and so d2(x, y) ≤ d1(x, y) and certainly

d2(x, y) ≤ nd1(x, y) (2).

Combining (1) and (2) we get

1

nd2(x, y) ≤ d1(x, y) ≤ nd2(x, y)

and so d1 and d2 are equivalent, by (2.1b).

Clearly d2(x, y) ≤ d3(x, y) and so

1

nd2(x, y) ≤ d3(x, y) (3).

Also, d3(x, y) =∑n

i=1 |xi − yi| and each |xi − yi| ≤ d2(x, y) so that

d3(x, y) ≤ nd2(x, y) (4).

Combining (3) and (4) we have

1

nd2(x, y) ≤ d3(x, y) ≤ nd2(x, y)

so that d2 and d3 are equivalent.

We have now shown that d1 and d2 define the same topology and that d2 and d3 define

the same topology and hence d1, d2, d3 all define the same topology, i.e. d1, d2, d3 are

equivalent.

Remark There are three obvious ways to define distance in R n (i.e. d1, d2, d3) but only

one obvious topology (involving distance). So the topology seem to be more natural than

distance.

23

Page 9: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Definition We call the topology on R n defined by d1, d2 and d3 the natural topology.

When is a map between metric space continuous ? Continuity is characterized by the

ε, δ condition just as it is for maps from R to R .

(2.1d) Proposition Let (X1, d1), (X2, d2) be metric spaces and let f : X1 → X2 be a

map. Then f is continuous if and only if for each x ∈ X1 and ε > 0 there exists a δ > 0

such that d2(f (x), f(y)) < ε whenever d1(x, y) < δ.

Proof (⇒) Suppose f is continuous and let x ∈ X1, ε > 0. Then V = Bd2(f (x); ε) is

open in X2. Let U = f−1V . Then U is open in X1, by the continuity of f . Now x ∈ U

(since f (x) ∈ V ) so we have Bd1(x; δ) ⊂ U for some δ > 0. Thus, for any y ∈ Bd1(x; δ), we

have f(x) ∈ Bd2(f (x); ε), in other words we have d2(f (x), f(y)) < ε whenever d1(x, y) < δ.

(⇐) Suppose f satisfies the “ε, δ” condition. Let V be open in X2 and let U = f−1V . We

must show that U is open. Let x ∈ U . Then f(x) ∈ V and since V is open there is an ε > 0

such that Bd2(f (x); ε) ⊂ V . By hypothesis there exists δ > 0 such that d2(f(x), f (y)) < ε

whenever d1(x, y) < δ, i.e. f (y) ∈ Bd2(f (x); ε) whenever y ∈ Bd1(x; δ), in other words

Bd1(x; δ) ⊂ f−1Bd2(f (x); ε). Thus we have Bd1(x; δ) ⊂ f−1Bd2(f (x); ε) ⊂ U . Hence U is

open, i.e. f−1V is open in X1 whenever V is open in X2. Hence f is continuous.

Before going further with metric spaces we make a useful general observation on topo-

logical spaces.

(2.1e) Lemma A subset V of a topological space X is open if and only if for each x ∈ V

there exists an open set Ux of X with x ∈ Ux ⊂ V .

Proof (⇒) Assume V is open. Then we can take Ux = V for each x ∈ V .

(⇐) Assume that for each x ∈ V there exists an open set Ux with Ux ⊂ V . Then we have

V =⋃x∈V Ux, so V is a union of open sets and hence open.

We now return to metric space theory. Let (X, d) be a metric space and let Z be a

subset of X. Defining dZ : Z × Z → R to be the restriction of d (i.e. dZ(p, q) = d(p, q)

for p, q ∈ Z) we have a metric space (Z, dZ). We can regard Z as a topological space via

the subspace topology induced from X, or we can regard Z as a topological space with

topology induced by the metric dZ . In fact these topologies are the same.

24

Page 10: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

We check this now. Let T be the topology on X determined by the metric d. Let S1 be

the subspace topology on Z and let S2 be the topology on Z determined by the metric dZ .

We have to show that every set is S1 = S2, in other words that every set in S1 is also in S2,

and vice versa. So let U ∈ S1. Then U = V⋂Z for some V ∈ T . Let x ∈ U . Then x ∈ V

so we have Bd(x; r) ⊂ V for some r > 0. Hence BdZ (x; r) = Z⋂Bd(x; r) ⊂ Z

⋂V = U .

This proves that U ∈ S2. Suppose conversely that U ∈ S2 and let x ∈ U . Then we have

BdZ (x; r) ⊂ U for some r > 0, in other words Z⋂Bd(x; r) ⊂ U . Putting Ux = Z

⋂Bd(x; r)

we have that Ux is open in the subspace topology S1. By (2.1e) we have that U is open in

the subspace topology S1, i.e. U ∈ S1, as required.

In particular any subspace Z of R has topology given by the usual distance d(x, y) =

|x− y|, for x, y ∈ Z.

Consider f : R → (0,∞) given by

f(x) =

{1/(1− x), x ≤ 0;1 + x, x ≥ 0.

Then f is continuous at x < 0, since 11−x is continuous on (−∞, 0) and f is continuous

at x > 0 as 1 + x is continuous .

At x = 0, f (0) = 1 and

|f (y) − f(0)| =∣∣ y

1−y∣∣ < |y| if y < 0

and

|f(y)− f (0)| = |y| if y > 0.

Hence, given ε > 0, we have |f(y) − f(0)| < ε for all y such that |y| < ε. So the ε, δ

condition is satisfied at 0. Hence f : R → (0,∞) is continuous . Leave it to you to check

that the function g : (0,∞) → R given by

g(y) =

{y−1y , if 0 < y ≤ 1;

y − 1, if y ≥ 1

is the inverse of f and is continuous . Hence f is a homeomorphism. (You could also use

the maps log and exp to get inverse homeomorphisms (0,∞) → R and R → (0,∞)).

(2.1f) Proposition All open intervals (a, b) (with a < b), (a,∞), and (−∞, a) (for

a ∈ R ) are homeomorphic to R .

25

Page 11: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Proof The map f : (0, 1) → (1,∞), f (x) = 1/x is a homeomorphism, with inverse

g(x) = 1/x. Hence (0, 1) is homeomorphic to (1,∞). Also (1,∞) is homeomorphic to

(0,∞) via the maps f : (1,∞)→ (0,∞), f (x) = x−1 and g : (0,∞) → (1,∞), g(x) = x+1.

Hence R is homeomorphic to (0, 1). We have already seen that all (a, b) are homeomorphic

to (0, 1) so that all (a, b) are homeomorphic to R .Now (a,∞) is homeomorphic to (0,∞) via the map f(x) = x− a (with inverse g(x) =

x+a). So (a,∞) is homeomorphic to (0,∞) which is homeomorphic to R and hence (a,∞)

is homeomorphic to R .Finally, (−∞, a) is homeomorphic to (−a,∞) via f (x) = −x (with inverse g(x) = −x)

and (−a,∞) is homeomorphic to R . Hence (−∞, a) is homeomorphic to R . Hence all open

intervals (bounded or not) are homeomorphic to R .

26

Page 12: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

2.2 Closed Sets

Definition Let X be a topological space. A subset Z of X is closed if its complement

CX (Z) = {x ∈ X |x 6∈ Z} is an open set.

Example For a < b the set [a, b] is closed in R since CR ([a, b]) = (−∞, a)⋃

(b,∞) is the

union of two open sets hence open.

(2.2a) Example In a metric space X the closed ball E(x; r) = {y ∈ X | d(x, y) ≤ r} is

closed, for all x ∈ X, r > 0.

Proof Let U = CX(E(x; r)) = {y ∈ X | d(x, y) > r}. We shall show that U is open (and

hence E(x; r) is closed).

Let y ∈ U and put s = d(x, y)− r. We claim that B(y; s) ⊂ U . For z ∈ B(y; s) we have

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

and d(z, y) < s = d(x, y)− r so

d(x, y) < d(x, z) + d(x, y)− r

and hence d(x, z) > r, i.e. z ∈ U . Hence we have B(y; s) ⊂ U and U is open so E(x; r) is

closed.

27

Page 13: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

(2.2b) Let X be a set and let {Ai | i ∈ I} be a collection of subsets of X. Then we have:

(i) CX(⋃i∈I Ai) =

⋂i∈I CX(Ai); and

(ii) CX(⋂i∈I Ai) =

⋃i∈I CX (Ai).

Proof (i) x ∈ LHS ⇐⇒ x 6∈⋃i∈I Ai ⇐⇒ for each i ∈ I we have x 6∈ Ai ⇐⇒ for

each i ∈ I we have x ∈ CX(Ai) ⇐⇒ x ∈⋂i∈I CX (Ai) = RHS.

(ii) x ∈ LHS ⇐⇒ x 6∈⋂i∈I Ai ⇐⇒ x 6∈ Ai for some i ∈ I ⇐⇒ x ∈ CX (Ai) for some

i ∈ I ⇐⇒ x ∈⋃i∈I CX(Ai) = RHS.

(2.2c) Proposition Let X be a topological space. Then:

(i) ∅ and X are closed;

(ii) if Y and Z are closed sets then Y⋃Z is closed;

(iii) if {Zi | i ∈ I} is any collection of closed sets then⋂i∈I Zi is closed.

Proof (i) CX (∅) = X which is open, so ∅ is closed.

CX (X) = ∅ which is open so X is closed.

(ii) CX(Y⋃Z) = CX(Y )

⋂CX(Z), the intersection of two open sets hence open and so

Y⋃Z is closed.

(iii) CX(⋂i∈I Zi) =

⋃i∈I CX (Zi), a union of open sets and hence open. Thus

⋂i∈I Zi is

closed.

Note that in general there are subsets which are neither open nor closed, e.g. (0, 1]

is not open since there is no r > 0 such that B(1; r) ⊂ (0, 1] and it is not closed since

CX ((0, 1]) = (−∞, 0]⋃

(1,∞) and there is no r such that B(0; r) ⊂ CX ((0, 1]).

Definition Let X be a topological space and let V be a subset of X . Let V be the

intersection of all closed subsets which contain V . The set V is called the closure of V .

(2.2d) Note V is closed and if Z is any closed set containing V then V ⊂ Z. So V is

the smallest closed set containing V .

This is because, by definition, V is an intersection of closed sets hence closed by (2.2c)(ii).

If V ⊂ Z with Z closed then V is an intersection of closed sets one of which is Z so V ⊂ Z.

Example Let X = {a, b, c, d, e} and let T consist of the empty set together with all

subsets of X which contain a. Find the closure of {a, b} and of {c, d, e}.

28

Page 14: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Definition Let X be a topological space and let V be a subset of X. We say that V is

a dense subset of X (or V is dense in X) if V = X.

(2.2e) Proposition The set of rational numbers is dense in R .

We will give the proof of this after the following exercise.

(2.2f) Exercise Between any two real numbers there is a rational number.

Proof Let α, β ∈ R with α < β.

Case (i) α is rational. Then α+1/n < β for some positive integer n and α+1/n is rational.

Case (ii) α irrational.

Choose a positive integer q such that q(β − α) > 1. Thus we have

1 + qα < qβ.

Let p be the smallest integer greater than or equal to qα. So we have p − 1 < qα and so

p < 1 + qα < qβ. Hence we have

qα ≤ p < qβ.

But qα 6= p (because α is irrational) so that

qα < p < qβ

and α < p/q < β.

We now prove (2.2e). Let Q be the set of rational numbers. Let Z = Q and assume for a

contradiction that Z 6= R . Let U be the complement of Z in R . Then U 6= ∅ and so there

is some x ∈ U and we have B(x; r) ⊂ U . Thus there are no rational numbers between

x− r and x+ r. This is not true, by the Exercise, so we must have Z = R , i.e. Q = R , i.e.

Q is dense.

2.3 Closed sets in a metric space

29

Page 15: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

We shall describe the closure of a subset of a metric space in terms of limits of elements.

Definition Let (X, d) be a metric space and let (xn) be a sequence of points in X. We

say that (xn) converges to x ∈ X, and write x = lim xn if for every ε > 0 there exists an

integer N such that d(x, xn) < ε for all n ≥ N . We say that x is a limit of (xn) and write

xn → x.

(2.3a) A sequence has at most one limit.

Proof Let (xn) be a sequence. Suppose x, y ∈ X are both limits of the sequence.

Suppose for a contradiction that x 6= y. Let r = d(x, y). Take ε = r/2. Then there exists

some N1 such that d(xn, x) < r/2 for all n ≥ N1 and there exists some N2 such that

d(xn, y) < r/2 for all n ≥ N2. Let n be an integer such that n ≥ N1 and n ≥ N2. Then

we have d(xn, x) < r/2 and d(xn, y) < r/2. Thus we get

r = d(x, y) ≤ d(x, xn) + d(xn, y) < r/2 + r/2 = r

and so r < r, a contradiction. Thus we have x = y.

Remark In view of (2.3a) if (xn) converges to x we now call x the limit of the sequence

(xn).

Examples (i) Taking X = R with the usual metric we have all the usual examples, e.g.

xn = 1/n converges to 0

Not every sequence converges, e.g. taking xn = (−1)n, the sequence is−1,+1,−1,+1, . . .

(which does not converge).

(ii) Take X = C[0, 1] (our Example 6 of a metric space, in Section 2.1). Let fn = 1n sin(nx).

We claim fn converges to 0 (the zero function). We have

d(fn, 0) =

∫ 1

0

|fn(x)− 0|dx

=

∫ 1

0

1

n| sin(nx)|dx ≤

∫ 1

0

1

ndx

=1

n.

Hence we have d(fn, 0) ≤ 1n . For ε > 0, choose N > 1

ε then, for all n ≥ N , we get n > 1ε

so 1n< ε and d(fn, 0) ≤ 1

n< ε. Hence fn → 0.

30

Page 16: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

(2.3b) Lemma Let Z be a closed subset of a metric space X. If x ∈ X is the limit of a

sequence of points in Z then x ∈ Z.

Proof We assume x is the limit of the sequence (xn), with xn ∈ Z for all n ≥ 1. If x 6∈ Z

then x ∈ U , where U is the complement of Z in X. Since U is open we would then have

B(x; r) ⊂ U for some r > 0. But since x = lim xn, for some N we have xn ∈ B(x; r) for

all n ≥ N . In particular xN ∈ B(x; r) ⊂ U . But xN ∈ Z and U is the complement of Z so

this is impossible.

We can now describe the closure in terms of limits.

(2.3c) Proposition Let S be a subset of a metrix space X. Then S̄ is the set of all

x ∈ X such that x is the limit of some sequence of elements of S.

Proof If x is the limit of a sequence of points in S then x is the limit of a sequence of

points in S̄ so x ∈ S̄, by (2.3b).

We now suppose that x ∈ S̄ and show that x can be written as the limit of a sequence

of points in S. If x ∈ S we have x = lim xn, where all xn = x. So now suppose x ∈ S̄\S.

Let n ≥ 1 and consider U = B(x; 1/2n). Then CX (U) is closed. If S ⊂ CX(U) then

S̄ ⊂ CX(U) (since S̄ is the smallest closed set containing S). But this is not true because

x ∈ S̄ would then give x ∈ CX(U) (whereas in fact x ∈ U). So S is not contained in

CX (U), i.e. the there is an element in both S and U . Choose one and call it xn. Then

xn ∈ S and d(x, xn) < 1/2n. This gives x = lim xn, with all xn ∈ S, as required.

Definition Let S be a subset of a metric space X. A limit point of S is the limit of a

convergent sequence of points of S.

Example Let X = R (with the natural topology) and S = {1, 1/2, 1/3, . . .}. Then 0 is

a limit point of S (because 0 = lim1/n).

We can make (2.3c) a bit more explicit as follows.

(2.3d) Proposition Let S be a subset of a metrix space X. Then S̄ is the union of S

and the set of all limit points of S.

31

Page 17: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

Proof Let S∗ be the union of S and the set of all limit points of S. Then S∗ ⊂ S̄, by

(2.3c). We need to show S̄ ⊂ S∗. We know that x = lim xn for some convergent sequence

(xn) of elements of S (by (2.3c)). We have to show x ∈ S∗. There are two cases to consider.

Case (i) : Suppose the set {x1, x2, x3, . . .} is finite.

(For example in R this could happen if x1 = 2, x2 = −33, x3 = 7 and xn = 13 for all

n ≥ 4.) Let α1, α2, . . . , αr be elements of S such that, for each n, we have xn is one of

α1, α2, . . . , αr. Let ε = min{d(x,α1), d(x,α2), . . . , d(x,αr)}.If ε = 0 then x = αi for some i, in particular x = αi ∈ X , as required.

If ε > 0 then, by definition of convergence, there exists an N such that d(xn, x) < ε for

all n ≥ N . Thus d(x, xN ) < ε. But xN = αj for some j so we get d(x, αj) < ε. But ε

is the minimum among d(x,α1), d(x,α2), . . . , d(x,αr) so this is impossible. So this never

happens, i.e. we must have ε = 0 and x = αi for some i, so x ∈ S.

Case (ii) : Suppose the set {x1, x2, x3, . . .} is infinite.

Let y1 = x1. Let y2 be the first xn different from y1, and generally let yr be the first

xn different from y1, y2, . . . , yr−1. [For example if our sequence is (1, 1, 2,−1, 3, 3, 4, 2, . . .)

then y1 = 1, y2 = 2, y3 = −1, y4 = 3, y5 = 4, . . ..]

By construction all the yr are distinct and, for each r we have yr = yn for some n ≥ r.

Let ε > 0. Then there exists N such that d(xn, x) < ε for all n ≥ N . Hence, for r ≥ N ,

we haved(x, yr) = d(x, xn) for some n ≥ r and hence n ≥ N

< ε.

Hence yr → x. Thus (yr) is a sequence of distinct terms in S converging to x. Hence x is

a limit point of S and so x ∈ S∗.

Example 1 Lets work out the closure of S = {1, 1/2, 1/3, . . .} in R . First work out its

limit points. There is an obvious one, namely 0 = lim1/n.

Suppose that x is a limit point of S, so that x = limxn for s sequence (xn) of distinct

points of S. Let ε > 0. Then there exists a positive integer N1 such that

|x− xn| < ε for n > N1.

Let K be a positive integer such that 1/K < ε. Since the elements xn are distinct we have

xn ∈ {1, 1/2, . . . , 1/K} for only finitely many values of n. So we may choose N2 such that

for all n ≥ N2 we have xn 6∈ {1, 1/2, . . . , 1/K}. So if n > N2 then xn = 1/r for some

r > K and so xn = 1/r < 1/K < /ep. Now let N be the maximum of N1 and N2. For

32

Page 18: 2. Metric Spaces 2.1 Definitions etc. - QMUL Mathsbill/topchapter2.pdf · Notation For sets X and Y the product X ×Y ... R and Ax2 − 2Bx+C ≥ 0 for all x ∈ R . Show A ≥ 0

n > N we have |xn − x| < ε and |xn| < ε so that |x| = |(x− xn) + xn| < ε+ ε = 2ε. But

this is true for all ε > 0 so |x| = 0 and hence x = 0.

Thus 0 is the only limit point of S.

Suppose now that α is a limit point and α = limxn, where (xn) is a sequence of distinct

points in S. Let ε > 0 and let K be a positive integer such that 1/K ≤ ε. Since (xn) is

a sequence of distinct terms, xn can only belong to {1, 1/2, 1/3, . . . , 1/K} for only finitely

many values of n, say xn1 , xn2 , . . . , xnr ∈ {1, 1/2, 1/3, . . .} and xn 6∈ {1, 1/2, 1/3, . . .} if n

is different from n1, n2, . . .. Thus if n is different form n1, n2, . . . , nr then xn = 1/k, for

some k > K and xn = 1/k < 1/K ≤ ε. Thus |xn| < ε for all n ≥ N = max{n1, n2, . . . , nr}and so xn → 0, i.e. 0 = limxn. Hence 0 is the only possible limit point of S. So

{x ∈ R | x is a limit point of S} = {0}

and, by (2.3d), we have S = {0, 1, 1/2, 1/3, . . .}.

Example 2 Let S = (0, 1). Find the set of limit points of S, and find S.

First note that [0, 1] is closed and so S ⊂ [0, 1], (2.2d). Hence, by (2.3d) Theorem, every

limit point of S belongs to [0.1]. Note also 0 = lim 1/n, 1 = lim(1− 1/2n) so that 0 and 1

are limit points of S. Let α ∈ (0, 1). Then α = limxn, where xn = α−α/2n, so that every

α ∈ (0, 1) is a limit point. Hence [0, 1] is the set of limit points of (0, 1) and so S = [0, 1],

by (2.3d)Theorem.

33