Let $G$ be an abelian group. Suppose $H$ is a subgroup. Then prove $H$ has index $p$ for some prime if and only if $H:=$ ker$\phi$ where $\phi$ is from $G$ onto $\Bbb{Z} / p \Bbb{Z}$.
For the backwards direction, supposing $H$ is the kernel of some onto group homomorphism
$$\phi:G \rightarrow \Bbb{Z} / p \Bbb{Z}$$
By the first isomorphism theorem we have that $G / H \cong$ im$\phi$ =$\Bbb{Z}/p \Bbb{Z}$ thus $G/H$ has order $p$ thus $H$ has index $p$ in $G$.
For the forwards direction, supposing $H$ has prime index we know that $G/H$ has order $p$. How do I show $H$ Is the kernel of some onto group homomorphism from $G$ onto $\Bbb{Z} / p \Bbb{Z}$? Also is my backwards direction ok?