Let and be two square matrices with integer coefficients. Assume that they are conjugate by , namely, that there exists a matrix such that . Then we can reduce this relation modulo every integer and obtain a similar relation between the images of and in .
Almost the same holds if and are only conjugate by , except for a few exceptions: we just need to take care to reduce the relation modulo integers that are coprime to the denominators of the coefficients of or of .
I was quite surprised at first to learn that the converse assertion is false. There are matrices and
in whose images modulo every integer are conjugate, but which are not conjugate by a matrix in .
An example is given by Peter Stebe in his paper “Conjugacy separability of groups of integer matrices”, Proc. of the AMS, 32 (1), mars 1972, p. 1—7.
Namely, set
and
\[ B = \begin{pmatrix} 188 & 11 \\ 3025 & 177 \end{pmatrix} =
\begin{pmatrix} 11\cdot 17+1 & 11 \\ 11^2\cdot 25 & 11\cdot 16+1 \end{pmatrix}. \]
These matrices and have integer coefficients, their determinant is , hence they belong to . They also have the same trace, hence the same characteristic polynomial, which is . The discriminant of this polynomial is . This implies that their complex eigenvalues are distinct, hence these matrices are diagonalizable over , and are conjugate over .
In the same way, we see that they remain conjugate modulo every prime number
that does not divide the discriminant. Modulo and , we check that both matrices become
conjugate to , while they become conjugate to modulo .
It is a bit more delicate to prove that if we reduce modulo any integer , then and become conjugate under . Stebe's argument runs in two steps.
He first computes the set of matrices that conjugate to , namely he solves the equation . The answer is given by
Moreover, one has
Consequently, to prove that and are conjugate in , it suffices to find such that .
To prove that they are conjugate by , we need to find such that , and if we agree to be content with a conjugacy by , then solutions of are also admissible.
Let us first start with the equations modulo . By the Chinese remainder theorem, we may assume that is a power of a prime number . Now, if , we can take and such that . If , we take and we solve for , which is possible since is a square, and it is easy, by induction (anyway, this is an instance of Hensel's lemma), to produce modulo such that and .
On the other hand, the equation has no solutions in integers.
The case of is easy by reduction modulo : it becomes , which has no solution since and is not a square modulo .
The case of is rather more difficult. Stebe treats it by reducing to the Pell equation and shows by analysing the minimal solution to this Pell equation that is divisible by , which is incompatible with the initial equation.
From a more elaborate point of view, is a smooth scheme over that violates the integral Hasse principle. In fact, is a torsor under the centralizer of , which is a torus, and the obstruction has been studied by Colliot-Thélène and Xu, precisely in this context. However, I did not make the calculations that could use their work to reprove Stebe's theorem.