Solution (source code)

= Solution

The <spectral theorem for compact self-adjoint operators> says that a compact self-adjoint $A$ has an orthogonal decomposition
$$
H=\ker A\oplus\mathop{\widehat\bigoplus}_{\lambda\ne0}\ker(A-\lambda I),
$$
with real nonzero <eigenvalues> of finite multiplicity. Only finitely many <eigenvalues>, counting multiplicity, have absolute value at least any given $\varepsilon>0$. Thus the nonzero <eigenvalues> form a finite list or a sequence tending to zero, and $A=\sum_{\lambda\ne0}\lambda P_\lambda$ in operator norm. The kernel may have arbitrary Hilbert dimension.

For existence of an extremal <eigenvector>, self-adjointness gives $\|A\|=\sup_{\|x\|=1}|\langle Ax,x\rangle|$. One elementary proof of the nontrivial inequality uses polarization: if the quadratic form is bounded in absolute value by $m\|x\|^2$, its polarized real part is bounded by $m$ on two unit vectors; adjusting a phase bounds $|\langle Ax,y\rangle|$ by $m$. Choose unit $x_j$ with quadratic values tending to $\lambda=\|A\|$ or $-\|A\|$. Then
$$
\|(A-\lambda)x_j\|^2\leq2\|A\|^2-2\lambda\langle Ax_j,x_j\rangle\longrightarrow0.
$$
If $A\ne0$, compactness supplies a convergent subsequence of $Ax_j$, and the last estimate supplies a convergent unit subsequence of $x_j$, with <eigenvalue> $\lambda$.

<Eigenvectors> for distinct <eigenvalues> are orthogonal, since $A=A^*$. An infinite orthonormal sequence in one nonzero eigenspace would violate compactness. More generally an infinite orthonormal family with <eigenvalues> bounded away from zero has images separated in norm, again impossible. Take all nonzero eigenspaces and let $M$ be their closed span. Its complement reduces $A$; if the restriction there were nonzero, the extremal-eigenvector argument would produce another nonzero <eigenvector>, a contradiction. Thus $M^\perp=\ker A$. The finite truncations of the <eigenvalue> sum have remainder norm tending to zero, proving the asserted norm expansion.