162 CHAPTER 7. METRIC SPACES AND TOPOLOGICAL SPACES

Lemma 7.11.7 Suppose xn→ x and yn→ y. Then d (xn,yn)→ d (x,y).

Proof: Consider the following.

d (x,y)≤ d (x,xn)+d (xn,y)≤ d (x,xn)+d (xn,yn)+d (yn,y)

sod (x,y)−d (xn,yn)≤ d (x,xn)+d (yn,y)

Similarlyd (xn,yn)−d (x,y)≤ d (x,xn)+d (yn,y)

and so|d (xn,yn)−d (x,y)| ≤ d (x,xn)+d (yn,y)

and the right side converges to 0 as n→ ∞.There is a remarkable result concerning compactness and uniform continuity.

Theorem 7.11.8 Let f : (X ,d)→ (Y,ρ) be a continuous function and let K be a compactsubset of X. Then the restriction of f to K is uniformly continuous.

Proof: First of all, K is a metric space and f restricted to K is continuous. Nowsuppose it fails to be uniformly continuous. Then there exists ε > 0 and pairs of points xn, x̂nsuch that d (xn, x̂n) < 1/n but ρ ( f (xn) , f (x̂n)) ≥ ε . Since K is compact, it is sequentiallycompact and so there exists a subsequence, still denoted as {xn} such that xn→ x∈K. Thenalso x̂n→ x also and so

ρ ( f (x) , f (x)) = limn→∞

ρ ( f (xn) , f (x̂n))≥ ε

which is a contradiction. Note the use of Lemma 7.11.7 in the equal sign.Next is to consider the meaning of convergence of sequences of functions. There are

two main ways of convergence of interest here, pointwise and uniform convergence.

Definition 7.11.9 Let fn : X → Y where (X ,d) ,(Y,ρ) are two metric spaces. Then { fn} issaid to converge poinwise to a function f : X → Y if for every x ∈ X ,

limn→∞

fn (x) = f (x)

{ fn} is said to converge uniformly if for all ε > 0, there exists N such that if n≥ N, then

supx∈X

ρ ( fn (x) , f (x))< ε

Here is a well known example illustrating the difference between pointwise and uniformconvergence.

Example 7.11.10 Let fn (x) = xn on the metric space [0,1] . Then this function convergespointwise to

f (x) ={

0 on [0,1)1 at 1

but it does not converge uniformly on this interval to f .