# 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.

• Welcome to MathOverflow! MathOverflow is for mathematicians to ask each other questions about their research. See Mathematics to ask general questions in mathematics. – Glorfindel Oct 1 '18 at 11:49
• crossposted: math.stackexchange.com/questions/2937733/… --- don't do that, please. – Carlo Beenakker Oct 1 '18 at 12:34
• I agree that the question shouldn't be double-posted, but I find @Glorfindel's comment a bit odd. I don't see why this question is off-topic, although it doesn't help that the OP seems to be omitting various adjectives and seems to think that only PSD matrices have square roots – Yemon Choi Oct 4 '18 at 0:10

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.