how to prove "monoid object in the category of monoids is a commutative monoid"? I've read about Eckmann–Hilton theorem (a * b) . (c * d) = (a . c) * (b . d). But category of monoids is not a 2-category, why are there two binary operators here?
 A: A monoid object in the category of monoids is a monoid $M$ (with multiplication $m$ and identity $e$) equipped with monoid homomorphisms $m':M\times M\to M$ and $e':\{*\}\to M$ satisfying the axioms
$$m'(m'(-,-),-)=m'(-,m'(-,-))$$
and
$$m'(e',-)=\mathrm{id}_M(-)=m'(-,e').$$
Since $e'$ is a homomorphism its image must be the identity. So those axioms just say that $m'$ is associative and has $e$ as an identity.
So what we've said so far is equivalent to saying that we have a set $M$ with two multiplication operations $m$ and $m'$ that are both associative and both have the same element, $e$, as an identity, and that furthermore $m'$ is a homomorphism respect to the $m$ monoid structure. In more detail, this last point means that if we treat $M\times M$ as a monoid with multiplication $m\times m$ and $M$ as a monoid under $m$, then $m'$ is a homomorphism $M\times M\to M$. In symbols this means that:
$$m'(m(a,b),m(c,d))=m(m'(a,c),m'(b,d))$$
We can then carry out the Eckmann–Hilton argument:
$$\begin{align}m(a,d)&=m(m'(a,e),m'(e,d))=m'(m(a,e),m(e,d))=m'(a,d)\\
&=m'(m(e,a),m(d,e))=m(m'(e,d),m'(a,e))=m(d,a)\end{align}$$
So $m=m'$ and both are commutative.
A: If $(M, \cdot, 1)$ is a monoid, and $f: M \times M \rightarrow M$ a monoid homomorphism with $f(x,1) = x = f(1,x)$, then:
$x\cdot y = f(x,y)$ 
Since
$x \cdot y = f(x,1) \cdot f(1,y) = f((x,1) \cdot (1,y)) = f(x,y)$
Therefore
$x \cdot y = f(1,x) \cdot f(y,1) = f((1,x) \cdot (y,1)) = f(y,x) = y \cdot x$
