Monoid — Definition, Formula & Example
A monoid is a set with one way of combining elements. Grouping does not change the result of that operation, and the set contains a neutral element that leaves everything unchanged. Unlike a group, a monoid does not require elements to have inverses.
A monoid is a triple where is a set and is a binary operation. It must satisfy two axioms. (1) Associativity: for all . (2) Identity: there is an element with for all . Equivalently, a monoid is a semigroup with a two-sided identity element. That identity is necessarily unique.
Key Formula
Where:
- = Any elements of the set M
- = The binary operation, which must produce an element of M (closure)
- = The identity element of M
Worked Example
Problem: Show that the integers under multiplication, , form a monoid. Then show that they do not form a group.
Step 1: Closure holds because the product of two integers is an integer. Multiplication of integers is associative. Check one instance with 2, 3, and 5.
Step 2: The identity is , since for every integer . For example, take .
Step 3: A group would also need every element to have an inverse. For , you would need an integer with . The only solution is , which is not an integer.
Answer: is a monoid with identity . It is not a group, because elements such as (and ) have no multiplicative inverse in .
Why It Matters
Monoids show up throughout computer science. Strings under concatenation form a monoid with the empty string as identity. In automata theory, each regular language has an associated finite syntactic monoid. Parallel frameworks such as MapReduce rely on associativity and an identity to split a fold across machines and merge the partial results safely.
Common Mistakes
Mistake: Treating any closed, associative operation as a monoid, such as the positive integers under addition.
Correction: That structure is only a semigroup. Its identity would have to be , and is not in the set. Always confirm that an identity element exists inside the set and works on both sides.
