In a non-commutative monoid, is the left inverse of an element also the right inverse?

Solution 1:

The answer is yes if $M$ is finite, no otherwise. For this you only have to consider for each $a\in M$, the function $$\begin{align*} T_a:M&\rightarrow M\\ x&\mapsto a*x \end{align*}\text{.}$$ Then, if there is a $b$ such that $$b*a=1\text{,}$$ this means that $T_a$ is injective since $$\text{id}_M=T_b\circ T_a=T_{b*a}\text{.}$$ In this case, if $M$ is finite, this implies that $T_a$ is bijective and $T_b$ its inverse. Thus $$b*a=1$$ due to $$T_{b*a}=T_b\circ T_a\text{.}$$

However, when $M$ is infinite, this implication is false, i.e., there are functions that are injective and no surjective. For a concrete example with a monoid consider the monoid $M$ of functions $\mathbb{N}_0\rightarrow \mathbb{N}_0$ generated by the functions given by $$ f:n\mapsto\begin{cases} 0 & \text{ if }n=0\\ n-1& \text{ if }n\neq 0 \end{cases}\text{ and } g:n\mapsto n+1\text{.} $$ Then $f\circ g=\text{id}$ but not in the other way. (Note here how we are using the injective but not surjective function trick.)

Solution 2:

The answer is no. The bicyclic monoid is a counter-example. However, in a finite monoid, the answer is yes.