Given two groups $A$ and $B$ and an injective homomorphism $f : A \to B$. When does a homomorphism $g : B \to A$ exist with $g\circ f = \mathrm{id}\_A$ (but not necessarily $f\circ g = \mathrm{id}\_B$)? 



When does an injective group homomorphism have an inverse?
If and only if $B$ is a semidirect product of $A$ and another group (the latter is normal). One direction is obvious, and another direction is easy: $B$ is a semidirect product of the image of $f$ and the kernel of $g$. 


