This entry is about the notion of monad in category theory. For other notions see monad (disambiguation).
symmetric monoidal (∞,1)-category of spectra
2-natural transformation?
The entry is about monads in the sense of category theory, for another concept see also monad in nonstandard analysis.
A monad is a structure that is a lot like a monoid, but that lives in a bicategory rather than a monoidal category. In other words, the concept of a monad is the horizontal categorification of that of a monoid.
Monads are among the most pervasive structures in category theory and its applications: for example, they are central to the category-theoretic account of universal algebra, as well as underlying the theory of simplicial objects and thus, via the Dold–Kan correspondence, much of homological algebra.
A monad in a bicategory $K$ is given by
an object $a$, together with
an endomorphism $t \colon a \to a$, and
2-cells $\eta \colon 1_a \to t$ (the unit of $t$) and $\mu \colon t \circ t \to t$ (the multiplication)
such that the diagrams
commute (where certain coherence isomorphisms have been omitted).
The name “monad” and the terms “unit”, “multiplication” and “associativity” bear a clear analogy with monoids (but see also at monad (disambiguation)). Indeed, one can define a monad on an object $a$ of a bicategory $K$ as just a monoid in the endomorphism category $K(a,a)$. Alternatively, monads can be taken as more fundamental, and a monoid in a monoidal category $C$ can be defined as a monad in $\mathbf{B} C$, the one-object bicategory corresponding to $C$.
A third and somewhat less obvious definition says that a monad in $K$ is a lax 2-functor from the terminal bicategory $1$ to $K$: the unique object $\ast$ of $1$ is sent to the object $a$, the morphism $1_a$ becomes $t$, and $\eta$ and $\mu$ arise from the coherent 2-cells expressing lax functoriality. This in turn is equivalent to saying that a monad is a category enriched in a bicategory with a single object and single morphism. Among higher-category theorists, it’s tempting to suggest that this is the most fundamental definition, and the most basic reason for the ubiquity and importance of monads. Regardless of this, however, the earlier more elementary definitions are both practically and pedagogically essential.
We can picture a monad in $K$ as an image of the third oriental in $K$. See the remarks at monoidal category.
The data of and axioms for a monad can be expressed graphically as string diagrams. Writing $T \colon C \to C, \eta, \mu$ for the monad in question (this notation being the standard one when $K = Cat$), these data can be represented as
Thanks to the distinctive shapes, one can usually omit the labels:
The axioms then appear as:
Monads in $Cat$ are sometimes, mostly in older literature, also called triples (alluding to the triple of data $(A,\mu,i)$), following Eilenberg and Moore. In even older literature, they are also referred to as standard constructions, the original term used by Godement when he introduced the idea. For terminological remarks by Ross Street see category-list here.
Given the equivalence between monads in $K$ and lax functors $1 \to K$ it is straightforward to define the bicategory $Mnd(K)$ of monads in $K$ to be the lax functor category $[1,K]_\ell$, which consists of lax functors, lax transformations and modifications.
Spelling this out, we see that an object of $Mnd(K)$ is a monad $(a,t,\eta,\mu)$ in $K$. A morphism of monads $(a,t) \to (b,s)$ is given by 1-cell $x \colon a \to b$ together with a 2-cell $\lambda \colon s x \to x t$ satisfying
Finally, a 2-cell $(x,\lambda) \Rightarrow (y, \kappa)$ is given by a 2-cell $m \colon x \Rightarrow y$ satisfying
Given that a monad in a bicategory $\mathcal{B}$ is nothing but a monoid in a hom-category $\mathcal{B}(a,a)$, it is natural to consider a module over this monoid: a module for a monad. This notion of module is more general than a module in a monoidal category, however, since it need not live in $\mathcal{B}(a,a)$ but can be in $\mathcal{B}(b,a)$ (for left modules) or $\mathcal{B}(a,c)$ (for right modules).
In a Cat-like bicategory, left modules over a monad are usually called algebras over the monad. This terminology is confusing from the point of view of monads as monoids, but is justified because in Cat itself, such algebras with domain 1 are just algebras for a monad in the classical sense. Such algebras are a powerful tool to encode general algebraic structures; this is the topic of universal algebra. The algebras over a monad form its Eilenberg-Moore category, which is characterized by a universal property.
Some monads arise from operads, in which case algebras for the monad are the same as algebras for the operad. A Lawvere theory is another special sort of monad in $Cat$.
Every adjunction $(L \dashv R)$ induces a monad $R \circ L$ and a comonad $L \circ R$. There is in general more than one adjunction which gives rise to a given monad this way, in fact there is a category of adjunctions for a given monad. The initial object in that category is the adjunction over the Kleisli category of the monad and the terminal object is that over the Eilenberg-Moore category of algebras. (e.g. Borceux, vol. 2, prop. 4.2.2) The latter is called the monadic adjunction.
Moreover, passing from adjunctions to monads and back to their monadic adjunctions constitutes itself an adjunction between adjunctions and monads, called the semantics-structure adjunction.
General types of monads that have standard usages also as monads in computer science? include
also
Monads are often considered in the 2-category Cat where they are given by endofunctors with a monoid structure on them. In particular, monads in Cat on Set are equivalent to the equational theories studied in universal algebra. In this context, a monad abstracts the concept of an algebraic theory (such as “group” or “ring”), giving a general notion of extra structure on an object of a category.
Classically, if $\mathbf{T}$ is an algebraic theory (e.g. the theory of groups), a $\mathbf{T}$-structure on a set tells us how to interpret various terms (e.g. $(a\cdot c)$) formed from elements of the set, subject to certain axioms (e.g. $(a\cdot (b\cdot c))=((a\cdot b)\cdot c)$). A monad collects this up into a functor $T$. For a set $X$, $T X$ is the set of all terms of the theory formed from elements of $X$, with terms identified if axioms force them to be equal. For groups, $T X$ is thus the (underlying set of the) free group of formal words $a \cdot b \cdot \cdots \cdot s$ from $X$; the fact that $T$ gives free structures turns out to be typical.
To capture the theory fully, we need to include a little more data: a natural map $\eta_X : X \to T X$ recording how each $a \in X$ gives a trivial term $a$, and a map $\mu_X:T T X \to T X$ recording how further terms built from terms are already present as terms in $T X$.
Given a monad in Cat on a category $C$, one can always produce a canonical resolution of any object of $C$.
Monads on posets are particularly simple (in particular, they are always idempotent). In fact, monads on power sets are extremely common throughout mathematics; they are known in less categorially-inclined circles as Moore closures, and there are many examples there.
An internal monad on the subobject classifier of a topos $E$ is a Lawvere-Tierney topology on $E$.
If $C$ is a category with finite limits, then a monad in the bicategory of spans in $C$ is the same thing as an internal category in $C$.
A monad in the bicategory Prof of profunctors on a category $A$ can be identified with an identity-on-objects functor $A\to B$.
There is a vertical categorification of monads to (∞,1)-categories. See (∞,1)-monad.
in section 3 of
adjunction, comonad, adjoint monad, algebra over a monad, monad with arities, distributive law, monoidal monad, cartesian monad
monad 2-monad/doctrine / (∞,1)-monad
Introductions:
The Catsters, Monads (five short video lectures)
John Baez, Universal Algebra and Diagrammatic Reasoning (Introductory slides).
Detailed accounts:
F. Borceux, Handbook of Categorical Algebra, vol. 2, Ch. 4 “Monads”
Ross Street, The formal theory of monads, J. of Pure and Applied Algebra 2 (1972), 149–168 (doi)
Ross Street, Steve Lack, The formal theory of monads II, J. Pure Appl. Algebra 175 (2002), No. 1-3, 243–265, (doi)
H. Appelgate, M. Barr, J. Beck, F. W. Lawvere, F. E. J. Linton, E. Manes, M. Tierney, F. Ulmer, Seminar on triples and categorical homology theory, ETH 1966/67, edited by B.~Eckmann, LNM 80, Springer 1969.
Relation to universal algebra:
Martin Hyland and John Power, The category theoretic understanding of universal algebra: Lawvere theories and monads (pdf).
Anthony Voutas, The basic theory of monads and their connection to universal algebra (pdf)
T. M. Fiore, N. Gambino, J. Kock, Monads in double categories, arxiv/1006.0797
Gabriella Böhm, Stephen Lack, Ross Street, Weak bimonads, arxiv/1002.4493