A thread I saw recently has led me to believe that this is not a valid proof of the fact that for matrices $A$ and $B$, $AB=I\implies BA=I$.
Suppose $AB=I$. Then
$$A^{-1}AB=A^{-1}I$$
$$B=A^{-1}$$
$$BA=A^{-1}A$$
$$BA=I$$
what step is wrong in this? I assume $A$ has an inverse because $\det A\det B=\det AB=\det I=1$, so $\det A\neq 0$.