Additive category

In mathematics, specifically in category theory, an additive category is a preadditive category C admitting all finitary biproducts.
Definition.
A category C is preadditive if all its hom-sets are abelian groups and composition of morphisms is bilinear; in other words, C is enriched over the monoidal category of abelian groups.
In a preadditive category, every finitary product (including the empty product, i.e., a final object) is necessarily a coproduct (or initial object in the case of an empty diagram), and hence a biproduct, and conversely every finitary coproduct is necessarily a product (this is a consequence of the definition, not a part of it).
Thus an additive category is equivalently described as a preadditive category admitting all finitary products, or a preadditive category admitting all finitary coproducts.
Another, yet equivalent, way to define an additive category is a category (not assumed to be preadditive) that has a zero object, finite coproducts and finite products, and such that the canonical map from the coproduct to the product
is an isomorphism. This isomorphism can be used to equip formula_2 with a commutative monoid structure. The last requirement is that this is in fact an abelian group. Unlike the aforementioned definitions, this definition does not need the auxiliary additive group structure on the Hom sets as a datum, but rather as a property.
Note that the empty biproduct is necessarily a zero object in the category, and a category admitting all finitary biproducts is often called semiadditive. As shown below, every semiadditive category has a natural addition, and so we can alternatively define an additive category to be a semiadditive category having the property that every morphism has an additive inverse.
Generalization.
More generally, one also considers additive -linear categories for a commutative ring . These are categories enriched over the monoidal category of -modules and admitting all finitary biproducts.
Examples.
The original example of an additive category is the category of abelian groups Ab. The zero object is the trivial group, the addition of morphisms is given pointwise, and biproducts are given by direct sums.
More generally, every module category over a ring  is additive, and so in particular, the category of vector spaces over a field  is additive.
The algebra of matrices over a ring, thought of as a category as described below, is also additive.
Internal characterisation of the addition law.
Let C be a semiadditive category, so a category having all finitary biproducts. Then every hom-set has an addition, endowing it with the structure of an abelian monoid, and such that the composition of morphisms is bilinear.
Moreover, if C is additive, then the two additions on hom-sets must agree. In particular, a semiadditive category is additive if and only if every morphism has an additive inverse.
This shows that the addition law for an additive category is "internal" to that category.
To define the addition law, we will use the convention that for a biproduct, "p"k will denote the projection morphisms, and "i"k will denote the injection morphisms.
We first observe that for each object  there is a
Next, given two morphisms , there exists a unique morphism such that equals if , and 0 otherwise.
We can therefore define .
This addition is both commutative and associative. The associativity can be seen by considering the composition
We have , using that .
It is also bilinear, using for example that and that .
We remark that for a biproduct we have . Using this, we can represent any morphism as a matrix.
Matrix representation of morphisms.
Given objects and in an additive category, we can represent morphisms as -by- matrices
Using that , it follows that addition and composition of matrices obey the usual rules for matrix addition and matrix multiplication.
Thus additive categories can be seen as the most general context in which the algebra of matrices makes sense.
Recall that the morphisms from a single object  to itself form the endomorphism ring .
If we denote the -fold product of  with itself by , then morphisms from to are "m"-by-"n" matrices with entries from the ring .
Conversely, given any ring , we can form a category  by taking objects "A""n" indexed by the set of natural numbers (including zero) and letting the hom-set of morphisms from to be the set of -by- matrices over , and where composition is given by matrix multiplication. Then is an additive category, and equals the -fold power .
This construction should be compared with the result that a ring is a preadditive category with just one object, shown here.
If we interpret the object as the left module , then this "matrix category" becomes a subcategory of the category of left modules over .
This may be confusing in the special case where or is zero, because we usually don't think of matrices with 0 rows or 0 columns. This concept makes sense, however: such matrices have no entries and so are completely determined by their size. While these matrices are rather degenerate, they do need to be included to get an additive category, since an additive category must have a zero object.
Thinking about such matrices can be useful in one way, though: they highlight the fact that given any objects and in an additive category, there is exactly one morphism from to 0 (just as there is exactly one 0-by-1 matrix with entries in ) and exactly one morphism from 0 to (just as there is exactly one 1-by-0 matrix with entries in ) – this is just what it means to say that 0 is a zero object. Furthermore, the zero morphism from to is the composition of these morphisms, as can be calculated by multiplying the degenerate matrices.
Additive functors.
A functor between preadditive categories is "additive" if it is an abelian group homomorphism on each hom-set in C. If the categories are additive, then a functor is additive if and only if it preserves all biproduct diagrams.
That is, if is a biproduct of  in C with projection morphisms and injection morphisms , then should be a biproduct of  in D with projection morphisms and injection morphisms .
Almost all functors studied between additive categories are additive. In fact, it is a theorem that all adjoint functors between additive categories must be additive functors (see here), and most interesting functors studied in all of category theory are adjoints.
Generalization.
When considering functors between -linear additive categories, one usually restricts to -linear functors, so those functors giving an -module homomorphism on each hom-set.
Special cases.
Many commonly studied additive categories are in fact abelian categories; for example, Ab is an abelian category. The free abelian groups provide an example of a category that is additive but not abelian.