Exact sequence of modules and freeness Let $R$ be a commutative ring. Let $0 \to M' \to M \to M'' \to 0$ be a short exact sequence of finitely generated $R$-modules.
Show that if $M'$ and $M''$ are free, then $M$ is free.
I assume that we need to use the isomorphism to the exact sequence $0 \to N \to M \to M/N \to 0$ (for some submodule $N \subseteq M$) to show the property, but I can't figure out how.
 A: I am assuming that $R$ has an identity and all the above $R$-modules are unitary. In any case, the hypotheses of the modules being finitely-generated and $R$ being commutative are not needed.

An approach to doing this is showing that the above diagram is split-exact. The amount of effort it takes to show this depends heavily on what you know and what you are allowed to assume. Here is a proof assuming nothing except for equivalency conditions of split-exact sequences of $R$-modules. I'm going to denote $f$ and $g$ as the functions in the diagram
$${0\to M'\xrightarrow{f}M\xrightarrow{g}M''\to 0}.$$
Recall that the following are equivalent for a short-exact sequence of $R$-modules ${0\to A\xrightarrow{f}B\xrightarrow{g}C\to 0}$ to be split-exact:

*

*There exists a function $h:C\to B$ such that $gh = 1_C$.

*$B\cong A\oplus C$.

We show the existence of $h$. Suppose $M''$ is free on the set $X$ and consider the diagram

where $\iota$ is the canonical inclusion map. Because $g$ is surjective, for each $x\in X$, there exists $m_x\in M$ such that $g(m_x) = \iota(x)$. This induces a map $\overline h:X\to M$ such that $\overline h(x) = m_x$. By definition, because $M''$ is free on $X$, there exists a unique $h: M''\to M$ such that $h\iota = \overline h$. As such, the following diagram commutes:

I assert that $gh = 1_{M''}$. If $\iota(x)\in M''$, then $h(\iota(x)) = \overline h(x) = m_x$. Thus $g(h(\iota(x))) = g(\overline h(x)) = g(m_x) = \iota(x)$. If $gh \ne 1_{M''}$ and $gh$ equaled a function $j:M''\to M''$ instead, then $hj\iota(x) = h(gh\iota(x)) = h\iota(x) = \overline h(x)$. This contradicts the uniqueness of $h$. Therefore, $gh = 1_{M''}$.
By the above, this means that the short-exact sequence ${0\to M'\xrightarrow{f}M\xrightarrow{g}M''\to 0}$ is split-exact, so $M \cong M'\oplus M''$. Because $M'$ and $M''$ are free $R$-modules, they are isomorphic to a direct sum of copies of $R$. This implies that $M$ must also be a direct sum of copies of $R$, which indeed means that $M$ is also a free $R$-module.

Note: If you know some theorems about projective modules, just note that every free module is projective and hence by definition of projectivity there exists a function $h$ such that the following diagram commutes,

which implies the result immediately.
