This question already has an answer here:

I was wondering if $AB=E$ ($E$ is identity) is enough to claim $A^{-1} = B$ or if we also need $BA=E$. All my textbooks define the inverse $B$ of $A$ such that $AB=BA=E$. But I can't see why $AB=E$ isn't enough. I can't come up with an example for which $AB = E$ holds but $BA\ne E$. I tried some stuff but I can only proof that $BA = (BA)^2$.

Edit: For $A,B \in \mathbb{R}^{n \times n}$ and $n \in \mathbb{N}$.


marked as duplicate by Omnomnomnom linear-algebra Aug 6 '15 at 9:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ Is the space finite-dimensional? If not, then it is not true in general. $\endgroup$ – Vim Aug 6 '15 at 2:58
  • $\begingroup$ Yes. I didn't try to come up with an counterexample of infinite-dimensional spaces since I can't even see why it's true for finite-dimensional spaces. $\endgroup$ – user44789 Aug 6 '15 at 3:01
  • $\begingroup$ (I can't comment...so): [Please look this question:][1] [1]: math.stackexchange.com/questions/3852/if-ab-i-then-ba-i $\endgroup$ – Beny Aug 6 '15 at 3:08
  • $\begingroup$ Ah thanks. I should have searched with $I$ instead of $E$. $\endgroup$ – user44789 Aug 6 '15 at 3:10
  • $\begingroup$ This is even true if $A$ and $B$ are matrices over a commutative semiring, but it is more difficult to prove. See Reutenauer and Straubing, Inversion of matrices over a commutative semiring. J. Algebra 88 (1984), no. 2, 350--360. $\endgroup$ – J.-E. Pin Aug 6 '15 at 6:50

If $AB = E$, then (the linear application associated to) $A$ has a right inverse, so it's surjective, and as the dimension is finite, surjectivity and injectivity are equivalent, so $A$ is bijective, and has an inverse. And the inverse is also a right inverse, so it's $B$


Are A,B both square matrices? Then AB=E and the fact that the determinant is multiplicative (i.e., det(AB)=det(A)det(B)) tells you that both A,B must have nonzero determinant and hence both be invertible. In that case, you can readily multiply on the left by A^{-1} and obtain B=A^{-1}.

If A is nxr and B is rxm, where n and m don't match, it is actually impossible to obtain AB=E, since E is square (i.e., n=m).

If n=m but n is not equal to r, then you can get AB=E (the nxn identity matrix), and BA will be defined as well, but it is possible that BA might not equal the rxr identity matrix. Such A,B to illustrate this fact can easily be found.


Use Crammer's Rule any square matrix $A\in\mathbb{R}^{n\times n}$ with nonzero determinant has a right inverse $B$ ($AB=E$).

Since $AB=E$, $|A||B|=|AB|=|E|=1$. Hence $|B|\neq 0$ which implies that $B$ has a right inverse $C$ such that $BC=E$.

Now you just need to prove that $A=C$ which you should try yourself.


Not the answer you're looking for? Browse other questions tagged or ask your own question.