Inequality on self adjoint operator eigenvalues I'm studying for a upcoming exam and have found the following problem:

Let $\phi$ be a self adjoint operator in an $n$-dimensional Hermitian space $(V, \left \langle\space  , \space\right \rangle)$. If the eigenvalues of $\phi$ are $\lambda_1 \leq ... \leq \lambda_n$, show that $$\lambda_1 \leq \frac{\left \langle\phi(a),a  \right \rangle}{\left \langle a,a \right \rangle} \leq \lambda_n$$
  for every non zero $a \in V$.

I have zero ideas on how to proceed. I'm especially interested in hints for this question, but any help would be deeply appreciated.
 A: Since you requested a hint, I'll provide a modest one, then put a spoiler of the solution at the end (hover your cursor over the block).
Hint: Write $a$ in terms of the orthonormal eigenbasis guaranteed by $\phi$, then just see what pops out when you compute $\frac{\langle \phi(a),a\rangle}{\langle a,a\rangle}$.
Spoiler: 

 By the spectral theorem, there exists an orthonormal basis of eigenvectors of $\phi$, and all of the eigenvalues are real. If $a=\sum_{j=1}^n a_je_j,$ where $e_j$ are an orthonormal basis of eigenvectors, then $$\langle a,a\rangle=\sum_{j=1}^n |a_j|^2,$$ and  $$\langle \phi(a),a\rangle=\left\langle \sum_{j=1}^n a_j\lambda_je_j,\sum_{j=1}^na_je_j\right\rangle=\sum_{j=1}^n |a_j|^2\lambda_j,$$ where we have used that $\phi$ is linear and that $e_j$ are eigenvectors of $\phi,$ so $\phi(a_je_j)=a_j\phi(e_j)=a_j\lambda_je_j.$ Putting this all together, $$\frac{\langle \phi(a),a\rangle}{\langle a,a\rangle}=\frac{\sum_{j=1}^n |a_j|^2\lambda_j}{\sum_{j=1}^n |a_j|^2}.$$ To make this as larger, bound each $\lambda_j$ from above by $\lambda_n$, and to make it smaller, bound each $\lambda_j$ from below by $\lambda_1$. This will provide you with the desired result.

A: For self-adjoint $\phi$,
$\phi^\dagger = \phi, \tag 1$
the eigenvaues are all real:
$\lambda_i \in \Bbb R, \; 1 \le i \le n; \tag 2$
furthermore, there exists a basis $\mathbf e_i$ such that
$\phi \mathbf e_i = \lambda_i \mathbf e_i, \tag 3$
with
$\langle \mathbf e_i, \mathbf e_j \rangle = \delta_{ij},\; 1 \le i, j \le n; \tag 4$
then we may write
$a = \displaystyle \sum_1^n a_i \mathbf e_i, \tag 5$
from which
$\langle a, a \rangle = \langle \displaystyle \sum_1^n a_i \mathbf e_i, \sum_1^n a_j \mathbf e_j \rangle = \sum_{i, j = 1}^n \bar a_i a_j \langle \mathbf e_i, \mathbf e_j \rangle = \sum_1^n \bar a_i a_j \delta_{ij} = \sum_1^n \bar a_i a_i \ne 0 \tag 6$
since $a \ne 0$; applying $\phi$ to $a$ using (5) amd (3):
$\phi a = \displaystyle \sum_1^n a_i \phi\mathbf e_i = \sum_1^n a_i \lambda_i \mathbf e_i; \tag 7$
now a calculation similar to (6) yields. by virtue of (2),
$\langle \phi a, a \rangle = \displaystyle \sum_1^n \lambda_i \bar a_i a_i, \tag 8$
from which
$\dfrac{\langle \phi a, a \rangle}{\langle a, a \rangle} = \displaystyle \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i} \lambda_i; \tag 9$
then
$\lambda_1 \displaystyle \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i}  = \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i} \lambda_1 \le \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i} \lambda_i = \dfrac{\langle \phi a, a \rangle}{\langle a, a \rangle}$
$\le \displaystyle \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i} \lambda_n = \lambda_n \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i}   \tag{10}$
since
$\lambda_1 \le \lambda_i \le \lambda_n, \forall i, \; 1 \le i \le n; \tag{11}$
now,
$\displaystyle \sum_1^n \dfrac{\bar a_i a_i}{\sum_1^n \bar a_i a_i} = \dfrac{1}{\sum_1^n \bar a_i a_i}\sum_1^n \bar a_i a_i = 1, \tag{12}$
and in light of this, (10) yields
$\lambda_1 \le \dfrac{\langle \phi a, a \rangle}{\langle a, a \rangle} \le \lambda_n, \tag{13}$
the required inequality.
A: Let $\left|n\right>$ be the eigenfunctions of $\phi$. Since the operator is self-adjoint, we can choose them to be orthonormal, and write $\left|a \right> = \sum_{i = 1}^n \left<n\right|\left.a\right>\left|n\right>$. Then we have
$$
\left<a\right|\left.a\right> = \sum_{i=1}^n\left<a\right|\left.n\right>\left<n \right|\left.a\right> = \sum_{i=1}^n|\left<a\right|\left.n\right>|^2
$$
and
$$
\left<a \right|\phi\left|a\right> = \sum_{i=1}^n\left<a\right|\phi\left|n\right>\left<n \right|\left.a\right> = \sum_{i=1}^n\lambda_i\left<a\right|\left. n\right>\left<n \right|\left.a\right> = \sum_{i=1}^n\lambda_i\left|\left<a\right|\left. n\right>\right|^2
$$
So
$$
\frac{\left<a \right|\phi\left|a\right>}{\left<a\right|\left.a\right>} = \frac{\sum_{i=1}^n\lambda_i\left|\left<a\right|\left. n\right>\right|^2}{\sum_{i=1}^n|\left<a\right|\left.n\right>|^2}
$$
is just a weighted average of the eigenvalues, and a weighted average always falls between the highest and lowest values.
