In reading about cokernels (relating to a homework question I have) I came across the following:
https://www.dpmms.cam.ac.uk/~jg352/pdf/CTSheet4-2013.pdf
I specifically wondered about question 5a. Therein the author claims that in the category of torsion-free Abelian groups that not every epimorphism is surjective.
This would clearly mean that the cokernel of a epimorphism that is not surjective would need to be torsion (which relates to the homework question I am working on).
However, I have yet to find an epimorphism in the category of torsion-free abelian groups that is not surjective.
Is the author's claim true? If so, what types of maps should I look at?
Note: the example given by Slade is correct, but there are more basic examples, like $(2\cdot) : \mathbb{Z} \to \mathbb{Z}$
The inclusion $\mathbb{Z} \to \mathbb{Q}$ is the usual counterexample of a ring epimorphism that isn't surjective
Let $f : A \to B$. We say $f$ is epi if and only if for all $g,h:B \to C$
$g \circ f = h \circ f$ implies $g = h$
If your category is enriched in abelian groups (like the category of torsion-free abelian groups), then this is equivalent to the requirement that for all $g : B \to C$
$g \circ f = 0$ implies $g = 0$
Now let $f : A \to B$ a map between torsion-free abelian groups such that the cokernel is non-zero torsion.
Suppose further that $g : B \to C$, where $C$ is torsion-free such that $g \circ f = 0$
Denote by $\mathrm{cok} f : B \to B/\mathrm{im} f$ the quotient map.
By the universal property there is a unique map $g' : B/\mathrm{im} f \to C$ such $g = g' \circ \mathrm{cok} f$.
Now $g'$ is a map from a torsion group to a torsion-free group, so it must be $0$. Hence $g = 0 \circ \mathrm{cok} f = 0$.
(In a more abstract language, we're using that taking torsion is functorial)