A compact operator in $L^2(\mathbb R)$ 
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. 
 A: Suppose, there is some $\epsilon > 0$ such that $M_\epsilon = \{ x \;\vert\; g(x) > \epsilon\}$ has positive measure $\mu(M_\epsilon) > 0$. Now pick a sequence of sets $M_n \subset M_\epsilon$ with 


*

*$M_{n+1} \subset M_n$ and

*$\mu(M_{n+1}) < \frac{1}{2}\mu(M_n)$ for all $n \in \mathbb N$.


Note that 2. implies $\mu(M_n) > 0$ for all $n\in \mathbb N$ and $\mu(M_n) \to 0$ as $n \to \infty$. Let $f_n(x) = \mu(M_n)^{-1}\chi_{M_n}(x)$ denote the normalized characteristic function of $M_n$. We will show now, that $T_gf_n$ does not contain a convergent subsequence:
We have
$$\Vert T_gf_m - T_gf_n\Vert_2^2 \geq \epsilon^2\Vert f_m -f_n \Vert_2^2 = \epsilon^2 \left(\mu(M_m)\left( \frac{1}{\mu(M_m)} - \frac{1}{\mu(M_n)}\right)^2 + \frac{\mu(M_n \setminus M_m)}{\mu(M_n)^2} \right)\geq \epsilon^2 \frac{\mu(M_n)}{\mu(M_n)^2} \to \infty$$
for $m > n$ and $\mu(M_n) < 1$.
A: 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\}$.
A: Suppose that $g$ is not zero a.e. and let $\epsilon>0$ be such that $E=\{x:|g(x)|>\epsilon\}$ has nonzero measure. Consider the orthogonal projection $p=T_{\chi_{E}}$. Assume that $T_{g}$ is a compact operator. The operator $T_{g}$ naturally induces a continuous linear operator of $L^2(\mathbb{R})$ into the Hilbert subspace $pL^{2}(\mathbb{R})=\{\xi \in L^{2}(\mathbb{R}):p\xi=\xi\}$, which is a Banach space. This map is onto, since $\xi \in pL^{2}(\mathbb{R})$ is mapped to by the $L^{2}$ function equal to $\xi(x)/g(x)$ on $E$ and zero elsewhere. By the open mapping theorem we have that this induced map is open, and therefore the image of the unit ball of $L^{2}(\mathbb{R})$ under this induced map contains an open ball $B$, and therefore the closure contains a closed ball $\overline{B}$. This closed ball is not compact, since $pL^2(\mathbb{R})$ is infinite-dimensional. But the image of the unit ball of $L^2(\mathbb{R})$ under a compact operator must have compact closure, and closed subsets of compact sets must be compact, so this is a contradiction.  
