TITLE: Spectral Theorem for bounded compact, self-adjoint operators as corollary of Hilbert-Schmidt theorem
QUESTION [8 upvotes]: I'm following Debnath and Mikusinksi's "Introduction to Hilbert Spaces with Applications" and am trying to understand how the spectral theorem for compact self-adjoint operators is a corollary of the Hilbert-Schmidt theorem.
Here is the Hilbert-Schmidt theorem:
Theorem (Hilbert-Schmidt) Let $T:H\to H$ be a bounded,
compact, self-adjoint linear operator on a complex Hilbert space $H$.
Then there exists an orthonormal set of eigenvectors $\left(w_{n}\right)$
corresponding to non-zero eigenvalues $\left(\lambda_{n}\right)$
s.t. for each $x\in H$ we can write unique 
$$
x=\sum_{n=1}^{\infty}a_{n}w_{n}+v
$$
 for some $a_{n}\in\mathbb{C}$ and $v\in\mathscr{N}\left(T\right)$.
...and here is the spectral theorem that I wish to prove:
Spectral Theorem  Let $T$ be a bounded, compact, self-adjoint
linear operator on a complex Hilbert space $H$. Then $H$ has an
orthonormal basis $\left\{ v_{n}\right\} _{n\in\mathbb{N}}$ consisting
of eigenvectors of $T$. Furthermore, 
$$
Tx=\sum_{k=1}^{\infty}\lambda_{k}\left\langle x,v_{k}\right\rangle v_{k}
$$
 where $\lambda_{k}$ is the eigenvalue associated with eigenvector
$v_{k}$.
Could anyone help me to understand how this comes about from the Hilbert-Schmidt theorem? The explanation in the textbook is not helpful to me.
The explanation is as follows:
"Debnath & Mikusinski's proof of the spectral theorem goes as follows: "To obtain a complete orthonormal system $\left\{v_1 , v_2 , \ldots \right\}$, we need to complement the system $\left\{u_1, u_2, \ldots \right\}$, defined in the proof of the Hilbert-Schmidt theorem, with an arbitrary orthonormal basis of $\mathscr N (T)$. The eigenvalues corresponding to the vectors that form $\mathscr N (T)$ are all equal zero. The desired equality follows from the continuity of $A$."
I can post up the proof of the Hilbert-Schmidt theorem if it is helpful?

REPLY [3 votes]: First, since the set of $w_n$ is orthonormal, you get (note that the scalar product is continuous!) $$
    \langle x,w_k \rangle
  = \underbrace{\langle v,w_k \rangle}_{=0} + \sum_{i=1}^\infty a_n \underbrace{\langle w_i,w_k\rangle}_{=\delta_{i,k}}
  = a_n \text{.}
$$
From Hilbert-Schmidt and the boundedness (i.e. continuity!) of $T$ it follows that $$
    T(x)
  = T\left(v + \sum_{k=1}^\infty a_nw_n\right)
  = \underbrace{T(v)}_{=0} + \sum_{k=1}^\infty
                             \underbrace{a_n}_{=\langle x,w_n\rangle} 
                             \underbrace{T(w_n)}_{=\lambda_n w_n}
  = \sum_{k=1}^\infty \lambda_n\langle x,w_n\rangle w_n
  \text{.}
$$
All that remains is to find an orthonormal basis $B$ of $H$ with $B \supset \{w_n\}$. You get such a thing by picking some orthonormal basis $\{v_n\}$ of $\mathcal{N}(T)$, and setting $B = \{w_n\} \cup \{v_n\}$. This works because $H$ is the direkt sum of $\mathcal{N}(T)$ and $\mathcal{N}(T)^\bot$, since $\mathcal{N}(T)$ is closed.