Prove if an element of a monoid has an inverse, that inverse is unique

Solution 1:

Of course the identity is unique, $e_1=e_1\circ e_2=e_2$. Now suppose $a,b$ are both inverses of $x$. Then

$$a = a\circ e = a\circ(x\circ b) = (a\circ x)\circ b = e\circ b = b.$$

The fact that the identity is unique plays no role, really, though the proof uses the same method of switching between the left and right perspectives of an expression and substituting with identity.