I think this is correct:
If $\phi:\mathbb Z^{n}\to\mathbb Z^{k}$ is a group homomorphism then $n=\operatorname{rank}\operatorname{im}\phi+\operatorname{rank}\ker\phi$.
Here is my attempt at a proof:
$\phi$ may be naturally and uniquely extended to a linear map between $\mathbb Q$-vector spaces $\widetilde{\phi}:\mathbb Q^{n}\to\mathbb Q^{k}$, where $n=\dim\operatorname{im}\widetilde{\phi}+\dim\ker\widetilde{\phi}$.
My questions:
- Is this proof correct? I am concerned with "rank" either not making sense for subgroups or not coinciding with "dimension".
- Does this appear in books (maybe with different formulation)? I have not found it in some standard textbooks I've looked in.
No need to refer to $\mathbb Q$: we have the following short exact sequence of free $\mathbb Z$-modules (or abelian groups, if you like it) $$0\to\ker\phi\to\mathbb Z^n\to\operatorname{im}\phi\to0$$ which is split (helpful, but not necessary to conclude).