examples of semigroups
Examples of semigroups are numerous. This entry presents some of the most common examples.

1.
The set $\mathbb{Z}$ of integers with multiplication is a semigroup, along with many of its subsets (subsemigroups):

(a)
The set of nonnegative integers

(b)
The set of positive integers
 (c)

(d)
For any prime $p$, the set of $\{{p}^{i}\mid i\ge n\}$, where $n$ is a nonnegative integer

(e)
The set of all composite integers

(a)

2.
${\mathbb{Z}}_{n}$, the set of all integers modulo an integer $n$, with integer multiplication modulo $n$. Here, we may find examples of nilpotent^{} and idempotent elements, relative inverses, and eventually periodic elements:

(a)
If $n={p}^{m}$, where $p$ is prime, then every nonzero element containing a factor of $p$ is nilpotent. For example, if $n=16$, then ${6}^{4}=0$.

(b)
If $n=2p$, where $p$ is an odd prime, then $p$ is a nontrivial idempotent element (${p}^{2}=p$), and since ${2}^{p1}\equiv 1\phantom{\rule{veryverythickmathspace}{0ex}}(modp)$ by Fermat’s little theorem, we see that $a={2}^{p2}$ is a relative inverse of $2$, as $2\cdot a\cdot 2=2$ and $a\cdot 2\cdot a=a$

(c)
If $n={2}^{m}p$, where $p$ is an odd prime, and $m>1$, then $2$ is eventually periodic. For example, $n=96$, then ${2}^{2}=4$, ${2}^{3}=8$, ${2}^{4}=16$, ${2}^{5}=32$, ${2}^{6}=64$, ${2}^{7}=32$, ${2}^{8}=64$, etc…

(a)

3.
The set ${M}_{n}(R)$ of $n\times n$ square matrices^{} over a ring $R$, with matrix multiplication^{}, is a semigroup. Unlike the previous two examples, ${M}_{n}(R)$ is not commutative^{}.

4.
The set $E(A)$ of functions on a set $A$, with functional composition, is a semigroup.

5.
Every group is a semigroup, as well as every monoid.

6.
If $R$ is a ring, then $R$ with the ring multiplication (ignoring addition) is a semigroup (with $0$).

7.
Group with Zero. A semigroup $S$ is called a group with zero if it contains a zero element^{} $0$, and $S\{0\}$ is a subgroup^{} of $S$. In $R$ in the previous example is a division ring, then $R$ with the ring multiplication is a group with zero. If $G$ is a group, by adjoining $G$ with an extra symbol $0$, and extending the domain of group multiplication $\cdot $ by defining $0\cdot a=a\cdot 0=0\cdot 0:=0$ for all $a\in G$, we get a group with zero $S=G\cup \{0\}$.

8.
As mentioned earlier, every monoid is a semigroup. If $S$ is not a monoid, then it can be embedded in one: adjoin a symbol $1$ to $S$, and extend the semigroup multiplication $\cdot $ on $S$ by defining $1\cdot a=a\cdot 1=a$ and $1\cdot 1=1$, we get a monoid $M=S\cup \{1\}$ with multiplicative identity $1$. If $S$ is already a monoid with identity^{} $1$, then adjoining ${1}^{\prime}$ to $S$ and repeating the remaining step above gives us a new monoid with identity ${1}^{\prime}$. However, $1$ is no longer an identity, as ${1}^{\prime}=1\cdot {1}^{\prime}$.
Title  examples of semigroups 

Canonical name  ExamplesOfSemigroups 
Date of creation  20130322 18:37:16 
Last modified on  20130322 18:37:16 
Owner  CWoo (3771) 
Last modified by  CWoo (3771) 
Numerical id  7 
Author  CWoo (3771) 
Entry type  Example 
Classification  msc 20M99 
Synonym  group with 0 
Defines  group with zero 