TITLE: Similar matrices over $\mathbb Z_p$
QUESTION [14 upvotes]: Let $A$ and $B$ be two $n \times n$ matrices with entries in $\mathbb Z_p$, the $p$-adic integers.  Is it true that $A$ and $B$ are conjugate iff they're conjugate over $\mathbb Q_p$ and over $\mathbb F_p$?

REPLY [23 votes]: A counterexample is
$$
A=\left[\begin{array}{cc}0&2\\8&0\end{array}\right],\hspace{5mm}B=\left[\begin{array}{cc}0&4\\4&0\end{array}\right]\in M_2(\mathbb{Z}_2).
$$
The matrices are conjugate in $\mathbb{Q}_2$ because they have the same eigenvalues $\pm 4$, and they are conjugate in $\mathbb{F}_2$ because both are $0$. But they are not conjugate in $\mathbb{Z}_2$ because $A\not\in 4\cdot M_2(\mathbb{Z}_2)$ but $B\in 4\cdot M_2(\mathbb{Z}_2)$.