If I have an $n \times n$ matrix $X$ that is symmetric and positive semi-definite, how do I prove that there exists vectors $v_1,\ldots,v_n$ such that
$$X = \sum_{i=1}^nv_iv_i^T$$
I know this is some form of factorization and know of how to find the eigenvectors of a matrix but am a little stuck on how to approach this. Any hints would be great!
Since $V$ is symmetric and positive definite, there exists an orthonormal basis $\{e_1, \ldots e_n\}$ such that $Ve_i = \lambda_ie_i$ for some $\lambda_i > 0$.
Denote $P_i$ the orthogonal projection onto $\operatorname{span}\{e_i\}$, i.e. $P_ix = \langle x, e_i\rangle e_i$.
Note that we have the equality $$V = \sum_{i=1}^n \lambda_iP_i$$
Now verify that the matrix of $P_i$ w.r.t. the standard basis is $e_ie_i^T$. Hence $$V = \sum_{i=1}^n \lambda_ie_ie_i^T = \sum_{i=1}^n \left(\sqrt{\lambda_i}e_i\right)\left(\sqrt{\lambda_i}e_i\right)^T$$