# Semigroup with three elements

In abstract algebra, a semigroup with three elements is an object consisting of three elements and an associative operation defined on them. The basic example would be the three integers 0, 1, and −1, together with the operation of multiplication. Multiplication of integers is associative, and the product of any two of these three integers is again one of these three integers.
There are 18 inequivalent ways to define an associative operation on three elements: while there are, altogether, a total of 3$^9$ = 19683 different binary operations that can be defined, only 113 of these are associative, and many of these are isomorphic or antiisomorphic so that there are essentially only 18 possibilities.
One of these is C$_3$, the cyclic group with three elements. The others all have a semigroup with two elements as subsemigroups. In the example above, the set {−1,0,1} under multiplication contains both {0,1} and {−1,1} as subsemigroups (the latter is a subgroup, C$_2$).
Six of these are bands, meaning that all three elements are idempotent, so that the product of any element with itself is itself again. Two of these bands are commutative, therefore semilattices (one of them is the three-element totally ordered set, and the other is a three-element semilattice that is not a lattice). The other four come in anti-isomorphic pairs.
One of these non-commutative bands results from adjoining an identity element to LO$_2$, the left zero semigroup with two elements (or, dually, to RO$_2$, the right zero semigroup). It is sometimes called the flip-flop monoid, referring to flip-flop circuits used in electronics: the three elements can be described as "set", "reset", and "do nothing". This semigroup occurs in the Krohn–Rhodes decomposition of finite semigroups. The irreducible elements in this decomposition are the finite simple groups plus this three-element semigroup, and its subsemigroups.
There are two cyclic semigroups, one described by the equation x$^4$ = x$^3$, which has O$_2$, the null semigroup with two elements, as a subsemigroup. The other is described by x$^4$ = x$^2$ and has C$_2$, the group with two elements, as a subgroup. (The equation x$^4$ = x describes C$_3$, the group with three elements, already mentioned.)
There are seven other non-cyclic non-band commutative semigroups, including the initial example of {−1, 0, 1}, and O$_3$, the null semigroup with three elements. There are also two other anti-isomorphic pairs of non-commutative non-band semigroups.
| | x | y | z |
| x | x | y | z |
| y | y | z | x |
| z | z | x | y |
| | x | y | z |
| x | y | z | y |
| y | z | y | z |
| z | y | z | y |
| | x | y | z |
| x | y | z | z |
| y | z | z | z |
| z | z | z | z |
| | x | y | z |
| x | z | y | x |
| y | y | y | y |
| z | x | y | z |
| | x | y | z |
| x | z | x | x |
| y | x | y | z |
| z | x | z | z |
| | x | y | z |
| x | z | x | x |
| y | x | z | z |
| z | x | z | z |
| | x | y | z |
| x | z | z | z |
| y | z | z | z |
| z | z | z | z |
| | x | y | z |
| x | z | z | z |
| y | z | y | z |
| z | z | z | z |
| | x | y | z |
| x | z | y | z |
| y | y | y | y |
| z | z | y | z |
| | x | y | z |
| x | z | x | z |
| y | x | y | z |
| z | z | z | z |
| | x | y | z |
| x | z | z | z |
| y | y | y | y |
| z | z | z | z |
| | x | y | z |
| x | z | y | z |
| y | z | y | z |
| z | z | y | z |
| | x | y | z |
| x | z | z | z |
| y | x | y | z |
| z | z | z | z |
| | x | y | z |
| x | z | x | z |
| y | z | y | z |
| z | z | z | z |
| | x | y | z |
| x | x | y | z |
| y | y | y | z |
| z | z | z | z |
| | x | y | z |
| x | x | z | z |
| y | z | y | z |
| z | z | z | z |
| | x | y | z |
| x | x | x | x |
| y | y | y | y |
| z | x | x | z |
| | x | y | z |
| x | x | y | x |
| y | x | y | x |
| z | x | y | z |
| | x | y | z |
| x | x | x | z |
| y | y | y | z |
| z | z | z | z |
| | x | y | z |
| x | x | y | z |
| y | x | y | z |
| z | z | z | z |
| | x | y | z |
| x | x | x | x |
| y | y | y | y |
| z | z | z | z |
| | x | y | z |
| x | x | y | z |
| y | x | y | z |
| z | x | y | z |
| | x | y | z |
| x | x | x | x |
| y | y | y | y |
| z | x | y | z |
| | x | y | z |
| x | x | y | x |
| y | x | y | y |
| z | x | y | z |
Index of two element subsemigroups: C$_2$: cyclic group, O$_2$: null semigroup, CH$_2$: semilattice (chain), LO$_2$/RO$_2$: left/right zero semigroup. :