### Ends

#### Posted by Simon Willerton

The categorical notion of an end is something that several people have requested Catster videos for and Yemon Choi was recently asking if Tom had covered it in his new-born book. Given that I’ve got ends in my head at the moment for two different reasons, I thought I’d write a post on how I think about them.

I feel that seeing an integral sign like $\int _{c\in \mathcal{C}} T(c,c)$ can cause people’s eyes to glaze over, never mind them getting confused as to whether that represents an end or a coend. So I will endeavour to avoid integral signs apart from right at the end.

My experience is that coends roam more freely in the wild than ends do, but I will focus on ends in this post. One reason that people are interested in ends is that natural transformation objects in enriched category theory are expressed as ends, but I will stay away from the enriched setting here.

Having said what I won’t do, maybe I should say what I will do. I will mainly concentrate on a few examples to demonstrate ends as universal wedges.

### Functors

The input data for an end is a functor of the form $T\colon \mathcal{C}^{\mathrm{op}}\times \mathcal{C}\to \mathcal{D}$. The only functors that I know people take the ends of are those of the form $T(c,c')= [F(c),G(c')]$ where $F,G\colon \mathcal{C}\to \mathcal{E}$ are functors and $[-,-]\colon \mathcal{E}^{\mathrm{op}}\times \mathcal{E}\to \mathcal{D}$ is some kind of hom functor, i.e. either the usual hom (so $\mathcal{D}=\text {Set}$) or an internal hom (so $\mathcal{D}=\mathcal{E}$).

Here are some typical examples I’ve come across.

$\text {Hom}\colon \mathcal{C}^{\mathrm{op}}\times \mathcal{C}\to \text {Set}$

$\text {Hom}_{\mathcal{E}}(F(-),G(-)) \colon \mathcal{C}^{\mathrm{op}}\times \mathcal{C}\to \text {Set}$, where $F,G\colon \mathcal{C}\to \mathcal{E}$ are functors.

$\text {Lin}(U(-,)U(-)) \colon \text {Rep}(A)^{\mathrm{op}}\times \text {Rep}(A)\to \text {Vect}$, where

$A$ is finite-dimensional algebra over $\mathbb{C}$,

$\text {Rep}(A)$ is the category of finite-dimensional, complex representations of $A$,

$\text {Vect}$ is the category of complex vector spaces,

$U\colon \text {Rep}(A)\to \text {Vect}$ is the forgetful functor,

$\text {Lin}$ is the internal hom in $\text {Vect}$, i.e. $\text {Lin}(V,W)$ is the vector space of linear maps from $V$ to $W$.

$[-,-]\colon \text {Rep}(G)^{\mathrm{op}}\times \text {Rep}(G)\to \text {Rep}(G)$

where $G$ is a finite group

$[V,W]$ is the internal hom of $G$-representations $V$ and $W$, so it is the vector space of linear maps with the $G$-action on $f\colon V\to W$ given by $(g\cdot f)(v)=g\cdot f(g^{-1}\cdot v)$.

The main point of difference between 3 and 4 is that for an arbitrary algebra $A$, the category of representations does not have an internal hom, but for a finite group $G$ it does. Other examples like 4 would involve representation categories of Hopf algebras or quantum groups.

### Wedges

An end is a universal wedge, so I’d better say what a wedge is. A **wedge** for a functor $T\colon \mathcal{C}\times \mathcal{C}^{\mathrm{op}}\to \mathcal{D}$ is an object $e\in \text {Ob}(\mathcal{D})$ with a morphism $\omega _{c}\colon e\to T(c,c)$ for every object $c\in \text {Ob}(\mathcal{C})$. These morphisms have to satisfy a naturality condition which says that for every morphism $f\colon c\to c'$ in $\mathcal{C}$, the two obvious maps $e\to T(c,c')$ you can make are the same, i.e. the following diagram commutes.
$\begin{matrix} e & \overset{\omega _{c}}{\longrightarrow }& T(c,c) \\ \omega _{c'} \downarrow & &\downarrow T(1,f)\\ T(c',c') &\underset{T(f,1)}{\longrightarrow } & T(c,c') \end{matrix}$
We can denote such a wedge by writing $e\stackrel{\cdot }{\longrightarrow }T$.

Let’s have a look a what wedges are in the examples given above.

For $T=\text {Hom}$, a wedge is a set $e$ and a function $\omega _{c}\colon e\to \text {Hom}(c,c)$ for each $c\in \mathcal{C}$. This means that for each $n\in e$ we get a family of morphisms $\omega _{c}(n)\colon c\to c$. The naturality condition ensures that these are the components of a natural transformation of the identity functor $\text {Id}_{\mathcal{C}}\to \text {Id}_{\mathcal{C}}$. So a wedge is a set $e$ with a function $e\to \text {Nat}(\text {Id}_{\mathcal{C}},\text {Id}_{\mathcal{C}})$.

For $T=\text {Hom}(F(-),G(-))$, by a similar argument to that above, a wedge is a set $e$ with a function $e\to \text {Nat}(F,G)$ to the set of natural transformations.

In this case, where we have a $\mathbb{C}$-algebra $A$, an end is a vector space $e$ with a morphism $e\to \text {Lin}(U(V),U(V))$ for every representation $V$ of $A$, in other words a linear map $e\otimes U(V)\to U(V)$. The naturality condition says that these linear ‘action maps’ must commute with all $A$-intertwining maps.

In the case of the internal hom of representations of a finite group, a wedge consists of a representation $e\in \text {Rep}(G)$ together with a natural ‘action’ on every $G$-representation: $e\otimes V\to V$. These action maps are intertwiners and must commute with all other intertwiners.

If $T(c,c')$ is of the form $[F(c),F(c')]$ as in 1, 3 and 4 above, then we have morphisms $e\to [F(c),F(c)]$ so in some sense $e$ is acting on $F(c)$ for every $c$.

### Ends

An end is a universal wedge. An **end** for $T$ consists of a set $E$ with a morphism $\Omega _{c}\colon E\to T(c,c)$ for each $c\in \mathcal{C}$, satisfying the wedge naturality conditions, such that if $e\stackrel{\cdot }{\longrightarrow }T$ is another wedge for $T$ then there is unique map $e\to E$ such that the components of $e$ factor through $E$ as $e\to E\to T(c,c)$.

An end is often written as an integral $\int _{c\in \mathcal{C}}T(c,c)$. Coends, which I’m not talking about here, are written with the limits at the top of the integral sign: in Sheffield we have the mnemonic

“The end of the walking stick is at the bottom.”

I have mixed feelings about this notation. I think that people can be intimidated by it, also people get the impression that it is supposed to be something to do with integration which confuses them (or maybe that’s just me!)

We can look back at our examples and identify the ends.

For $T=\text {Hom}$, from what is written above, it should be clear that the end is the set of natural transformations of the identity $\text {Nat}(\text {Id}_{\mathcal{C}},\text {Id}_{\mathcal{C}})$. This set is sometimes called the Hochschild cohomology of the category.

For $T=\text {Hom}(F(-),G(-))$, similar to the example above, the end is $\text {Nat}(F,G)$ the set of natural transformations from $F$ to $G$.

In the case of the representation category of an algebra $A$ we find that the end is actually (the underlying vector space of) the algebra $A$ itself. It is pretty obvious that the tautological action on $A$-representations $A\otimes U(V)\to U(V)$ gives rise to a wedge. It is less obvious that it is the universal wedge.

This is the example of the internal hom for the representations of a finite group $G$. Whilst we have the tautological action $\mathbb{C}G\otimes U(V)\to U(V)$ for every representation $V$, we can make these into intertwining maps by taking the group algebra with

*the adjoint action*$\mathbb{C}G^{\mathrm{ad}}$. The resulting morphisms $\mathbb{C}G^{\mathrm{ad}}\otimes V\to V$ in $\text {Rep}(G)$ make the group algebra $\mathbb{C}G^{\mathrm{ad}}$ into a wedge for the internal hom $[-,-]$. In fact it is an end for the internal hom. This is related to the fact that a group algebra is semisimple and that there is an isomorphism of algebras in the representation category $\mathbb{C}G^{\mathrm{ad}}\cong \bigoplus _{W} [W,W]$ where sum runs over (a set of representatives of the equivalence classes of) the irreducible representations of $G$.

Example 3 is the prototypical example of **Tannakian reconstruction**. We start with the representation category $\text {Rep}(A)$ and the ‘fibre functor’ $U:\text {Rep}(A)\to \text {Vect}$, then reconstruct $A$ from there. See the nlab page on Tanaka duality for more details.

Example 4 is a kind of ‘internal reconstruction’. More generally, for a Hopf algebra $H$ the end of the internal hom is a version of $H$ inside its category of representations. I believe that this idea is due to Shahn Majid (see Chapter 9 of Foundations of Quantum Group Theory).

### Ends as Algebras (or Monoids, if you prefer)

In Examples 1, 3 and 4, the end could actually be given more structure than that of being just a set, a vector space or a representation. In all three examples the end is actually an algebra (or monoid, if you prefer) in the appropriate category. In fact, in Example 4 the end has a Hopf algebra structure, but I won’t go into that here.

Suppose the functor $T\colon \mathcal{C}^{\mathrm{op}}\otimes \mathcal{C}\to \mathcal{D}$ is of the form $[F(-),F(-)]$ for some functor $F\colon \mathcal{C}\to \mathcal{E}$ and for $[,]$ either internal or external hom then using the composition of the hom, for each $c\in \mathcal{C}$ we have the composite $E\otimes E\to [F(c),F(c)]\otimes [F(c),F(c)]\to [F(c),F(c)]$ and you can check that this gives a wedge $E\otimes E\stackrel{\cdot }{\longrightarrow }T$. Thus by the universal nature of the end we get a canonical map $\mu \colon E\otimes E\to E.$ In a similar vein we have an identity morphism for each $c\in \mathcal{C}$ $1\to [F(c),F(c)],$ these give rise to a wedge $1\stackrel{\cdot }{\longrightarrow }T$ so by the universality of $E$ we get a canonical map $\eta \colon 1\to E.$ You can verify that $\mu$ and $\eta$ make the end $E$ into an algebra object in $\mathcal{D}$, and the components of the end $E\to [F(c),F(c)]$ are algebra homomorphisms.

### Further examples

Just to finish we can have a look at how taking different ends on a similar category give different but related answers. So let’s look at Examples 1, 3 and 4 for the category $\text {Rep}(G)$ of representations of a finite group.

If we use the ordinary hom then we get the centre of the group algebra. $\int _{V\in \text {Rep}(G)} \text {Hom}(V,V) = Z(\mathbb{C}G)\in \text {Set}$

If we use the internal hom in $\text {Vect}$ we get the group algebra. $\int _{V\in \text {Rep}(G)}\text {Lin}(U(V,)U(V))=\mathbb{C}G\in \text {Vect}$

If we use the internal hom then we get the group algebra with the adjoint action. $\int _{V\in \text {Rep}(G)} [V,V]=\mathbb{C}G^{\mathrm{ad}}\in \text {Rep}(G)$

There ends my introduction to ends.

## Re: Ends

Item 2 in the list of examples of ends is the same as item 2 in the list of examples of wedges. I presume that it is meant to say that the end in question is $\Nat(F,G)$.