nLab monoid



Category theory


Monoid theory



With a binary operation and an element

Classically, a monoid is a set MM equipped with a binary operation μ:M×MM\mu: M \times M \to M and special element 1M1 \in M (the neutral element) such that 11 and xy=μ(x,y)x \cdot y = \mu(x,y) satisfy the usual axioms of an associative product with unit, namely the associative law:

(xy)z=x(yz) (x \cdot y) \cdot z = x \cdot (y \cdot z)

and the left and right unit laws:

1x=x=x1. 1 \cdot x = x = x \cdot 1 .

With nn-ary operations

Equivalently, a monoid is a set MM with an element 1M1 \in M and a dependent sequence of functions: for every natural number nn \in \mathbb{N}, an n n -ary operation μ n:M nM\mu_n:M^n \to M with domain the nn-th cartesian power of MM and codomain MM, such that

μ 0(*)=1\mu_0(*) = 1
μ 1(x)=x\mu_1(x) = x
μ 2(μ m(x 1,,x m),μ n(x m+1,,x m+n))=μ m+n(x 1,,x m,x m+1,,x m+n)\mu_2(\mu_m(x_1, \ldots, x_m), \mu_n(x_{m+1}, \ldots, x_{m+n})) = \mu_{m+n}(x_1, \ldots, x_m, x_{m+1}, \ldots, x_{m+n})

For n>1n \gt 1, μ n\mu_n is usually written as

x 1x 2x n=μ n(x 1,x 2,,x n)x_1 \cdot x_2 \cdot \ldots \cdot x_n = \mu_n(x_1, x_2, \ldots, x_n)

In a monoidal category

See monoid in a monoidal category.

In terms of string diagrams

The data of a monoid may be written in string diagrams as:

String diagrams of the monoid data (for "Monoid")

Thanks to the distinctive shapes, one can usually omit the labels:

String diagrams of the monoid data, unlabeled (for "Monoid")

The axioms μ(ηM)=1 M=μ(Mη)\mu \cdot (\eta \otimes M) = 1_M = \mu \cdot (M \otimes \eta) and μ(Mμ)=μ(μM)\mu \cdot (M \otimes \mu) = \mu \cdot (\mu \otimes M) then appear as:

String diagrams of the monoid axioms (for "Monoid")

As a one-object category

Equivalently, and more efficiently, we may say that a (classical) monoid is the hom-set of a category with a single object, equipped with the structure of its unit element and composition.

More tersely, one may say that a monoid is a category with a single object, or more precisely (to get the proper morphisms and 22-morphisms) a pointed category with a single object. But taking this too literally may create conflicts in notation. To avoid this, for a given monoid MM, we write BM\mathbf{B}M for the corresponding category with single object \bullet and with MM as its hom-set: the delooping of MM, so that M=Hom BM(,)M = Hom_{\mathbf{B}M}(\bullet, \bullet). This realizes every monoid as a monoid of endomorphisms.

Similarly, a monoid in (C,,I)(C,\otimes,I) may be defined as the hom-object of a CC-enriched category with a single object, equipped with its composition and identity-assigning morphisms; and so on, as in the classical (i.e. Set\mathbf{Set}-enriched) case.

For more on this see also group.

As a strict monoidal category

An alternate way to view a monoid as a category is as a discrete strict monoidal category C\mathbf{C} where the elements of the monoid are the objects of C\mathbf{C}, the binary operation of the monoid provides the tensor product bifunctor, and the identity of the monoid is the unit object. Preordered monoids then yield (non-discrete) strict monoidal categories with the morphisms witnessing the preorder in the usual way.

𝒪\mathcal{O}-Monoids over an (,1)(\infty,1)-Operad

The notion of associative monoids discussed above are controled by the associative operad. More generally in higher algebra, for 𝒪\mathcal{O} any operad or (infinity,1)-operad, one can consider 𝒪\mathcal{O}-monoids. (Lurie, def.

These are closely related to (infinity,1)-algebras over an (infinity,1)-operad with respect to 𝒪\mathcal{O} (Lurie, prop.


  • A monoid in which every element has an inverse is a group. For that reason monoids are often known (especially outside category theory) as semi-groups. (But this term is often extended to monoids without identities, that is to sets equipped with any associative operation.)
  • The set of endomorphisms of a given object in a category has a canonical monoid structure given by composition.

Remarks on notation

It can be important to distinguish between a kk-tuply monoidal structure and the corresponding kk-tuply degenerate category, even though there is a map identifying them. The issue appears here for instance when discussing the universal GG-bundle in its groupoid incarnation. This is

GEGBG G \to \mathbf{E}G \to \mathbf{B}G

(where EG=G//G\mathbf{E}G = G//G is the action groupoid of GG acting on itself). On the left we crucially have GG as a monoidal 0-category, on the right as a once-degenerate 1-category. Without this notation we cannot even write down the universal GG-bundle!

Or take the important difference between group representations and group 2-algebras, the former being functors BGVect\mathbf{B}G \to Vect, the latter functors GVectG \to Vect. Both these are very important.

Or take an abelian group AA and a codomain like 2Vect2Vect. Then there are 3 different things we can sensibly consider, namely 2-functors

A2Vect A \to 2Vect
BA2Vect \mathbf{B}A \to 2Vect


B 2A2Vect. \mathbf{B}^2A \to 2Vect \,.

All of these concepts are different, and useful. The first one is an object in the group 3-algebra of AA. The second is a pseudo-representation of the group AA. The third is a representations of the 2-group BA\mathbf{B}A. We have notation to distinguish this, and we should use it.

Finally, writing BG\mathbf{B}G for the 1-object nn-groupoid version of an nn-monoid GG makes notation behave nicely with respect to nerves, because then realization bars |||\cdot| simply commute with the BBs in the game: |BG|=B|G||\mathbf{B}G| = B|G|.

This behavior under nerves shows also that, generally, writing BG\mathbf{B}G gives the right intuition for what an expression means. For instance, what’s the “geometric” reason that a group representation is an arrow ρ:BGVect\rho : \mathbf{B}G \to Vect? It’s because this is, literally, equivalently thought of as the corresponding classifying map of the vector bundle on BG\mathbf{B}G which is ρ\rho-associated to the universal GG-bundle:

the ρ\rho-associated vector bundle to the universal GG-bundle is, in its groupoid incarnations,

V V//G BG, \array{ V \\ \downarrow \\ V//G \\ \downarrow \\ \mathbf{B}G } \,,

where VV is the vector space that ρ\rho is representing on, and this is classified by the representation ρ:BGVect\rho : \mathbf{B}G \to Vect in that this is the pullback of the universal VectVect-bundle

V//G Vect * BG ρ Vect, \array{ V//G &\to& Vect_* \\ \downarrow && \downarrow \\ \mathbf{B}G &\stackrel{\rho}{\to}& Vect } \,,

In summary, it is important to make people understand that groups can be identified with one-object groupoids. But next it is important to make clear that not everything that can be identified should be, for instance concerning the crucial difference between the category in which GG lives and the 2-category in which BG\mathbf{B}G lives.

algebraic structureoidification
truth valuepreorder
unital magmaunital magmoid
anti-involutive monoiddagger category
associative quasigroupassociative quasigroupoid
flexible magmaflexible magmoid
alternative magmaalternative magmoid
absorption monoidabsorption category
cancellative monoidcancellative category
rigCMon-enriched category
nonunital ringAb-enriched semicategory
nonassociative ringAb-enriched unital magmoid
nonassociative algebralinear magmoid
nonassociative unital algebraunital linear magmoid
nonunital algebralinear semicategory
associative unital algebralinear category
C-star algebraC-star category
differential algebradifferential algebroid
flexible algebraflexible linear magmoid
alternative algebraalternative linear magmoid
Lie algebraLie algebroid
monoidal poset2-poset
strict monoidal groupoid?strict (2,1)-category
strict 2-groupstrict 2-groupoid
strict monoidal categorystrict 2-category
monoidal groupoid(2,1)-category
monoidal category2-category/bicategory


Exposition of basics of monoidal categories and categorical algebra:

Properties of monoids expressed through properties of their toposes of presheaves:

  • Jens Hemelaer, Morgan Rogers, Monoid Properties as Invariants of Toposes of Monoid Actions, arXiv:2004.10513.

Last revised on June 9, 2022 at 10:22:29. See the history of this page for a list of all contributions to it.