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

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.


Even for groups, I have seen the definition of an inverse as $ab=ba=e$, so defining both left and right inverse. This is quite convenient and not every definition has to be "minimal".

Of course, left inverse implies also right inverse, so it would be enough to require only, say, left inverse - see for example here:

Any set with Associativity, Left Identity, Left Inverse, is a Group. - Fraleigh p.49 4.38

Right identity and Right inverse implies a group

In particular, this holds for the group $G=GL_n(K)$.