The goal of today’s post is to introduce and discuss semiadditive categories. Roughly speaking, these are categories in which one can add both objects and morphisms. Prominent examples include the abelian categories appearing in homological algebra, such as categories of sheaves and modules and categories of chain complexes.

Semiadditive categories display some interesting categorical features, such as the prominence of pairs of universal properties and the surprising ways in which commutative monoid structures arise, which seem to be underemphasized in textbook treatments and which I would like to emphasize here. I would also like to emphasize that their most important properties are unrelated to the ability to subtract morphisms which is provided in an additive category.

In this post, for convenience all categories will be locally small (that is, -enriched).

This post can be thought of as motivated by the following question: what basic categorical properties 1) distinguish the category of abelian groups from categories like and 2) are inherited by related categories like categories of modules?

**Zero morphisms and zero objects**

A simple way to distinguish from categories like is the behavior of initial and terminal objects: they are different in , but in both are given by the trivial group.

An object which is both initial and terminal in a category is a **zero object**, usually denoted . Equivalently, a category has zero objects if it has an initial object and a terminal object and moreover the unique map from the former to the latter is an isomorphism. A category with a zero object is sometimes said to be **pointed**.

Zero objects are perhaps the simplest examples of objects satisfying two dual universal properties: one making them a limit and one making them a colimit. They also give perhaps the simplest example of a functor having a left and a right adjoint which agree (namely the unique functor from a category to the terminal category).

*Example.* The category of monoids has a zero object given by the trivial monoid.

*Example.* If is a category with a zero object , then remains a zero object in any full subcategory containing it (such as ).

*Example.* Let be a dagger category. Then any initial object (resp. terminal object) is automatically a zero object by applying .

*Sub-example.* In particular, the dagger category of sets and relations has an initial object given by the empty set, which therefore is also a zero object.

*Example.* The definition of a zero object is self-dual, so the opposite category of a category with a zero object has the same zero object.

*Example.* Let be a small category and be a category with a zero object . Then the functor category has a zero object given by the functor which is identically equal to .

*Example.* Let be a category with a terminal object . Consider the **coslice category** , whose objects are morphisms in and whose morphisms are commutative triangles. Thinking of as a point, is the category of “pointed -objects” (hence the name pointed categories) and could also be denoted . The identity morphism is always an initial object in a coslice category regardless of the properties of ; because is also terminal, it is also a terminal object, so has a zero object. Dually, taking the **slice category** where has an initial object produces a category with a zero object.

*Sub-examples.* Taking we obtain the category of **pointed sets**. Note that forgetting the the distinguished point of a pointed set gives an equivalence between the category of pointed sets and the category of sets and partial functions, and note also that the category of monoids has a natural forgetful functor to the category of pointed sets. Taking we obtain the category of pointed topological spaces. This is an important category since, for example, the fundamental group is naturally defined as a functor on it.

If is a category with a zero object , then between any two objects there is a canonical morphism obtained as the composition

where the first arrow is the unique map and the second arrow is the unique map . The two universal properties of show that for any morphism and similarly for any morphism . We say that a category has **zero morphisms** if there exists a collection of morphisms having the above properties.

**Proposition:** Zero morphisms are unique if they exist.

*Proof.* Let be two collections of zero morphisms. Then for every triple of objects .

This is analogous to the uniqueness of identities in a monoid. In the same way that we often refer to the zero element in different monoids with the same symbol , we will often refer to the zero morphism in different Hom-sets with the same symbol .

Having zero morphisms is a special kind of enrichment: it is equivalent to being equipped with an enrichment over the category of pointed sets if the latter is equipped with the monoidal product given by its categorical product

.

Here denotes a set and a distinguished element . Enrichment over is special because it is unique if it exists, something which is quite false in general. In particular, is canonically enriched over itself; it is the primordial category with zero morphisms in the same way that is the primordial category.

*Example.* Let be a monoid regarded as a one-object category. Then a zero morphism in this category is precisely an **absorbing element** in . The most familiar examples occur when is a ring under multiplication. Note that this example shows that a category can have zero morphisms without having a zero object.

*Example.* Any -enriched category has zero morphisms; each Hom-set is an abelian group and the identity element of that group is a zero morphism. More abstractly, there is a natural product-preserving forgetful functor .

The above discussion shows that a category with a zero object is canonically equipped with zero morphisms, which are precisely the morphisms factoring through ; equivalently, it is canonically enriched over . The converse claim, that categories with zero morphisms also have zero objects, is false as we saw above. However, we can say the following.

It is possible to think of pointed sets as a particularly simple kind of algebraic structure described by a single unary operation sending every element of to the distinguished point of ; morphisms of pointed sets are then precisely functions preserving this operation. A category with a zero object is automatically -enriched, and then in a -enriched category a zero object is a zero object for “purely algebraic reasons” in the following sense. In particular, unlike the definition of an initial object or terminal object in an arbitrary category, the following definition requires no quantifiers.

**Theorem (algebraic definition of zero objects):** Let be a -enriched category. Then an object is a zero object if and only if (in other words, if and only if is a zero morphism).

*Proof.* Follows from the definition of zero morphisms.

**Corollary:** Let be a -enriched category. Any initial object in is a zero object.

*Proof.* If is an initial object, then there is a unique morphism , so it must satisfy .

This is perhaps the simplest example of a result of the following form: if an object in a certain kind of enriched category satisfies a universal property in one direction, it also satisfies a universal property in the other direction.

**Corollary:** Let be categories with zero objects (in particular, -enriched). Then a functor is -enriched if and only if it preserves zero objects.

*Proof.* : if is -enriched, then it preserves the algebraic definition of zero objects.

: by hypothesis, is a zero object in . Consequently, the zero morphisms in are precisely the morphisms factoring through the zero object, and this condition is preserved by .

*Remark 1.* Relative to an enriching category , an **absolute colimit** is a colimit preserved by any -enriched functor whatsoever. The first half of the second corollary then states that for -enriched categories, initial objects are absolute colimits.

*Remark 2.* The hypothesis of the second half of the second corollary holds in particular if is either a left or a right adjoint, since in the first case it preserves colimits (hence preserves initial objects, hence preserves zero objects by the first corollary) and in the second case it preserves limits.

We mention in closing that it is particularly easy to adjoin a zero object to a -enriched category which does not have one, since all of the additional morphisms one has to specify are unique (they are all zero morphisms) and so are their compositions with all other morphisms (they are all also zero morphisms). By contrast, if we want to adjoin an initial object to an ordinary category, the morphisms out of it and their compositions are uniquely determined, but the morphisms into it and their compositions are not.

**Interlude: diagonal and codiagonal**

Recently I learned the following from Mike Shulman on MO, and it’s relevant to the next section but more general than it so should be discussed first.

Let be a category with finite coproducts regarded as a monoidal category. Recall that a monoid object in is an object together with a multiplication map and an identity map satisfying associativity and identity.

**Theorem:** Every object of has a unique monoid structure given by a canonical map , the **codiagonal**; this monoid structure is commutative; and any morphism in is automatically a morphism of monoids.

In other words, the forgetful functor is an equivalence of categories!

*Proof.* Since is the initial object, the identity map is unique. By the universal property of the coproduct, to give a map is precisely to give a pair of maps , and compatibility with the identity implies that both of these maps must be . This defines the codiagonal map . Composing the codiagonal in all possible ways with itself gives maps which are all uniquely determined by the requirement that all of the corresponding maps are , so is commutative and associative, and we already know that it is compatible with the identity, so it defines a unique commutative monoid structure on .

If is any morphism in , it clearly preserves identities; moreover, is the morphism whose components are both given by , and this is equal to , so preserves the codiagonal as desired.

Dualizing, we obtain the following.

**Cotheorem:** Let be a category with finite products regarded as a monoidal category. Every object of has a unique **comonoid** structure given by a canonical map , the **diagonal**; this comonoid structure is cocommutative; and any morphism in is automatically a morphism of comonoids.

In particular, in a category with finite products and coproducts, every object is canonically both a commutative monoid and a cocommutative comonoid (with respect to two different monoidal category structures).

*Example.* Let , which has both finite coproducts and finite products. The diagonal in this case is just the map , which explains the name. The codiagonal is the map which sends to .

The diagonal and codiagonal are maps which are in some sense waiting to become interesting after suitable functors are applied. For example, the free vector space functor is monoidal with respect to the product and tensor product, and consequently every free vector space is canonically a coalgebra.

*Example.* Let , which has both finite coproducts and finite products. Moreover, the forgetful functor has both a left adjoint (taking a set to the discrete topology on that set) and a right adjoint (taking a set to the indiscrete topology on that set), so preserves both limits and colimits, hence we expect that the diagonal and codiagonal maps are the same as above, and indeed they are.

Again, these maps are waiting to become more interesting after suitable functors are applied. For example, the functor sending a topological space to its singular homology groups over a field is monoidal with respect to the product and tensor product (of graded vector spaces) by the Künneth theorem, and consequently the singular homology of is canonically a coalgebra. (The hypothesis that is a field is crucial; see this MO question for a discussion.) Similar considerations define the cup product on cohomology, which is induced from the diagonal.

*Example.* Let , which has both finite coproducts and finite products. The diagonal in this case is just the set-theoretic diagonal (since the forgetful functor has a left adjoint and consequently preserves limits), and the codiagonal is multiplication of elements of regarded as a map , where is the free product. (Note that this is not multiplication regarded as a map ; in particular, we have not just proven that every monoid is commutative!)

*Example.* Let be the category of commutative monoids. Everything is as above except that there is a natural identification between the coproduct and the product of commutative monoids, so that the codiagonal really is the multiplication map in the ordinary sense. This is relevant for the next section.

**Adding objects and adding morphisms**

A more general way in which categories like differ from categories like is in the behavior of products and coproducts. (The above section describes the special case of empty products and coproducts.) In , finite products and coproducts are nonisomorphic in general, but in both are given by the direct sum.

The sense in which the direct sum of abelian groups is both a product and a coproduct should be made precise. In the case of zero objects there is always a unique morphism from an initial object to a terminal object and the only question is whether it is an isomorphism. In general, however, there does not exist a distinguished morphism from a coproduct to a product. In fact, in general there does not exist any such morphism.

*Example.* Let be a poset regarded as a category. Then the coproduct of two objects is their sup and the product of two objects is their inf, so if these are distinct then the former is strictly greater than the latter.

Since a product is equipped with projections and a coproduct is equipped with inclusions , we can write down two morphisms

from the product to the coproduct, but even in neither of these is the isomorphism we want.

One definition to try is the following. Say that a **naive biproduct** of two objects in a category is an object together with four morphisms such that is a product with respect to the first two morphisms and a coproduct with respect to the second two morphisms. Specifying a naive biproduct is equivalent to specifying a coproduct , a product , and an isomorphism between them.

This definition has the enormous drawback that a naive biproduct does not have the characteristic property we expect of our universal objects: it is not unique, not even up to isomorphism (let alone unique isomorphism)! If there are at least two different isomorphisms between a coproduct and a product of , then using a different isomorphism will give a genuinely different naive biproduct (in the sense that the natural diagram one would want to write down involving both biproducts will not commute). Specifying objects with two universal properties is not as easy as it sounds, but we really want uniqueness up to unique isomorphism if there’s any chance of, say, upgrading the biproduct to a bifunctor.

If there is any hope to get a notion of object-which-is-both-a-coproduct-and-a-product which is actually unique up to unique isomorphism, then at a minimum we need to fix the four compositions

.

Ideally we should fix them functorially in both and . The first two are easy: based both on our experience with abelian groups and on functorial considerations, we want them to be and . Specifying the second two compositions canonically requires a functorial choice of a morphism and of a morphism . In the case of abelian groups both of these morphisms are just the zero morphism, which is certainly functorial. This has the intuitive meaning that are behaving “independently” in the biproduct.

Accordingly, we now formulate a better definition. A **biproduct** of two objects in a -enriched category is an object together with four morphisms as above which is a product and a coproduct and which also satisfies

.

The definition of a biproduct of a finite number of objects is similar, but if binary biproducts exist then finite biproducts can be obtained from them (provided that the empty biproduct, e.g. the zero object, exists). A -enriched category with all finite biproducts is a **semiadditive category**.

Note that, by the remarks in the interlude, every object in a semiadditive category is canonically both a commutative monoid and a cocommutative comonoid with respect to biproduct. In fact, these two structures canonically make every object a bimonoid; see the discussion at this nCafe post.

Note also that the condition of having biproducts is a *property* of an ordinary unenriched category and not an extra kind of structure placed on : the question of whether has a zero object and hence zero morphisms is a property of as a category, and this then defines what a biproduct is and whether has them.

*Example.* The category of commutative monoids is semiadditive.

*Example.* The dagger category of sets and relations is semiadditive with biproduct given by disjoint union.

*Example.* The definition of a biproduct is self-dual, so the opposite category of a semiadditive category is semiadditive.

*Example.* Let be a ring. Then the category of left -modules is semiadditive. (This is inherited from in a sense we will make precise below.)

*Non-example.* A category may have zero objects but also have two objects such that and are not isomorphic at all. Such a category cannot be semiadditive (indeed it does not even have naive biproducts). is a familiar example; less familiar examples include , etc.

**Theorem:** The biproduct of two objects in a -enriched category is unique up to unique isomorphism. It defines a bifunctor which is naturally equivalent to both the product and coproduct bifunctors.

*Proof.* A biproduct is in particular a naive biproduct, so it is obtained by specifying an isomorphism , and showing that biproducts are unique up to unique isomorphism is equivalent to showing that is unique on the nose. By the universal property of the product, specifying a map into the product is equivalent to specifying a pair of maps into , and by the universal property of the coproduct, specifying a map out of the coproduct is equivalent to specifying a pair of maps out of . Hence specifying a map is equivalent to specifying four maps

.

These four maps are in fact precisely , and , which have been fixed to equal respectively, and consequently is unique on the nose as desired.

To prove that the biproduct defines a bifunctor (note that “bi” is being used in two different senses here) it suffices to show that as defined above actually extends to a natural isomorphism of functors. So let be a pair of morphisms in . Then finite product and finite coproduct define morphisms

and we want to show that (we are referring to two different morphisms by the same name here). Both of these morphisms are defined by their components , and by the definition of these components are necessarily , so they are the same morphism and the conclusion follows.

Essentially the same proof also shows that the biproduct of a finite number of objects is unique up to unique isomorphism.

**Theorem:** Let be a small category and let be a semiadditive category. Then the functor category is semiadditive.

*Proof.* We already know that has a zero object, hence zero morphisms. Since limits and colimits can be computed pointwise in functor categories, has finite coproducts and finite products because does, and the isomorphism between them necessary to obtain biproducts can also be defined pointwise.

All of the examples of semiadditive categories we have given so far happen to be enriched over the category of commutative monoids (equipped with the tensor product); that is, their Hom-sets are all commutative monoids, and composition of morphisms is bilinear. This is not completely obvious for , but the union of two relations (as a subset of ) is another relation, and composition of relations respects union.

In fact this is inevitable.

**Theorem:** A semiadditive category is canonically enriched over . The identity in each commutative monoid is the zero morphism .

*Proof.* Let be a pair of parallel morphisms. Consider the composition

.

If then the middle map factors through , and we have natural identifications which show that, tracing through all of the morphisms above, . Commutativity and associativity follow from the commutativity and associativity of and the cocommutativity and coassociativity of . So defines a commutative monoid operation on with identity .

It remains to show that composition

is bilinear. By dualizing, it suffices to show that for any . Writing down the composition

we see that the composition is just the morphism whose components are , and writing down we get the same composition, so the conclusion follows.

The converse is, as in the case of the relationship between zero objects and zero morphisms, false. For example, most one-object -enriched categories (that is, **semirings**, or **rigs**) fail to have biproducts. However, just as zero objects in -enriched categories are zero objects for “purely algebraic reasons,” the same is true for biproducts in -enriched categories; in particular, the following gives a remarkable definition of biproducts in -enriched categories which requires no quantifiers.

**Theorem (algebraic definition of biproducts):** Let be a -enriched category and let be two objects in it. Suppose an object is equipped with two morphisms and two morphisms such that

and such that

.

Then (together with these four morphisms) is a biproduct of .

(That the converse is true can be seen by inspecting the components of to verify that it has the same components as .)

*Proof.* We first show that the morphisms equip with the structure of a coproduct. Given a pair of maps , we want to show that they uniquely factor through a map such that . This map is necessarily unique since

so it remains to show that actually works. But by assumption

and similarly for . So (together with ) is a coproduct. The hypotheses are self-dual, so dualizing, we conclude that (together with ) is a product, hence a biproduct.

*Remark.* We required five algebraic identities to hold among morphisms above; in fact either the two identities or the two identities are redundant in that the remaining two together with the fifth can prove them.

**Corollary:** Let be semiadditive categories (in particular, -enriched). Then a functor is -enriched if and only if it preserves biproducts.

A -enriched functor is also said to be **additive**.

*Proof.* : the addition on morphisms is defined only in terms of identity morphisms and the biproduct, both of which are by assumption preserved by .

: if preserves addition of morphisms, then it preserves the algebraic conditions characterizing a biproduct.

**Corollary:** Let be a -enriched category. Any coproduct in is a biproduct. More precisely, we can canonically write down projections making a biproduct.

*Proof.* Let be a coproduct with structure maps . Let be the morphism with components and let be the morphism with components . This is equivalent to requiring the first four identities in the algebraic definition of biproducts, so it suffices to verify the fifth identity

.

A morphism is determined by its components , and we compute that the components of the LHS are , which are the same as the components of the RHS. The conclusion follows.

We conclude that in a -enriched category there is an algebraic characterization of finite coproducts and products, both of which must be biproducts, which implies that finite coproducts are absolute colimits for -enriched categories.

**Corollary:** Let be a small -enriched category and let be a semiadditive category. Then the category of -enriched functors is also semiadditive.

*Proof.* We know that has zero objects. To verify that it has biproducts, it suffices by the algebraic definition of biproducts to verify that the pointwise biproduct of two -enriched functors in the ordinary functor category is still -enriched. In other words, if are a parallel pair of morphisms in and are a pair of -enriched functors, then we want to verify that

as morphisms . But this follows from the fact that are -enriched and from an examination of the components , etc. of the two morphisms above.

*Example.* This subsumes our earlier result that if is a small category and is a semiadditive category, then is additive. Indeed, from any category we may construct a free -enriched category on whose Hom-monoids are given by the free commutative monoids on the Hom-sets of , and then -enriched functors from this category to are naturally identified with ordinary functors from to .

*Example.* Let be a rig regarded as a one-object -enriched category and let . Then is the category of left –**semimodules**, so semimodule categories over rigs are semiadditive. Similarly, module categories over rings are semiadditive.

A slight variant of the above proof gives the following.

**Corollary:** Let be a small -enriched category and let be a semiadditive category. Then the category of -enriched functors is also semiadditive.

*Example.* Let be the free category on a chain complex, which explicitly is the category whose objects are the integers and where , all other Homs consist only of zero morphisms, and . Then a -enriched functor , where is a -enriched functor, is precisely a chain complex in . The category of such functors is denoted by , and by the above is semiadditive if is.

We mention in closing that, as for zero objects, it is particularly easy to adjoin biproducts to a -enriched category which does not have them, since all of the additional morphisms one has to specify are uniquely determined (by the two universal properties) as well as their compositions with all other morphisms (by bilinearity).

**Matrix multiplication**

Let be a finite collection of objects in a semiadditive category . A particularly nice feature of having finite biproducts is that

can be explicitly described in terms of using matrices of morphisms in a way that directly generalizes the usual description of linear transformations using matrices (which corresponds to taking and the to all be the base field) as well as the use of block matrices, etc. Explicitly, the above commutative monoid can be described as a direct sum , or more suggestively as the matrix of commutative monoids

and moreover the matrix description sends composition of morphisms to matrix multiplication (this follows by writing a morphism as the sum of its components and using the bilinearity of composition). This is particularly useful if is semisimple.

*Example.* Let be the category of finite sets and relations. Every finite set is a biproduct of copies of the one-element set, and consequently a relation between two finite sets can be described by a matrix whose entries lie in the rig . This is precisely the rig of **truth values** with addition given by logical OR and multiplication given by logical AND. See also the nLab article on matrix mechanics.

*Example.* The free category with biproducts on one object is the category whose morphisms are matrices with values in the non-negative integers . Morphisms in this category can be given an explicit combinatorial and visual description as collections of arrows between collections of dots, and working in this category appears to be a feasible combinatorial version of linear algebra.

*Example.* Let be a -enriched category with exactly two objects such that there are no nonzero morphisms . Then is a rig , is a rig , and is an arbitrary -semibimodule . If we adjoin the biproduct to , then is the **triangular matrix ring** of matrices of the form

where . Rings of this form are sometimes used as counterexamples in noncommutative ring theory as they often have different properties from their opposites; for example, a ring of this form is right Noetherian but not left Noetherian.

on September 29, 2012 at 4:42 pm |Monomorphisms and epimorphisms « Annoying Precision[…] Previously we discussed categories with finite biproducts, or semiadditive categories. Today, partially as a further warmup for the axioms defining an abelian category, we’ll discuss monomorphisms and epimorphisms. […]

on September 8, 2013 at 9:52 am |The homotopy groups are only groups | Annoying Precision[…] Example. If is an abelian group, then the group operation is itself a morphism in , giving a morphism from the Lawvere theory of abelian groups to . Hence naturally acquires the structure of an abelian group. (We discussed a more general setting in which such an abelian group structure exists in this previous post on semiadditive categories.) […]

on September 28, 2013 at 10:55 am |Cartesian closed categories and the Lawvere fixed point theorem | Annoying Precision[…] is the diagonal map; see, for example, this blog post. ( specializes to the paradoxical subset constructed in the usual proof of Cantor’s theorem.) […]

on March 28, 2015 at 5:11 pm |Projective objects | Annoying Precision[…] a linear functor automatically preserves finite coproducts, is right exact iff it preserves […]

on May 7, 2015 at 1:26 pm |Tiny objects | Annoying Precision[…] We saw in this blog post that zero objects are absolute for categories enriched over pointed sets, and finite coproducts / […]