A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Algebras over a Monad

Research Depth 91 in the knowledge graph I know this Set as goal
541prerequisites beneath it
See this on the map →
Monads in Category TheoryAdjoint Functors
Eilenberg-Moore algebra T-algebra Kleisli category monad free algebra

Core Idea

Given a monad (T, η, μ) on C, a T-algebra (Eilenberg-Moore algebra) is an object A together with a morphism α: T(A) → A satisfying α∘η_A = id_A and α∘μ_A = α∘T(α). T-algebras and their homomorphisms form the Eilenberg-Moore category CT, which is the 'semantic' category of structures defined by the monad. The Kleisli category C_T has the same objects as C but morphisms A → B are morphisms A → T(B) in C, capturing computational effects: a morphism in the Kleisli category is a computation returning a B-value with effects tracked by T.

How It's Best Learned

Show that T-algebras for the list monad on Set are exactly monoids. Verify the T-algebra axioms correspond to associativity and unit laws for the monoid operation. Then identify the Kleisli category for the maybe monad as the category of partial functions.

Common Misconceptions

Explainer

From your study of monads, you know that a monad (T, η, μ) on a category C packages a unit η: Id → T and a multiplication μ: T² → T satisfying coherence laws that look like a monoid in the category of endofunctors. A natural question is: what does it mean for an object to "be acted on" by T coherently? This is precisely what a T-algebra captures — it is the structure that says "T can deposit its contents into this object in a compatible way."

Concretely, a T-algebra (or Eilenberg-Moore algebra) is a pair (A, α) where A is an object of C and α: T(A) → A is a morphism — the structure map — satisfying two axioms. The unit axiom α ∘ η_A = id_A says that the unit inclusion η_A: A → T(A) is a section of α: if you inject A into T(A) via the unit and then apply the structure map, you get back where you started. The associativity axiom α ∘ μ_A = α ∘ T(α) says that folding a nested T(T(A)) down to A gives the same result whether you first flatten T² to T (using μ) and then apply α, or whether you first apply α inside T and then apply α again. These two axioms are the algebra laws dressed in categorical clothing.

The canonical example clarifies everything. Take the list monad on Set, where T(A) = the set of finite lists over A, η_A maps each element to its singleton list, and μ_A concatenates a list of lists. A T-algebra is then a set A with a map α: List(A) → A. The unit axiom requires α([a]) = a — the operation on a singleton list returns the element itself. The associativity axiom requires that flattening a nested list before applying α equals applying α twice — once inside, once outside. This is exactly the definition of a monoid: associativity and unit for a binary operation generalized to arbitrary arities. So list-monad algebras on Set are precisely monoids; the monad has "encoded" the equational theory of monoids, and T-algebras are the models of that theory.

The Eilenberg-Moore category CT has T-algebras as objects and algebra homomorphisms as morphisms: a morphism from (A, α) to (B, β) is a morphism f: A → B in C such that f ∘ α = β ∘ T(f) — meaning f commutes with the T-action on both sides. This is the "semantic" category: it contains all models of the algebraic theory encoded by T. At the other extreme sits the Kleisli category C_T, whose objects are the same as C but whose morphisms A → B are morphisms A → T(B) in C — computations that produce a B-value wrapped in T-effects. Kleisli composition (the bind/flatMap operation) sequences these effectful computations by composing them through μ. These two categories sit at opposite ends of a canonical factorization of the monad's adjunction: the free-forgetful adjunction factoring through C_T gives the "minimal" factorization, while CT gives the "maximal" one.

An important subtlety your misconceptions note points to: not every T-algebra is free. The free T-algebra on an object A is (T(A), μ_A) — the algebra you get by applying T once and then folding with the multiplication. Free algebras are the "syntactic" objects, containing formal expressions. A non-free algebra like a specific monoid (the integers under addition, say, as a list-monad algebra) is a "semantic" quotient — it imposes additional equations beyond what T itself requires. The relationship between free and non-free algebras mirrors the relationship between syntax and semantics in logic, and the adjunction between C and CT encodes exactly this syntax-semantics duality: the left adjoint builds free algebras (syntax), the right adjoint forgets the T-structure (extracts the underlying set), and the unit η is the inclusion of generators into their free algebra.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementCartesian Products and RelationsPartial OrdersBinary RelationsEquivalence RelationsInjective, Surjective, and Bijective FunctionsCategories and MorphismsFunctorsCommutative Diagrams in Category TheoryCommutative Diagrams and CompositionNatural Transformations2-Categories and Weak FunctorsNatural Isomorphisms Between FunctorsIsomorphisms in CategoriesUniversal PropertiesInitial and Terminal ObjectsProducts and CoproductsEqualizers and CoequalizersLimits and ColimitsPullbacks and PushoutsAdjoint FunctorsFree ObjectsMonads in Category TheoryAlgebras over a Monad

Longest path: 92 steps · 541 total prerequisite topics

Prerequisites (2)

Leads To (0)

No topics depend on this one yet.