TITLE: Examples of Monads and their Algebras
QUESTION [18 upvotes]: I'd like to get some examples of monads; specifically, I'd love a big list of different monads and a description of what their algebras are. Alternatively, online resources and especially exercices on monads and their algebras.


A recent question I asked (that hasn't received any answers yet), has sent me on an epic voyage of discovery through the world of lattices, monads, operads, lattice and poset homology. I'm a bit lost but very much enjoying the ride ^^
Anyway, I know that a pair of adjoint functors produce a monad, and conversely, it is my understanding that, given a monad, one can construct a new category and a pair of adjoint functors that will produce the original monad, so in a way the question is settled. However this is not very concrete to me.
Here are some monads encountered in various lecture notes (and the youtube video series by the Catsters)

the monad on $\mathsf{Set}$ that associates to every set the set on words on it; its algebras are the monoids. Similarly there is the monad on $\mathsf{Set}$ that associates to every set the set underlying the free group on it; I guess the algebras associated to this one are the groups(?), or the monad on $\mathsf{Vect}_k$ that takes a vector space $V$ to the vector space underlying its tensor algebra: what are its algebras? These arise from classical adjuctions. 
the powerset monad. I've tried working out its algebras but I don't have a clue as to what they might be. An algebra would be a set $X$ and a map $\theta:\mathcal{P}(X)\rightarrow X$ such that for any $x\in X$ and family $(A_i:i\in I)$ of distinct subsets of $X$,
$$\theta(\lbrace x\rbrace)=x\text{ and }\theta\left(\bigcup_{i\in I} A_i\right)=\theta\left(\lbrace \theta(A_i)\mid i\in I\rbrace\right)$$
However, I don't see what that actually means. EDIT I found a chapter of Mac Lane's Categories for the Working Mathematician online that features an exercise showing that the algebras for the powerset monad are the complete join semi-lattices.
the intriguing ultrafilter monad on $\mathsf{Set}$ that sends a set $X$ to the set $\mathcal{U}X$ of all ultrafilters on $X$. According to Steve Lack's answer to this MO question, its "algberas are compact Hausdorff spaces". I read a short explanation somewhere on the net, but I haven't yet tried to grasp it, nor do I remember where it was...

REPLY [2 votes]: I'll describe the following three examples:

The word monad; its algebras are monoids
The reduced word monad; its algebras are groups
The path monad; its algebras are small categories

Monoids. Let $T\colon \textrm{Set}\to \textrm{Set}$ be the functor taking a set $S$ to the set of words in $S$, i.e.
$$
T(S)=\bigsqcup_{n=0}^{\infty}S^n
$$
and taking a function $f\colon S\to S'$ to the function $T(S)\to T(S')$ which applies $f$ to each symbol appearing in a word. Let $\mu$ be the natural transformation from $T^2$ to $T$ which concatenates words, and let $\eta$ be the natural transformation from $T^0$ to $T$ which embeds sets as words of length $1$. Then $(T,\eta,\mu)$ is a monad in Set. Its Eilenberg-Moore category is the category of monoids.
Groups. I'm following the explicit construction of free groups described here. Given a set $S$ consider the disjoint union $S\sqcup S$ and let $i$ be the involution exchanging the two copies of $S$. The graph of $i$, as a subset of $(S\sqcup S)^2$, is the set of reducible words of length $2$, and its complement is the set of reduced words. These notions are extended to words on $S\sqcup S$ of arbitrarily length, and there is an operation on sequences of reduced words given by concatenation followed by reduction.
Let $T\colon \textrm{Set}\to \textrm{Set}$ be the functor taking a set $S$ to the set of reduced words on $S\sqcup S$ and sending a function $f\colon S\to S'$ to the operation which applies $f\sqcup f$ to each symbol then reduces the resulting word. Let $\mu$ be the natural transformation from $T^2$ to $T$ which takes a word whose symbols belong to $T(S)\sqcup T(S)$ and concatenates them after replacing symbols coming from the second factor with their involuted reversal, and finally reducing the resulting word. Let $\eta$ be as before. Then $(T,\eta,\mu)$ is a monad in Set whose Eilenberg-Moore category is the category of groups.
Small categories.
Let Quiv denote the category of quivers, i.e. directed multigraphs with multigraph homomorphisms. Let $T\colon\textrm{Quiv}\to\textrm{Quiv}$ be the functor taking a quiver to its path quiver, i.e. the quiver with the same vertex set and edges given by paths in the original quiver, and taking a morphism of quivers to the morphism of path quivers obtained from the original morphism by applying it to each of the edges along a path.  Let $\mu$ be the natural transformation from $T^2$ to $T$ which concatenates paths of paths, and let $\eta$ be the natural transformation from $T^0$ to $T$ consisting of quiver morphisms which are the identity on the vertices and map edges to the corresponding paths of length $1$. Then $(T,\eta,\mu)$ is a monad in Quiv whose Eilenberg-Moore category is the category of small categories.

There is a notable omission from this list of examples: groupoids. I expect that there is a "reduced path" monad whose algebras are groupoids, but I did not work out the details and would be interested to see them.