# Module Homomorphisms and a Direct Sum

I am trying to show the following:

Let $f:M\to N$ and $g:N\to M$ be module homomorphisms such that $g\circ f=Id_M$. Prove that $N=Im(f)\oplus\ker(g)$.

I know that $M/\ker(f)\cong Im(f)$, but I'm not sure if this even helpful. I also think that $g$ must be surjective, so $B/\ker(g)\cong A$, and that is a sum of what I've determined... Any suggestions would be helpful!

-

$\def\im{\operatorname{im}}$*Hint*: I don't see why you use quotients. The direct way should work: To show $N = \im f \oplus \ker g$ you have to show two things:
• $\ker g \cap \im f = 0$ (if $g(n) = 0$ and $f(m) = n$, we have $m = \mathrm{id}_M(m) = \cdots$.
• $N = \ker g + \im f$. For $n \in N$, consider $(f \circ g)(n) \in \im f$. What can you say about $n - (f\circ g)(n)$?
Just to be sure I've got it: $g(f(m))=m=0$ in the first case, while in the second, $g(n-(f\circ g)(n))=g(n)-g(n)=0$, thus $n\in\ker(g)$. Right? – Clayton Dec 7 '12 at 17:11
Almost ... in the first case you have to note that hence $n = 0$ ... in the second one you get $n - fg(n) \in \ker g$ .. and hence (as it should be $n \in \ker g + \im f$. – martini Dec 7 '12 at 17:13
Okay, the first part certainly follows since $f(m)=n=f(0)$ and the additive identity must map to the additive identity. I see my problem on the second part, thanks for pointing it out! – Clayton Dec 7 '12 at 17:15