Maximal commuting subsets of $\text{End}(X)$ Let $X$ be a set and let $\text{End}(X)$ be the set of all functions $f:X\to X$. We say that $f, g\in \text{End}(X)$ commute if $g\circ f = f\circ g$, and $S\subseteq \text{End}(X)$ is a commuting subset if any two members of $S$ commute.
Using Zorn's Lemma, a routine verification shows that for any commuting subset $S\subseteq \text{End}(X)$ there is a maximal (with respect to $\subseteq$) commuting subset $M\subseteq \text{End}(X)$ such that $S\subseteq M$. (It is also easy to prove that if $f, g\in M$ for $M$ maximal commuting, then $g\circ f\in M$, and $\text{id}_X\in M$, so $M$ is a sub-monoid of $\text{End}(X)$.) 
Question: If $X$ is infinite, and $M\subseteq \text{End}(X)$ is maximal commuting, what are possible cardinalities of $M$ in terms of $|X|$? In particular, it would be nice to know whether all maximal commuting subsets of $\text{End}(X)$ have the same cardinality.
 A: One should be able to use the following ingredients to show that most any cardinality is possible.  Unfortunately, a missing piece is that the result is maximal commuting.  However, I give the other pieces now to inspire someone to answer the problem.
For any commutative monoid M, one can enhance M by adding a new unit u to M to make M', as well as add a zero elements z and associated divisors of z to make a larger commutative monoid. One can use a version of Cayley's Theorem to embed such monoids into the desired set X.  So End(X) will have commutative submonoids of any desired possible cardinality.
Since X is infinite, there may be a chance of making a twist to these embeddings to make them maximal. Unfortunately my hand waving efforts fail me here.
Gerhard "Might Try Some Foot Waving" Paseman, 2016.11.06.
A: Here is a concrete way to construct examples of maximal commuting monoids of different cardinalities: As Anthony Quas said: we can get a maximal monoid of cardinality $|X|$
This can be generalized in the following way: let $G$ be an abelian group. Let $X$ be the $G$-set $G\sqcup Y$ where the action of $G$ on $Y$ is trivial. 
Let now $f\in End(X)$ be an element which commutes with the action of $G$. We have two options: 


*

*$f(G)=G$. In this case $f$ can be thought of as an element in $G\times End(Y)$.

*$f(G)=y\in Y$. In this case, $f$ can be thought of as an element of $Y\times End(Y)$ (this is just a set, not a monoid).
Take now a maximal commutative monoid $M\subseteq End(Y)$. Then we get an embedding of $G\times M$ into $End(X)$. The only way that this commutative submonoid will not be maximal is if there exists an $f\in End(X)$ from the second form. In this case $f(G)=y$ should be a fixed point of $M$, and the action of $f$ on $Y$ is given by an element in $M$. 
Thus, we see that the commutative monoid $G\times M$ is almost maximal, at least in the sense that a maximal commutative monoid which contains it will have cardinality at most $|G||M|+|Y||M|$.
If $|Y|\leq |G|$, then this maximal commutative monoid will have cardinality $|G||M|$.
This enables us to construct now submonoids of many different cardinalities: 
For example, if $Y$ has infinite cardinality, then we can write a bijection $Y\cong Y\times\{0,1\}$. On this set we can consider the commutative monoid $\{Id, \tau\}^Y$ where $\tau$ is the transposition. This has cardinality $2^{|Y|}$, and therefore the maximal commutative submonoid of $End(Y)$ which contains it will also be of the same cardinality. This shows that for every $|Y|\leq |X|$ we can construct a maximal commutative submonoid of cardinality max$\{|X|,2^{|Y|}\}$.
I do not know if it is possible to construct a maximal commutative monoid of cardinality smaller than $|X|$. 
