Proposition
Let R be a ring and let M be an R-module. Suppose p:M→M is such that p∘p=p. Then M≅imp⊕kerp.
Proof
Let f:M→imp⊕kerp, given as f=(p,idM−p) where we restrict each component to its image. To see that im(idM−p)=kerp note that for any a∈M,
(idM−p)(a)=a−p(a)
and
p(a−p(a))=p(a)−p(p(a))=p(a)−p(a)=0.
The other inclusion is simple, since any v∈ker(p) can be written as v−p(v), and this lives in im(idM−p).
Consider also the map g:imp⊕kerp→M, given as g=idimp+idkerp. Note that it’s an R-module homomorphism.
To check that they are mutually inverse, we take arbitrary m∈M, (a,b)∈imp⊕kerp and check
g(f(m))=g(p(m),m−p(m))=p(m)+m−p(m)=m,
and
f(g(a,b))=f(a+b)=(p(a+b),a+b−p(a+b))=(p(a)+p(b),a+b−p(a)−p(b))=(a+0,a+b−a−0)=(a,b).
Note that the second derivation uses the fact that a∈imp (hence p(a)=a) and b∈kerp (hence p(b)=0).
Since an R-module homomorphism with an inverse function is an isomorphism, this completes the proof.
■