Monoid
A monoid is a mathematical object whose definition can be understood in multiple ways. 1
Under set theory
A monoid under set theory is made up of three things: 2
- A set of elements called the underlying set
- An operation called the monoid operation, which is a rule for combining two items in the underlying set to get another item in the underlying set. The monoid operation is associative.
- An identity element that, when combined
with any other element
A, gives back that same elementA.
Monoids are denoted by specifying the set and the operation enclosed in angle brackets. For example: 2
| Monoid | Description |
|---|---|
| ⟨ℤ, +⟩ | The set of integers ℤ and the addition operation. |
| ⟨ℕ, ×⟩ | The set of natural numbers ℕ and the multiplication operation. |
Under category theory
A monoid under category theory is a category made up of one kind of object: A set of morphisms that follow the rules of composition. 1
For example, the monoid ⟨ℤ, +⟩ can also be
understood as a set of morphisms that add an
integer. That is, it contains +0
(identity morphism), +1,
+2, +3, etc. 1
Types
Types of monoids:
- Commutative monoid (also known as an Abelian monoid) is a monoid with commutative monoid operations. 2
- Group is a monoid that has an underlying set for which each element can be paired with another element that, when combined together with the monoid's monoid operation, gives you the identity element. 2