TITLE: Principal ideal ring, does there exist an invertible matrix such that certain matrix is upper triangular?
QUESTION [7 upvotes]: I asked here on Math Stack Exchange the following question.

Let $R$ be a principal ideal ring. If $A$ is any $p \times q$ matrix over $R$, then does there exist an invertible matrix $U$ in $\text{M}_p(R)$ such that the $p \times q$ matrix $UA$ is upper triangular?

rschwieb gave the following answer.

Of course you can try row reduction: you should probably go look at Smith normal form. Of course that is written for principal ideal domains, but I don't remember the domain part being the important condition to execute row operations.  I think you just need GCDs. (I should check, maybe there is something tricky.)
Part of the algorithm is the process of performing row operations to put the matrix in upper triangular form.
The process continues with aim invertible matrix on the right to get the matrix into a diagonal form.

My question is, can anybody here beef up what he wrote here into a more complete (but hopefully concise) proof? I still don't really see why what he suggests works.

REPLY [2 votes]: An elementary matrix is a $p\times p$ matrix of the form
  $$
  E^a_{i,j} = I + a e_{i,j},
  $$ where $I$ is the identity matrix, $a$ is any element in your ring, $i\neq j$, and $e_{i,j}$ is the standard matrix unit.  It is easy to see that $E^a_{i,j}$ is always invertible and that its inverse is $E^{-a}_{i,j}$.  The other crucial property of this matrix is that, for every $p\times q$ matrix $A$, the product $E^a_{i,j}A$ coincides with the matrix you get by multiplying the $j^{th}$ row of $A$ by $a$, and adding it to the $i^{th}$ row.  This is therefore one of the elementary operations used to perform row reduction.
The other important operation used in row reduction, namely exchange of rows, is also easily seen to be obtained by left multiplying $A$ by a suitable invertible matrix.  Thus, if you can transform $A$ into an upper triangular matrix using a finite number of elementary operations, you may also left multiply $A$ by the same number of invertible matrices, obtaining an upper triangular matrix, say
  $$
  U_1U_2\ldots U_nA=T,
  $$
  from where your conclusion follows easily.