Suppose I have homomorphism $f:A\to B$ of abelian groups.
Is it possible in general to find a bijection between $A$ and $\operatorname{im}(f)\times \operatorname{ker}(f)$?
The canonical isomorphism between $im(A)$ and $A/\operatorname{ker}(f)$ makes me think the answer should be yes.
In the example of $g:\mathbb{Z}\to\mathbb{Z}_{2}$, where $g(x)$ is the remainder when $x$ is divided by $2$, $\operatorname{im}(g) = \{0,1\}$ and $\operatorname{ker}(g) = 2\mathbb{Z}$.
In this case I can easily decompose $x\in \mathbb{Z}$ into a unique sum of $y\in 2\mathbb{Z}$ and $z\in \{0,1\}$, and then use the mapping $x\mapsto (y,z)$. e.g.: pairing $17$ with $(16,1)$, $98$ with $(98,0)$ etc.
I need to show that the number of elements of $A$ is the product of the number of elements in $\operatorname{im}(f)$ and $\operatorname{ker}(f)$, and I think this is the idea but I am having difficulty extending this to general groups.
Any advice on how I can extend this generally?
My problem in general is choosing the element of $\operatorname{ker}(f)$. Given $x\in A$, the obvious choice for the element of $\operatorname{im}(A)$ is $f(x)$.