[proofplan]
Let $M$ be the ordinary supremum of $|f|$ on the compact interval $[a,b]$, and let $m$ be the essential supremum of $|f|$ with respect to [Lebesgue measure](/page/Lebesgue%20Measure) restricted to $[a,b]$. The inequality $m \leq M$ follows immediately from the pointwise bound $|f| \leq M$. For the reverse inequality, continuity and compactness give a point $x_0$ where $|f|$ attains $M$; continuity then forces $|f|$ to stay above $M-\varepsilon$ on a relative interval of positive Lebesgue measure. Therefore no number below $M$ can be an essential upper bound, so $m \geq M$.
[/proofplan]
[step:Define the two norms as a supremum and an essential supremum]
Define $M \in [0,\infty)$ by
\begin{align*}
M := \sup_{x \in [a,b]} |f(x)|.
\end{align*}
Since $f: [a,b] \to \mathbb{R}$ is continuous on a compact interval, $|f|: [a,b] \to 0,\infty)$ is continuous and bounded, so $M<\infty$. By the definition of the [[uniform norm](/page/Uniform%20Norm) on $C([a,b])$,
\begin{align*}
\|f\|_\infty = M.
\end{align*}
Define $m \in 0,\infty)$ using the [essential supremum by
\begin{align*}
m := \|f\|_{L^\infty([a,b],\lambda)} = \operatorname{ess\,sup}_{x \in [a,b]} |f(x)|.
\end{align*}
Equivalently,
\begin{align*}
m = \inf \{c \in [0,\infty) : |f(x)| \leq c \text{ for } \lambda\text{-almost every } x \in [a,b]\}.
\end{align*}
It remains to prove $m=M$.
[/step]
[step:Bound the essential supremum above by the uniform supremum]
For every $x \in [a,b]$, the definition of $M$ gives
\begin{align*}
|f(x)| \leq M.
\end{align*}
Hence the same inequality holds for $\lambda$-almost every $x \in [a,b]$. Therefore $M$ is an admissible essential upper bound in the defining infimum for $m$, and
\begin{align*}
m \leq M.
\end{align*}
[/step]
[step:Use continuity at a maximum point to get positive-measure superlevel sets]
Because $|f|: [a,b] \to [0,\infty)$ is continuous on the compact interval $[a,b]$, the [Extreme Value Theorem](/theorems/584) gives a point $x_0 \in [a,b]$ such that
\begin{align*}
|f(x_0)| = M.
\end{align*}
Fix $\varepsilon>0$. If $M-\varepsilon<0$, then $m \geq 0 > M-\varepsilon$, so suppose $M-\varepsilon \geq 0$. By continuity of $|f|$ at $x_0$, there exists $\delta>0$ such that every $x \in [a,b]$ with $|x-x_0|<\delta$ satisfies
\begin{align*}
\big||f(x)|-M\big| < \varepsilon.
\end{align*}
In particular,
\begin{align*}
|f(x)| > M-\varepsilon
\end{align*}
for every $x \in [a,b] \cap (x_0-\delta,x_0+\delta)$.
Define the relative neighbourhood $U_\varepsilon \subset [a,b]$ by
\begin{align*}
U_\varepsilon := [a,b] \cap (x_0-\delta,x_0+\delta).
\end{align*}
This set has positive $\lambda$-measure. Indeed, if $x_0 \in (a,b)$, then $U_\varepsilon$ contains an open interval centered at $x_0$ of positive length. If $x_0=a$, then $U_\varepsilon$ contains $[a,a+r)$ for any $r \in (0,\min\{\delta,b-a\})$. If $x_0=b$, then $U_\varepsilon$ contains $(b-r,b]$ for any $r \in (0,\min\{\delta,b-a\})$. In all cases,
\begin{align*}
\lambda(U_\varepsilon)>0.
\end{align*}
[guided]
The point of this step is to rule out the possibility that the maximum value of $|f|$ occurs only on a negligible set. First, compactness gives an actual maximizer: since $|f|: [a,b]\to [0,\infty)$ is continuous and $[a,b]$ is compact, the [Extreme Value Theorem](/theorems/584) gives $x_0 \in [a,b]$ with
\begin{align*}
|f(x_0)| = M.
\end{align*}
Now fix $\varepsilon>0$. If $M-\varepsilon<0$, then the lower bound $m \geq M-\varepsilon$ is automatic because $m$ is a norm and hence $m\geq 0$. Thus assume $M-\varepsilon \geq 0$.
Continuity of $|f|$ at the point $x_0$ says that there is a radius $\delta>0$ such that whenever $x \in [a,b]$ and $|x-x_0|<\delta$, the value $|f(x)|$ differs from $|f(x_0)|=M$ by less than $\varepsilon$:
\begin{align*}
\big||f(x)|-M\big| < \varepsilon.
\end{align*}
This implies
\begin{align*}
|f(x)| > M-\varepsilon.
\end{align*}
So the superlevel set where $|f|$ is strictly larger than $M-\varepsilon$ contains the relative neighbourhood
\begin{align*}
U_\varepsilon := [a,b] \cap (x_0-\delta,x_0+\delta).
\end{align*}
We must check that this neighbourhood has positive measure, especially when $x_0$ is an endpoint. If $x_0 \in (a,b)$, then $U_\varepsilon$ contains a genuine open interval around $x_0$, hence has positive one-dimensional Lebesgue measure. If $x_0=a$, then for any $r \in (0,\min\{\delta,b-a\})$, the interval $[a,a+r)$ lies inside $U_\varepsilon$, so $\lambda(U_\varepsilon)\geq r>0$. If $x_0=b$, then for any $r \in (0,\min\{\delta,b-a\})$, the interval $(b-r,b]$ lies inside $U_\varepsilon$, so again $\lambda(U_\varepsilon)\geq r>0$. Therefore
\begin{align*}
\lambda(U_\varepsilon)>0.
\end{align*}
[/guided]
[/step]
[step:Conclude that no smaller essential upper bound is possible]
For every $\varepsilon>0$, the preceding step shows that the set
\begin{align*}
\{x \in [a,b] : |f(x)| > M-\varepsilon\}
\end{align*}
has positive $\lambda$-measure whenever $M-\varepsilon \geq 0$, and the inequality $m \geq M-\varepsilon$ is automatic when $M-\varepsilon<0$.
Therefore no number strictly smaller than $M-\varepsilon$ can be an essential upper bound for $|f|$. Hence
\begin{align*}
m \geq M-\varepsilon
\end{align*}
for every $\varepsilon>0$. Letting $\varepsilon \to 0$ gives
\begin{align*}
m \geq M.
\end{align*}
Together with $m \leq M$, this yields $m=M$. Since $M=\|f\|_\infty$ and $m=\|f\|_{L^\infty([a,b],\lambda)}$, we conclude
\begin{align*}
\|f\|_\infty = \|f\|_{L^\infty([a,b],\lambda)}.
\end{align*}
[/step]