# Continuous Image of Compact Space is Compact/Corollary 3

## Corollary to Continuous Image of Compact Space is Compact

Let $S$ be a compact topological space.

Let $f: S \to \R$ be a continuous real-valued function.

Then $f$ attains its bounds on $S$.

## Proof 1

By Continuous Image of Compact Space is Compact: Corollary 2, $f \left({S}\right)$ is bounded.

$\sup \left({f \left({S}\right)}\right) \in \operatorname {cl} \left({f \left({S}\right)}\right)$
$\inf \left({f \left({S}\right)}\right) \in \operatorname {cl} \left({f \left({S}\right)}\right)$

From Continuous Image of Compact Space is Compact, $f \left({S}\right)$ is compact in $\R$.

From Non-Closed Set of Real Numbers is not Compact, it follows from the Rule of Transposition that $f \left({S}\right)$ is closed in $\R$.

$f \left({S}\right) = \operatorname {cl} \left({f \left({S}\right)}\right)$

Hence the result that:

$\sup \left({f \left({S}\right)}\right) \in f \left({S}\right)$

and:

$\inf \left({f \left({S}\right)}\right) \in f \left({S}\right)$

$\blacksquare$

## Proof 2

By Continuous Image of Compact Space is Compact, $f \left({S}\right)$ is compact.

From Compact Metric Space is Complete and Compact Metric Space is Totally Bounded, $f \left({S}\right)$ is complete and totally bounded.

Hence both the supremum and the infimum of $f \left({S}\right)$ exist in $\R$.

Because $f \left({S}\right)$ is complete:

$\sup f \left({S}\right) \in f \left({S}\right)$

and:

$\inf f \left({S}\right) \in f \left({S}\right)$

$\blacksquare$