# When the inverse of a matrix with integer entries also has integer entries

Suppose $$A\in\Bbb{GL}_n(\Bbb R)$$, (the space of all invertible matrices of order $$n$$), have integer entries.

If $$\det(A)=\pm 1$$ then obviously $$A^{-1}$$ have integer entries. Is the converse true, that is, if $$A^{-1}$$ have integer entries does it imply that $$\det(A)=\pm 1$$? Obviously for that $$|\det(A)|=\gcd\{|A_{ij}|,1\leq i,j\leq n\}$$ where $$A_{ij}$$ is the$$(i,j)^{th}$$ cofactor. But is it necessary for the $$\gcd$$ to be $$1$$ for a matrix to be invertible?

• Just check hilbert matrix and its inverse. Inverse of hilbert matrix have integer entries but matrix is not itself integer matrix.It is rational entry matrix. Nov 15, 2017 at 5:55
• To refer to what maths student had already said, related question and explanation why the inverse of the Hilbert matrix has integer coefficients. Jul 6, 2020 at 7:45
• This is only true for n > 1 ! Oct 19, 2020 at 10:03
• @jherek: No, it's not. If you think otherwise, please provide a counterexample. Oct 19, 2020 at 19:11

If $A$ and $A^{-1}$ have integer entries, then $$\det(A)\det(A^{-1})=\det(AA^{-1})=\det(I)=1$$ and as $\det(A)$ and $\det(A^{-1})$ are integers, then $\det(A)=\det(A^{-1})=\pm1$.
Consider this $$3 \times 3$$ matrix :
$$A=\begin{pmatrix}1 & 1/2 & 1/3 \\ 1/2 & 1/3 & 1/4 \\ 1/3 & 1/4 &1/5 \end{pmatrix}$$
$$A^{-1}=\begin{pmatrix}9 & -36 & 30 \\ -36 & 192 & -180 \\ 30 & -180 &180 \end{pmatrix}$$ But $$\det(A)=\frac1{2160}$$