Why does definition of the inverse of a matrix involves having $AB=I=BA$? 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!
 A: 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.
A: 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)$.
