A monoid is a unital semigroup, i.e. a magma $M$ such that:
Associativity. For all $a$, $b$, $c\in M$,
\[(ab)c = a(bc).\]Neutral element. There is (exactly) one $e\in M$ such that for all $a\in M$,
\[ae = ea = a.\]
Let $M$ be a monoid and $a\in M$. $a$ is left-invertible if and only if $a$ is right-invertible.
Proof.Let $e$ be the neutral element.
-
If $a$ is left-invertible, then there is $x\in M$ such that $xa=e$. We have
\[x(ax) = (xa)x = ex = x,\]which follows that $ax=e$.
-
If $a$ is right-invertible, then there is $x\in M$ such that $ax=e$. We have
\[(xa)x = x(ax) = xe = x,\]which follows that $xa=e$.