# Showing that all Monics are Regular in the Category of Abelian Groups

I'm trying to show that all monics are regular in the category of abelian groups, and not having much luck. We have that the monics in Ab are simply the injective homomorphisms, but I haven't been able to see how to use that to construct an equalizer.

Given a monic $m:A \rightarrow B,$ we want an abelian group $C$ and two morphisms $f,$ $g:B \rightarrow C$ so that $A \overset{m}\rightarrow B {\overset{f}{\underset{g}\rightrightarrows}} C$ is an equalizer. My issue is that I don't see how to choose $f$ and $g.$

I feel like this should be relatively straightforward, I'm just not seeing it.

Let $m:A\to B$ be the injective homomorphism. Consider $C:=B/\text{im}(m)$ and $f:B\to C$ the quotient map and $g:B\to C$ the zero map. You can easily check that $m$ equalizes $f$ and $g$.
Now for the universal property: assume that $k:O\to B$ equalizes $f$ and $g$ as well. It follows that $\text{im}(k)\subseteq\text{im}(m)$ and thus we have a well defined homomorphism
$$k':O\to A$$ $$k'(x)=m^{-1}(k(x))$$
where $m^{-1}:\text{im}(m)\to A$ makes sense since $m$ is injective. Obviously $m\circ k'=k$.
$\DeclareMathOperator\coker{coker}$Let $C=\coker(m)=B/m(A)$ be the cokernel of $m$, $f$ the quotient map and $g$ the zero map.