Continuous Image of Compact Space is Compact/Corollary 3

Corollary to Continuous Image of Compact Space is Compact
Let $f: S \to \R$ be a real-valued function.

If $S$ is a compact space, then $f$ attains its bounds on $S$.