How does compactness relate to continuity? It turns out that the continuous image of a
compact set is always compact. This is an easy consequence of the above major
theorem.
Theorem 2.7.1Let f : X → Y where
(X,d)
and
(Y,ρ)
are metric spaces andf is continuous on X. Then if K ⊆ X is compact, itfollows 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}
.
Then f^{−1}
(C )
is an open cover of K. It follows there are finitely many,
{ }
f− 1(U1 ),⋅⋅⋅,f−1(Un )
which covers K. It follows that
{U ,⋅⋅⋅,U }
1 n
is an open cover for f
(K )
. ■
The following is the important extreme values theorem for a real valued function defined
on a compact set.
Theorem 2.7.2Let K be a compactmetric space and suppose f : K → ℝis a continuous function. That is, ℝ is the metric space where the metric is given byd
(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 existence of a sequence
{xn}
⊆ K such that lim_{n→∞}f
(xn)
= λ. There is a
subsequence still called
{xn}
which converges to some x ∈ K. Therefore, from continuity,
λ = lim_{n→∞}f
(xn)
= f
(x)
and so f achieves its maximum value at x. Similar reasoning
shows that it achieves its minimum value on K. ■
Definition 2.7.3Let f :
(X,d)
→
(Y, ρ)
be a function. Then it is said to beuniformly continuouson X if for every ε > 0 there exists a δ > 0 such that wheneverx,
ˆx
are two 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 depend on x
but here it works for any pair of points in X.
There is a remarkable result concerning compactness and uniform continuity.
Theorem 2.7.4Let f :
(X, d)
→
(Y,ρ)
be a continuous function and let K bea compact 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. Now suppose
it fails to be uniformly continuous. Then there exists ε > 0 and pairs of points x_{n},
ˆx
_{n} such
that d
(xn,xˆn )
< 1∕n but ρ
(f (xn),f (xˆn ))
≥ ε. Since K is compact, it is sequentially
compact and so there exists a subsequence, still denoted as
{xn}
such that x_{n}→ x ∈ K. Then
also
ˆx
_{n}→ x also and so
ρ(f (x),f (x)) = lim ρ(f (xn),f (ˆxn)) ≥ ε
n→ ∞
which is a contradiction. Note the use of Lemma 2.2.5 in the equal sign. ■