# Relevance / Importance of the category Mat

I am new, very new, to category theory - which I am trying to learn on my own. I've run across an example in several texts which confuses me.

Specifically, it is the category Mat where objects are natural numbers and morphs between the objects m and n are mxn matrices. I can see that this is a category, but I wonder what it provides an example of. While definitions are neither correct nor incorrect, they can certainly be useful or useless, and this example seems to be in the latter category.

If authors want an example of a category with matrices as morphs, why not let the objects also be matrices, subject only to the restriction that the dimensions are such that post multiplication of a matrix in the domain by a morph gives a matrix in the codomain? This gives a much richer example.

Again, I am not questioning the "correctness" of anything. But when I encounter what seems like a trivial example, used repeatedly, I have to wonder whether I am missing the whole point the author is trying to make.

Thanks for any help or comments.

• I think, maybe you miss the point that composition in this category is the matrix product. So the family of all morphisms along with composition is exactly what you learned previously under the name of "matrix algebra". (if you want addition too, that's covered by giving Mat the structure of a preadditive category; in fact it's an abelian category, and many matrix operations turn out to be abelian category operations) – user14972 Jun 11 '17 at 0:58
• An important information is missing here: matrices with what kind of entries? Also a minor detail: you need to be clear about the status of $0$ as natural number; I think in category theory most agree that it is included (and leaving it out would result in a rather different category). Then you are forced to conceive and distinguish $0\times n$ and $m\times 0$ matrices for all $m,n\in\Bbb N$; this is a good thing, it is just that many people overlook this (and Bourbaki even erroneously considers all these matrices to be the same). – Marc van Leeuwen Jun 11 '17 at 7:31
• @Marc. In this case I am assuming 0 is not included. Also, I intentionally avoided specifying any particular entires because that did not seem to relate to my question. – PossumP Jun 11 '17 at 21:09

In my opinion, the two most significant things to learn from the example are:

### Morphisms are important

One thing I really like about Mat is that it's a familiar example where our prior experience is to consider all of the importance to be in the morphisms, which serves to contrast with other examples like AbGrp where prior experience tends to be object-centric.

A running theme throughout category theory is the emphasis on the importance of morphisms — a point of view that can even be fruitfully taken to the extreme of considering objects to be wholly irrelevant beyond their role of being the sources and targets of morphisms.

E.g. in many of the familiar examples, all of the usual structure of the objects can be recovered from morphisms. For example, in Top, given a topological space $X$ one can identify its set of points with $\hom(1, X)$ and its family of open sets with $\hom(X, 2)$, where $1$ is the one-point space and $2$ is the Sierpinski space.

### Categories are natural structures

Another thing I like about Mat is it demonstrates a new way in which categories naturally organize familiar structure.

Matrix algebra is sort of an oddball in abstract algebra because the product is only partially defined; it doesn't really fit well with the usual approaches to the subject; you have to do unnatural things like restrict your attention only to square matrices of fixed dimension, or do weird things like allow all products but define those with mismatch to multiply to zero.

But lo and behold, the structure of a category happens to be exactly how matrices with the matrix product want to be organized.

Another point about the example is it paves the way of applying ideas of category theory to linear algebra.

It wasn't until I learned about Mat, for example, that I really accepted that "column space of an $n \times m$ matrix" is a better notion for computation than "subspace of $\mathbb{R}^n$". Or finally allowed "$n \times 1$ matrix" to replace "element of $\mathbb{R}^n$" in my mind when doing calculations.

• Arguably an even better perspective would be to use a multicategory which would lead to multilinear (i.e. tensor) algebra. – Derek Elkins left SE Jun 11 '17 at 0:48
• @DerekElkins: The category whose objects are rings, arrows are bimodules (with the product being the tensor product), and 2-cells are bimodule homomorphisms is, in fact, one of my favorite examples of a $2$-category! – user14972 Jun 11 '17 at 0:49
• In this case I'm referring to this generalization of a category. The 2-category you talk about, though, is even more fun as a pseudo-double category of which it is indeed an excellent example. Nice thing about multicategories is that the tensor product becomes expressible via a universal property rather than as some non-canonical additional structure. – Derek Elkins left SE Jun 11 '17 at 0:57
• how is the matrix better though? – Yorch Jun 11 '17 at 3:41
• @Hurkyl. Thank you for the very thorough answer. I think the main thing I am having problems with is the idea of "considering objects to be wholly irrelevant beyond their role of being the sources and targets of morphisms." I seems to me that other than the rules for composing morphs, the objects are very important because they go a long way toward determining the nature of the morphs. For example, suppose we further restrict the objects of Mat down to a single positive integer. Then the only morphs are 1x1 matrices that relate the object to itself. – PossumP Jun 11 '17 at 22:06

Mat is basically the same category as Vect of finite dimensional with a distinguished basis. It's to demonstrate the notion of categorical equivalence as well as a cute example of a category whose morphisms are not functions.

• To emphasize this, we could say the objects are vector spaces $\mathbb{R}^n$ for various $n$ (or whatever field), but that would basically have no effect on the category. What the objects of a category actually are are basically irrelevant. You can (and arguably should) formulate category theory in a framework where equality of objects is not even expressible, let alone any aspects of their internal details. – Derek Elkins left SE Jun 11 '17 at 0:36
• No, this is wrong; there is not even an equivalence of categories between that of finite dimensional $\Bbb R$-vector spaces and the matrix category of the question (with entries in$~\Bbb R$). Try to define a functor to that category, and you'll see that you need to canonically choose bases in all finite dimensional vector spaces, which cannot be done. If you want to get an equivalent category, you need finite dimensional $\Bbb R$-vector spaces equipped with an ordered basis. Or, as in the comment by @DerekElkins, take the full subcategory of f.d.$\Bbb R$.v.s. of the vector spaces $\Bbb R^n$. – Marc van Leeuwen Jun 11 '17 at 7:42
• @MarcvanLeeuwen: No, that is incorrect. You don't need to canonically choose ordered bases of all finite-dimensional vector spaces, you just need to fix one ordered basis once and for all for each finite-dimensional vector space. That lets you turn any linear map into a matrix (using the chosen bases on the domain and codomain), and gives you the equivalence functor from the category of finite-dimensional vector spaces to Mat. – Eric Wofsey Jun 12 '17 at 4:54
• More generally, if $\mathcal{C}$ is any category and $\mathcal{D}$ is a full subcategory of $\mathcal{C}$ such that every object of $\mathcal{C}$ is isomorphic to some subobject of $\mathcal{D}$, the inclusion functor $\mathcal{D}\to\mathcal{C}$ is an equivalence (to define an inverse, you need to actually make choices of all those isomorphisms). In this case, $\mathcal{C}$ is all finite-dimensional vector spaces, and $\mathcal{D}$ is the full subcategory spanned by $\mathbb{R}^n$ for each $n$, which is canonically isomorphic to Mat. – Eric Wofsey Jun 12 '17 at 4:56
• @EricWofsey: You are right that I was confused about this (and still am a bit); what you say is mostly what I wanted to say but stated differently. I think "you just need to fix one ordered basis once and for all for each finite-dimensional vector space" is a tall order; even the axiom of choice does not seem to grant this, as all "f.d. vector spaces" form a proper class, not a set. When I said " you need f.d.R.v.s equipped with an ordered basis" I meant just that, you need to have the data of a chosen basis coming along with each and every vector space... – Marc van Leeuwen Jun 12 '17 at 7:38

Is that category really so trivial? I think part of the point is that while the objects are rather "boring", there is much more richness to be found in the morphisms.

• Yes, matrices are a rich set of morphs, but not when used only between natural numbers. That's my point. – PossumP Jun 11 '17 at 0:05

As already pointed out, $\mathbf{Mat}$ gives a fairly familiar example of a category with objects that aren't "sets equipped with" and with morphisms that aren't "functions such that". But so does yours. So what does make them different?

The very fundamental property of $\mathbf{Mat}$ (here I suppose $0$ is taken, and that entries of the matrices are in a field $k$) is that it is a skeleton of the category of finite-dimensional vector spaces over $k$ (as long as a strongly enough axiom of choice is assumed). A skeleton $\mathbf S$ of a category $\mathbf C$ is a full subcategory of $\mathbf C$ such that: every object of $\mathbf C$ is isomorphic to one of $\mathbf S$; and two isomorphic objects of $\mathbf S$ are in fact equal. It kind of reflects the way you think most of the time in linear algebra: when you say "Let fix basis for $V,W$ and ...", you basically say that you now work inside $\mathbf{Mat}$ rather than the category of finite-dimensional vectors spaces.

And this happens in other area of mathematics. Suppose you're studying the combinatorial class of finite labeled graphs: there is a functor $\mathbf{Bij}\to\mathbf{Set}$, where $\mathbf{Bij}$ has as objects the finite sets and as morphisms the bijections between such, mapping each finite set $S$ to the set of graphs whose vertices are labeled by elements of $S$. Then sentences like "Up to renaming the vertices by $1,\dots,n$" is a way to say that you are exploiting a skeleton of $\mathbf{Bij}$, which is the category $\mathbf P$ whose objects are natural numbers $n\geq 0$ and where $\mathbf P(n,n)$ is the permutation group on $n$ letters (and $\mathbf P(m,n) = \emptyset$ whenever $m\neq n$).

Now, I want to emphasise that your example is very different in nature: you define the category $\mathbf M$ whose objects are the matrices and where $\mathbf M(M,N) = \{P : PM = N\}$. It is far from skeletal, as every invertible $P$ gives a isomorphism from $M$ to $PM$ (and such are rarely equal). And this is clearly not equivalent to vector spaces. But in fact, this is still related to $\mathbf{Mat}$ somehow. For each category $\mathbf C$, you can define its category of arrows $\mathrm{Arr}(\mathbf C)$ whose objects are the morphisms of $\mathbf C$ and the morphisms between $f$ and $g$ are the commutative squares with $f$ on the top and $g$ on the bottom. So $\mathrm{Arr}(\mathbf{Mat})$ has matrices as objects and $\mathrm{Arr}(\mathbf{Mat})(M,N) = \{ (P,Q) : PM = NQ \}$. Hence your $\mathbf M$ is the subcategory of it containing all the objects but only the morphisms of the form $(P,\mathrm{Id})$.