If $R$ is a commutative ring, and $A \in M_{n \times m}(R)$, $B \in M_{m \times n}(R)$ with the property that $AB = I_n$ and $BA = I_m$, prove that $n = m$.
I’m aware of a proof involving traces in the case that $R$ is a field of characteristic zero, but cannot think of / know of a proof for this more general case.
Let $\mathfrak{m}$ be a maximal ideal of $R$, and let $k=R/\mathfrak{m}$. If $C=(c_{ij})\in M_{p\times q}(A)$, define $\bar{C}=(\overline{c_{ij}})_{ij}\in M_{p\times q}(k)$.
It is not difficult to see that $\overline{C_1C_2}=\overline{C}_1 \overline{C}_2$, with obvious notation.
Now if $AB=I_n$ and $BA=I_m$, then $\bar{A}\bar{B}=I_n\in M_n(k)$ and $\bar{B}\bar{A}=I_m\in M_m(k)$. Since $k$ is a field, a classical result of linear algebra tells you that $n=m$.