TITLE: Show that the norm of the multiplication operator $M_f$ on $L^2[0,1]$ is $\|f\|_\infty$
QUESTION [10 upvotes]: I'm having some (hopefully small) issues computing the norm of an operator. Firstly, the problem,

For $f\in L^\infty[0,1]$, define $M_f: L^2[0,1]\to L^2[0,1]$ by $M_f(g)(x) = f(x)g(x)$. Show that $M_f$ is a bounded linear operator and $\|M_f\| = \|f\|_\infty$.

What I've done so far:
To see that $M_f$ is linear, let $g_1,g_2\in L^2[0,1]$ and $\lambda\in\mathbb{R}$. Then
$$ M_f(g_1 + \lambda g_2)(x) = f(x)(g_1(x) + \lambda g_2(x)) = f(x)g_1(x) + \lambda f(x)g_2(x) = M_f(g_1)(x) + \lambda M_f(g_2)(x).$$
As $f\in L^\infty$ we know there is some minimal $N\in \mathbb{R}$ such that $|f(x)| \leq N$ almost everywhere (i.e., $\|f\|_\infty = N \lt \infty$). The fact that $M_f$ is bounded comes straight this assupmtion, as
$$ \|M_f\| = \sup \frac{\|fg\|_2}{\|g\|_2} \leq \sup \frac{\|Ng\|_2}{\|g\|_2} = N\sup \frac{\|g\|_2}{\|g\|_2} = N < \infty.$$
almost everywhere in $[0,1]$, for all non-zero $g\in L^2[0,1]$. So $M_f$ is a bounded linear operator on $L^2[0,1]$.
To prove equality, we must show there is some $g\in L^2[0,1]$ so that $\frac{\|fg\|_2}{\|g\|_2} = N$. Now I want to say something along the lines of pick $g = 1$, but this won't have $\|g\|_2 = 1$ for all measures, so this won't work. Is there any simple way of picking a $g$ that does what we want? Or am I farther off than I'm expecting?
Thanks!

REPLY [13 votes]: Hint: Fix $\varepsilon > 0$ and $S_{\varepsilon} := \{ x \in [0,1] \; \colon \; |f(x)| \geqslant N - \varepsilon \}$. Take $g$ to be $\chi_{S_{\varepsilon}}$, the indicator function of the set $S_{\varepsilon}$.

Fleshed out answer. We will prove that $\| M_f \| \geqslant N-\varepsilon$ for all $\varepsilon > 0$. Fix $\varepsilon > 0$ (s.t. $\varepsilon < N$) and set $$S_{\varepsilon} := \{ x \in [0,1] \; \colon \; |f(x)| \geqslant N - \varepsilon \} .$$ Finally, define $g$ by 
$$
g(x) = \begin{cases}
1, &x \in S_{\varepsilon}, \\
0, &\text{otherwise}.
\end{cases}
$$
(The definition of $N$ implies that $g$ differs from zero in a positive measure set.) It is easy to check that $|fg| \geqslant (N-\varepsilon) \cdot |g|$ holds pointwise, from which it follows that $\| fg \|_2 \geqslant (N-\varepsilon) \cdot \|g \|_2$. Therefore, $\| M_f \| \geqslant N-\varepsilon$.