<s>[INST] 2nd degree matrix equation Let $X$ be a matrix with 2 rows and 2 columns.
Solve the following equation:
$$ X^2 = \begin{pmatrix}
3 & 5\\ 
-5 & 8
\end{pmatrix} $$ 
Here is what I did:
Let $ X = \begin{pmatrix}
a & b\\ 
c & d
\end{pmatrix} $. After multiplying I got the following system:
$$ \left\{\begin{matrix}
a^2 + bc = 3\\ 
ab + bd = 5\\ 
ac + cd = -5\\ 
d^2 + bc = 8
\end{matrix}\right. $$
At this point I got stucked. 
If you know how to solve this please help me! Thank you!
 [/INST] A nonsingular $n \times n$ matrix $M$  will have some square roots that are polynomials in $M$ of degree $\le n-1$.  Thus in this case we can look for solutions of the form $X = s M + t I$. By the Cayley-Hamilton theorem,
a matrix satisfies its characteristic polynomial: in this case the characteristic polynomial is $p(x) = x^2 - 11 x + 49$, and $M^2 - 11 M + 49 I = 0$.  Thus $s M + t I$ will be a square root of $M$ if
$(s x + t)^2 - x$ is a multiple of $p(x)$.  In this case 
$$(s x + t)^2 - x - s^2 p(x) =  (11 s^2 + 2 s t - 1) x - 49 s^2 + t^2$$
so we want
$$ \eqalign{11 s^2 & + 2 s t - 1 = 0\cr
            -49 s^2 & + t^2 = 0\cr}$$
The solutions are 
$$ \eqalign{ s &= 1/5, t = 7/5 \cr
             s &= -1/5, t = -7/5\cr
             s &= i/\sqrt{3}, t = -7 i/\sqrt{3}\cr
             s &= -i/\sqrt{3}, t = 7 i/\sqrt{3}\cr}$$
corresponding to 
$$ X = \pmatrix{2 & 1\cr -1 & 3\cr},\ \pmatrix{-2 & -1\cr 1 & -3\cr},\ 
\pmatrix{-4i/\sqrt{3} & 5i\sqrt{3}\cr -5i/\sqrt{3} & i/\sqrt{3}},\
\pmatrix{4i/\sqrt{3} & -5i\sqrt{3}\cr 5i/\sqrt{3} & -i/\sqrt{3}}$$
</s>