Let $X$ be a set. Show that $((M(X),\circ)$ has an absorbing element iff $|X|\leq 1$ iff $M(X)$ is commutative.
In this problem $((M(X),\circ)$ is a monoid and M(X) is the set of all maps from X to X and the operation is the composition function. I know that the composition function is not normally commutative but it obviously is in this case.
I'm just really not sure how to fill in the actual proof from the following succession I have... any help would be great!
a $\to$ b: Show that an absorbing element must equal every constant function.
b $\to$ c: $|M(X)|$=1 in this case
c $\to$ a: Show that any constant function is an absorbing element.
Note that if $f\colon X\to X$ is constant, then $f\circ g=f$ for all $g\colon X\to X$.
$a\to b$: If $z$ is absorbing and $f$ constant, we obtain $f=f\circ z = z$. For any elemtn $x\in X$ there exists a constant function that maps all to $x$. As all constant functions must equal $z$, we conclude $|X|\le 1$.
$c\to a$: As remarked above, if $f$ is constant, then $f\circ g$ for all $g$. By commutativity, we find $f=f\circ g = g\circ f$, i.e. $f$ is absorbing.