# Can we prove $BA=E$ from $AB=E$? [duplicate]

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 StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 6 '15 at 9:00

• Is the space finite-dimensional? If not, then it is not true in general. – Vim Aug 6 '15 at 2:58
• 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. – user44789 Aug 6 '15 at 3:01
• (I can't comment...so): [Please look this question:][1] [1]: math.stackexchange.com/questions/3852/if-ab-i-then-ba-i – Beny Aug 6 '15 at 3:08
• Ah thanks. I should have searched with $I$ instead of $E$. – user44789 Aug 6 '15 at 3:10
• 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. – 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.