# The Unapologetic Mathematician

## The Category of Matrices I

What we’ve been building up to is actually the definition of a category. Given a field $\mathbb{F}$ we define the category $\mathbf{Mat}(\mathbb{F})$ of matrices over $\mathbb{F}$.

Most of our other categories have been named after their objects — groups are the objects of $\mathbf{Grp}$, commutative monoids are the objects of $\mathbf{CMon}$, and so on — but not here. In this case, matrices will be the morphisms, and the category of matrices illustrates in a clearer way than any we’ve seen yet how similar categories are to other algebraic structures that are usually seen as simpler and more concrete.

Down to business: the objects of $\mathbf{Mat}(\mathbb{F})$ will be the natural numbers $\mathbb{N}$, and the morphisms in $\hom(m,n)$ are the $n\times m$ matrices. That is, a morphism is a collection of field elements $\left(t_i^j\right)$ where $i$ runs from ${1}$ to $m$ and $j$ runs from ${1}$ to $n$.

We compose two morphisms by the process of matrix multiplication. If $\left(s_i^j\right)$ is an $n\times m$ matrix in $\hom(m,n)$ and $\left(t_j^k\right)$ is a $p\times n$ matrix in $\hom(n,p)$, then their product $\left(s_i^jt_j^k\right)$ is a $p\times m$ matrix in $\hom(m,p)$ (remember the summation convention).

The category of matrices is actually enriched over the category of vector spaces over $\mathbb{F}$. This means that each set of morphisms is actually a vector space over $\mathbb{F}$. Specifically, we add matrices of the same dimensions and multiply matrices by scalars component-by-component.

We have yet to speak very clearly about identities. The axioms of an enriched category state that for each object (natural number) $n$ there must be a linear function $I_n:\mathbb{F}\rightarrow\hom(n,n)$. Because of linearity, this function is completely determined by its value at $1\in\mathbb{F}$: $I_n(x)=xI_n(1)$. We must pick this matrix $I_n(1)$ so that it acts as an identity for matrix multiplication, and we choose the Kronecker delta for this purpose: $I_n(1)=\left(\delta_i^j\right)$. That is, we use an $n\times n$ matrix whose entries are ${1}$ if the indices are equal and ${0}$ otherwise. It’s straightforward to check that this is indeed an identity.

Other properties I’ve skipped over, but which aren’t hard to check, are that matrix multiplication is bilinear and associative. Both of these are straightforward once written out in terms of the summation convention; sometimes deceptively so. For example, the associativity condition reads $(r_i^js_j^k)t_k^l=r_i^j(s_j^kt_k^l)$. But remember that there are hidden summation signs in here, so it should really read:

$\displaystyle\sum\limits_k\left(\sum\limits_jr_i^js_j^k\right)t_k^l=\sum\limits_jr_i^j\left(\sum\limits_ks_j^kt_k^l\right)$

so there’s an implicit change in the order of summation here. Since we’re just doing finite sums, this is no problem, but it’s still worth keeping an eye on.

June 2, 2008