TITLE: Matrices over $\mathbb{Q}[x,y,z]$ which are not equivalent
QUESTION [6 upvotes]: I have some problems solving the following task:

Let $R = \mathbb{Q}[x,y,z]$ and:
  $$A = \begin{pmatrix} x & y \\ 0 & z
\end{pmatrix} \in M_{2,2}(R) \qquad B = \begin{pmatrix} x & 0 \\ y & z
\end{pmatrix} \in M_{2,2}(R).$$
  Show that $A$ is not equivalent to $B$, that is, there are no invertible matrices $C,D \in M_{2,2}(R)$ such that $B=CAD$.

I've already tried substituting $C = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ and the same for $D$ and then drawing conclusions from the products of the matrices. But I wasn't able to find something helpful.

REPLY [2 votes]: Let $R'$ be the ideal of $R$ generated by $x,y,z$ (in other words, $R'$'s elements are the polynomials in $R$ with no constant coefficient). It will suffice to show the following :
Lemma. Suppose that $C,D$ are two matrices in $M_{2,2}(R)$ such
that $CB=AD$. Then $\det(C)$ and $\det(D)$ are in
$R'$ ; in particular those determinants are not invertible in $R$.
Proof of lemma Write $D=(d_{ij})_{1\leq i,j \leq 2}$ in the usual
notation. Comparing the $(1,2)$-coefficients in $CB$ and $AD$, we see
that $(1) : xd_{12}+yd_{22}=c_{12}z$. So $xd_{12}\in (y,z)$, and since
$(y,z)$ is a prime ideal of $R$ with $x\not\in (y,z)$, we see that $d_{12}\in (y,z)$ (thanks to user26857 for pointing this out) and hence $d_{12}\in R'$. Similarly, (1) forces $d_{22}\in R'$.
So $\det(D) \in R'$. The proof for $\det(C)$ is similar.