# For every monoid $M$ with zero is there a group $G$ such that $\mathrm{Grp}(G,G)\cong M$?

All monoids that I will consider here have identities. A monoid $M$ is said to have a zero iff $\exists z\in M \forall x\in M (zx=xz=z)$.

Let $M$ be any monoid with a zero. Must there exist a group $G$ such that $\mathrm{Grp}(G,G)\cong M$ ?

I know that there is no reason to suppose that there must exist such a group. I also expect that there will exist a counterexample, however the fact that I can't find one is irritating me.

Thank you

• @BabakS. $Grp$ denotes the category of all groups. $Grp(G,G)$ denotes the monoid of all group homomorphisms $\phi:G\rightarrow G$ , where the operation is function composition – Amr May 22 '13 at 10:23
• Related "dual" question: math.stackexchange.com/questions/2779465 – Watson Nov 21 '18 at 17:35

The group of invertible elements of $\operatorname{Grp}(G,G)$ contains the automorphism group of $G$, and in particular the group of inner automorphisms, which is isomorphic to $G/Z(G)$.
So take the monoid $\{ z \} \cup C_{p}$, where $p > 2$ is a prime, $C_{p}$ is a multiplicative cyclic group of order $p$, and $z$ is the zero.
So $G/Z(G)$ is isomorphic to a subgroup of $C_{p}$, and thus cyclic. Therefore $G = Z(G)$ is abelian. Then $\operatorname{Grp}(G,G)$ is nothing else but the (multiplicative part of the) endomorphism ring of $G$, and the automorphism group of $G$ has odd order $p$.
Now in any abelian group inversion is an automorphism, so inversion must be trivial here, that is, $G$ has exponent $2$. Clearly $\lvert G \rvert = 2$ is impossible, and if $\lvert G \rvert > 2$, then $G$ is a vector space of dimension $\ge 2$ over the field with two elements, and thus swapping two basis elements would be an automorphism of order $2$, a contradiction.