# 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.

## 9 Comments	»

1. [...] Category of Matrices II As we consider the category of matrices over the field , we find a monoidal [...]

Pingback by | June 3, 2008 | Reply

2. “Down to business: the objects of \mathbf{Mat}(\mathbb{F}) will be the natural numbers \mathbb{N}…”

Wait, why? Why wouldn’t it be a vector? I can see how the morphisms are matrices, but don’t the morphisms map one object to another? And wouldn’t matrices – being linear operators – map vector spaces to vector spaces, and vectors to vectors? So…why are natural numbers the objects?

Comment by Wait one moment... | June 4, 2008 | Reply

3. (Sorry to keep posting )

But a thought, it’s the natural numbers because the natural number indicates the number of dimensions of the vector space, right? Which is why it’s an n by m matrix that maps the object ‘m’ to the object ‘n’, right?

Comment by Wait one moment... | June 4, 2008 | Reply

4. Yes, that’s it. This is not a category of algebraic structures and mappings between them. The morphisms are the most important part of this category, and the objects are largely bookkeeping to tell which morphisms can be composed.

Comment by | June 4, 2008 | Reply

5. ‘Wait one moment’ wrote:

So…why are natural numbers the objects?

The real reason is that it doesn’t matter what you call the objects – you can call them $n$ or $F^n$. The latter seems more reasonable when you’re first getting started, but once this realization fully sinks in – it doesn’t matter what you call the objects – people often decide the shorter name $n$ is fine. This is especially true because there’s a large class of important categories where there’s one object per natural number. Some of these categories are called “PROPs” – and there’s a whole big theory of PROPs, which is very interesting.

Comment by | June 5, 2008 | Reply

6. Grr… I typed in the html to get F^n with a superscript for the n, but all I got was Fn.

Comment by | June 5, 2008 | Reply

7. fixed it. And yes, that’s a good point. It’s pretty much what I meant by “the objects are largely bookkeeping”, but your explanation is appreciated.

Comment by | June 5, 2008 | Reply

8. Alright, thanks for the clarification Dr Baez and Dr Armstrong; if I may employ a terrible pun, may I give *PROPS* to you both. Ahaha…ahem, what a terrible pun.

Comment by Wait one moment... | June 7, 2008 | Reply

9. [...] of Matrices III At long last, let’s get back to linear algebra. We’d laid out the category of matrices , and we showed that it’s a monoidal category with [...]

Pingback by | June 23, 2008 | Reply

« Previous | Next »

## About this weblog

This is mainly an expository blath, with occasional high-level excursions, humorous observations, rants, and musings. The main-line exposition should be accessible to the “Generally Interested Lay Audience”, as long as you trace the links back towards the basics. Check the sidebar for specific topics (under “Categories”).

I’m in the process of tweaking some aspects of the site to make it easier to refer back to older topics, so try to make the best of it for now.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 41, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9306620955467224, "perplexity_flag": "head"}