The Extreme Value Theorem for Cts. Fns. on Comp. Sets of Met. Sps.

# The Extreme Value Theorem for Continuous Functions on Compact Sets of Metric Spaces

Recall from the Continuous Functions on Compact Sets of Metric Spaces page that if $(S, d_S)$ and $(T, d_T)$ are metric spaces, $X \subseteq S$ is a compact subset of $S$, and $f : S \to T$ is continuous, then the image $f(X)$ is a compact subset of $T$.

Furthermore, we also noted that since $f(X)$ is a compact subset of $T$ that then $f(X)$ is also closed in $T$, bounded in $T$, and every infinite subset of $f(X)$ has an accumulation point.

We will now apply this theorem to state a more generalized Extreme Value Theorem for a metric space that maps into $\mathbb{R}$ with the usual Euclidean metric.

Theorem 1 (The Extreme Value Theorem): Let $(S, d_S)$ and $(\mathbb{R}, d)$ be metric spaces where $d$ is the usual Euclidean metric defined for all $x, y \in \mathbb{R}$ by $d(x, y) = \mid x - y \mid$. Also let $X \subseteq S$ be a compact subset of $S$, and $f : S \to T$ be continuous on all of $X$. Then $f(X)$ is closed and bounded in $T$ and $f$ achieves its supremum and infimum on $X$, that is, there exists $p, q \in X$ such that $f(p) = \sup \{ f(x) : x \in X \}$ and $f(q) = \inf \{ f(x) : x \in X\}$. |

**Proof:**Since $X \subseteq S$ and $f : S \to T$ is continuous on all of $X$ we have by the theorem summarized about that $f(X)$ is a compact subset of $T$ and is also closed and bounded in $T$. We only need to prove that there exists $p, q \in S$ such that $f(p) = \sup \{ f(x) : x \in X \}$ and $f(q) = \inf \{ f(x) : x \in X \}$.

- Let $L = \sup \{ f(x) : x \in X \}$. Then $L$ is the least upper bound of $f$ as $x$ ranges through $X$. For all $x \in X$ we then have that $f(x) \leq L$. Furthermore, since $L$ is the least upper bound, we have that for all $\epsilon > 0$ that there exists an $x_{\epsilon} \in X$ such that $L - \epsilon \leq f(x_{\epsilon})$ (if not, then $L - \epsilon$ would be an upper bound of $f(x)$ that is less than $L$ which would be a contradiction. Hence:

\begin{align} \quad L - \epsilon \leq x_{\epsilon} \leq L \end{align}

- So, for all $\epsilon > 0$ we have that $B(L, \epsilon) \cap f(X) \neq \emptyset$, so $L$ is an adherent point of $f(X)$. But $f(X)$ is closed in $T$ and contains all of its adherent points, so there exists a $p \in X$ such that:

\begin{align} \quad f(p) = L = \sup \{ f(x) : x \in X \} \end{align}

- Similarly let $l = \inf \{ f(x) : x \in X \}$. Then $l$ is the greatest lower bound of $f$ as $x$ ranges through $X$. For all $x \in X$ we then have that $l \leq f(x)$. Furthermore, since $l$ is the greatest lower bound we have that for all $\epsilon > 0$ that there exists an $x_{\epsilon} \in X$ such that $f(x) \leq l + \epsilon$ (if not, then $l + \epsilon$ would be a lower bound of $f(x)$ that is greater than $l$ which would be a contradiction to $l = \inf \{ f(x) : x \in X \}$. Hence:

\begin{align} \quad l \leq f(x_{\epsilon}) \leq l + \epsilon \end{align}

- So for all $\epsilon > 0$ we have that $B(l, \epsilon) \cap f(X) \neq \emptyset$, so $l$ is an adherent point of $f(X)$. But $f(X)$ is closed in $T$ and contains all of its adherent points, so there exists a $q \in X$ such that:

\begin{align} \quad f(q) = l = \inf \{ f(x) : x \in X \} \quad \blacksquare \end{align}