Quotient by Kernel of Monoid Homomorphism? Suppose $f : M \to N$ is a monoid homomorphism. Is it the case that
$$
(m_1 \ker f) (m_2 \ker f) = m_1 m_2 \ker f
$$
for all $m_1, m_2 \in M$? That is, can we use the usual construction from groups to define a monoid $M / \ker f$?
Based on some preliminary efforts and investigations, it seems like the answer is no.
If the answer really is no, is there a standard counterexample?
 A: For monoids, and many other structures, the correct substitute for the kernel of a map $f : M \to N$ is the kernel pair
$$M \times_N M = \{ (m_1, m_2) \in M^2 : f(m_1) = f(m_2) \}.$$
This is an internal equivalence relation or congruence on $M$ (a submonoid of $M \times M$ satisfying the equivalence relation axioms), we can meaningfully talk about the quotient of $M$ by it, which means the coequalizer of the two projections $M \times_N M \to M$, and we can show that $f$ is surjective iff this quotient is $N$, which is a general version of the first isomorphism theorem valid in great generality.
The extra simplification that occurs for groups resp. rings is that congruences are equivalent to normal subgroups resp. ideals and so we don't have to define congruences in full generality. But for monoids it's inescapable.
A: No.  For instance, let $M$ be the free monoid on two generators $x$ and $y$, let $N$ be the free monoid on just $x$, and let $f:M\to N$ be the homomorphism mapping $x$ to $x$ and $y$ to $1$.  Then $\ker(f)$ consists of just the powers of $y$, and $(1\ker f)(x\ker f)\neq (1x)\ker f$ because $yxy$ is in the left side but not in the right side.
On the other hand, it is always true if $M$ is commutative, since then $(m_1\ker f)(m_2\ker f)=(m_1m_2)(\ker f)(\ker f)$ and $\ker f=(\ker f)(\ker f)$ since $1\in\ker f$.
