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 is even helpful. I also think that $g$ must be surjective, so $N/\ker(g)\cong M$, and that is a sum of what I've determined. Any suggestions would be helpful!