Skip to content

A magma with associativity — the minimal structure where expressions like a ∗ b ∗ c are unambiguous.

A semigroup is a magma whose operation is associative: (ab)c=a(bc)(a \ast b) \ast c = a \ast (b \ast c) for all elements a, b, c. Associativity means that the order of performing operations does not matter — you can drop the parentheses. The expression abca \ast b \ast c is unambiguous.

Associativity is the first axiom that most of mathematics needs. Without it, even simple chains of operations become ambiguous — (ab)c(a \ast b) \ast c might differ from a(bc)a \ast (b \ast c), and you would need parentheses everywhere. With it, you can talk about “the product of a, b, and c” without specifying grouping.

A semigroup with an identity element is a monoid. A monoid with inverses is a group. The positive integers under addition form a semigroup but not a monoid, since 0 is excluded and there is no identity. The set of all strings over an alphabet under concatenation is a semigroup and a monoid, with the empty string as identity.

Semigroups are the minimal structure needed for sequential composition. In a category, the collection of endomorphisms of any object (morphisms from the object to itself) forms a monoid under composition. Forgetting the identity morphism leaves a semigroup. Associativity of composition is one of the two axioms of a category — it comes from the semigroup level of the algebraic hierarchy. The other axiom, the identity law, comes from the monoid level.

Relations

Axioms
Associativity
Categorical role
Endomorphisms without identity
Date created
Date modified
Defines
Semigroup
Extends to
Monoid
Referenced by