= Semigroup
{title2=$(S,\ast)$}
{wiki}
A <semigroup> is an <algebraic magma> whose <binary operation> has the <associative property>. Its products can be regrouped while preserving the order of their elements. An <identity element> and <inverse elements> are not required.
For example, the positive <integers> with <addition> form a <semigroup>, since $(a+b)+c=a+(b+c)$ and a sum of positive <integers> is positive. They have no <identity element>: it would have to be zero, which is outside that <set>. Nonempty <words over an alphabet> with <concatenation> give a noncommutative example without an <identity element>. Including the <empty word> instead gives a <free monoid>.
The usefulness of a <semigroup> is that an ordered list has one product regardless of its parentheses. This permits replacing a consecutive block by its already computed value. Here the empty <set> is also allowed as a <semigroup>; a <monoid> is necessarily nonempty because it contains an <identity element>.
Back to article page