Kronecker semigroups

Let $S$ be a set with a distinguished element $0$. Define a product $\star$ on $S$ by $x \star y = x$ if $x = y$ and $0$ otherwise. Show that $(S, \star)$ is a semigroup (called a Kronecker semigroup) and find all of its idempotents and ideals.

First, we note that $\star$ is commutative and that $0$ is a (two sided) zero, since if $x \neq 0$ we have $x \star 0 = 0$ and if $x = 0$ then $x \star 0 = 0$.

To see that $\star$ is associative, we appeal to the following diagram. We have condensed four strings of equalities into a tree, to be read from top to bottom. A label on an equals sign indicates an assumption that holds in the arguments below it.

Associativity of the Kronecker product on a set

So $\star$ is associative, and $(S, \star)$ is a semigroup.

Note that for all $x \in S$, we have $x \star x = x$ by definition. So every element is idempotent.

Since $S$ is commutative, the left, right, and two-sided ideals coincide.

Let $A \subseteq S$ be a subset containing 0. If $a \in A$ and $s \in S$, then either $s \star a = a \in A$ or $s \star a = 0 \in A$. So $A$ is an ideal.

Conversely, suppose $A \subseteq S$ is an ideal. If $A = S$, then certainly $0 \in A$. If $A \neq S$, then there exist elements $a \in A$ and $s \in S \setminus A$, and we have $0 = s \star a \in A$.

Hence the ideals of $S$ are precisely the subsets which contain 0.