# Additive category

In mathematics, specifically in category theory, an additive category is a preadditive category C admitting all finitary biproducts.

## Definition

There are two equivalent definitions of an additive category: One as a category equipped with additional structure, and another as a category equipped with no extra structure but whose objects and morphisms satisfy certain equations.

### Via preadditive categories

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 is necessarily a coproduct, 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). The empty product, is a final object and the empty product in the case of an empty diagram, an initial object. Both being limits, they are not finite products nor coproducts.
Thus an additive category is equivalently described as a preadditive category admitting all finitary products and with the null object or a preadditive category admitting all finitary coproducts and with the null object

### Via semiadditive categories

We give an alternative definition.
Define a semiadditive category to be a category (note: not a preadditive category) which admits a zero object and all binary biproducts. It is then a remarkable theorem that the Hom sets naturally admit an abelian monoid structure. A proof of this fact is given below.
An additive category may then be defined as a semiadditive category in which every morphism has an additive inverse. This then gives the Hom sets an abelian group structure instead of merely an abelian monoid structure.

### Generalization

More generally, one also considers additive R-linear categories for a commutative ring R. These are categories enriched over the monoidal category of R-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 R is additive, and so in particular, the category of vector spaces over a field K 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.
The diagonal morphism is the canonical morphism ∆: A → A ⊕ A, induced by the universal property of products, such that p$_k$ ∘ ∆ = 1$_A$ for k = 1, 2. Dually, the codiagonal morphism is the canonical morphism ∇: A ⊕ A → A, induced by the universal property of coproducts, such that ∇ ∘ i$_k$ = 1$_A$ for k = 1, 2.
For each object A, we define:
* the addition of the injections i$_1$ + i$_2$ to be the diagonal morphism, that is ∆ = i$_1$ + i$_2$;
* the addition of the projections p$_1$ + p$_2$ to be the codiagonal morphism, that is ∇ = p$_1$ + p$_2$.
Next, given two morphisms α$_k$: A → B, there exists a unique morphism α$_1$ ⊕ α$_2$: A ⊕ A → B ⊕ B such that p$_l$ ∘ (α$_1$ ⊕ α$_2$) ∘ i$_k$ equals α$_k$ if k = l, and 0 otherwise.
We can therefore define α$_1$ + α$_2$ := ∇ ∘ (α$_1$ ⊕ α$_2$) ∘ ∆.
This addition is both commutative and associative. The associativity can be seen by considering the composition
    $A\ {\xrightarrow {\quad \Delta \quad }}\ A\oplus A\oplus A\ {\xrightarrow {\alpha _{1}\,\oplus \,\alpha _{2}\,\oplus \,\alpha _{3}}}\ B\oplus B\oplus B\ {\xrightarrow {\quad \nabla \quad }}\ B$
We have α + 0 = α, using that α ⊕ 0 = i$_1$ ∘ α ∘ p$_1$.
It is also bilinear, using for example that ∆ ∘ β = (β ⊕ β) ∘ ∆ and that (α$_1$ ⊕ α$_2$) ∘ (β$_1$ ⊕ β$_2$) = (α$_1$ ∘ β$_1$) ⊕ (α$_2$ ∘ β$_2$).
We remark that for a biproduct A ⊕ B we have i$_1$ ∘ p$_1$ + i$_2$ ∘ p$_2$ = 1. Using this, we can represent any morphism A ⊕ B → C ⊕ D as a matrix.

## Matrix representation of morphisms

Given objects A$_1$, ..., A$_n$ and B$_1$, ..., B$_m$ in an additive category, we can represent morphisms f: A$_1$ ⊕ ⋅⋅⋅ ⊕ A$_n$ → B$_1$ ⊕ ⋅⋅⋅ ⊕ B$_m$ as m-by-n matrices
    ${\begin{pmatrix}f_{11}&f_{12}&\cdots &f_{1n}\\f_{21}&f_{22}&\cdots &f_{2n}\\\vdots &\vdots &\cdots &\vdots \\f_{m1}&f_{m2}&\cdots &f_{mn}\end{pmatrix}}$ where $f_{kl}:=p_{k}\circ f\circ i_{l}\colon A_{l}\to B_{k}.$
Using that ∑$_k$ i$_k$ ∘ p$_k$ = 1, it follows that addition and composition of matrices obey the usual rules for matrix addition and 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 A to itself form the endomorphism ring End A. If we denote the n-fold product of A with itself by A$^n$, then morphisms from A$^n$ to A$^m$ are m-by-n matrices with entries from the ring End A.
Conversely, given any ring R, we can form a category Mat(R) by taking objects A$_n$ indexed by the set of natural numbers (including 0) and letting the hom-set of morphisms from A$_n$ to A$_m$ be the set of m-by-n matrices over R, and where composition is given by matrix multiplication. Then Mat(R) is an additive category, and A$_n$ equals the n-fold power (A$_1$)$^n$.
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 A$_n$ as the left module R$^n$, then this matrix category becomes a subcategory of the category of left modules over R.
This may be confusing in the special case where m or n 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 A and B in an additive category, there is exactly one morphism from A to 0 (just as there is exactly one 0-by-1 matrix with entries in End A) and exactly one morphism from 0 to B (just as there is exactly one 1-by-0 matrix with entries in End B) – this is just what it means to say that 0 is a zero object. Furthermore, the zero morphism from A to B is the composition of these morphisms, as can be calculated by multiplying the degenerate matrices.

## Additive functors

A functor F: C → D 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 B is a biproduct of A$_1$, ... , A$_n$ in C with projection morphisms p$_k$ and injection morphisms i$_j$, then F(B) should be a biproduct of F(A$_1$), ... , F(A$_n$) in D with projection morphisms F(p$_j$) and injection morphisms F(i$_j$).
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). Most of the interesting functors studied in category theory are adjoints.

### Generalization

When considering functors between R-linear additive categories, one usually restricts to R-linear functors, so those functors giving an R-module homomorphism on each hom-set.

## Special cases

* A pre-abelian category is an additive category in which every morphism has a kernel and a cokernel.
* An abelian category is a pre-abelian category such that every monomorphism and epimorphism is normal.
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.