Equivalence of Definitions of Self-Inverse

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

Let $$x \in \left({S, \circ}\right)$$ be such that $$x \circ x = e_S$$.

Then $$x = x^{-1}$$.

Such an $$x$$ is said to be self-inverse.

Proof
$$ $$ $$ $$