It is well known that if $A,B$ are square matrices of size $n$ (with terms in some field $\mathbb{K}$) such that $AB=I_n$ (the unit matrix of size $n$) then $BA=I_n$.
This can be proved by considering the endomorphisms $f,g$ of $\mathbb{K}^n$ which are represented respectively by $A,B$ in the canonical basis of $\mathbb{K}^n$ :
Since $f\circ g=id$, we can see that $f$ is surjective and $g$ is injective, hence both are isomorphisms. Now we have :
$g\circ f=g\circ f\circ (g\circ g^{-1})=g\circ (f\circ g)\circ g^{-1}=g\circ g^{-1}=id$
which proves that $BA=I_n$.
Of course, it can also be seen as follows : $\det(A)\,\det(B)=\det(AB)=1$ hence $\det(A)$ and $\det(B)$ are nonzero.
Now my question ...
How to prove the same result, using only algebraic calculations (no determinant, no rank formula) ?