Monads and Algebras over a Monad
A monad on a category is a monoid in the category of endofunctors: an endofunctor equipped with a unit and multiplication satisfying associativity and unit laws. An algebra over the monad (Eilenberg–Moore algebra) is an object with a structure map compatible with and . Every adjunction generates a monad, and every monad arises from an adjunction in two canonical ways — via the Kleisli and Eilenberg–Moore categories. Applied across universal algebra, topology, functional programming, and descent theory. Originated by Godement (1958), Huber, Kleisli, Eilenberg–Moore, and Beck (1960s).
Adjunctions and monads are two faces of the same phenomenon. An adjunction between and produces a monad on that remembers the composite round-trip and forgets the intermediate category . The monad alone cannot reconstruct , but it can reconstruct two canonical "best approximations": the Kleisli category (the initial adjunction giving ) and the Eilenberg–Moore category (the terminal one). All adjunctions inducing sit between these extremes, and the original is monadic exactly when the comparison functor is an equivalence.
Formal Statement
A monad on a category is a triple where is an endofunctor, (the unit), and (the multiplication) are natural transformations satisfying the associativity and left/right unit coherence laws.
Derivation hint: Both sides are the two ways to collapse ; equality is the monoid associativity condition transported to under horizontal composition .
Derivation hint: Insert a unit on the left or right factor of and multiply; this is the monoid unit law for the monoid . Here are the whiskerings: and . Likewise and . The diagrams asserted componentwise are, for every object :
Derivation hint: Evaluate and at an object ; the symbols unwind to the indicated component morphisms.
Given a monad , a -algebra (or Eilenberg–Moore algebra) is a pair with and a morphism (the structure map) satisfying:
Derivation hint: A "generator" , embedded via into the free structure , must evaluate back to itself.
Derivation hint: Evaluating a doubly-nested formal expression either by first multiplying () then evaluating, or by first evaluating the inner layer () then the outer, gives the same result — exactly the associativity of an action. A morphism of -algebras is a -morphism with . These form the Eilenberg–Moore category , with forgetful functor , .
The Kleisli category has the same objects as . A morphism in is a -morphism . The identity on is , and Kleisli composition of and is:
Derivation hint: Lift to act on via , apply first, then flatten with ; associativity of follows from , units from .
Let and with , unit and counit . Then with the given and with is a monad on .
Derivation hint: The triangle identities and , whiskered appropriately, yield the monad unit laws ; the naturality of yields associativity .
Every monad on arises from at least two adjunctions:
- The Eilenberg–Moore adjunction where is the free -algebra and , with .
- The Kleisli adjunction between and , with .
Among all adjunctions inducing , the Kleisli adjunction is initial and the Eilenberg–Moore adjunction is terminal in the category of such adjunctions. There is a fully faithful comparison functor exhibiting as the full subcategory of free algebras, and for any adjunction inducing a unique comparison functor with and .
Derivation hint: carries a -action because the counit at gives ; applying produces a structure map; the algebra laws are the triangle identity and the naturality of .
Why It Holds / Derivation
Let with unit , counit , satisfying the triangle identities
Derivation hint: These are the defining zig-zag equations of any adjunction, expressed with whiskering.
Step 1 — Set , . Then is a natural transformation since is natural and are functors; whiskering preserves naturality.
Step 2 — Right unit . Compute . Then
using functoriality of and the first triangle identity of .
Step 3 — Left unit . Here . Then
using the second triangle identity. (Whiskering by on the right is functorial.)
Step 4 — Associativity . Both sides are transformations . We have and . The interchange law applied to the naturality square of at the morphism itself — i.e. as transformations — gives, after whiskering by on the left and on the right, exactly .
∎Define . It is an algebra: the unit law for it reads , which is the left half of ; the associativity law reads , which is the left half of evaluated at . So is a genuine -algebra.
Adjunction data. The unit of at is . The counit at an algebra is the algebra map
Derivation hint: is an algebra morphism because says , exactly the morphism condition . The triangle identities for are (which is ) and (right half of ). Hence and with the original .
∎Beck's 1967 Columbia thesis crystallized monad theory into a working tool. He proved the monadicity (tripleability) theorem, giving a sharp criterion for when a forgetful functor exhibits its source as the algebras of a monad, and he introduced distributive laws for composing monads. The associated Beck–Chevalley condition and Beck's bar/cobar resolution (the simplicial object built from ) underpin descent theory and monadic cohomology. The term "triple" — Beck's and Eilenberg's preferred word for "monad" — survives in the older literature; Mac Lane popularized "monad" by analogy with the monoid law.
Building Intuition
Think of as "the free gadget on a set of generators." For the monad on Set sending (underlying set of the free monoid ), an element of is a formal word in the generators . The unit injects a generator as a length-one word. The multiplication takes a "word of words" and concatenates — flattening one layer of nesting. The associativity law says flattening a triply-nested expression is unambiguous; the unit laws say a single generator wrapped trivially flattens back to itself. An algebra then says: " knows how to evaluate formal words into honest elements," coherently. For the monoid monad, an algebra is exactly a monoid: reads off the product of any formal word. The slogan is: a monad is a theory of formal expressions; an algebra is a model of that theory. The Kleisli category is the world of "programs that produce -effects," while the Eilenberg–Moore category is the world of "all models," and free models embed into it.
Though a number theorist and functional analyst, Godement introduced in his 1958 Topologie algébrique et théorie des faisceaux the standard construction (now the "monad of a comonad" / the Godement resolution): given a sheaf, the canonical flasque resolution iterates an endofunctor with exactly the comonad/monad coherences. This was the first systematic appearance of the data as a computational device, used to define sheaf cohomology via the Godement (bar) resolution. The pattern — build a simplicial object from iterated and take cohomology — became the template for monadic cohomology of all algebraic theories.
Worked Examples
Given. On Set, let (covariant power set), , and , .
Step 1 — Check monad laws. Unit: and , giving . Associativity: for ,
confirming .
Step 2 — Decode an algebra. A structure map with (unit ) and (coherence ). Setting makes a complete join operation: is a bottom element, is monotone and idempotent on the induced order.
Step 3 — Identify the category. Algebra morphisms are exactly sup-preserving maps.
The free algebra on a set is , the power set ordered by inclusion.
Given. Fix a field . On Set, . Unit . Multiplication substitutes a combination-of-combinations and re-collects coefficients.
Step 1 — Algebra = -vector space. A structure map assigns to a formal combination its actual value . Laws force to carry a -vector-space structure and morphisms to be -linear; thus .
Step 2 — A concrete Kleisli composite over . Take , and Kleisli arrows
By , . First applied to gives the element-of- ""; then collects:
Step 3 — Sanity check via matrices. Linear maps compose to the matrix .
Common Misconceptions
A monad is not the same as its Kleisli category, nor as its algebras. The data on determines both and , but these are generally very different categories: is (equivalent to) the full subcategory of free algebras inside . Confusing "model" (object of ) with "computation" (morphism of ) is the single most common error.
Also: the unit and multiplication are natural transformations, not arbitrary morphisms; their naturality squares are needed in nearly every proof. And the monad laws are about , , — not about any particular adjunction — so different adjunctions can yield isomorphic monads while having inequivalent middle categories .
Consider on Set with . There is no natural making this a monad: any attempt (e.g. project to the diagonal pairs) violates the unit law , because and cannot both equal the identity for a multiplication that discards coordinates. Concretely, one checks for that no natural transformation of the right type satisfies . A subtler point: the continuation monad on Set is a monad and is monadic, but is not a category of finitary algebraic structures — it is not a variety in the sense of universal algebra, because does not preserve filtered colimits. This shows "Eilenberg–Moore category" is strictly more general than "category of algebras of an equational theory."
Connections
Monads sit at a crossroads of category theory. They are precisely monoids in , linking them to Monoidal Categories and the general theory of monoid objects. Dualizing every arrow gives <span class="wiki-link-missing">Comonads and Coalgebras</span>, whose coalgebras model coinductive/state-based systems. The relationship is the categorical heart of <span class="wiki-link-missing">Adjoint Functors</span>, and the question of whether is settled by <span class="wiki-link-missing">Beck's Monadicity Theorem</span>. In algebra, finitary monads on Set correspond exactly to <span class="wiki-link-missing">Lawvere Theories</span> and to varieties of universal algebra, while in semantics monads model <span class="wiki-link-missing">Computational Effects (Moggi)</span>. Composing monads requires <span class="wiki-link-missing">Distributive Laws of Monads</span>, and the simplicial bar construction from feeds <span class="wiki-link-missing">Monadic Cohomology and Descent</span>.
Real-World Applications
Historical Development
Subtleties & Limits
Several structural questions remain technically delicate or actively studied. (1) Monadicity beyond the elementary toposes: characterizing exactly which functors between higher categories are monadic (the -categorical monadicity theorem of Lurie) and how monadic descent behaves in the -setting is still being worked out. (2) Composing monads: two monads compose to a monad only given a distributive law satisfying four coherence laws; deciding whether a distributive law exists — and classifying them, including "no-go" theorems (e.g. there is no distributive law combining the list monad with itself in certain ways) — is subtle and has yielded surprising negative results. (3) Algebraic vs. non-algebraic effects: which monads correspond to algebraic theories with operations and equations (Plotkin–Power) versus genuinely non-finitary effects (continuations) is a fine boundary; effect handlers exploit exactly the algebraic ones. (4) Codensity monads and ultrafilters: the codensity monad of the inclusion is the ultrafilter monad (Kennison–Gildenhuys, Leinster), and the general theory of codensity monads as "limits over a for