# Contents

## Idea

In a category $C$ with biproducts, morphisms between finite biproducts are naturally encoded in terms of arrays of morphisms between the direct summands of the objects. The natural operations on morphisms (addition, composition) correspond to the usual matrix calculus operations on these arrays.

For the special case that $C=$ Vect this reproduces the standard matrix calculus of linear algebra.

## Rules

Let $f:X\to Y$ be a morphism in a category with biproducts where the objects $X$ and $Y$ are given as direct sums

$X={\oplus }_{j=1}^{m}{X}_{j}\phantom{\rule{thinmathspace}{0ex}},\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}Y={\oplus }_{i=1}^{n}{Y}_{i}\phantom{\rule{thinmathspace}{0ex}}.$X = \oplus_{j = 1}^m X_j \,, \;\; Y = \oplus_{i = 1}^n Y_i \,.

Since a biproduct is both a product as well as a coproduct, the morphism $f$ is fixed by all its compositions ${f}_{j}^{i}$ with the product projections ${\pi }^{i}:Y\to {Y}_{i}$ and the coproduct injections ${\iota }_{j}:{X}_{j}\to X$:

${f}_{j}^{i}:={X}_{j}\stackrel{{\iota }_{j}}{\to }X\stackrel{f}{\to }Y\stackrel{{\pi }^{i}}{\to }{Y}_{i}\phantom{\rule{thinmathspace}{0ex}}.$f^i_j := X_j \stackrel{\iota_j}{\to} X \stackrel{f}{\to} Y \stackrel{\pi^i}{\to} Y_i \,.

In matrix calculus one therefore writes

$f:=\left(\begin{array}{cccc}{f}_{1}^{1}& {f}_{2}^{1}& \cdots & {f}_{m}^{1}\\ ⋮& ⋮& \ddots & ⋮\\ {f}_{1}^{n}& {f}_{2}^{n}& \cdots & {f}_{m}^{n}\end{array}\right)\phantom{\rule{thinmathspace}{0ex}}.$f := \left( \array{ f^1_1 & f^1_2 & \cdots & f^1_m \\ \vdots & \vdots & \ddots & \vdots \\ f^n_1 & f^n_2 & \cdots & f^n_m } \right) \,.

With this notation one has the following rules for computation:

$\left(f+g{\right)}_{j}^{i}={f}_{j}^{i}+{g}_{j}^{i}$(f + g)^i_j = f^i_j + g^i_j
• matrix multiplication

$\left(g\circ f{\right)}_{j}^{i}=\sum _{k}{g}_{j}^{k}\circ {f}_{k}^{i}\phantom{\rule{thinmathspace}{0ex}},$(g \circ f)^i_j = \sum_k g^k_j \circ f^i_k \,,

where in each case the sum of morphisms is taken using the canonical enrichment of $C$ in abelian monoids (as described at biproduct).

As can be seen in the above formulas, particularly for matrix multiplication, this is a context is which the Einstein summation convention can be used, with a distinction drawn between upper and lower indices. Then repeated indices (in formulas with general applicability) will always appear once upper and once lower, summed over. However, this convention can apply only to the morphisms, not to the objects.

## In dagger categories

If the category $C$ is in addition a dagger category with an obvious compatibility condition between the dagger operation $\left(-{\right)}^{†}:C\to C$ and the biproduct structure, then the usual rules of computation for matrices over complex numbers have analogs in $C$.

• conjugation

$\left({f}^{†}{\right)}_{ij}=\left({f}_{ji}{\right)}^{†}$(f^\dagger)_{i j} = (f_{j i})^\dagger

Here the distinction between upper and lower indices cannot be maintained, although it is still true that repeated indices will be summed in formulas with general applicability.

## References

For instance section 2 of

Revised on November 9, 2010 09:25:44 by Urs Schreiber (87.212.203.135)