Similarity of integer matrices

We know in linear algebra that if $$A$$ and $$B$$ are $$n×n$$ complex matrices then$$A\sim B\iff\begin{pmatrix}A&\\&A\end{pmatrix}\sim\begin{pmatrix}B&\\&B\end{pmatrix}.$$I wonder whether it still holds when $$A$$ and $$B$$ are integer matrices.（In this case the transition matrix should also be an invertible integer matrix.）

If $$A \sim B$$ it's easy to show $$diag(A,A) \sim diag(B,B).$$But the opposite side seems more difficult.I think the opposite side may not hold.But cannot prove it or find a counterexample.Any help will be thanked.

$$A \sim B \Longrightarrow \exists C, \; B = CAC^{-1}; \tag 1$$

we thus compute

$$\begin{bmatrix} C & 0 \\ 0 & C \end{bmatrix}\begin{bmatrix} A & 0 \\ 0 & A \end{bmatrix}\begin{bmatrix} C^{-1} & 0 \\ 0 & C^{-1} \end{bmatrix} = \begin{bmatrix} CA & 0 \\ 0 & CA \end{bmatrix}\begin{bmatrix} C^{-1} & 0 \\ 0 & C^{-1} \end{bmatrix}$$ $$= \begin{bmatrix} CAC^{-1} & 0 \\ 0 & CAC^{-1} \end{bmatrix} = \begin{bmatrix} B & 0 \\ 0 & B \end{bmatrix}; \tag 2$$

thus

$$\begin{bmatrix} A & 0 \\ 0 & A \end{bmatrix} \sim \begin{bmatrix} B & 0 \\ 0 & B \end{bmatrix}. \tag 3$$

Note that if $$A$$ and $$B$$ are integer matrices and $$C$$ is an invertible integer matrix in (1), the corresponding applies to (2) and (3).

The reverse implication, going from (3) to (1), appears to be substantially more difficult and I can't write on it at this time.

• Yes that's true but what about the opposite site? – Tree23 Apr 11 at 5:30
• @Tree23: what is "the opposite site"? – Robert Lewis Apr 11 at 5:33
• Can we have $A \sim B$ when $diag(A,A) \sim diag(B,B)$? – Tree23 Apr 11 at 5:36
• @Tree23: need to think a little more about that one! – Robert Lewis Apr 11 at 5:38
• @Tree23: well, sorry to say, I don't have an answer to that. But at least I edited my post to reflect that! Cheers! – Robert Lewis Apr 11 at 5:46

If $$A = MBM^{-1}$$ then

$$\left( \begin{array} { l l } { A } & { } \\ { } & { A } \end{array} \right) = \left( \begin{array} { l l } { M } & { } \\ { } & { M } \end{array} \right) \left( \begin{array} { l l } { B } & { } \\ { } & { B } \end{array} \right) \left( \begin{array} { l l } { M^{-1} } & { } \\ { } & { M^{-1} } \end{array} \right)$$