Equality of left and right inverses in monoid

Verbal statement
Suppose $$*$$ is the associative binary operation of a monoid, and $$e$$ is its neutral element (or identity element). If an element has both a left and a right inverse with respect to $$*$$, then the left and right inverse are equal.

Statement with symbols
Suppose $$S$$ is a monoid with binary operation $$*$$ and neutral element $$e$$. If an element $$a \in S$$ has a left inverse $$b$$ (i.e., $$b * a = e$$)and a right inverse $$c$$ (i.e., $$a * c = e$$), then $$b = c$$.

Corollaries
Some easy corollaries:


 * Two-sided inverse is unique if it exists in monoid
 * In a monoid, if an element has a left inverse, it can have at most one right inverse; moreover, if the right inverse exists, it must be equal to the left inverse, and is thus a two-sided inverse.
 * In a monoid, if an element has a right inverse, it can have at most one left inverse; moreover, if the left inverse exists, it must be equal to the right inverse, and is thus a two-sided inverse.
 * In a monoid, if an element has two distinct left inverses, it cannot have a right inverse, and hence cannot have a two-sided inverse.
 * In a monoid, if an element has two distinct right inverses, it cannot have a left inverse, and hence cannot have a two-sided inverse.
 * In a group, every element has a unique left inverse (same as its two-sided inverse) and a unique right inverse (same as its two-sided inverse).

More indirect corollaries:


 * Monoid where every element is left-invertible equals group

Proof idea
The idea is to pit the left inverse of an element against its right inverse. Starting with an element $$a$$, whose left inverse is $$b$$ and whose right inverse is $$c$$, we need to form an expression that pits $$b$$ against $$c$$, and can be simplified both to $$b$$ and to $$c$$.

The only relation known between $$b$$ and $$c$$ is their relation with $$a$$: $$b * a$$ is the neutral element and $$a * c$$ is the neutral element. To use both these facts, we construct the expression $$b * a * c$$. The two ways of parenthesizing this expression allow us to simplify the expression in different ways.

The key idea here is that since $$b$$ and $$c$$ are related through $$a$$, we need to put $$a$$ in between them in the expression. Then, we need associativity to interpret the expression in different ways and simplify to obtain the result.

Formal proof
Given: A monoid $$S$$ with associative binary operation $$*$$ and neutral element $$e$$. An element $$a$$ of $$S$$ with left inverse $$b$$ and right inverse $$c$$.

To prove: $$b = c$$

Proof: We consider two ways of associating the expression $$b * a * c$$.

$$(b * a) * c = b * (a * c)$$ by associativity. The left side simplifies to $$e * c = c$$ while the right side simplifies to $$b * e = b$$. Hence, $$b = c$$.