A subsemigroup of a semigroup is a nonempty subset
which is closed under the semigroup operation. Thus
whenever
, and the restricted operation makes
a semigroup. Unlike a subgroup,
a subsemigroup need not contain an identity or inverses.
The subsemigroup generated by a subset consists of all nonempty finite products of elements
of
.