As far as I know, a real square matrix $M$ has a real square root if $M$ is positive semidefinite, i.e., if all eigenvalues are nonnegative. And, in fact, its square root is unique.
I have read some research papers on how to solve the square root of a $3 \times 3$ positive definite matrix using Cayley-Hamilton, the minimal polynomial, and diagonalization.
However, when does a $3 \times 3$ integer matrix $M$ have an integer square root?
Trivially, $M$ must be positive definite to make sure its square root exists and is real. Also, $\det(M)$ must be a a perfect square. Other than that, I am stuck.
Please help me with this. Or just give me a hint or a lead. Thank you.