Projection operators

Armed with the bra-ket formalism we can construct any operator in Hilbert space. The projection operator Pa is defined as

 
Pa = | a><a|,


Note that $ P^{2}_{a} \equiv P_{a} P_{a} = \vert a><a\vert \vert a><a\vert=\vert a><a\vert=P_{a}$and in general any projection operator P has the property P2=P. Consider operator X whose eigenstates are given by the set $ \{ \vert a_{1} > \, \vert a_{2}> ... \vert a_{n}> \}$. If we define the projection operators Pan = | an><an|, show that operator X can be expressed as a sum of projection operators, i.e.

 \begin{displaymath}X=\sum_{n} P_{a_{n}} a_{n}
\end{displaymath}