I'm studying some linear algebra applications in quantum mechanics, and I was told that a normal matrix can be written as: $$ M=\sum_{i=1}^{n}\theta_i |\theta_i\rangle \langle\theta_i| $$ where $|\theta_i\rangle$ is the eigenvector associated with it's eigenvalue $\theta_i$.
The problem is that I can't properly visualize that summation as a normal matrix representation.
Here's my attempt to visualize why that's true.
I know, by spectrum theorem, that I can diagonalize that matrix M by some unitary matrices:
$$ D = U^{\dagger}MU \Rightarrow U^{\dagger}\big(\sum_{i=1}^{n}\theta_i |\theta_i\rangle \langle\theta_i|\big)U $$
So if I manage to calculate the right relation, I'll get why the matrix $M$ can be written as it was said, but how can I do that? How can I include $U$ and $U^{\dagger}$ into that summation to calculate it? Can someone please show me what's really happening in that summation?
What I've been able to get is: $$ \theta_i|\theta_i\rangle $$ Is a scalar times a "column" vector. $$ \langle\theta_i| $$ Is a bra, or a conjugate transpose ket. $$ \theta_i |\theta_i\rangle \langle\theta_i| $$ Is a matrix, and the summation is actually adding multiple matrices with previous outer product computation.
Can someone please help me out? Thanks!
Note that $\langle \theta_i \mid \theta_j \rangle = \delta_{ij}$. So $M \lvert\theta_j \rangle = \sum_i \theta_i \lvert \theta_i \rangle \langle \theta_i \mid \theta_j \rangle = \theta_j \lvert \theta_j \rangle$ for all $j$. Geometrically $\lvert \theta_i \rangle \langle \theta_i \rvert$ is the orthogonal projection onto the line spanned by $\lvert \theta_i \rangle$.