TITLE: Do endomorphisms of quotients always lift?
QUESTION [7 upvotes]: Let $H \to G$ be an injective homomorphism of Abelian groups and let $\varphi$ be an endomorphism of $H$. Must $\varphi$ extend to an endomorphism of $G$? The answer is no; a counterexample is the endomorphism of the subgroup $2\mathbb{Z} \times \mathbb{Z}_2$ of $\mathbb{Z} \times \mathbb{Z}_2$ given by $(2,0) \to (0,1)$ and $(0,1) \to (0,0)$.
I am interested in the dual question. Let $G \to H$ be a surjective homomorphism of Abelian groups and let $\varphi$ be an endomorphism of $H$. Must $\varphi$ lift to an endomorphism of $G$?
I strongly suspect the answer to be no, but I have not been able to find a counterexample. An easy counterexample like the one above would be ideal, although any would be good. Note that if the map $G \to H$ splits then $\varphi$ must be induced by an endomorphism of $G$ (and similarly in the dual case). The two questions make sense for other objects also, and so if there is anything interesting to be said on this matter in categorical terms then I would be happy to hear it.

REPLY [5 votes]: Consider the standard surjection $\mathbb{Z}/4\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} \to \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}$.
More specifically we have $$G=\langle x , y : x^4 = y^2 =1 , yx=xy\rangle \quad\text{and}\quad H=\langle \bar x, \bar y : \bar x^2 = \bar y^2 = 1, \bar y \bar x = \bar x \bar y \rangle$$
The elements of $G$ that have order 4 are $\{ x, xy, x^3, x^3y \}$, the elements that order 2 are $\{ y, x^2, x^2 y \}$, and the element of order 1 is just called $1$. The elements of $H$ are just $\{ \bar x, \bar y, \bar x \bar y \}$ of order 2, and $\bar 1$ of order 1.
An endomorphism of $G$ cannot take $y$ (of order 2) to any element of order 4. But the image in $H$ of the elements of $G$ order dividing 2 is only $\{ \bar 1 = \bar x^2, \bar y = \bar x^2 \bar y \}$. Hence an endomorphism of $H$ that is induced by an endomorphism of $G$ can only take $\bar y$ to $\bar y$ or $\bar 1$.
The endomorphisms of $H$ are most easily represented by $2\times 2$ matrices over $\mathbb{Z}/2\mathbb{Z}$. There are 16 such endomorphisms, but only 8 of them send $\bar y$ to $\bar y$ or $\bar 1$. The other 8 send $\bar y$ to $\bar x$ or $\bar x \bar y$. None of these latter 8 lift as shown in the previous paragraph. All of the former 8 do lift, though this doesn't matter very much.
In particular, 8 of the endomorphisms of $H$ lift (4 ways each), and 8 do not lift.