Do all symmetric $n\times n$ invertible matrices have a square root matrix? 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. 
 A: What about the matrix $(-1){}{}{}{}{}{}{}{}{}{}{}$?
A: For your first question: that you can diagonalize real symmetric matrices is the so-called spectral theorem.
For the second: your argument is general; you did not use that the eigenvalues were distinct.
A: All symmetric matrices are diagonalizable, therefore they have $n$ eigenvalues (which don't have to be distinct, by the way), all of which are real. The spectral theorem says:

We can decompose any symmetric matrix $A\in S^n$ using symmetric eigendecomposition:
  $$
A = \sum_{i=1}^n\lambda_iq_iq_i^T = Q\Lambda Q^T, \qquad \Lambda=diag(\lambda_i,\dots,\lambda_n)
$$
  where the matrix $Q = [q_1,\dots,q_n]$ is orthogonal (with $Q^TQ=I_n$), and contains the eigenvectors of $A$, while the diagonal matrix $\Lambda$ contains the eigenvalues of A.

The matrix "power rule":
$$
A^k = Q\Lambda^k Q^{-1}
$$
can be used (with $k<0$ being allowed for invertible matrices, which means there should be no $\lambda_i=0$). Note that if there are negative eigenvalues, $\Lambda^{\frac{1}{2}}$ will become complex.
Note that in the complex case, the transpose operations should be replaced with the Hermitian operation (the conjugate transpose).
A: Matrix square root can be defined in many ways. If you just want $X$ such that $X^2 = A$, you approach is good.
However, the principal square root is defined only for the matrices with no strictly negative eigenvalues and zero being at most nonderogatory eigenvalue (which is unimportant here, since symmetric matrices are diagonalizable).
The importance of the principal square root lies in the fact that it is a unique square root with the spectrum in the open right half-plane. If we extended this to the matrices with the real negative eigenvalues, we would either lose uniqueness, or the "open right half-plane" would have to be replaced by something less nice. Of course, there are reasons to ask for this. Read more in Higham's "Functions of Matrices".
Since you ask about symmetric matrices, your eigenvalues are real, so you can only define principal square root if your matrix has nonnegative eigenvalues, which means it is positive semidefinite. That also means that your square (or any other) root will also be positive semidefinite, which can be easily seen from the eigenvalue (spectral) decomposition.
