Let $M$ be a monoid with unit element $e$. One may define its maximal subgroup to be $$G_M=\left\{a\in M\mid\exists b\in M:ab=ba=e\right\}$$
I wanted to know whether there is a monoid $M'$ such that $M\cong G_M\times M'$. If it's false in general, does it hold for commutative monoids?
Thanks :)
No, there is not always such an $M'$. For instance, you have the monoid of multiplication of integers modulo $3$. It has three elements, and its maximal subgroup is the cyclic group with two elements.