TITLE: Is a matrix similar to its transpose over $\mathbb{Z}_p$?
QUESTION [15 upvotes]: Is every $n \times n$ matrix with entries in $\mathbb{Z}_p$ (or even $\mathbb{Z}$) conjugate to its transpose via a matrix in $GL_n(\mathbb{Z}_p)$?
On the one hand, I know the analogous fact is false for matrices over $\mathbb{Z}$ with counterexamples constructed via the Latimer-MacDuffee theorem (but the only counterexamples I've seen break down in $\mathbb{Z}_p$ for all $p$.) 
On the other hand I know there are various conditions under which $GL_n(\mathbb{Q}_p)$-conjugacy implies $GL_n(\mathbb{Z}_p)$-conjugacy, as well as lifting criteria from $GL_n(\mathbb{F}_p)$, so it seems possible that it could hold here.

REPLY [15 votes]: No, the matrix
$$
\begin{pmatrix}0 & 1 & 0\\
0 & 0 & p\\
0 & 0 & 0
\end{pmatrix}\in\mathrm{M}_{3}(\mathbb{Z}_{p})
$$
is not similar to its transpose. This has been known for some time. McDonald, Linear Algebra over Commutative Rings (1984) atttributes this to M. Hochster in Exercise V.D.17, p. 424. More generally, it is noted there that this counter-example works for any commutative ring $R$ that is not von Neumann regular when instead of $p$ one uses an element $x\in R$ such that $x\not\in (x^2)$. 
The "reason" why there is no counter-example for $2\times 2$ matrices over $\mathbb{Z}_p$ is that any such matrix can be written as $aI+p^iX$, where $a$ is a scalar and $X$ is a regular matrix, that is, $X$ is similar to a companion matrix. The point is that it is known that companion matrices over commutative rings are similar to their transpose (I think this is due to Gustafson).