Let $R$ is a ring, $M$ is a $n \times n$ matrix over the ring $R$ (i.e. $M \in M_n(R)$). I need to prove that $\exists M' \in M_n(R)$ such that $M' M = \det M \cdot E$, where $E \in M_n(R)$ is the identity matrix.
My proof is the following:
If $\det M = 0$ then we can assume $M' = 0$
If $\det M \ne 0$ then there exists $M^{-1}$ and therefore $M' = \det M \cdot M^{-1}$ will work.
Are there any errors in the proof?