In category theory, a branch of mathematics, a monoid (or monoid object, or internal monoid, or algebra) in a monoidal category is an object together with two morphisms
such that the pentagon diagram
and the unitor diagram
commute. In the above notation, is the identity morphism of , is the unit element and and are respectively the associator, the left unitor and the right unitor of the monoidal category .
Dually, a comonoid in a monoidal category is a monoid in the dual category .
Suppose that the monoidal category has a braiding . A monoid in is commutative when .
Given two monoids (M, μ, η) and (M′, μ′, η′) in a monoidal category C, a morphism f : M → M′ is a morphism of monoids when
In other words, the following diagrams
commute.
The category of monoids in C and their monoid morphisms is written MonC.