Does hom. $\phi$ from abelian $G$ to $H$ imply $G\cong \ker(\phi)\oplus{\rm im}(\phi)$? Suppose $G,H$ are abelian groups and $\phi: G \rightarrow H$ is a group homomorphism. Can we decompose $G$ as $G\cong \ker(\phi)\oplus{\rm im}(\phi)$? More generally, what objects can have this kind of "kernel $\oplus$ image" decomposition?
 A: Of course, by the first isomorphism theorem, $G/\ker \phi \cong \operatorname{img} \phi$. Moreover, every subgroup $A$ of $G$ is the kernel of some homomorphism from $G$, namely the canonical projection $G \to G/A$. Thus, this question:

what objects can have this kind of "kernel ⊕ image" decomposition?

Is equivalent to the following:

which abelian groups $G$ have the property that every subgroup is a direct summand?

The answer is that an abelian group $G$ has this property if and only if $G$ is a (possibly infinite) direct sum of cyclic groups of prime order. It's a good (but not extremely easy) exercise to prove this!
More generally, if $R$ is a ring and $M$ is a left $R$-module, the following are equivalent:

*

*Every submodule of $M$ is a direct summand

*$M$ is a direct sum of simple left $R$-modules

*$M$ is the sum of its simple submodules

Such modules are called "semisimple". What I said about about abelian groups above is the equivalence of (1) and (2) in the case that $R = \mathbb{Z}$.
A: There are many examples where this fails. See halrankard2 comment for the example $G = \mathbb{Z}/ 4 \mathbb{Z}$.
If we think only about abelian groups, this situation is where we have an exact sequence,
$$ 1 \to K \to G \to H \to 1 $$
and we want to know when it "splits" meaning $G = H \oplus K$. Such sequences are called group extensions of $H$ by $K$ and in general, they will not be split. These (up to isomorphism) are classified by the group $\mathrm{Ext}^{1}(H, K)$ if you are interested in looking up some homological algebra. So you can say that every sequence splits iff $\mathrm{Ext}^1(H, K) = 0$.
Some examples of when this happens.
(1) if $H$ is a free abelian group (i.e. $\mathbb{Z}^n$)
(2) if $K = \mathbb{Q}/\mathbb{Z}$ or more generally an injective group
(3) if we replace groups here with vector spaces
