Max and Min of Function on Closed Real Interval

Theorem
Let $f$ be a real function which is continuous on the closed interval $\left[{a. . b}\right]$.

Then $f$ reaches a maximum of $d$ and a minimum of $c$ on $\left[{a. . b}\right]$.

Proof
From Image of Closed Real Interval is Bounded, we have that $f$ is bounded on $\left[{a. . b}\right]$.

Let $d$ be the supremum of $f$ on $\left[{a. . b}\right]$.

Consider a sequence $\left \langle {x_n} \right \rangle$ in $\left[{a. . b}\right]$ such that $\left|{f \left({x_n}\right)}\right| \to d$ as $n \to \infty$.

From the corollary to Limit of Sequence to Zero Distance Point, this can always be found.

Now $\left[{a. . b}\right]$ is a closed interval

So from Convergent Subsequence in Closed Interval, $\left \langle {x_n} \right \rangle$ has a subsequence $\left \langle {x_{n_r}} \right \rangle$ which converges to some $\xi \in \left[{a. . b}\right]$.

Because $f$ is continuous on $\left[{a. . b}\right]$, it follows from Limit of Image of Sequence that $f \left({x_{n_r}}\right) \to f \left({\xi}\right)$ as $r \to \infty$.

So $f \left({\xi}\right) = d$ and thus the supremum $d$ is indeed a maximum.

A similar argument shows that the infimum is a minimum.