Group-like structures | |||||
---|---|---|---|---|---|
Totality | Associativity | Identity | Invertibility | Commutativity | |
Semicategory | Unneeded | Required | Unneeded | Unneeded | Unneeded |
Category | Unneeded | Required | Required | Unneeded | Unneeded |
Groupoid | Unneeded | Required | Required | Required | Unneeded |
Magma | Required | Unneeded | Unneeded | Unneeded | Unneeded |
Quasigroup | Required | Unneeded | Unneeded | Required | Unneeded |
Loop | Required | Unneeded | Required | Required | Unneeded |
Semigroup | Required | Required | Unneeded | Unneeded | Unneeded |
Monoid | Required | Required | Required | Unneeded | Unneeded |
Group | Required | Required | Required | Required | Unneeded |
Abelian group | Required | Required | Required | Required | Required |
^α Closure, which is used in many sources, is an equivalent axiom to totality, though defined differently. |
In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative binary operation. The binary operation of a semigroup is most often denoted multiplicatively: x·y, or simply xy, denotes the result of applying the semigroup operation to the ordered pair (x, y). Associativity is formally expressed as that (x·y)·z = x·(y·z) for all x, y and z in the semigroup.
The name "semigroup" originates in the fact that a semigroup generalizes a group by preserving only associativity and closure under the binary operation from the axioms defining a group. From the opposite point of view (of adding rather than removing axioms), a semigroup is an associative magma. As in the case of groups or magmas, the semigroup operation need not be commutative, so x·y is not necessarily equal to y·x; a typical example of associative but non-commutative operation is matrix multiplication. If the semigroup operation is commutative, then the semigroup is called a commutative semigroup or (less often than in the analogous case of groups) it may be called an abelian semigroup.
A monoid is an algebraic structure intermediate between groups and semigroups, and is a semigroup having an identity element, thus obeying all but one of the axioms of a group; existence of inverses is not required of a monoid. A natural example is strings with concatenation as the binary operation, and the empty string as the identity element. Restricting to non-empty strings gives an example of a semigroup that is not a monoid. Positive integers with addition form a commutative semigroup that is not a monoid, whereas the non-negative integers do form a monoid. A semigroup without an identity element can be easily turned into a monoid by just adding an identity element. Consequently, monoids are studied in the theory of semigroups rather than in group theory. Semigroups should not be confused with quasigroups, which are a generalization of groups in a different direction; the operation in a quasigroup need not be associative but quasigroups preserve from groups a notion of division. Division in semigroups (or in monoids) is not possible in general.