An abelian group is finite $\iff$ the kernel of a surjective homomorphism has rank $n$ I'm doing a course on lineare algebra and I have to show the following:

let $H$ be a finitely generated abelian group and $g: \mathbb{Z}^n \to H$ a surjective homomorphism.
  I want to show that $H$ is finite $\iff$ the $kernel$ of g has $rank=n$. 

since g is a surjective homomorphism follows that 
• $g( 1_{\mathbb{Z}} )=1_{H}$
• $g(a^{-1}) = g(a)^{-1}$
• $\forall a \in H \space \exists a' \in \mathbb{Z}^n : g(a')=a$
but how shall I use those properties? I sincerely don't have any Idea since I did not already follow the algebra course and this seems to me more an "algebra problem" than a "lineare algebra problem". Could you maybe help me? Some hints would be really appreciated :-)
 A: It can be useful to see $\def\Z{\Bbb Z}\Z^n$ as a part of the vector space $\def\Q{\Bbb Q}\Q^n$ at some places (though I am not sure this approach is intended).
The main non obvious thing here is that every subgroup $K$ of $\Z^n$ has a rank, namely that it is generated by a set of linearly independent elements (over$~\Z$, which implies independence over$~\Q$), and that the number of generators (which gives the rank) depends only on$~K$ (you can get the latter but not the former from linear algebra over$~\Q$). But apparently this is supposed to be known.
Now first suppose the rank $r$ of $K=\ker(g)$, which clearly cannot exceed$~n$, is actually less than $n$. Then there exist some element $v\in\Z^n$ linearly independent of the generators of$~K$, so that $mv\in K$ with $m\in\Z$ is only satisfied for $m=0$; this means $g(v)$ has infinite order in $H$, and $H$ must be infinite.
Conversely assume $r=n$. Then viewed as elements of$~\Q^n$ the generators of$~K$ span the whole space. The standard basis elements can be expressed as rational linear combinations of the generators of$~K$. Then for each of then some integer multiple lies in $K$ (all its coefficients when expressed on the basis of$~K$ become integer). This means the image of each standard basis element under $g$ has finite order in$~H$. But an Abelian group generated by finitely many elements of finite order is finite.
A: Hint: if $|H|=k$, then try to show $(k,k,\dots,k)\in \ker g$. Conversely, assume $(k,k,\dots,k)\in\ker g$, show that $H$ is finite (it is here that you need $g$ surjective).
A: Hint:
$$N\le\Bbb Z^n\;\;\text{has finite index}\;\;\iff \text{rank}\,(N)=n\iff N\cong\Bbb Z^n$$
If yu have the above you have the answer of your question.
Hint for the hint's proof:
If $\;[\Bbb Z^n:N]=\infty\implies \exists\,a\in\Bbb Z^n\;\;s.t.\;\;\left|\langle a+N\rangle\right|=\infty\iff \exists\,\overline K\le\Bbb Z^n/N\;\;with\;\;\overline K\cong\Bbb Z$
