I'm attempting to find the cokernel of a group homomorphism but I'm having trouble taking the quotient of the two sub groups. It is as follows,
$f:\mathbb{Z} \bigoplus \mathbb{Z/2Z} \rightarrow \mathbb{Z} \bigoplus \mathbb{Z/4Z} $ ; given by $(n,m) \mapsto (2n,2m)$ is a homomorphism of groups.
It seems to me that $Im(f) = \mathbb{2Z} \bigoplus\mathbb{Z/2Z}$.
And if this is correct then the $coker(f) = (\mathbb{Z} \bigoplus \mathbb{Z/4Z})/(\mathbb{\mathbb{2Z} \bigoplus \mathbb{Z/2Z}})$.
So then I think, $coker(f) = \{(n,m) + \mathbb{2Z} \bigoplus \mathbb{Z/2Z} : (n,m) \in \mathbb{Z} \bigoplus \mathbb{Z/4Z} \}$.
Assuming this is all correct I imagine this would simplify further as I don't really have any intuition as to what that set above is in simpler terms. Can the cokernel be simplified here?
Some hints:
1) if $g : A \to B$ and $h : C \to D$ are group homomorphisms and $f : A \oplus C \to B \oplus D$ is defined by $f(a, b) = (g(a), h(b))$, then $\mathrm{coker}(f) = \mathrm{coker}(g) \oplus \mathrm{coker}(h)$.
2) When you say that $\mathrm{im}(f) = 2\Bbb{Z} \oplus \Bbb{Z}/2\Bbb{Z}$, you are right up to isomorphism but $\Bbb{Z}/2\Bbb{Z}$ isn't actually a subgroup of $\Bbb{Z}/4\Bbb{Z}$: instead it is isomorphic to the subgroup $\langle[2]\rangle$ of $\Bbb{Z}/4\Bbb{Z}$ generated by the equivalence class of $2$. (It so happens that $\langle[2]\rangle$ is the only proper subgroup of $\Bbb{Z}/4\Bbb{Z}$, so there is no real ambiguity about what you wrote.)
3) With $g$ and $h$ in (1) chosen to give your $f$, you should find that $\mathrm{coker}(g) \simeq \mathrm{coker}(h) \simeq \Bbb{Z}/2\Bbb{Z}$.