Why does definition of the inverse of a matrix involves having $AB=I=BA$

definitioninverselinear algebramatrices

So, I was reviewing the first course in Linear Algebra which I took and got curious about the reason behind defining the inverse of a matrix in the following way (from Wikipedia):

In linear algebra, an $n$-by-$n$ square matrix $A$ is called invertible (also nonsingular or nondegenerate) if there exists an $n$-by-$n$ square matrix $B$ such that
$$
AB=BA=I
$$

Now, I had an exercise to prove that if $AB=I$, then $BA=I$. Then, what is the reason to put both the equalities in the definition? Is that somewhat traditional or is it because of some specific reason which I'm not aware of?

I'd be happy if someone could help me out.

Thanks in advance!

Best Answer

We want to require $AB=I$ and $BA=I$ for any linear operators $A$ and $B$. The second is redundant for finite-dimensional spaces but not in general.

Say $V$ is the space of all one-sided sequences $x=(x_1,x_2,\dots)$. Define $A,B:V\to V$ by $$Ax=(x_2,x_3,\dots),$$ $$Bx=(0,x_1,x_2,\dots).$$Then $AB=I$ but $BA\ne I$.

So: We need the condition for the infinite-dimensional case, so the reason it's included in the definition in the finite-dimensional case is so the definition is the same in every vector space.