Universal property of images in category theory

Let $\mathcal{A}$ be an additive category with all kernels and cokernels and $f:A\to B$ a morphism. If $e:B\to \text{coker}(f)$ is the canonical epimorphism, define $\text{im}(f):=\ker(e)$, with a canonical monomorphism $i:\text{im}(f)\to B$. Prove that:

$1)$ There is a unique $\pi:A\to\text{im}(f)$ such that $i\circ\pi=f$

$2)$ If there is a monomorphism $i':C\to B$ and a morphism $\pi':A\to C$ such that $i'\circ\pi'=f$, then there is a unique morphism $\mu:\text{im}(f)\to C$ such that $\mu\circ\pi=\pi'$ and $i'\circ\mu=i$.

For part $1)$, I used the fact that $e\circ f=0$ (by definition of $\text{coker(f)}$), so by the universal property of $\ker(e)$, there is a unique $\pi$ such that $i\circ\pi=f$

For $2)$, I've shown that if there is another $\mu'$ with these properties, then $i'\circ \mu=i=i'\circ \mu'$ and, since $i'$ is a monomorphism, then $\mu'=\mu$, so $\mu$ is unique. Furthermore, assuming $i'\circ\mu=i$, we get $i'\circ\mu\circ\pi=i\circ\pi=f=i'\circ\pi'$ and, since $i'$ is a monomorphism, $\mu\circ\pi=\pi'$, which means we only need to find $\mu$ with $i'\circ\mu=i$. Here is where I'm stuck, because I don't know how to come up with an arrow $\textit{leaving }\text{im}(f)$, since the universal property of $\ker(e)$ can only give an arrow $\textit{arriving}$ at it.

• If $\alpha:B\to C$ is a monomorphism, composable after $\def\fii{\varphi} \fii:A\to B$, then $\def\im{\rm im} \im(\alpha\circ \fii)\cong\im(\fii)$ should hold. For start, prove that the pushout of $B\to{\rm coker}(\fii)$ along $\alpha$ is $C\to{\rm coker}(\alpha\circ\fii)$. – Berci Apr 3 '17 at 23:34
• 1) The proof is not correct. You cannot argue with $\pi$ before defining it. The claim follows directly from $e f=0$ and the universal property of $i$. – HeinrichD Apr 4 '17 at 19:06
• @HeinrichD, of course you're right, silly mistake. Still trying to figure 2) though – rmdmc89 Apr 4 '17 at 21:51
• You've tagged this question "abelian-categories", but your hypothesis is that $\mathcal{A}$ is only additive. Which one do you really want? – Arnaud D. Apr 6 '17 at 15:26
• @ArnaudD., the tag was misleading indeed. The hypothesis is just $\mathcal{A}$ additive with all kernels and cokernels – rmdmc89 Apr 6 '17 at 16:02

This is not true in general. For instance, let $\mathcal{A}$ be the category of torsion-free abelian groups. This is an additive category with kernels and cokernels (to form a cokernel, first take the cokernel in $Ab$ and then mod out the torsion subgroup). Now consider the map $f:\mathbb{Z}\to\mathbb{Z}$ given by multiplication by $2$. The cokernel of $f$ is $0$, so the image of $f$ is the identity $\mathbb{Z}\to\mathbb{Z}$. But taking $i'=f$ and $\pi'=1$, $i'$ is a monomorphism, $i'\circ\pi'=f$, but $i=1$ does not factor through $i'$.