A semigroup is a set together with a binary operation which satisfies the associative property: for all .
The set is not required to be nonempty.
Let be two semigroups. A semigroup homomorphism from to is a function such that .