### Categories vs. Algebras

#### Posted by Tom Leinster

Representation theorists make good use of the “category algebra” construction. This is a way of turning a linear category (one whose hom-sets are vector spaces) into an associative algebra. In this post, I’ll describe what the category algebra is and why it seems to be important.

I’ll also ask two basic questions about the category algebra construction. I hope someone can tell me the answers.

First I’ll describe the category algebra construction. To make life easier
for all of us, I’ll always use the word **category** to mean what category
theorists would call a “category enriched in vector spaces”: one in which
the hom-sets are vector spaces and composition is bilinear. Similarly,
**functors** will be assumed to preserve this linear structure.

The construction takes as input a category $\mathbf{C}$ (assumed to
have just a *set* of objects, not a proper class) and produces as output an
associative algebra $\Sigma \mathbf{C}$, called its **category algebra**. As a vector space,

$\Sigma\mathbf{C} = \bigoplus_{c, d \in \mathbf{C}} \mathbf{C}(c, d)$

— the direct sum or coproduct of all the hom-sets of $\mathbf{C}$ (which, remember, are vector spaces). To define the multiplication on $\Sigma\mathbf{C}$, it’s enough to define the product $g \cdot f$ whenever $g$ and $f$ are maps in $\mathbf{C}$, and we do this by putting

$g \cdot f = \begin{cases} g \circ f &\text{if } domain(g) = codomain(f)\\ 0 &\text{otherwise.} \end{cases}$

In other words, multiplication is composition where that makes sense, and zero elsewhere.

(The notation $\Sigma\mathbf{C}$ for the category algebra is something I just made up. Is there standard notation?)

So far I’ve followed the time-honoured tradition of not bothering to say whether “algebras” are supposed to have a multiplicative identity. But actually, the issue of multiplicative identities is crucial to understanding category algebras.

Let me briefly try to explain why. The first observation is that if the category $\mathbf{C}$ has only finitely many objects, then the algebra $\Sigma\mathbf{C}$ does have a multiplicative identity. It’s $\sum_{c \in \mathbf{C}} 1_c$. If $\mathbf{C}$ has infinitely many objects then this sum makes no sense, so $\Sigma \mathbf{C}$ usually doesn’t have a multiplicative identity.

I’ll assume from now that $\mathbf{C}$ has only finitely many objects, so that $\Sigma\mathbf{C}$ is a unital algebra.

We’ll come back to the significance of identities in $\mathbf{C}$ and in $\Sigma\mathbf{C}$, but for now, let’s just observe:

- Taking the category algebra has the effect of concentrating all the
identities of $\mathbf{C}$ into a single identity for $\Sigma\mathbf{C}$,
with the individual identities $1_c$ of $\mathbf{C}$ being merely
*idempotents*in $\Sigma\mathbf{C}$.

(The sum of all these idempotents is the multiplicative identity of $\Sigma\mathbf{C}$.) Alternatively, looking at it from the point of view of the algebra $\Sigma\mathbf{C}$:

- The multiplicative identity of $\Sigma\mathbf{C}$ is smeared all across the category $\mathbf{C}$, with one summand of the multiplicative identity $\sum_{c \in \mathbf{C}} 1_c$ attached to each object of $\mathbf{C}$.

Time for some examples.

Let $S$ be a finite preordered set — that is, a finite set equipped with a reflexive, transitive binary relation $\leq$. We can construct a category $\mathbf{C}$ from it as follows. Abstractly: view $S$ as an ordinary, unenriched category, then let $\mathbf{C}$ be the free linear category on it. Concretely, the objects of $\mathbf{C}$ are the elements of $S$, the hom-set $\mathbf{C}(s, t)$ is the ground field $k$ if $s \leq t$ and zero otherwise, and composition (where it’s nontrivial) is multiplication of scalars.

Now, the category algebra $\Sigma\mathbf{C}$ is a subalgebra of the algebra $M_S(k)$ of all $S \times S$ matrices over $k$. It consists of just those matrices $P$ satisfying the condition that $P(s, t)$ is only allowed to be nonzero when $s \leq t$.

A special case of the last example: let $S = \{1, \ldots, n\}$, with the obvious ordering. Then $\mathbf{C}$ is the category that you’d usually draw as $\bullet \to \bullet \to \quad \cdots \quad \to \bullet$ and $\Sigma\mathbf{C}$ is the algebra of $n \times n$ upper-triangular matrices.

Another special case: let $S = \{1, \ldots, n\}$ with the discrete ordering: $s \leq t \iff s = t$. Then $\mathbf{C}$ is the

**discrete**category on $n$ objects — the disjoint union of $n$ copies of the ground field $k$ — and $\Sigma\mathbf{C}$ is the algebra of $n \times n$ diagonal matrices. Equivalently, $\Sigma\mathbf{C}$ is the $n$-fold product $k^n$.A final special case: let $S = \{1, \ldots, n\}$ with the other trivial ordering: $s \leq t$ for all $s, t$. Then $\mathbf{C}$ is the

**codiscrete**category on $n$ objects (so that all objects are isomorphic and all hom-sets are $k$), and $\Sigma\mathbf{C}$ is the full matrix algebra $M_n(k)$.

Why are category algebras important? I’m not sure I fully know, but here’s a fundamental fact:

A category and its category algebra are Morita equivalent.

What this means is that for any category $\mathbf{C}$, there’s an equivalence of categories

$[\mathbf{C}, \mathbf{Vect}] \simeq {\Sigma\mathbf{C}}\text{-}\mathbf{Mod}$

where the left-hand side is the category of functors $\mathbf{C} \to \mathbf{Vect}$. If you regard the algebra $\Sigma\mathbf{C}$ as a one-object category, then the right-hand side is the category of functors $\Sigma\mathbf{C} \to \mathbf{Vect}$.

So as far as linear representations are concerned, $\mathbf{C}$ and $\Sigma\mathbf{C}$ are the same thing.

How can we prove this equivalence? It’s one of those follow-your-nose proofs… but in following your nose, you discover the pivotal role of the identities.

In one direction, it’s straightforward: given a functor $F: \mathbf{C} \to \mathbf{Vect}$, put $X = \bigoplus_{c \in \mathbf{C}} F(c)$; then $X$ is a $\Sigma\mathbf{C}$-module in what is, if you think about it, an obvious way.

The other direction isn’t quite so obvious. Starting with a $\Sigma\mathbf{C}$-module $X$, how can we manufacture a functor $F: \mathbf{C} \to \mathbf{Vect}$? Given $X$ and an object $c \in \mathbf{C}$, we have to cook up a vector space $F(c)$. The key here is that, for each $c \in \mathbf{C}$, the element $1_c$ of $\Sigma\mathbf{C}$ is idempotent. It follows that $1_c \cdot - : X \to X$ is idempotent. The image of this map (which is also its set of fixed points) is a vector space; and that’s what we take $F(c)$ to be.

The rest of the details of this equivalence are easy enough, and I won’t bother you with them. Instead, I’ll show you one consequence of the equivalence, then ask you two questions.

First, here’s the consequence. It begins with the observation that equivalent categories *don’t* usually have isomorphic category algebras. Indeed, suppose we have two equivalent categories,
$\mathbf{C}$ and $\mathbf{D}$. Then they’re certainly *Morita* equivalent. So, by using the
result above, we get a chain of equivalences:

$\Sigma\mathbf{C}\text{-}\mathbf{Mod} \simeq [\mathbf{C}, \mathbf{Vect}] \simeq [\mathbf{D}, \mathbf{Vect}] \simeq \Sigma\mathbf{D}\text{-}\mathbf{Mod}$

The end result is that the categories $\Sigma\mathbf{C}$-modules and $\Sigma\mathbf{D}$-modules are equivalent. And, since $\Sigma\mathbf{C}$ and $\Sigma\mathbf{D}$ are not usually isomorphic, this isn’t quite trivial.

The most famous example is due to Morita. Say $\mathbf{C}$ is the codiscrete category on $n \geq 1$ objects (so that all hom-sets are the ground field $k$), and $\mathbf{D}$ is the codiscrete category on a single object. Then, as we saw earlier, $\Sigma\mathbf{C}$ is the full matrix algebra $M_n(k)$, while $\Sigma\mathbf{C} = M_1(k) = k$. But $\mathbf{C}$ and $\mathbf{D}$ are equivalent categories (since all objects of $\mathbf{C}$ are isomorphic), so

$M_n(k)\text{-}\mathbf{Mod} \simeq \mathbf{Vect}$

for any $n \geq 1$.

Now here are my two questions.

**First question** *Is there a good categorical explanation of the
category algebra construction?*

The first observation is that the construction isn’t even functorial, or at least, not in the obvious way. A functor $F: \mathbf{C} \to \mathbf{D}$ does induce a linear map $\Sigma\mathbf{C} \to \Sigma\mathbf{D}$, but it doesn’t usually preserve multiplication. For instance, consider the obvious functor from the discrete category $\mathbf{C}$ on two objects to the discrete category $\mathbf{D}$ on one object. The induced linear map $k^2 \to k$ is addition, which is not a homomorphism of algebras.

**Second question** *Does the category algebra construction suggest
that we should study representations of categories rather than representations of algebras?*

I need to explain the thinking behind this. The Morita equivalence between a
category $\mathbf{C}$ and its category algebra $\Sigma\mathbf{C}$ tells us
that from a representation-theoretic viewpoint, it doesn’t much matter
which we use. *However*, if $\mathbf{C}$ has infinitely many objects then
$\Sigma\mathbf{C}$ is usually not a *unital* algebra, and one may view a
non-unital algebra as a rather deficient sort of thing. In that case, the thinking goes,
it’s better to stick with the original category than pass to the category
algebra.

Another way to put it: whenever you see a non-unital algebra (especially an infinite-dimensional one), ask yourself whether it’s the category algebra of some category with infinitely many objects. If it is, you might be better off working with the category rather than the algebra.

I picked up this point of view from a couple of different conversations with algebraists, but I’m not sure I’ve properly understood it. Let me test it out on a couple of examples. One of them kind of “works”, in the sense of corroborating this viewpoint. The other appears not to work at all.

ExampleLet $L^1(\mathbb{T})$ be the set of complex-valued integrable functions on the circle $\mathbb{T} = \mathbb{R}/\mathbb{Z}$. It’s a $\mathbb{C}$-algebra under addition and convolution.This algebra has no multiplicative identity. If it did have one, it would be the Dirac delta function — that is, a function $\delta$ such that $\int_\mathbb{T} f \cdot \delta = f(0)$ for all integrable $f$. But, of course, no such delta function exists. This is what gives Fourier analysis its richness.

So we have before us an infinite-dimensional, non-unital algebra. The viewpoint described above tells us to look for a category of which it’s the category algebra. How can we do this?

Well, if $L^1(\mathbb{T}) = \Sigma\mathbf{C}$ for some category $\mathbf{C}$, then each object of $\mathbf{C}$ gives rise to an idempotent in $L^1(\mathbb{T})$. So we start by looking for the idempotents in $L^1(\mathbb{T})$. Since multiplication in $L^1(\mathbb{T})$ is convolution, this means looking for functions $f: \mathbb{T} \to \mathbb{C}$ such that $f \ast f = f.$ Since taking Fourier coefficients turns convolution into multiplication, this implies that each Fourier coefficient of $f$ is a

multiplicativeidempotent, that is, $0$ or $1$. Let’s write $e_k: x \mapsto e^{2\pi i k x}$ for the $k$th character of the circle ($k \in \mathbb{Z}$). Then $f = \sum_{k \in S} e_k$ for some $S \subseteq \mathbb{Z}$.My thinking gets a bit fuzzy around here, but I

thinkone can follow the argument through to show that the objects of $\mathbf{C}$ must be the integers (or if you prefer, the characters of $\mathbb{T}$), and that all the hom-sets are zero apart from an endomorphism ring $\mathbb{C}$ on each object. In other words, $\mathbf{C}$ is the discrete category on $\mathbb{Z}$.The category algebra of this discrete category $\mathbf{C}$ consists of those double sequences $(c_k)_{k \in \mathbb{Z}}$ that are zero in all but finitely many places. Alternatively, you can think of this as the algebra of all trigonometric polynomials (that is, finite linear combinations of characters $e_k$).

This is not, of course, our original algebra $L^1(\mathbb{T})$. Most integrable functions on $\mathbb{T}$ are not trigonometric polynomials. So, you might say that the viewpoint advocated above has failed. However, perhaps it’s achieved some kind of moral victory. Although not every integrable function is a trigonometric polynomial, the whole theory of Fourier series tells us how, under various hypotheses and in various senses, arbitrary integrable functions can be expressed as

limitsof trigonometric polynomials. So perhaps it’s a category algebra in some suitably analytic sense.Here’s another sign that this is a good point of view. When $\mathbf{C}$ is a category with infinitely many objects, we want to say that the identity of $\Sigma\mathbf{C}$ is $\sum_{c \in \mathbf{C}} 1_c$, except that this sum, being infinite, doesn’t exist. In the case of our particular $\mathbf{C}$, this sum is $\sum_{k \in \mathbb{Z}} e_k$, the sum of all the characters of $\mathbb{T}$. On the other hand, if the identity for convolution — the Dirac delta function — existed, then all its Fourier coefficients would be $1$. So this is exactly the nonexistent sum that the Dirac delta wants to be.

Non-exampleHere’s another commonly-encountered non-unital algebra, also arising in a soft-analytic context. But this one doesn’t seem to support the viewpoint advocated at all.Gelfand duality tells us that the commutative not-necessarily-unital $C^\ast$-algebras are dual to the locally compact Hausdorff spaces, with a space $X$ corresponding to the $C^\ast$-algebra $C_0(X)$ of continuous functions $X \to \mathbb{C}$ that vanish at infinity. (The algebra operations are pointwise.) This restricts to a duality between

unitalcommutative $C^\ast$-algebras andcompactHausdorff spaces.In particular, if $X$ is a Hausdorff space that is locally compact but not compact, then $C_0(X)$ is a commutative algebra without a multiplicative identity. Concretely, the multiplicative identity of $C_0(X)$ would have to be the function with constant value $1$, but this does not vanish at infinity.

Is $C_0(X)$ a category algebra? Apparently not. Again, if it was one, each object of the category would give rise to an idempotent in $C_0(X)$. But in general, $C_0(X)$ has no nontrivial idempotents. For the algebra structure on $C_0(X)$ is pointwise multiplication, so an idempotent in $C_0(X)$ is just a function taking only the values $0$ and $1$; but assuming $X$ is connected, this forces the function to have constant value zero.

Perhaps this failure is somehow due to my ignoring the extra structure on $C_0(X)$. I’ve been treating it as a mere associative algebra, not a $C^\ast$-algebra. But I’m not convinced… can anyone help?

What I’d most like is for someone to explain a bit more the viewpoint that non-unital algebras are often categories in disguise. And some compelling examples would be even better.

## Re: Categories vs. Algebras

Concerning C*-algebras: it might be worthwhile to look into groupoid C*-algebras, which are C*-algebras associated to topological groupoids equipped with a suitable system of measures. The duality between C*-algebras and locally compact Hausdorff spaces is then the analogue of your example 3. The simplest non-commutative non-unital C*-algebra is the algebra of compact operators on a Hilbert space $\mathcal{H}$. There is a chance that it arises from the C*-algebra version of your example 4 with the cardinality of $S$ equal to the dimension of $\mathcal{H}$. I can’t say for sure off the top of my head.

One might also want to try and generalize the definition of groupoid C*-algebra to a definition of category C*-algebra by replacing topological groupoids with topological categories. But this is likely not to work, since taking inverses is a necessary ingredient for defining the involution on the groupoid C*-algebra! One could try to associate a category C*-algebra to any topological

daggercategory, but my feeling is that the C*-condition $||a^\ast a||=||a||^2$ is only going to hold if the dagger actually maps every morphisms to its inverse.Admittedly, all of this lies in a somewhat different realm: the groupoid or category that one starts with is not assumed to be enriched over vector spaces.