My teacher was giving a lesson on matrices today, and he mentioned that, given two square matrices (of the same dimensions) $A$ and $B$, in order to determine if $A=B^{-1}$, we have to make sure that both $AB=I$ and $BA=I$, as matrix multiplication is not commutative.
However, it seems that given $A$, there is only one solution for $B$ to the equation $AB=I$.
Can someone show an example of two matrices $A$ and $B$ such that $AB=I$ but $BA \ne I$? Or prove that this not possible?