I've been given this question that's been puzzling me for a while:
$M$ is a monoid with identity element denoted by $e$.
$U(M)$ is the set of all invertible elements of $M$.
Suppose that $M$ is not commutative.
Let $a, b \in M$. If $ab \in U(M)$, then is it necessarily the case that $a \in U(M)$?
Hint: Consider the monoid of the set of all functions from positive integers into itself, equipped with the binary operation of composition of functions, together with the element $b \in M$ that is defined as follows: $b(n)=n+1 \ \forall n \in \Bbb N$.
I believe that it's not always necessarily the case and I need to provide a counter example. I'm attempting to find a function $a(n) \circ b(n)$ is equal to an invertible function. However the invertible function that I can think of is one as the function has a domain and co-domain of positive integers.
Is this the right approach? I'm not sure where to go from here.