On the existence of integer square root of a $3 \times 3$ positive definite matrix 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.
 A: For an $n\times n$ matrix $X$ with characteristic polynomial $p_X(t)$, the roots of $p_X$ form the multiset of eigenvalues of $X$. If $A=B^2$ then the eigenvalues of $A$, as a multiset, are the squares of the eigenvalues of $B$, and $$p_A(t^2)=p_B(t)p_B(-t)\tag{*}$$ Now, if $A$ and $B$ are integer matrices then their characteristic polynomials are monic polynomials of degree $n$ with integer coefficients, so that the eigenvalues are algebraic integers, and $(*)$ provides a necessary condition in terms of $p_A$.  
This condition can be analyzed further by considering the irreducible factorization of $p_B$ over $\mathbb{Z}$. For $n=3$, there are three cases to consider: (a) 3 linear factors, (b) a linear and an irreducible quadratic factors, and (c) an irreducible cubic polynomial. 
(a) Eigenvalues of $A$ are perfect square integers.
(b) One eigenvalue of $A$ is a perfect square integer and the other two are conjugate perfect square integers in a quadratic field.
(c) The eigenvalues of $A$ are conjugate perfect square integers in a cubic field. 
This condition is sufficient for semisimple matrices, but not in general. For example, an $n\times n$ Jordan block matrix does not admit an integer square root, essentially, because $1$ is odd.
A: Besides the fact that $\det M$ needs to be a perfect square, there is an other set of necessary conditions: among the diagonal entries $m_{ii}$ and the principal $2\times2$ minors $m_{ii}m_{jj}-m_{ij}^2$, none of them may be $\equiv7$ mod $8$. Writing $A=\sqrt M$, this is because on the one hand 
$$m_{ii}=a_{i1}^2+a_{i2}^2+a_{i3}^2.$$
And on the other hand
$$m_{ii}m_{jj}-m_{ij}^2=\sum_{k,\ell=1}^3(a_{ij}a_{k\ell}-a_{i\ell}a_{kj})^2.$$
