Showing that an epimorphism to a free module of finite rank splits

Let $M$ be an $R$-module and let $F$ be a free $R$-module of finite rank. Let $\phi : M \to F$ be an epimorphism. Then show that $M$ has a submodule $F' \cong F$ such that $M=F' \oplus \ker\phi$.

I am new to Module theory. If I apply fundamental theorem of homomorphism then $M/\ker\phi \cong F$, what to do next?

To form $F'$ (nonuniquely), pick preimages of the generators of $F$.
Now show $\phi:F'\to F$ is an iso, $M=F'+\ker\phi$ and $F'\cap\ker\phi=0$.
Hint: Since $F$ is free of finite rank, there exists an $R$-basis $\{f_1,\ldots,f_n\}$ for $F$. Since $\phi:M\to F$ is a surjective map, there exist some $m_1,\ldots,m_n\in M$ such that $\phi(m_i)=f_i$. Let $F'$ be the submodule of $M$ spanned by these $m_i$'s. You need to show that $F'$ is isomorphic to $F$ and that $M=F'\oplus \ker(\phi)$; it will help to choose a map $\alpha:F\to M$ which sends $F$ to $F'$.
• how to prove that $m_i$ form a basis for $F'$ – Waqas Feb 18 '14 at 12:05
• @Waqas If the $m_i$ satisfy a nontrivial $R$-linear relation, the image of that relation under $\phi$ will be a nontrivial $R$-linear relation satisfied by the $f_i$, which is impossible. – anon Feb 19 '14 at 14:39