82 CHAPTER 3. METRIC SPACES

Theorem 3.7.2 Let K be a compact metric space and suppose f : K→R is a contin-uous function. That is, R is the metric space where the metric is given by d (x,y) = |x− y|.Then f achieves its maximum and minimum values on K.

Proof: Let λ ≡ sup{ f (x) : x ∈ K} . Then from the definition of sup, you have the ex-istence of a sequence {xn} ⊆ K such that limn→∞ f (xn) = λ . There is a subsequence stillcalled {xn} which converges to some x ∈ K. From continuity, λ = limn→∞ f (xn) = f (x)and so f achieves its maximum value at x. Similar reasoning shows that it achieves itsminimum value on K. ■

Definition 3.7.3 Let f : (X ,d)→ (Y,ρ) be a function. Then it is said to be uniformlycontinuous on X if for every ε > 0 there exists a δ > 0 such that whenever x, x̂ are two pointsof X with d (x, x̂)< δ , it follows that ρ ( f (x) , f (x̂))< ε.

Note the difference between this and continuity. With continuity, the δ could dependon x but here it works for any pair of points in X .

There is a remarkable result concerning compactness and uniform continuity.

Theorem 3.7.4 Let f : (X ,d) → (Y,ρ) be a continuous function and let K be acompact subset 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 by Lemma 3.2.6, ρ ( f (x) , f (x)) = limn→∞ ρ ( f (xn) , f (x̂n)) ≥ ε

which is a contradiction. ■

3.8 Lipschitz Continuity and Contraction MapsThe following may be of more interest in the case of normed vector spaces, but there isno harm in stating it in this more general setting. You should verify that the functionsdescribed in the following definition are all continuous.

Definition 3.8.1 Let f : X → Y where (X ,d) and (Y,ρ) are metric spaces. Thenf is said to be Lipschitz continuous if for every x, x̂ ∈ X , ρ ( f (x) , f (x̂)) ≤ rd (x, x̂). Thefunction is called a contraction map if r < 1.

The big theorem about contraction maps is the following.

Theorem 3.8.2 Let f : (X ,d) → (X ,d) be a contraction map and let (X ,d) bea complete metric space. Thus Cauchy sequences converge and also d ( f (x) , f (x̂)) ≤rd (x, x̂) where r < 1. Then f has a unique fixed point. This is a point x ∈ X such thatf (x) = x. Also, if x0 is any point of X , then

d (x,x0)≤d (x0, f (x0))

1− r

Also, for each n,

d ( f n (x0) ,x0)≤d (x0, f (x0))

1− r,

and x = limn→∞ f n (x0).