TITLE: A compact operator in $L^2(\mathbb R)$
QUESTION [9 upvotes]: Let $g \in L^{\infty}(\mathbb R)$. Consider the operator 
  $$
\begin{split}
T_g\colon & L^2(\mathbb R)\to L^2(\mathbb R) \\
& f \mapsto gf
\end{split}
$$
  Prove that $T_g$ is compact (i.e., the image under $T_g$ of bounded closed sets is compact) if and only if $g=0$ a.e. 

I do not know how to start and I'm very puzzled. I know very little about compactness in $L^p$: of course they are complete metric spaces, therefore a subspace is compact if and only if it is closed (complete) and totally bounded. A singleton is of course totally bounded and I think it is closed: therefore I can say that if $g=0$ a.e. then the image of every subspace is $\{0\}$ which is compact, so the operator is compact. What about the inverse direction? It seems hard to prove. 
Would you help me, please? Thanks.

REPLY [3 votes]: If $\lVert g\rVert_{\infty}\neq 0$, fix, $\Delta_n$ a sequence of measurable subsets of $\Bbb R$ such that $\lambda(\Delta_n)\in (0,+\infty)$ and for all $n\in \Bbb N$, $x\in\Delta_n$, we have $|g(x)|\geq\lVert g\rVert_{\infty}-\frac 1n$. 

We can assume that $\lambda(\Delta_n)\to 0$, since the sequence $\{\Delta_n\}$ can wbe chosen decreasing, and if the measure of the intersection is non-negative, $g$ would be constant equal to $C$ over a set of positive measure $A_0$. If we take a sequence of the form $\chi_{A_0}f_n$ which is weakly convergent but non fo the norm. Then $T_g(\chi_{A_0}f_n)=C\chi_{A_0}f_n$, which is not strongly convergent. Hence in this case we already have that $T_g$ is not compact.
We would have, if $T_g$ were compact, that
$$\tag{*} \lim_{N\to +\infty}\sup_{n\in\Bbb N}\int_{\{1\geq N\lambda(\Delta_n)\}}g^2\frac{\chi_{\Delta_n}}{\lambda(\Delta_n)}dx=0.$$
To see this, use precompactness and a "$2\varepsilon$" argument.
With the assumption made in the first point, we can, for each integer $N$, pick an integer $k(N)$ with $1\geq N\lambda(\Delta_{k(N)})$. We can choose the sequence $\{k(N)\}$ strictly increasing, hence $1/k(N)< \lVert g\rVert_{\infty}$ for $N$ large enough. We would have 
$$\lim_{N\to +\infty}\left(\lVert g\rVert_{\infty}-\frac 1{k(N)}\right)^2.$$
But this limit is $\lVert g\rVert_{\infty}$.

An alternative method is the following: we use the fact that the spectrum of a multiplication operator is the essential range of $g$. The spectrum of a compact self-adjoint operator is a sequence which converge to $0$, hence the essential image of $g$ is $\{0\}$.