2.5. COMPACTNESS AND CONTINUOUS FUNCTIONS 53

Note that x must be a limit point of D( f ) in order to take the limit at x. This will beclear from the next proposition which says that the limit, if it exists, is well defined.

Proposition 2.5.24 Let x be a limit point of D( f ) where f : D( f ) ⊆ X → Y as in theabove definition. If limy→x f (x) = z and limy→x f (y) = ẑ, then z = ẑ.

Proof: Let δ be small enough to go with ε/3 in the case of both z, ẑ. Then, since x is alimit point, there exists y ∈ B(x,δ )∩D( f ) ,y ̸= x. Then

ρ (z, ẑ)≤ ρ (z, f (y))+ρ ( f (y) , ẑ)<2ε

3< ε

Since ε is arbitrary, this shows that z = ẑ. ■

2.5.3 The Extreme Value Theorem and Uniform ContinuityThese topics work in any metric space or even more general settings. First is a theoremwhich says that the continuous image of a compact set is compact.

Theorem 2.5.25 Let f : X → Y where (X ,d) and (Y,ρ) are metric spaces and f iscontinuous on X. Then if K ⊆ X is compact, it follows that f (K) is compact in (Y,ρ).

Proof: Let C be an open cover of f (K) . Denote by f−1 (C ) the sets{f−1 (U) : U ∈ C

}.

Each of these is an open set by Theorem 2.5.19. Then f−1 (C ) is an open cover of K. Itfollows there are finitely many, {

f−1 (U1) , · · · , f−1 (Un)}

which covers K. It follows that {U1, · · · ,Un} is an open cover for f (K). ■The following is the important extreme values theorem for a real valued function de-

fined on a compact set.

Theorem 2.5.26 Let K be a compact metric space and suppose f : K → R is acontinuous 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 2.5.27 Let f : (X ,d)→ (Y,ρ) be a function. Then it is said to be uni-formly continuous on X if for every ε > 0 there exists a δ > 0 such that whenever x, x̂ aretwo points of 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.