Categories, categories of linear maps and homomorphisms

category-theorylinear algebra

The concept of categories and morphisms were introduced to us today in our Linear Algebra course. I haven't taken abstract algebra yet so this lecture confused me quite a bit. As far as my understanding goes, a category consists of the following:

  1. A class of objects
  2. A class of morphisms given any 2 objects from the category
  3. An identity morphism given an object
  4. A way to compose 2 morphisms

A few examples that were given by our professor that he claimed would be relevant in the class were the category of vector spaces with linear maps as morphisms and the category of linear maps. But he never explored these concepts in detail and just skimmed over them.

Why must the morphisms of the category of vector spaces have to be linear maps? Why not functions that are non-linear? I have eventually, after trying to prove that they must be linear, think that it is only for the sake of convenience. Is this correct?

And I am quite confused about morphisms of the category of Linear maps (between vector spaces). Does it mean that the morphism takes linear maps as input and outputs an other map in the category?

And in general, do morphisms need only be associative or are there other resitrictions?

I have no prior experience in abstract algebra so please consider me a layman. A few might examples might help.

Thank you

Best Answer

It is by definition that the maps in the category of vector spaces are linear maps. The full description of the data defining the category of vector spaces and linear maps is, after fixing a base field (such as the real numbers $\mathbb{R}$):

  1. Objects: vector spaces over $\mathbb{R}$.
  2. Morphisms: Set $\operatorname{Hom}(V, W) = \{f : V \to W \mid f \text{ is } \mathbb{R}\text{-linear}\}$.
  3. Composition: For $f \in \operatorname{Hom}(U, V)$ and $g \in \operatorname{Hom}(V, W)$, the composition $fg$ in the category is defined to be the composition of functions $f \circ g$.

Now you need to check that this data is indeed a category: that composition is associative, that composition lands in the correct set (for the above example, we need $f \circ g$ to be a linear map $V \to W$), and that an identity morphism $\operatorname{id}_V \in \operatorname{Hom}(V, V)$ exists for each object $V$.

Here are some other examples of random categories we could define:

  1. The category of vector spaces and linear isomorphisms. (Same objects as above, but fewer morphisms).
  2. The category of vector spaces, where the only morphisms are the identity morphisms from an object to itself. (Same objects as above, but a pretty useless category).
  3. The category of sets and functions.
  4. The category where the objects are the natural numbers $\mathbb{N} = \{0, 1, 2, \ldots\}$, the morphisms $\operatorname{Hom}(n, m)$ are the set of $m \times n$ matrices, and composition is matrix multiplication.
  5. The category with a single object $x$ and a single morphism in $\operatorname{Hom}(x, x)$.

There are many things that are categories, some useful, and some not. But the defining data are objects, morphisms, and composition. Then you need to check that the conditions hold. Here are some non-examples of categories:

  1. The category with a single object $\mathbb{R}$, where morphisms $\operatorname{Hom}(\mathbb{R}, \mathbb{R})$ are polynomials of degree at most 2, and composition in the category is composition of functions. (The composition of two quadratics can be a degree-4 polynomial, so this is not a category).
  2. Suppose we have three objects $A, B, C$, identity morphisms $\operatorname{id}_A, \operatorname{id}_B, \operatorname{id}_C$, and the only other two morphisms in the "category" are $A \to B$ and $B \to C$. Then no matter how composition is defined, this can never be a category, since composing those two morphisms should have given us a morphism $A \to C$.
Related Question