Question: If $M,N$ are $R$-modules and $f:Μ\rightarrow N$ , $g:N\rightarrow M$ are $R$-module homomorphisms s.t. $g\circ f=1_M$
Prove: $N=Im(f)\oplus \ker(g)$
My attempt: Since $\forall n\in Im(f)$ we get $g(n)=1_M\neq 0_M$ $\implies Im(f)\cap \ker(g)=\emptyset$
In addition $Im(f)\subseteq N$ and $\ker(g)\subseteq N \implies Im(f)\oplus \ker(g)\subseteq Ν $
However i am having trouble proving that $N\subseteq Im(f)\oplus \ker(g)$
How should i proceed?