Idempotent Elements form Subsemigroup of Commutative Semigroup

Theorem
Let $\left({S, \circ}\right)$ be a semigroup such that $\circ$ is commutative.

Let $I$ be the set of all elements of $S$ that are idempotent under $\circ$.

That is:


 * $I = \{x \in S: x \circ x = x\}$

Then $\left({I, \circ}\right)$ is a subsemigroup of $\left({S, \circ}\right)$.

Proof 1
By Subsemigroup Closure Test we need only show that:


 * For all $x, y \in I$: $x \circ y \in I$.

That is:


 * $\left({x \circ y}\right) \circ \left({x \circ y}\right) = x \circ y$.

We reason as follows:

Hence the result.

Proof 2
By Subsemigroup Closure Test we need only show that:


 * For all $x, y \in I$: $x \circ y \in I$.

That is:


 * $\left({x \circ y}\right)$ is idempotent.

Since $x, y \in I$, they are idempotent.

Since $\circ$ is commutative, $x$ and $y$ commute.

Thus the result follows from Product of Commuting Idempotent Elements is Idempotent.