# square root of a real matrix

I want to compute the square root of a real symmetric positive definite matrix $S\in \mathcal{M}_{m,m}$ such that $S^{1/2}S^{1/2}=S$ and it's well known that this decomposition is unique.

My question is if I have $S$ a real matrix will its square root be real too or it could be a complex matrix. In case that it could be complex then $S$ could have infinitely many square roots.

-
Note that the answer by user1551 shows that the statement above needs the requirement that $S^{1/2}$ is positive (semi-)definite in order for the uniqueness claim to hold. If you are asking about possible complex positive definite square roots, then you should first make precise what exactly that means (usually "positive definite" implies real symmetric, but allowing complex Hermitian matrices is a possibility). If you don't want the positive definite requirement, infinitely many real and complex solutions may exist. –  Marc van Leeuwen Apr 4 at 5:11

If $S$ is real, symmetric and positive definite, consider its eigenvalue / eigenvector decomposition $S = X \Lambda X^T$ where $\Lambda$ is diagonal and $X$ is orthogonal. Because $S$ is positive definite, $\Lambda_{ii} > 0$ for all $i$. The unique symmetric and positive definite square root of $S$ is given by $S^{1/2} = X \Lambda^{1/2} X^T$, where $\Lambda^{1/2}$ is the diagonal matrix with the $\sqrt{\Lambda_{ii}}$ on its diagonal. Indeed, $$S^{1/2} S^{1/2} = X \Lambda^{1/2} X^T X \Lambda^{1/2} X^T = X \Lambda X^T = S,$$ because $X^T X = I$. So $S^{1/2}$ is indeed real.

-
yes you're right it mostly depends on the eigenvalues. thanks –  Bel Feb 25 at 2:48
Actually if a matrix has at least one negative part eigenvalue then it won't have a real square root but for the case of positive semidefinite matrices all eigenvalues are positive hence real square root. –  Bel Feb 25 at 2:51
-1 What does this answer show at all? That the unique symmetric and positive definite square root is real. But "symmetric positive definite" implies real by definition, so this is no news (however, no news is good news). Also this fact was already stated as well known in the question. –  Marc van Leeuwen Apr 4 at 5:15

A real matrix $S$ can possess infinitely many real or nonreal square roots. For example, $$S=I=\begin{pmatrix}1&t\\0&-1\end{pmatrix}^2$$ for every $t\in\mathbb{C}$. Note that $S=I$ is real and positive definite.

-
But.. among positive definite symmetric matrices, square root is indeed unique. –  Berci Feb 25 at 2:04
@Berci Square roots in general are not unique, but positive semidefinite matrices have unique positive semidefinite square roots. –  user1551 Feb 25 at 2:08