Spectrum of $T$ is contained in $[a,b]$ if and only if $aI\le T\le bI$ $T$ is a bounded and self-adjoint operator. I need to show that the spectrum of $T$ is contained in the interval $[a,b]$ if and only if $aI\le T\le bI$.
I know that $||T||=sup\{\frac {|\langle Tx,x\rangle|}{||x||^2} : ||x||=1\}$ and that the spectrum is real. Using that I only managed to show that $aI\le T\le bI$ for $0\le b=-a$. I was unable to show it for any $a\le b$ and I was unable to show the converse. Any suggestions?
 A: The following is going to use the fact that for a selfadjoint, nonnegative, bounded operator $S$ we have that $\sigma(S) \subset [0,\infty)$.
Then let $T$ bounded and s.a. such that $aI\leq T \leq b I$ for some real $a\leq b$.
Let $S=T-aI,$ then we have $0 \leq T -aI = S$, i.e. $S$ is a nonnegative s.a., bounded operator (since $\|S\|\leq \|T\| + |a|$) and $\sigma(S) \subset [0,\infty)$. This means, for $\lambda < 0$, we have that $S-\lambda I$  is bijective, i.e. $T-(\lambda+a)I$ is bijective. Thus, for $\mu < a$, $T-\mu I$ is bijective, hence $\sigma(T) \subset [a,\infty)$. 
Furthermore, consider $S'=-T + b$, which is nonnegative , s.a., bounded. In a similar fashion as above, we get $\sigma(T) \subset (-\infty,b]$, thus $\sigma(T) \subset [a,b]$.
For the converse let $T$ such that $\sigma(T)\subset [a,b]$. Using the spectral theorem, we have $\langle (T-  aI)x,x\rangle = \int_{\sigma(T)}(t-a)d\langle E_\lambda x,x\rangle \geq 0$. The latter is true since $\sigma(T)\subset [a,b]$, the integrand is always nonnegative in the area of integration. The boundedness by $b$ follows analogously.
A: Assume $T=T^*$. Then,
$$           a I \le T \le b I \\
    \iff   \left(a-\frac{b+a}{2}\right)I \le T-\frac{b+a}{2}I \le \left(b-\frac{b+a}{2}\right)I \\
    \iff -\frac{b-a}{2}I \le T-\frac{b+a}{2}I \le \frac{b-a}{2}I \\
    \iff  \|T-\frac{b+a}{2}I\| \le \frac{b-a}{2} \\
    \iff \sigma(T-\frac{b+a}{2}I) \subseteq \left[-\frac{b-a}{2},\frac{b-a}{2}\right] \\
    \iff \sigma(T) \subseteq\left[\frac{b+a}{2}-\frac{b-a}{2},\frac{b+a}{2}+\frac{b-a}{2}\right] \\
  \iff \sigma(T) \subseteq [a,b].
$$
