TITLE: Understanding the $L^\infty$ norm
QUESTION [8 upvotes]: I'm very confused about $L^\infty$. So I'm trying to prove this:
Is $\|f\|_{\infty}$ the smallest of all numbers of the form $\sup\{|g(x)| \,:\,x \in X\}$, where $f=g $ $\mu$-a.e.?

REPLY [11 votes]: The answer to your question is yes. Recall that the definition of $\|f\|_\infty$ is
$$\|f\|_\infty=\operatorname{ess sup}(f)=\inf\{a\in\mathbb{R}\mid \mu(\{x\in X\mid |f(x)|>a\})=0\}.$$
I'll interpret the phrase "the smallest of all numbers of the form $\sup\{|g(x)|\,:\,x\in X\}$, where $f=g$ $\mu$-a.e." to mean $$M=\inf_{g=f\text{ a.e.}}\left\{\sup_{x\in X}|g(x)|\right\}.$$

For any $\epsilon>0$, we can define $g:X\to\mathbb{R}$ by 
$$g(x)=\begin{cases}f(x) & \text{if }|f(x)|\leq \|f\|_\infty+\epsilon,\\0 & \text{otherwise}.\end{cases}$$
Note that $$\mu(\{x\in X\mid f(x)\neq g(x)\})=\mu(\{x\in X\mid |f(x)|>\|f\|_\infty+\epsilon\})=0$$
by the definition of $\|f\|_\infty$, so that $f=g$ almost everywhere, and that $\sup_{x\in X}|g(x)|\leq \|f\|_\infty+\epsilon$.
Thus,
$$M=\inf_{g=f\text{ a.e.}}\left\{\sup_{x\in X}|g(x)|\right\}\leq \|f\|_\infty+\epsilon$$
for all $\epsilon>0$, and thus $M\leq \|f\|_\infty$.

For the other direction, note that for any $\epsilon>0$, $$\mu(\{x\in X\mid |f(x)|>(\|f\|_\infty-\epsilon)\})>0$$ by the definition of $\|f\|_\infty$. If $g=f$ a.e., then certainly $|g|=|f|$ a.e., so we must have that $$\mu(\{x\in X\mid |g(x)|>(\|f\|_\infty-\epsilon)\})>0$$ too, so that $g(x)>\|f\|_\infty-\epsilon$ for some $x\in X$. Thus, for any $g$ such that $g=f$ a.e., we have that $$\sup_{x\in X}|g(x)|\geq \|f\|_\infty-\epsilon$$
so that 
$$M=\inf_{g=f\text{ a.e.}}\left\{\sup_{x\in X}|g(x)|\right\}\geq \|f\|_\infty-\epsilon$$
for all $\epsilon>0$, and thus $M\geq \|f\|_\infty$.
This shows that $M=\|f\|_\infty$.