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 \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 \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 \to \infty} x_n$.

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


 * $\displaystyle \left\Vert{f \left({x}\right)}\right\Vert = \left\Vert{f \left({\lim_{n \to \infty} x_n}\right)}\right\Vert = \left\Vert{\lim_{n \to \infty} f \left({x_n}\right)}\right\Vert = \lim_{n \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
If $f$ is continuous in a compact interval $\left[{a \,.\,.\, b}\right]$, then: $\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)$, $ \forall \ x \in \left[{a \,.\,.\, b}\right] $.

PROOF

BOUNDING $f \left({x}\right)$

First, we must prove that $f \left({x}\right)$ is bounded in the compact interval $\left[{a \,.\,.\, b}\right]$. Let's proof by contradiction that $f \left({x}\right)$ has un upper bound. Supposing that $f \left({x}\right)$ does not have an upper bound, then: for every $ \ N \in \R $, there $ \exists \ x_n \in \left[{a \,.\,.\, b}\right]:$ such that $f \left({\left \langle {x_n} \right \rangle}\right) > \ N $, for $ \ x \in \left[{a \,.\,.\, b}\right]$.

Because $ \N \subset \R $, there is no loss of generality if we consider $ \ N \in \N $. Now we should consider the sequence $\left \langle {f(\left \langle {x_n} \right \rangle)} \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$, then: $\left \langle {f(\left \langle {x_n} \right \rangle)} \right \rangle_{n \in \N}$ > $\infty$ $\implies$ $\left \langle {f(\left \langle {x_n} \right \rangle)} \right \rangle_{n \in \N} $ $\to$ $\infty $.

Considering now 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 in effect, $f \left({x}\right)$ is continous 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(x_n)} \right \rangle_{n \in \N} $ $\to$ $ \infty $, so its imposible that  $\left \langle {f(g_n)} \right \rangle_{n \in \N} $ $\to \ d$.

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

What is left for us to prove is that, there $\exists \ d \in \left[{a \,.\,.\, b}\right] $, such that $f \left({x}\right) \le f \left({d}\right)$, where $f \left({d}\right) = \ N $ (the maximum).

Claim $ \ N - 1/n < f \left({\left \langle {x_n} \right \rangle }\right) $ $ \le \ N $ for $ \ n \in \R $, $n \ne \ 0 $. Proof of claim : As said before, there is no loss in generality if we consider n $\in \N $. Let $\ I$ represent the set of the codomain of $ f \left({x}\right) $, $ \forall \ x  \in \left[{a \,.\,.\, b}\right] $. Because $\ N$ is the set's maximum and $ \ N - 1/n < \ N $, there is $\ y_n \in \left[{a \,.\,.\, b}\right] $, such that $ \ N - 1/n < \ y_n < \ N $, for every $n \in \N$. But $y_n \in \ I$, so, there $ \exists \ x_n \in \left[{a \,.\,.\, b}\right] $ for every $ \ n \in \N$, that means:  $f \left({\left \langle {x_n} \right \rangle }\right))= y_n$ $\implies  \ N - 1/n <  f \left({x_n}\right) \le \ N $

Now, it is easy to see that $\left \langle {f(\left \langle {x_n} \right \rangle)} \right \rangle \to \ N $. Considering $\left \langle {N - 1/n} \right \rangle \to \ N$, as n $\to \infty$, and $\left \langle {N} \right \rangle \to \ N, \forall n \in \N $, by $\left \langle {N-1/n} \right \rangle $ < $ \left \langle {f(\left \langle {x_n} \right \rangle)} \right \rangle \le \ N $ $\implies \left \langle {f(\left \langle {x_n} \right \rangle)} \right \rangle \to \ $\left \langle {N} \right \rangle $$

Let's now consider $\left \langle {x_n} \right \rangle $, because it is bounded, by Bolzano-Weierstrass_Theorem  we know there exists a subsequence $\left \langle {s_n} \right \rangle $ that converges; let's say it converges to $ \ l$. Because $\left \langle {s_n} \right \rangle \in \left[{a \,.\,.\, b}\right]$ then, $ \ 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(x_n)} \right \rangle \to \ N \implies \left \langle {f(s_n)} \right \rangle_{n \in \N} \to \ N \iff f \left({d}\right)=N $.