I'm trying to prove the following equivalence: A symmetric matrix $X \in M(n,n)$ over $\mathbb{R}$ is a positive operator (it is self-adjoint and is positive semidefinite) if, and only if there exists $\{\lambda_i\}^n_{i=1}$ where $\lambda_i \geq 0$ for all $i$ and $\{w_i\}^n_{i=1}$, an orthonormal set in $\mathbb{R}^n$, such that $X= \sum^n_{i=1}\lambda_iw_iw_i^T$ (here, we take $w_i$ to be a column vector).
I've proved the backward direction of the claim by proving that $X$ is positive semidefinite. I'm not sure how to prove the forward direction of the claim. I suspect that the $\{\lambda_i\}$ and $\{w_i\}$ are the eigenvalues (which are non-negative for a positive operator) and the eigenvectors (there are $n$-many of them since they span $\mathbb{R}^n$) respectively. I tried writing down the sum on the RHS but got nowhere.