Most books and courses on linear algebra or functional analysis present at least one version of the spectral theorem (either in finite or infinite dimension) and emphasize its importance to many mathematical disciplines in which linear operators to which the spectral theorem applies arise. One finds quite quickly that the theorem is a powerful tool in the study of normal (and other) operators and many properties of such operators are almost trivial to prove once one has the spectral theorem at hand (e.g. the fact that a positive operator has a unique positive square root). However, as hard as it is to admit, I barely know of any application of the spectral theorem to areas which a-priori have nothing to do with linear algebra, functional analysis or operator theory.


One nice application that I do know of is the following proof of Von Neumann's mean ergodic theorem: if $T$ is an invertible, measure-preserving transformation on a probability space $(X,\mathcal{B},\mu)$, then $T$ naturally induces a unitary operator $T: L^2(\mu) \to L^2(\mu)$ (composition with $T$) and the sequence of operators $\frac{1}{N}\sum\_{n=1}^{N}T^n$ converges to the orthogonal projection on the subspace of $T$-invariant functions, in the strong operator topology. The spectral theorem allows one to reduce to the case where $X$ is the unit circle $\mathbb{S}^1$, $\mu$ is Lebesgue measure and $T$ is multiplication by some number of modulus 1. This simple case is of course very easy to prove, so one can get the general theorem this way. Some people might find this application a bit disappointing, though, since the mean ergodic theorem also has an elementary proof (credited to Riesz, I believe) which uses nothing but elementary Hilbert space theory.


Also, I guess that Fourier theory and harmonic analysis are intimately connected to the spectral theory of certain (translation, convolution or differentiation) operators, and who can deny the usefulness of harmonic analysis in number theory, dynamics and many other areas? However, I'm looking for more straight-forward applications of the spectral theorem, ones that can be presented in an undergraduate or graduate course without digressing too much from the course's main path. Thus, for instance, I am not interested in the use of the spectral theorem in proving Schur's lemma in representation theory, since it can't (or shouldn't) be presented without some prior treatment of representation theory, which is a topic in itself.


[This book](http://rads.stackoverflow.com/amzn/click/0821849778) by Matousek is pretty close to what I'm looking for. It presents simple and short (but nevertheless impressive and nontrivial) applications of linear algebra to other areas. I'm interested in the more specific question of applications of the spectral theorem, in one of its versions (in finite or infinite dimension, for compact or bounded or unbounded operators, etc.), to areas which are not directly related to the theory of linear operators. Any suggestions will be appreciated.



Nice applications of the spectral theorem?
* An operator-theoretic proof that the classical [Hamburger moment problem](http://en.wikipedia.org/wiki/Hamburger_moment_problem) admits a solution (see e.g. *Methods of modern mathematical physics* by Reed and Simon, volume 2, Theorem X.4).
* Weyl's proof of the Bohr analogue of Parseval's identity for almost periodic functions. More precisely, let $f$ be a uniformly almost periodic $\mathbb C$-valued function on $\mathbb R$ and let 
$$a(\lambda)=\lim\_{T\to\infty}\frac{1}{2T}\int\_{-T}^{T}f(t)e^{-i\lambda t}dt.$$
It is known that the set $\{\lambda\in \mathbb R:\ a(\lambda)\neq 0\}$ is at most countable for any uniformly almost periodic function. Let $c\_k=a(\lambda\_k)\neq 0$ be the sequence of the nontrivial Fourier constants of the function $f$. Then 
$$\sum\_{k}|c\_k|^2=\lim\_{T\to\infty}\frac{1}{2T}\int\_{-T}^{T}|f(t)|^2dt.$$
The proof is based on the spectral analysis of the operator 
$$Au=\lim\_{T\to\infty}\frac{1}{2T}\int\_{-T}^{T}f(t-s)u(s)dt.$$
Weyl shows that $A$ is a normal compact operator on the space of uniformly almost periodic functions (endowed with the scalar product $(u,v)=\lim\_{T\to\infty}\frac{1}{2T}\int\_{-T}^{T}u(t-s)\overline{v(s)}dt$). The result then follows from a clever application of the spectral theorem.


A detailed exposition of the proof can be found in [*Theory of linear operators in Hilbert space*](http://books.google.com/books?id=GTWMqiuvOAQC&pg=PA236&dq=Akhiezer+N.I.,+Glazman+I.M.+Theory+of+linear+operators&hl=en&ei=sz9QTd6T) by Akhiezer and Glazman (see Section 57).


