Surjective homomorphism between a R-module and a free R-module I'm trying to show that if $F$ is a free $R-$module and $g:M\rightarrow F$ is a surjective $R-$homomorphism then $M \simeq Ker(f)\oplus F$.
What I have done so far:
Let $X=\{x_i\}_{i\in I}$ be a base for $F$, define the $R-$homomorphism $h:F\rightarrow M$, taking for each $x_i \in X$ an element $m_i \in M$ such that $g(m_i)=x_i$ and define $h(x_i)=m_i$ then extend it by linearity
Then, for each $n \in F$, we have $g\circ h(n)=g(h(\sum_{i\in I}\lambda_ix_i))=\sum_{i\in I}\lambda_ig(h(x_i))=\sum_{i \in I}x_i=n$
and
$$h(n)=h(n') \Rightarrow h(n-n')=0 \Rightarrow g(h(n-n'))=g(0)=0 \Rightarrow n-n'=0 \Rightarrow n=n'$$
Hence, $h $ is injective and  then $F\simeq h(F)$
Now, let $m\in h(F) \cap Ker(g)$, then $g(m)=0$ and $m=h(n)$ for some $n\in F$, it follows that
$$g(h(n))=g(m)=0\Rightarrow n=0\Rightarrow h(n)=m=0$$
What have I done so far is acceptable?
What I'm trying to do now is show that every element of $M$ can be written as a sum $y+k$ with $y \in Im(h)$ and $k \in Ker(g)$ and then i think the conclusion follows easily.
P.S: Sorry for grammar mistakes, I learned English with video games.
 A: You can prove this essentially as with vector spaces. Let $F$ be free with basis $\{ x_i : i\in I\}$ and for each of these basis elements choose $m_i\in M$ so that $f(m_i) = x_i$: this can be done because $f$ is surjective.
Because $F$ is free, there is a map $g : F\to M$ such that $g(x_i) = m_i$ and by construction $fg$ is the identity of $F$. This means that $g$ is injective, so $F' = g(F)$ identifies $F$ with a submodule of $M$. Let $K=\ker f$, and let us show that $M=K\oplus F'$.
Certainly we have $K\cap F' = 0$: if $m = g(x)$ and $f(m)=0$ then $f(m)=x=0$. Given $m\in M$, let $n = gf(m)$, and write $m = (m -n) +n$. To conclude, we note that $m-n\in K$ since $f(m-n)$ $= f(m) - fgf(m)$ $= f(m)- f(m)=0$ because $fg=1$, while $n$ is, by construction, in $F'$.
A: Say the short exact sequence $0 \to L \overset\varphi\to M \overset\psi\to N \to 0$ of $R$-modules splits if $M \cong L\oplus N$ where $\varphi$ corresponds to the natural inclusion $L \hookrightarrow L\oplus N$ and $\psi$ corresponds to the natural projection $L\oplus N \to N$. [Equivalently there is an isomorphism of short exact sequences from $0 \to L \to M \to N \to 0$ to $0 \to L \to L\oplus N \to N \to 0$.]
A easy to prove fact, called the splitting lemma:
The following are equivalent:


*

*The short exact sequence $0 \to L \overset\varphi\to M \overset\psi\to N \to 0$ splits.

*There exists an $R$-module homomorphism $\rho:N \to M$ such that $\psi\circ \rho = id_N$.

*There exists an $R$-module homomorphism $\lambda: M \to L$ such that $\lambda \circ \varphi = id_L$
In your problem $L = \ker(g)$, $M = M$, $N = F$ and $psi = g$. The $h$ you constructed is $\rho$ and satisfies condition $2$.
A: The other answers are perfectly good, but I'll just give a different approach, although I woudldn't suggest it as a good way to prove the claim:
This is essentially a specialization of the proof that every free module is projective, where a module $P$ is said to be projective if every short exact sequence
$$0 \to M \to N \to P \to 0$$
splits.
In particular, there is a sequence
$$\ker f \hookrightarrow M \to F \to 0,$$
and if $F$ were projective, this sequence would split.
To see the proof of the claim, using a slightly different characterization of projective:
given a map $f:P \to N$ and a surjective map $g: M  \to N$, there always exists a lift $h:P \to M$ so that $g \circ h= f$.
proof: Let $P$ be a free module, and let $f,g$ as before. Clearly, it is enough to understand $f(s)$ for all $s \in S$, where $S$ generates $P$. Then since $g$ is assumed to be surjective, we have that $g(m_1)=f(s)$ for some $m \in M$. Let $h(s)=m_1$, and repeat this process for all $s \in S$ and extend linearly.
here is a resource that suggests how to prove the equivalence of the two definitions.
In fact, the link also says that every projective module $M \cong F\oplus N$ with $F$ free, in which case we can take $N=(0)$, in which case the proof of the claim is immediate.
