Adjoint Functors and Monads

In Category Theory we introduced the language of categories, and in many posts in this blog we have seen how useful it is in describing concepts in modern mathematics, for example in the two most recent posts, The Theory of Motives and Algebraic Spaces and Stacks. In this post, we introduce another important concept in category theory, that of adjoint functors, as well as the closely related notion of monads. Manifestations of these ideas are quite ubiquitous in modern mathematics, and we enumerate a few examples in this post.

An adjunction between two categories \mathbf{C} and \mathbf{D} is a pair of functors, F:\mathbf{C}\rightarrow \mathbf{D}, and G:\mathbf{D}\rightarrow \mathbf{C}, such that there exists a bijection

\displaystyle \text{Hom}_{\mathbf{D}}(F(X),Y)\cong\text{Hom}_{\mathbf{C}}(X,G(Y))

for all objects X of \mathbf{C} and all objects Y of \mathbf{D}. We say that F is left-adjoint to G, and that G is right-adjoint to F. We may also write F\dashv G.

An adjunction determines two natural transformations \eta: 1_{\mathbf{C}}\rightarrow G\circ F and \epsilon:F\circ G\rightarrow 1_{\mathbf{D}}, called the unit and counit, respectively. Conversely, the functors F and G, together with the natural transformations \eta and \epsilon, are enough to determine the adjunction, therefore we can also denote the adjunction by (F,G,\eta,\epsilon).

We give an example of an adjunction. Let K be a fixed field, and consider the functors


\displaystyle G:\textbf{Vect}_{K}\rightarrow\textbf{Sets}

where F is the functor which assigns to a set X the vector space F(X) made up of formal linear combinations of elements of X with coefficients in K; in other words, an element of F(X) can be written as \sum_{i}a_{i}x_{i}, where a_{i}\in K and x_{i}\in X, and G is the forgetful functor, which assigns to a vector space V the set G(V) of elements (vectors) of V; in other words it simply “forgets” the vector space structure on V.

For every function g:X\rightarrow G(V) in \textbf{Sets} we have a linear transformation f:F(X)\rightarrow V in \textbf{Vect}_{K} given by f(\sum_{i}a_{i}x_{i})=\sum_{i}a_{i}g(x_{i}). The correspondence \psi:g\rightarrow f has an inverse \varphi, given by restricting f to X (so that our only linear transformations are of the form f(x_{i}), and we can obtain set-theoretic functions corresponding to these linear transformations). Hence we have a bijection

\displaystyle \text{Hom}_{\textbf{Vect}_{K}}(F(X),V)\cong\text{Hom}_{\textbf{Sets}}(X,G(V)).

We therefore see that the two functors F and G form an adjunction; the functor F (sometimes called the free functor) is left-adjoint to the forgetful functor G, and G is right-adjoint to F.

As another example, consider now the category of modules over a commutative ring R, and the functors -\otimes_{R}B and \text{Hom}_{R}(B,-) (see The Hom and Tensor Functors). For every morphism g:A\otimes_{R}B\rightarrow C we have another morphism f: A\rightarrow\text{Hom}_{R}(B,C) given by [f(a)](b)=g(a,b). We actually have a bijection

\displaystyle \text{Hom}(A\otimes_{R}B,C)\cong\text{Hom}(A,\text{Hom}_{R}(B,C)).

This is called the Tensor-Hom adjunction.

Closely related to the concept of an adjunction is the concept of a monad. A monad is a triple (T,\eta,\mu) where T is a functor from \mathbf{C} to itself, \eta is a natural transformation from 1_{\mathbf{C}} to T, and \mu is a natural transformation from \mu:T^{2}\rightarrow T, satisfying the following properties:

\displaystyle \mu\circ\mu_{T}=\mu\circ T\mu

\displaystyle \mu\circ\eta_{T}=\mu\circ T\eta=1

Dual to the concept of a monad is the concept of a comonad. A comonad on a category \mathbf{C} may be thought of as a monad on the opposite category \mathbf{C}^{\text{op}}.

As an example of a monad, we can consider the action of a fixed group G on a set (such as the symmetric group permuting the elements of the set, for example). In this case, our category will be \mathbf{Sets}, and T, \eta, and \mu are given by

\displaystyle T(X)=G\times X

\displaystyle \eta:X\rightarrow G\times X given by x\rightarrow\langle g,x\rangle

\displaystyle \mu:G\times (G\times X)\rightarrow G\times X given by \langle g_{1},\langle g_{2},x\rangle\rangle\rightarrow \langle g_{1}g_{2},x\rangle

Adjunctions and monads are related in the following way. Let F:\mathbf{C}\rightarrow\mathbf{D} and G:\mathbf{D}\rightarrow\mathbf{C} be a pair of adjoint functors with unit \eta and counit \epsilon. Then we have a monad on \mathbf{C} given by (G\circ F,\eta,G\epsilon_{F}). We can also obtain a comonad given by (F\circ G,\epsilon,F\eta_{G}).

Conversely, if we have a monad (T,\eta,\mu) on the category \mathbf{C}, we can obtain a pair of adjoint functors F:\mathbf{C}\rightarrow\mathbf{C}^{T} and G:\mathbf{C}^{T}\rightarrow\mathbf{C}, where \mathbf{C}^{T} is the Eilenberg-Moore category, whose objects (called T-algebras) are pairs (A,\alpha), where A is an object of \mathbf{C}, and \alpha is a morphism T(A)\rightarrow A satisfying

\displaystyle \alpha\circ \eta_{A}=1_{A}

\displaystyle \alpha\circ \mu_{A}=\alpha\circ T(\alpha),

and whose morphisms h:(A,\alpha)\rightarrow (B,\beta) are morphisms h:A\rightarrow B in \mathbf{C} such that

\displaystyle h\circ\alpha=\beta\circ T(h).

In the example we gave above in the discussion on monads, the T-algebras are exactly the sets with the action of the group G. If X is such a set, then the corresponding T-algebra is the pair (X,h), where the function h:G\times X\rightarrow X satisfies

\displaystyle h(g_{1},h(g_{2},x))=h(g_{1}g_{2},x)

\displaystyle h(e,x)=x.

For comonads, we have a dual notion of coalgebras. These “dual” ideas are important objects of study in themselves, for example in topos theory. Another reason to consider comonads and coalgebras is that in mathematics there often arises a situation where we have three functors

\displaystyle L:\mathbf{D}\rightarrow\mathbf{C}

\displaystyle F:\mathbf{C}\rightarrow\mathbf{D}

\displaystyle R:\mathbf{D}\rightarrow\mathbf{C}

where L is left-adjoint to F, and R is right-adjoint to F (a so-called adjoint triple). As an example, consider the forgetful functor F:\textbf{Top}\rightarrow\textbf{Sets} which assigns to a topological space its underlying set. It has both a left-adjoint L:\textbf{Sets}\rightarrow\textbf{Top} which assigns to a set X the trivial topology (where the only open sets are the empty set and X itself), and a right-adjoint R:\textbf{Sets}\rightarrow\textbf{Top} which assigns to the set X the discrete topology (where every subset of X is an open set). Therefore we have a monad and a comonad on \textbf{Sets} given by F\circ L and F\circ R respectively.

Many more examples of adjoint functors and monads can be found in pretty much all areas of mathematics. And according to a principle attributed to the mathematician Saunders Mac Lane (one of the founders of category theory, along with Samuel Eilenberg), such a structure that occurs widely enough in mathematics deserves to be studied for its own sake.


Adjoint Functors on Wikipedia

Monad on Wikipedia

Adjoint Functor on nLab

Adjunction on nLab

Monad on nLab

Adjunctions by TheCatsters on YouTube

Monads by TheCatsters on YouTube

Categories for the Working Mathematician by Saunders Mac Lane

Category Theory by Steve Awodey


2 thoughts on “Adjoint Functors and Monads

  1. Pingback: Monoidal Categories and Monoids | Theories and Theorems

  2. Pingback: The Field with One Element | Theories and Theorems

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s