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.

Proof
$$ $$ $$ $$ $$

Comment
I have a feeling that I've entered this proof before, but I can't find it anywhere.