Let $f \in L^{\infty} ([a,b])$ be continuous and consider the multiplication operator $M_f$ defined as $M_f : L^{2} ([a,b]) \to L^{2} ([a,b])$
$M_f(h) = fh$ for $h \in L^2 ([a,b])$. I want to show that the spectrum is $\sigma(M_f) = f([a,b])$.
So far I have shown that $\sigma(M_f)$ for a general $f$ consists of $x \in \mathbb{C}$ such that $\mu (f^{-1} ((x-\epsilon, x+\epsilon)))>0$ for all $\epsilon >0$, where $\mu$ is the measure. However, I am not sure how to implement $f$ being continuous to conclude $\sigma(M_f) = f([a,b])$.
Any help will be appreciated. Thanks!
I will use disks instead of intervals since it appears that $f$ takes complex values (I will write $D(z,r)$ for the open disk centered at $z$ of radius $r>0$).
Let $t\in[a,b]$. By continuity of $f$ at $t$, if $\varepsilon>0$, then there exists $\delta>0$ so that $|t-s|<\delta\implies|f(t)-f(s)|<\varepsilon$. In other words, $(t-\delta,t+\delta)\subset f^{-1}(D(f(t),\varepsilon))$. But the interval $(t-\delta,t+\delta)$ has measure $2\delta>0$. This shows that $f([a,b])\subset \sigma(M_f)$.
The reverse inclusion goes as follows: if $x\in\mathbb{C}$ satisfies $\mu(f^{-1}(D(x,\varepsilon)))>0$ for all $\varepsilon>0$, this means that we can find a sequence $(t_n)\subset[a,b]$ so that $|f(t_n)-x|<\frac{1}{n}$. This shows that $x\in\overline{f([a,b])}$. Note that $[a,b]$ is compact, so $f([a,b])$ is compact, since $f$ is continuous. But then $f([a,b])$ is closed, so $x\in f([a,b])$ and this shows that $\sigma(M_f)\subset f([a,b])$.