## Coends

Coends are a categorified version of “summing over repeated indices”. We do that when we’re computing the trace of a matrix and when we’re multiplying two matrices. It’s categorified because we’re summing over a bunch of sets instead of a bunch of numbers.

Let be a small category. The functor assigns

- to each pair of objects the set of morphisms between them, and
- to each pair of morphisms a function that takes a morphism and returns the composite morphism , where

It turns out that given any functor we can make a new category where and are subcategories and is actually the hom functor; some keywords for more information on this are “collages” and “Artin glueing”. So we can also think of as assigning

- to each pair of objects a set of morphisms between them, and
- to each pair of morphisms a function that takes a morphism and returns the composite morphism , where and

We can think of these functors as adjacency matrices, where the two parameters are the row and column, except that instead of counting the number of paths, we’re taking the set of paths. So is kind of like a matrix whose elements are sets, and we want to do something like sum the diagonals.

The coend of is the coequalizer of the diagram

The top set consists of all the pairs where

- the first element is a morphism and
- the second element is a morphism

The bottom set is the set of all the endomorphisms in

The coequalizer of the diagram, the coend of is the bottom set modulo a relation. Starting at the top with a pair the two arrows give the relation

where I’m using the lollipop to mean a morphism from

So this says take all the endomorphisms that can be chopped up into a morphism from going one way and a from going the other, and then set For this to make any sense, it has to identify any two objects related by such a pair. So it’s summing over all the endomorphisms of these equivalence classes.

To get the trace of the hom functor, use in the analysis above and replace the lollipop with a real arrow. If that category is just a group, this is the set of conjugacy classes. If that category is a preorder, then we’re computing the set of isomorphism classes.

The coend is also used when “multiplying matrices”. Let Then the top set consists of triples the bottom set of pairs and the coend is the bottom set modulo

That is, it doesn’t matter if you think of as connected to or to ; the connection is associative, so you can go all the way from to

Notice here how a morphism can turn “inside out”: when and the identities surround a morphism in , it’s the same as being surrounded *by* morphisms in and ; this is the difference between a trace, where we’re repeating indices on the same matrix, and matrix multiplication, where we’re repeating the column of the first matrix in the row of the second matrix.

leave a comment