Extreme Value Theorem

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

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

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


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

where $\left\Vert{f \left({x}\right)}\right\Vert$ denotes the norm of $f \left({x}\right)$.

Moreover, $\left\Vert{f}\right\Vert$ attains its minimum and maximum.

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

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

Let $\displaystyle A = \inf_{x \mathop \in X} \left\Vert{f \left({x}\right)}\right\Vert$.

It follows from the definition of infimum that there exists a sequence $\left\langle{y_n}\right\rangle$ in $X$ such that:
 * $\displaystyle \lim_{n \mathop \to \infty} \left\Vert{f \left({y_n}\right)}\right\Vert = A$

By Sequence of Implications of Metric Space Compactness Properties, $X$ is sequentially compact.

So there exists a convergent subsequence $\left\langle{x_n}\right\rangle$ of $\left\langle{y_n}\right\rangle$.

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

Since $f$ is continuous and a norm is continuous, it follows by Composite of Continuous Mappings is Continuous that:


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

So $\left\Vert{f}\right\Vert$ attains its minimum at $x$.

By replacing the infimum with the supremum in the definition of $A$, we also see that $\left\Vert{f}\right\Vert$ attains its maximum by the same reasoning.

Extreme Value Theorem for a Real Function
Let $f$ is continuous in a compact interval $\left[{a \,.\,.\, b}\right]$.

Then:
 * $\forall x \in \left[{a \,.\,.\, b}\right]: \exists x_s \in \left[{a \,.\,.\, b}\right]: f \left({x_s}\right) \le f \left({x}\right)$


 * $\forall x \in \left[{a \,.\,.\, b}\right]: \exists x_n \in \left[{a \,.\,.\, b}\right]: f \left({x_n}\right) \ge f \left({x}\right)$

Proof
First it is shown that $f \left({x}\right)$ is bounded in the compact interval $\left[{a \,.\,.\, b}\right]$.

$f \left({x}\right)$ has no upper bound.

Then for all $x \in \left[{a \,.\,.\, b}\right]$:
 * $\forall N \in \R: \exists x_n \in \left[{a \,.\,.\, b}\right]: f \left({\left \langle {x_n} \right \rangle}\right) > N$

We have that $\N \subset \R$

, we can consider $N \in \N$.

Consider the sequence:
 * $\left \langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle_{n \in \N}$

and the sequence:
 * $\left \langle {N} \right \rangle_{N \in \N}$

Because:
 * $f \left({\left \langle {x_n} \right \rangle}\right) > N$

and:
 * $\left \langle {N} \right \rangle_{N \in \N} \to \infty$

it follows that:
 * $\left\langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle_{n \in \N} > \infty \implies \left \langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle_{n \in \N} \to \infty$.

Consider the sequence:
 * $\left \langle {x_n} \right \rangle \in \left[{a \,.\,.\, b}\right]$

It is obviously bounded.

So by the Bolzano-Weierstrass_Theorem there exists a subsequence of $\left \langle {x_n} \right \rangle $:
 * $\left \langle {g_n} \right \rangle \to d$

Since $\left[{a \,.\,.\, b}\right]$ is closed:
 * $d \in \left[{a \,.\,.\, b}\right]$

By Continuity of Mapping between Metric Spaces by Convergent Sequence, then:
 * $f \left({x}\right)$ is continuous in $d$

and:
 * $f \left({\left \langle {g_n} \right \rangle}\right) = f \left({d}\right)$

But our first conlusion indicates that:
 * $\left \langle {f \left({x_n}\right)} \right \rangle_{n \in \N} \to \infty$

which contradicts:
 * $\left \langle {f \left({g_n}\right)} \right \rangle_{n \in \N} \to d$

A similar argument can be used to prove the lower bound.

It remains to be proved that:
 * $\exists d \in \left[{a \,.\,.\, b}\right]: f \left({x}\right) \le f \left({d}\right)$

where $f \left({d}\right) = N$ (the maximum).

It will be shown that:
 * $\forall n \in \R_{\ne 0}: N - 1/n < f \left({\left \langle {x_n} \right \rangle }\right) \le N$

as follows;

, consider $n \in \N$.

Let $I$ denote the codomain of $f \left[{a \,.\,.\, b}\right]$.

Because $N$ is its maximum and $N - 1/n < N$:
 * $\forall n \in \N: \exists y_n \in \left[{a \,.\,.\, b}\right]: N - 1/n < y_n < N$

But $y_n \in I$, so:
 * $\forall n \in \N: \exists x_n \in \left[{a \,.\,.\, b}\right]$

That means:
 * $f \left({\left \langle {x_n} \right \rangle}\right) = y_n \implies N - 1/n < f \left({x_n}\right) \le \ N$

It follows that:
 * $\left \langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle \to N$

Considering:
 * $\left \langle {N - 1/n} \right \rangle \to \ N$ as $n \to \infty$

and:
 * $\forall n \in \N: \left \langle {N} \right \rangle \to N$

by:
 * $\left \langle {N - 1/n} \right \rangle < \left \langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle \le N \implies \left \langle {f \left({\left \langle {x_n} \right \rangle}\right)} \right \rangle \to \left \langle {N} \right \rangle$

Consider $\left \langle {x_n} \right \rangle$.

Because it is bounded, by Bolzano-Weierstrass Theorem there exists a subsequence:
 * $\left \langle {s_n} \right \rangle$

that converges.

Let it converge to $l$.

Because $\left \langle {s_n} \right \rangle \in \left[{a \,.\,.\, b}\right]$ it follows that:
 * $l \in \left[{a \,.\,.\, b}\right]$.

Finally, $f \left({x}\right) $ is continuous in $\left[{a \,.\,.\, b}\right]$.

So, by Continuity of Mapping between Metric Spaces by Convergent Sequence:
 * $\left \langle {s_n} \right \rangle \to d \implies f \left({\left \langle {s_n} \right \rangle}\right) \to f \left({d}\right)$

But:
 * $\left \langle {f \left({x_n}\right)} \right \rangle \to N \implies \left \langle {f \left({s_n}\right)} \right \rangle_{n \in \N} \to N \iff f \left({d}\right) = N$