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:


 * $\|f(x)\| \leq \|f(z)\| \leq \|f(y)\|\quad \forall z \in X$

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

Proof
By Continuous Image of a Compact Space is Compact, $f(X) \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(X)$ is sequentially compact.

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

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

Since $f$ is continuous we have:


 * $\displaystyle f(w) = f\left( \lim_{n \to \infty} x_n \right) = \lim_{n \to \infty} f(x_n) = 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.