Composition of Commuting Idempotent Mappings is Idempotent/Proof 2

Theorem
Let $S$ be a set.

Let $f, g: S \to S$ be idempotent mappings from $S$ to $S$.

Suppose that $f \circ g = g \circ f$, where $\circ$ denotes composition.

Then $f \circ g$ is idempotent.

Proof
By Set of All Self-Maps is Semigroup, the set of all self-maps on $S$ forms a semigroup under composition.

The result follows from Product of Commuting Idempotent Elements is Idempotent.