Suppose $A$ and $B$ are $n \times n$ matrices. Assume $AB=I$. Prove that $A$ and $B$ are invertible and that $B=A^{-1}$.
Please let me know whether my proof is correct and if there are any improvements to be made.
Assume $AB=I$. Then $(AB)A=IA=A$. So, $A(BA)=AI=A$. Then $BA=I$. Therefore $AB=BA=I$. Thus $A$ and $B$ are invertible. And by definition $B=A^{-1}$, so $AB=AA^{-1}=I$.
It doesn't seem quite correct. Thanks in advance for any advice.