# If $A,B$ are $n\times n$ matrices and we have that $AB= I_n$, why do we need to show that $BA=I_n$ as well to show that $A$ is an inverse of $B$?

If $$A,B$$ are $$n\times n$$ matrices and we have that $$AB= I_n$$, why do we need to show that $$BA=I_n$$ as well to show that $$A$$ is an inverse of $$B$$?

This answer addresses the author's original question without appealing to (basic facts of) groups.

As to how to prove that the right-inverse implies the left-inverse, there are many answers of that here.

As to the why this must be proven, which is at the crux of the original question, it is clear from the definition of matrix multiplication and working with examples that the operation is not commutative. Thus, if $$AB = I_n$$, then there is no guarantee that $$BA = I_n$$.

• can you have $AB=I_n$ without $BA=I_n$? – stochasticmrfox May 14 at 9:44
• @stochasticmrfox No, see the second link in my answer. – Pietro Paparella May 14 at 16:28

No, we do not need to show this, since in the group $$GL_n(K)$$ it follows that a left inverse is also a right inverse.

• @OP: Technically you do need to show that $BA=I$. But as Dietrich Burde pointed out, this is automatically true when $A,B$ are matrices. For linear maps in infinite dimensions, you can have $AB=I$ while $BA\neq I$, so generally speaking you should be aware that one should show $AB=I$ and $BA=I$. – Ehsaan May 13 at 21:35

At first glance, it might seem necessary to show this because it is a matter of definition.

Moreover, consider the real vector space $$E$$ of all $$C^\infty$$ maps $$f:\mathbb{R}\to\mathbb{R}$$, the ring $$A$$ of all linear maps $$T:E\to E$$ and the two following elements of $$A$$ :

$$\phi:E\to E,f\mapsto f'$$

and

$$\psi:E\to E,f\mapsto[x\mapsto\int_0^xf(t)\,dt]$$

It can be seen that $$\phi$$ has a right inverse but no left inverse and $$\psi$$ has a left inverse but no right inverse.

In fact : $$\phi\circ\psi=id_E$$ but neither $$\phi$$ nor $$\psi$$ is a bijection.

Now, if $$u,v:\mathbb{R}^n\to\mathbb{R}^n$$ are linear maps such that $$u\circ v=id_{\mathbb{R}^n}$$ then $$u$$ is surjective and $$v$$ is injective, hence both are bijective (because both are linear and $$\mathbb{R}^n$$ is finite dimensional.

It is now clear that : $$v\circ u=u^{-1}\circ\left(u\circ v\right)\circ u=u^{-1}\circ u=id_{\mathbb{R}^n}$$.

Hence the proposition : if $$A,B$$ are square $$n\times n$$ matrices such that $$AB=I_n$$ then $$BA=I_n$$.

Here is an easy way to prove that $$AB=I_n$$ implies $$BA=I_n$$ without appealing to any advanced concepts or algebraic structures.
Recall that a matrix is invertible if and only if its determinant is different from $$0$$.
Now, taking the determinant of both sides we have that $$\det(AB)=1$$. Since the matrices are square, this means that $$\det A \cdot \det B=1$$. This implies that $$\det A, \det B \neq 0$$, so $$A$$ and $$B$$ are invertible.
Left multiply the initial relation by $$A^{-1}$$ to get that $$B=A^{-1}$$. Now since $$A^{-1}\cdot A=I_n$$, we get that $$BA=I_n$$.