# Matrices over a ring: does $PAQ=A'$ imply $\mathrm{Coker}A\cong\mathrm{Coker}A'$?

In A Singular Introduction to Commutative Algebra by Greuel & Pfister, there is written on p. 127:

Let $R$ be a commutative unital ring and $A\in R^{n\times k}$, $P\in R^{n\times n}$, $Q\in R^{k\times k}$, with $P$ and $Q$ invertible. Why do we have $\mathrm{Coker}\,A \cong \mathrm{Coker}\,PAQ$?

I understand that $R^n/\mathrm{Im}(A)\cong R^n/\mathrm{Im}(PA)$ via $P$.

-

You want to prove that $R^n/\mathrm{Im}(A)\cong R^n/\mathrm{Im}(AQ)$ with $Q$ invertible. Well, I don't think this is necessarily true, but for the special case when $Q$ is an elementary transformation this is easily seen. The image of $A$ is the submodule generated by the columns of $A$ and the image of $AT$ is the same since the elementary transforms on columns of $A$ don't affect the image: they simply interchange two columns, multiply a column by an invertible element, or add a multiple of a column to another column and obviously these operations don't change the submodule generated by the columns of $A$.