My professor said the following in his lecture:
Suppose $M$ and $P$ are free modules and $\alpha: M\rightarrow P$ is a surjection. Then $\alpha$ splits and the kernel of $\alpha$ is a summand of $M$.
I know that $M$ and $P$ being free means that they have a basis and hence, any element can be written as a linear combo of the basis elements. I also know that if $\alpha$ being split means that there exists a $\beta: P\rightarrow M$ such that $\alpha\beta=1_{P}$. I am having trouble understanding why this surjection of free modules implies that the surjection splits. How do I get started?
The key property of the free module $F$ with basis $\{f_i\}_{i\in I}$ is the following:
Let $\{p_i\}_{i\in I}$ be a basis for $P$. For each $i$, there exists $m_i\in M$ such that $\alpha(m_i)=p_i$. Define $\beta$ to be the (unique) morphism induced by mapping $\beta(p_i)=m_i$. Then $\alpha\beta(p_i) = \alpha(m_i)=p_i$. Thus, $\alpha\beta$ is the identity on the basis, hence is the identity morphism.
Now let $A=\mathrm{ker}(\alpha)$, and $B=\mathrm{Im}(\beta)$. If $x\in A\cap B$, then $x=\beta(p)$ for some $p\in P$, hence $0 = \alpha(x) = \alpha\beta(p) = p$. Thus, $x=\beta(p)=\beta(0)=0$, so $A\cap B=\{0\}$. And if $m\in M$, then $\beta(\alpha(m))\in B$, and $m-\beta(\alpha(m))\in A$, with $m=\beta(\alpha(m)) + (m-\beta(\alpha(m))$, proving that $A+B=M$. Thus, $M=A\oplus B$.
Note the last part does not use the facts that $M$ and $P$ are free. In general, if $N$ and $N’$ are any modules, and $\alpha\colon N\to N’$ splits (has a right inverse), then $\mathrm{ker}(\alpha)$ is a direct summand of $N$, and $N$ is isomorphic to a direct sum $N’\oplus N’’$.
The first part shows that free modules are projective. A module $P$ is projective if and only if, for every pair of modules $M$ and $M’$, and surjective module morphism $f\colon M\to M’$, if there is a morphism $\alpha\colon P\to M’$, then there is a morphism $\beta\colon P\to M$ such that $f\beta=\alpha$. That is: if you have a diagram $$\begin{array}{ccccc} && P \\ &&\downarrow\alpha\\ M&\stackrel{f}{\longrightarrow}&M’&\rightarrow &0 \end{array}$$ with bottom row exact, then there exists a morphism $\beta$ such that $$\begin{array}{ccccc} && P \\ &{\scriptstyle\beta}\swarrow&\downarrow\alpha\\ M&\stackrel{f}{\longrightarrow}&M’&\rightarrow &0 \end{array}$$ that makes the diagram commutative.
Free modules are always projective, and for some rings, projective modules are necessarily free; but for other rings, you may have projective modules that are not free. A module is projective if and only if it is a direct summand of a free module.