all square roots of psd matrix According to Wikpedia a positive semidefinite matrix has a unique positive semidefinite square root. If the first PSD matrix is $\sum_i \lambda_iv_iv_i^T$, the PSD square root must be $\sum_i \sqrt{\lambda_i}v_iv_i^T$.
If we drop the requirement that the root is positive semidefinite, other square roots can be obtained by changing the signs of the eigenvalues, like $\sum_i -\sqrt{\lambda_i}v_iv_i^T$. Can all the symmetric (not necessarily PSD) square roots of a PSD matrix be obtained in this way?
 A: In a sense. Suppose $P \in M(n, \mathbb{R})$ is positive semifdefinite. Suppose $Q \in M(n, \mathbb{R})$ is a symmetric square root of $P$, meaning $Q^* = Q$, $Q^2 = P$. We have $QP = QQ^2 = Q^2Q = PQ$, so $Q$ commutes with $P$. Thus the eigenspaces of $P$ are invariant under $Q$, so since self adjoint operators are orthonormally diagonalizable, there is an orthonormal basis $\{v_1, \dots, v_n\}$ of $\mathbb{R}^n$ such that each $v_j$ is both an eigenvector of $P$ and of $Q$. Say $Qv_j = \mu_jv_j$, $Pv_j = \lambda_jv_j$. Then $\mu_j^2v_j = \lambda_jv_j$, so $\mu_j = \pm\lambda_j$. If you want all the eigenvectors of $P$ to be eigenvectors of $Q$, you have to ensure that if $\lambda_j = \lambda_k$, then $\mu_j = \mu_k$. If you ensure that, then (with appropriate relabeling)
$$Q = \sum_{j = 1}^{K}\mu_jP_j,$$
where $\{\lambda_1, \dots, \lambda_K\}$ is the set of eigenvalues of $P$, and $P_j$ is the orthogonal projection onto the $\lambda_j$-eigenspace of $P$.
A: If the eigenvalues are all distinct, yes, otherwise, no. A simple counterexample is given by the identity matrix $I_2=e_1e_1^T+e_2e_2^T$. Clearly, all square roots of the form $\pm e_1e_1^T\pm e_2e_2^T$ are diagonal matrices, but reflection matrices in the form of $\pmatrix{\cos\theta&\sin\theta\\ \sin\theta&-\cos\theta}$ are also symmetric square roots of $I_2$ and they are not diagonal matrices when $\sin\theta\ne0$.
When all eigenvalues of a real positive semidefinite matrix $A$ are distinct, let $A=V\Lambda V^T$ for some orthogonal matrix $V$ and some diagonal matrix $\Lambda=\operatorname{diag}(\lambda_1,\ldots,\lambda_n)$ containing the eigenvalues of $A$ on the diagonal. If $B$ is a square root of $A$, it must commute with $A$. Therefore $D=V^TBV$ must commute with $\Lambda$. Consequently, $D$ is a diagonal matrix. However, as $A=B^2$, we have $\Lambda=D^2$. Therefore $d_{ii}=\pm\sqrt{\lambda_i}$ and $B=VDV^T=\sum_i\pm\sqrt{\lambda_i}v_iv_i^T$. Note that we have not assumed that $B$ is symmetric in the argument above, but it turns out that $B$ is necessarily symmetric when the eigenvalues of $A$ are distinct.
A: In a sense, yes. This is known as unitary freedom of square roots, see https://en.wikipedia.org/wiki/Square_root_of_a_matrix#Unitary_freedom_of_square_roots
