Is $\eta(1)=1'$ necessary when defining monoid homomorphisms? The definition of monoid homomorphisms requires that $\eta(1)=1'$. However, I doubt whether this condition is superfluous, for
$\forall x \in M, \eta(x) = \eta(x*1) = \eta(x)\eta(1)$
and
$\forall x \in M, \eta(x) = \eta(1*x) = \eta(1)\eta(x)$
so we may infer that $\eta(1)$ acts as $1'$ in $\eta(M)$, utilizing the condition $\forall a, b \in M, \eta(ab)=\eta(a)\eta(b)$ only.
So is it really necessary to emphasize this condition?
 A: Generally, the condition can be left out when $\eta$ is surjective. However, otherwise, for $\eta: X \to Y$, there may be $y \in Y$ such that $\eta(1_X)y \ne y$.
For example, consider the inclusion $n \to (n,0)$ of $(\Bbb Z,\cdot)$ into $(\Bbb Z^2, \cdot)$ (coordinatewise $\cdot$, that is).
A: No, preservation of multiplicative identity cannot be deduced from the other axioms.
Even for monoids as rigid as the multiplicative monoids of rings, it is not true.
For example, if $e$ is a central idempotent (that is, $e^2=e$) which is not $0$ or $1$ in a ring $R$, then $eRe$ is a ring with identity $e\neq 1$, but it is also a subring of $R$. Then the inclusion map $eRe\rightarrow R$ is a monomorphism of rings, but the identity is not preserved.
Lord_Farin made a very good point though in his solution that if the homorphism is onto, then it follows that it preserves identity, and in general the image of the identity is the identity of the image (but possibly not the identity of the entire codomain).
