Suppose B is an N x N Hermitian matrix with $\lambda _i$ eigenvalues. if $w_k$ are any orthonormal real-valued vectors. I need to prove that \begin{equation} \sum _{k=1}^N\left(w_k^TBw_k\right)\:=\:\sum _{k=1}^N\left(\lambda _k\right) \end{equation} Here's what I know so far
Since $B$ is Hermitian, then $B = Q\Lambda Q^H$ Where $Q$ is the eigenvector matrix of $B$ and $\Lambda$ is the diagonal matrix of eigenvalues of $B$
now $B$ can be represented as $B = \sum _{j=1}^N\left(\lambda _jq_jq^H_j\right)$
If we substitute that in the original question, we get \begin{equation} \sum _{k=1}^N\left(w_i^T\sum _{j=1}^N\left(\lambda _jq_jq_j^H\right)w_i\right)\ \end{equation}
But am confused on what to do from here. Please help me
An alternative argument to the one presented in the other answer: we have $$ \begin{align} \sum _{k=1}^N\left(w_k^TBw_k\right) &= \sum _{k=1}^N\left(\sum _{j=1}^Nw_k^H\left(\lambda _jq_jq_j^H\right)w_k\right) \\ & = \sum_{j=1}^N \sum_{k=1}^N \lambda_j \,(w_k^Hq_j)( w_k q_j^H) \\ & = \sum_{j=1}^N \lambda_j \left(\sum_{k=1}^N (w_k^Hq_j)( w_k q_j^H)\right) \\ & = \sum_{j=1}^N \lambda_j \left(\sum_{k=1}^N |w_k^Hq_j|^2\right) = \sum_{j=1}^N \lambda_j \cdot 1 \end{align} $$