Let $M$ be a finitely generated module over a ring $R$ and $\phi: M \rightarrow R^n$ be a surjective homomorphism. Show that the $\ker(\phi)$ is finitely generated submodule of $M$.
My effort: Since $M$ is finitely generated, So there exist $x_1,x_2, \ldots, x_k \in M$ such that $M = \langle x_1,x_2, \ldots, x_k \rangle = Rx_1 + Rx_2 + \cdots +Rx_k$. Since $\phi$ is surjective so, $\langle\phi(x_1), \cdots, \phi(x_k) \rangle = R^n$. By first isomorphism theorem, $M/\ker(\phi) \cong R^n$. And $R^n$ is finitely generated so $M/\ker(\phi)$ is finitely generated. We also have the following exact sequence $0 \rightarrow \ker(\phi) \rightarrow M \rightarrow M/\ker(\phi) \rightarrow 0$.
I am stuck after this point. Any help would be appreciated! Thanks in advance!