Matrix over $\mathbb Z[X]$ which is not equivalent to a diagonal matrix How can I find $A=\begin{pmatrix} a & b \\ c & d \end{pmatrix}$, where $a,b,c,d \in \mathbb Z[x]$, such that there does not exist invertible matrices $B, C \in M_2(\mathbb Z[x])$ such that $B^{-1}AC$ is diagonal?
 A: A necessary (and sufficient) condition for matrices $B,C$ with entries in $\mathbb{Z}[x]$ to be invertible is that the respective determinant be a unit of $\mathbb{Z}[x]$, i.e 1 or -1.
Consider $A = \begin{pmatrix} x & 2 \\ 0 & 0 \end{pmatrix}$.  
If matrix $A$ were equivalent to diagonal matrix $D$:
$$B^{-1} A C = D$$
then by taking determinants we see that $D$ must have a zero on its diagonal:
$$D = \begin{pmatrix} p & 0 \\ 0 & 0 \end{pmatrix}$$
where $p$ is a nonzero element of $\mathbb{Z}[x]$.  Rewriting the equivalence condition:
$$\begin{pmatrix} x & 2 \\ 0 & 0 \end{pmatrix} C = B \begin{pmatrix} p & 0 \\ 0 & 0 \end{pmatrix}$$
we see that $p B_{21} = 0$, so $B_{21} = 0$, and that $x C_{12} + 2 C_{22} = 0$.  Since $x,2$ are different primes (not associates), this implies for some polynomial $q$, $C_{12} = 2q$ and $C_{22} = -xq$.
Now invertibility of $B$ requires $|B_{11}| = 1$, and without loss of generality any sign of $B_{11}$ may be combined with $p$ in our calculations, so that $x C_{11} + 2 C_{21} = p$.
But invertibility of $C$ requires $C_{11} C_{22} - C_{12} C_{21}$ be 1 or -1.  Substituting $C_{22} = -xq$ and $C_{12} = 2q$ from above gives us that $-q (x C_{11} + 2 C_{21})$ is a unit, and thus both factors of that must be units.
This is a contradiction because factor $x C_{11} + 2 C_{21}$ cannot be a unit.  The ideal generated by $x,2$ in $\mathbb{Z}[x]$ is proper.
