Dirac notation - Outer product representation of Normal Matrix 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!
 A: First let $(\lvert e_i \rangle)_i$ be a basis of your Hilbert space. Note that $\lvert e_i \rangle^\dagger = \langle e_i \rvert$ and the matrix $\lvert e_i \rangle \langle e_i \rvert$ is actually the diagonal matrix filled with zeros except with a $1$ on the $i$-th column and $i$-th row.
So any diagonal matrix $D$ can be written in the form $D = \sum_{i=1}^n \alpha_i \lvert e_i \rangle \langle e_i \rvert$ where $\alpha_i$ are the diagonal entries of $D$. Let $M$ be an arbitrary normal matrix. Then by the spectral theorem, there exists a unitary matrix $U$ such that 
$$
M = U D U^\dagger = \sum_{i=1}^n \alpha_i U \lvert e_i \rangle \langle e_i \rvert U^\dagger = \sum_{i=1}^n \alpha_i U \lvert e_i \rangle \big(U\lvert e_i \rangle \big)^\dagger.
$$
Now we can simply rename $\theta_i = \alpha_i$ and $U\lvert e_i \rangle = \lvert \theta_i \rangle$ to obtain the required form. 
A: 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$.
