Idempotents and projections are the same thing
Say
f is idempotent. By property (1) we know its target is
Im(f) and therefore every
f maps into its target,
satisfying projection condition #1. To show condition #2, take a
y in the target
Im(f), write it as
y=f(x) for some
x∈X, and note
f(y)=f(f(x))=f(x)=y.
Say
f is a projection. By property (1) we know the target is
Im(f). Now take an
x∈X, note that
f(x)∈Im(f), and conclude by projection condition #2 that
f(f(x))=f(x). Since this holds for all
x then
f∘f=f.