# Vectorisation of a category

I have no experience with category theory at all, but I recently stumbled upon the following construction. Since it is extremely elementary and seems rather natural, it should be known, but I have not been able to find it in the literature, probably because I was looking in the wrong places and/or for the wrong keywords.

Given a small category $C$, define a new category $\mathrm{Vec}(C)$ as follows. The objects of $\mathrm{Vec}(C)$ are all subsets of $\mathrm{Ob}(C)$. Given $T,U \subset \mathrm{Ob}(C)$, a morphism $f \in \mathrm{Hom}(T,U)$ is a map from $T$ into the free (real) vector space generated by the morphisms of $C$, with the additional property that $f(x)$ belongs to the span of $\{\mathrm{Hom}(x,y)\,:\, y \in U\}$ for every $x \in T$. Given furthermore $g \in \mathrm{Hom}(U,V)$, we define the composition $h = gf$ by $h(x) = g(\mathrm{cod}(f(x)))f(x)$ (with a hopefully obvious abuse of notation being used here, just extend everything by linearity). The identity $id_T$ is then given by $id_T(x) = id_x$.

There is a functor $F \colon \mathrm{Vec}(C) \to \mathrm{Vec}$ mapping $T$ to the free vector space $F(T)$ generated by $T$ and $f$ to the linear map such that $F(f)(x) = \mathrm{cod}(f(x))$ (we again make an abuse of notation by extending $\mathrm{cod}$ to a linear map), so in a way one can interpret morphisms in $\mathrm{Vec}(C)$ as linear maps that carry some additional information around.

Did people consider this or a similar construction before and where can I read about it?

• If you allow objects of $\operatorname{Vec}(C)$ to be multisets rather than just sets of objects of $C$, then you can describe this as just freely adjoining coproducts to the $\mathbb{R}$-linearization of your category. – Eric Wofsey May 17 '15 at 10:45
• I am trying to check associativity of composition and it is sort of tricky. I guess the reason is that $f$ appears twice in the composition - once in the linearization of $g$ over $\operatorname{cod}(f(x))$ and second time in the argument of this linearization. Could you provide some transparent argument for associativity? – მამუკა ჯიბლაძე May 17 '15 at 10:46
• For every morphism $F\colon T\to U$ of $\mathrm{Vec}(C)$, consider the linear map $\hat F$ acting on the vector space generated by all morphisms of $C$ by $\hat F(g) = F(\mathrm{cod}(g))g$ if $\mathrm{cod}(g) \in T$ and $\hat F(g) = g$ otherwise. Then, one has $\widehat{FG} = \hat F\hat G$ (usual composition of linear maps) and associativity follows since $\hat F$ determines $F$ uniquely. – Martin Hairer May 17 '15 at 11:07
• When you say $x \in T$, do you mean, generalized elements? Also, $g(cod(f(x)))$ doesn't really seem to make sense in arbitrary (small or otherwise) categories. Let me ask you this. If C is, say, a proset, does your definition make sense? (If not, you need to be more specific about your $C$.) – PyRulez May 17 '15 at 11:52
• $T$ is a subset of $\mathrm{Ob}(C)$, so I just mean element in the usual sense. Regarding $g(\mathrm{cod}(f(x)))f(x)$, I meant the following. If $f(x) = \sum_u f_{x,u} u$ for some morphisms $u$ in $C$ leaving $x$ and coefficients $f_{x,u}$ (and similarly for $g$), then $g(\mathrm{cod}(f(x)))f(x) = \sum_{u} f_{x,u} \sum_v g_{\mathrm{cod}(u),v} vu$, where the inner sum runs over all $v$ leaving $\mathrm{cod}(u)$. – Martin Hairer May 17 '15 at 12:46

As Eric Wofsey observed in the comments, your construction is almost the what you get by freely adjoining coproducts to the linearization of your category. Indeed, your construction is the full subcategory of this on those objects with no repeated summands (a decently natural condition from representation theory); but that's evil (a technical condition --- roughly meaning a notion that doesn't play well under equivalences of categories) unless your original category is skeletal (also an "evil" condition). Let me explain in a bit more detail, and provide some remarks about your category.

Given a category $C$ and a field (indeed, a commutative ring will do) $\mathbb K$, there is a $\mathbb K$-linear category that I would probably write $\mathbb K C$, but I've once used $\mathbb K\cdot C$ and I've seen $\mathbb K[C]$ and even $\mathbb K\otimes C$. It is defined as having the same objects as $C$ and, for objects $x,y$, $\hom_{\mathbb K C}(x,y) =$ the free vector space with basis $\hom_C(x,y)$. It has the following property: for any $\mathbb K$-linear category $D$, functors $C \to D$ are the same as $\mathbb K$-linear functors $\mathbb K C \to D$. In this sense it is the free linearization.

You may now play other games. Eric suggested considering freely adjoining direct sums. Recall that in a linear category, a direct sum of two objects $x,y$ is an object $x\oplus y$ with morphisms $i_x : x \to x\oplus y$, $i_y : y \to x\oplus y$, $p_x : x\oplus y \to x$, and $p_y: x\oplus y \to y$ such that the compositions $p_x i_x$ and $p_y i_y$ are identities, the compositions $p_x i_y$ and $p_y i_x$ are $0$, and $\mathrm{id}_{x\oplus y} = i_x p_x + i_y p_y$. Let $C'$ be a linear category. (In our case $C' = \mathbb K C$.) Then the free category with direct sums generated by $C'$ can be presented as having as its objects all finite-length vectors of objects of $C'$, and as its morphisms all matrices filled in by morphisms in $C'$. I've seen this category called $\mathrm{Mat}(C')$. Eric suggested a different presentation, in which vectors are replaced by multisets. These are "the same" in the sense of giving equivalent categories because any vector of objects is naturally isomorphic to any permutation thereof, so only the underlying multiset of the vector "matters".

Freely adjoinging direct sums is idemptotent, in the sense that if you take a linear category with direct sums and freely adjoint direct sums again, you get back an equivalent category. This is not true for general "free" functors, but follows from the fact that direct sums are "absolute", in the sense that they are preserved by any linear functor. A good exercise is to write down an explicit equivalence between $\mathrm{Mat}(C')$ and $\mathrm{Mat}(\mathrm{Mat}(C'))$.

Your category $C''$ lives between $C'$ and $\mathrm{Mat}(C')$, since you don't admit all objects. But there is an equivalence $\mathrm{Mat}(C'') \to \mathrm{Mat}(C')$, which you should work out.

A special case of a linear category is the category $\mathrm{Vect}$ itself. It certainly has all direct sums, and so linear functors $C' \to \mathrm{Vect}$ are the same as linear functors $\mathrm{Mat}(C') \to \mathrm{Vect}$. Two linear categories are Morita equivalent if their categories of functors to $\mathrm{Vect}$ are equivalent. I can't resist mentioning the following fact. An idempotent $f: x \to x$ (i.e. an endomorphism $f$ such that $f^2 = f$) is split if there is an object $[f]$ with maps $p_f : x \to [f]$ and $i_f : [f] \to x$ such that $f = i_f p_f$ and $p_f i_f = \mathrm{id}_{[f]}$. Similar to the above, there is a universal way to split all idempotents. It is usually called the "Karoubi envelop". Doing it twice is the same as doing it once, because split idempotents are absolute. Since in $\mathrm{Vect}$ all idempotents split, every category is Morita equivalent to its Karoubi envelop. The remarkable fact is that linear categories $D$ and $E$ are Morita equivalent if and only if the categories you get by first doing the $\mathrm{Mat}$ construction and then the Karoubi envelop construction are equivalent (in the sense of categories).

Earlier, I mentioned the notion of "evil" constructions, which are those constructions that respect isomorphisms, rather than equivalences, of categories. In my post so far, every time I say "the same as" I have meant in the sense of equivalences: "the" category with such and such property is unique up to equivalence, not isomorphism. Thus my constructions have been non-evil. Your construction is evil: if you input the trivial category with one object $x$ and only the identity morphism, you get out the category with two objects $\emptyset,x$. If instead you input the category with two objects $x,y$ and a unique isomorphism between them, you output the category with essentially three objects: $\emptyset$, $x\oplus y$, and the isomorphic objects $x$ and $y$. So probably you had meant to use multisets or vectors to get the category Eric mentioned.

Finally, let me discuss your functor. For any $C$, there is a functor $C \mapsto *$, where $*$ denotes the one-object category with only the identity morphism. If I am not mistaken, your functor (or, rather, its $\mathrm{Mat}$ version) is the application of $\mathrm{Mat}$ to this functor; note that $\mathrm{Mat}$ takes functors to functors, and $\mathrm{Mat}(*)$ is the category $\mathrm{Vect}^{fd}$ of finite-dimensional vector spaces. This functor loses hecka information, and does not in any reasonably way find $\mathrm{Mat}(\mathbb K C)$ as a category of vector spaces with extra structure. One way to say this precisely is that your functor is not "monadic" (I'll let you look it up).

There is a way to find $\mathrm{Mat}(\mathbb K C)$, or rather its Karoubi envelope $\mathrm{Kar}(\mathrm{Mat}(\mathbb K C))) = \mathcal C$, as a category of vector spaces with structure, although it is evil. For every object $x\in C$, there is a functor $\hom(x,-) : \mathcal C \to \mathrm{Vect}$. Consider the functor $\bigoplus_{x\in C} \hom(x,-)$. If I am not mistaken, this is monadic. (Perhaps I should use the direct product rather than the direct sum.) Then $\mathcal C$ is, I think, equivalent to the category of compact projective modules for this monad. Note that this construction is evil because it treats isomorphic but non-equal objects as different.

• Thank you very much for the great answer, that's very helpful. You are essentially saying that the construction is "evil" (cute terminology, I didn't know it) because $\mathrm{Vec}$ isn't a functor in $\mathrm{Cat}$. This is of course perfectly true but my "cure" for this is somewhat different: I don't think of $C$ itself as an object of $\mathrm{Cat}$, but as an object of a different category, say $\mathrm{Cat}_p$. – Martin Hairer May 18 '15 at 10:49
• This category also has (small) categories as objects, but different arrows: arrows in $\mathrm{Cat}_p$ still map objects from the source to objects from the target, just like functors, but they map arrows from the target to suitable linear combinations of arrows from the source. This does then turn $\mathrm{Vec}$ into a (contravariant) functor from $\mathrm{Cat}_p$ to $\mathrm{Cat}$ (one has to define $\mathrm{Vec}(F)$ for morphism $F$ in $\mathrm{Cat}_p$ in the "correct" way of course). – Martin Hairer May 18 '15 at 10:49
• Sorry, I don't know the notation "$\mathrm{Cat}_p$". Will you elaborate? – Theo Johnson-Freyd May 19 '15 at 1:10
• It is the category of categories I describe briefly in the second part of my comment. Maybe there is a standard notation for it, but unfortunately I do not know it. – Martin Hairer May 19 '15 at 5:55
• Oh, sorry, I think something funny must have happened with the computer. I wrote my comment having seen your first one but not the second, in spite of the time stamps, suggesting that for some reason the second one wasn't displaying on my end at the time. – Theo Johnson-Freyd May 19 '15 at 15:22