Fix a continuous function $f: [0,1] \rightarrow \mathbb{R}$. Consider the multiplication operator $M_f: C^0 [0,1] \rightarrow C^0 [0,1]$ defined by $(M_f g)(x) = f(x)g(x)$ for all $x \in [0,1]$ and $g \in C^0([0,1])$. Show that $M_f$ is a compact operator if and only if $f \equiv 0$.
I'm having trouble with the forwards direction of the proof, where we assume $M_f$ is compact. I think I need to think of a bounded sequence $(g_n)$ whose image under $M_f$ cannot have any convergent subsequences unless $f = 0$, but I'm having trouble thinking of such a sequence.
Let $a \in (0,1)$ and construct a sequence of continuous functions $(g_n)$ with the properties $g_n(a)=1, g_n(x)=0$ if $x >a+\frac 1 n$ or $x <a-\frac 1 n$, $0\leq g(x)\leq 1$ for all $x$. (The graph is a triangle). Then $(g_n)$ us bounded in $C^{0}[0,1]$ so $(f(x)g_n(x))$ must have a convergent subsequence in $C^{0}[0,1]$. The limiting function is necessarily continuous. Note that the pointwise limit is $0$ for $x \neq a$. By continuity the limit has to be $0$ at all points. But $f(a)g_n(a)=f(a)$ so we must have $f(a)=0$. This is true for $0<a<1$ and, by continuity $f$ vanishes at the end points also.