# nLab algebra over a monad

Contents

### Context

#### Higher algebra

higher algebra

universal algebra

# Contents

## Idea

There are different, related ways in which one could view the notion of algebra over a monad.

Algebras over a monad are usually objects equipped with extra structure, not just properties. (They can also be seen as algebras over the underlying endofunctor, satisfying extra compatibility properties.)

## Definition

Let $(T,\mu,\eta)$ be a monad on a category $C$. An algebra over $T$, or $T$-algebra, consists of an object $A$ of $C$ together with a morphism $a:TA\to A$ of $C$, such that the following diagrams commute.

The diagram on the left is sometimes called the unit triangle, and the diagram on the right the multiplication square or algebra square.

The corresponding dual notion is that of a coalgebra over a comonad.

In the case of a commutative monad, one can define a tensor product of algebras.

### Morphisms of algebras

Let $(A,a)$ and $(B,b)$ be $T$-algebra. A morphism of $T$-algebras is a morphism $f:A\to B$ of $C$ which makes the following diagram commute.

The category of $T$-algebras and their morphisms is called the Eilenberg-Moore category and denoted by $C^T$.

### Free algebras

Given a monad $(T,\mu,\eta)$ on a category $C$, for every object $X$ of $C$, the object $T X$ is canonically equipped with a $T$-algebra structure, given by the multiplication map $\mu$. The relevant diagrams commute by the monad axioms.

Algebras of this sort are called free algebras.

Given any morphism $f:X\to Y$ of $C$, the map $T f:T X\to T Y$ is a morphism of algebras, by naturality of $\mu$. In general, not every morphism of algebras between $T X$ and $T Y$ arises this way.

The subcategory of free algebras and their morphisms is (equivalent to) the Kleisli category.

## Examples

Many monads are named after their (free) algebras.

• The algebras of the free monoid monad on Set are monoids, and the morphisms of algebras the monoid homomorphisms.
• The algebras of the free commutative monoid monad on Set are commutative monoids, and their morphisms the monoid homomorphisms between them.
• The algebras of the free group monad on Set are groups, and their morphisms are the group homomorphisms.
• …and so on.

In these cases, the notion of free group, free monoid, et cetera coincide with the notion of free algebra given above.

## Generalizations

An algebra over a monad is a special case of a module over a monad in a bicategory. See there for more information.

The Eilenberg-Moore and Kleisli categories are also special cases of more general 2-dimensional universal constructions, namely the Eilenberg-Moore object and the Kleisli object. See those pages for more information.

## References

An introduction to the basic ideas, which gives some intuition for newcomers, can be found in

• Paolo Perrone, Notes on Category Theory with examples from basic mathematics, Chapter 5. (arXiv)