Extreme Value Theorem

Definition
Let $X$ be a compact metric space and $Y$ a normed vector space.

Let $f : X \to Y$ be a continuous function.

Then $f$ is bounded, and there exist $x, y \in X$ such that:


 * $\forall z \in X: \left\|{f \left({x}\right)}\right\| \le \left\|{f \left({z}\right)}\right\| \le \left\|{f \left({y}\right)}\right\|$

That is, $f$ attains its minimum and maximum.

Proof
By Continuous Image of a Compact Space is Compact, $f \left({X}\right) \subseteq Y$ is compact.

Therefore by Compact Subspace of Metric Space is Bounded $f$ is bounded.

By Countably Compact Metric Space is Sequentially Compact, $f \left({X}\right)$ is sequentially compact.

Let $A = \inf \left\{{ \left\|{f \left({x}\right)}\right\| : x \in X}\right\}$, and $ \left \langle{x_n}\right \rangle_{n \in \N}$ a sequence such that $\left\|{f \left({x_n}\right)}\right\| \to A$.

Let $\displaystyle w = \lim_{n \to \infty} x_n$.

Since $f$ is continuous we have:


 * $\displaystyle f \left({w}\right) = f \left({\lim_{n \to \infty} x_n}\right) = \lim_{n \to \infty} f \left({x_n}\right) = A$

So $f$ attains its minimum at $w$.

By replacing $\inf$ with $\sup$ in the definition of $A$ we also see that $f$ attains its maximum.