Left Inverse and Right Inverse is Inverse

Theorem
Let $\left({S, \circ}\right)$ be a monoid whose identity is $e_S$.

Let $x \in S$ such that $x$ has both a left inverse and a right inverse. That is:


 * $\exists x_L \in S: x_L \circ x = e_S$
 * $\exists x_R \in S: x \circ x_R = e_S$

Then $x_L = x_R$, that is, $x$ has an inverse.

Furthermore, that element is the only inverse (right and left) for $x$

Proof
We note that as $\left({S, \circ}\right)$ is a monoid, $\circ$ is associative by definition.

Its uniqueness comes from Inverse in Monoid is Unique.