[Math] Do all symmetric $n\times n$ invertible matrices have a square root matrix

linear algebra

My question relates to the conditions under which the spectral decomposition of a nonnegative definite symmetric matrix can be performed. That is if $A$ is a real $n\times n$ symmetric matrix with eigenvalues $\lambda_{1},…,\lambda_{n}$, $X=(x_{1},…,x_{n})$ where $x_{1},…,x_{n}$ are a set of orthonormal eigenvectors that correspond to these eigenvalues (i.e. $X$ is an orthogonal matrix), and $\Lambda=\text{diag}(\lambda_{1},…,\lambda_{n})$ then

$A=X\Lambda X'$

is the spectral decomposition of $A$. If we then let $A^{1/2}=X\Lambda^{1/2}X'$, where $\Lambda^{1/2}$ is a square root matrix of $\Lambda$ – i.e. $\Lambda^{1/2}\Lambda^{1/2}=\Lambda$, then $A^{1/2}A^{1/2}=A$. Thus $A^{1/2}$ is a square root matrix of $A$.

So if a real nonnegative definite symmetric $n\times n$ matrix $A$ has $n$ eigenvalues then the matrix has a spectral decomposition and thus a square root matrix too. My question is do all symmetric $n\times n$ invertible matrices have $n$ eigenvalues, and thus a square root matrix? Furthermore it is not clear to me whether the eigenvalues have to be distinct or not.

Best Answer

What about the matrix $(-1){}{}{}{}{}{}{}{}{}{}{}$?