# Categories and Functors

Before we begin, I must say that this topic may not be as accessible as the other posts on this blog. It is intended for those who have had at least an introductory course in abstract algebra. I do intend on making quite a few posts like this but I will definitely be doing the fun accessible ones as well.

A personal interest of mine is Category Theory. This field of mathematics acts as a unifier for many mathematical fields. To be more precise, the development of Category Theory was spurred by the study of Toplogy. A huge goal of topology is to be able to say whether or not two spaces are homeomorphic (i.e. if there is a continuous bijection between two topological spaces). However, as one may see, it is a sizable problem without a general solution. Moreover, this problem is really hard to solve using only topological tools. If we could employ tools of another area of mathematics with seemingly endless tools, say Algebra, then we may ease our burden. Enter the notion of categories and functors.

Definition: category $\mathcal{C}$ is a collection, $\mathrm{Ob}(\mathcal{C})$, of objects along with a set, $\mathrm{Mor}(\mathcal{C})$, of arrows that satisfy the following conditions

• To each arrow $f \in \mathrm{Mor}(\mathcal{C})$ there corresponds objects $A$ and $B$ which form the source (domain) and target (codomain) of $f$ respectively. We write $f : A \to B$ for any morphism.
• If $f : A \to B$ and $g : B \to C$ are arrows then $f \circ g$ is an arrow with source $s(f) = A = s(f \circ g)$ and target $t(g) = C = t(f \circ g)$. That is $f \circ g: A\to C$ is an arrow. This is called composition.
• Composition is associative. That is $(f \circ g) \circ c = f \circ (g \circ c)$ provided that the composition exists.
• For every object $X$ there corresponds an arrow $\mathrm{id}_X : X \to X$ so that $f \circ \mathrm{id}_X = f$ and $\mathrm{id}_X \circ g = g$ where $f: X \to Y$ and $g: Y\to X$. This arrow is called the identity arrow on $X$.

While this seems like a lot to take in, every day mathematicians work with categories without even realizing it. To see this let us look at many examples of categories.

Examples:

•  $\mathbf{Set}$ is the category of sets and functions
• $\mathbf{Top}$ is the category of topological spaces and continuous functions
• $\mathbf{Group}$ is the category whose objects are groups (from algebra) and whose arrows are homomorphisms (maps of the form $\phi : G \to H$ where $\phi(g_1 \cdot_G g_2) = \phi(g_1) \cdot_H \phi(g_2)$.
• $\mathbf{Ab}$ is the category of abelian groups (groups where commutativity holds) and whose arrows are homomorphisms
• $\mathbf{Ring}$ is the category of rings with ring homomorphisms
• Let $F$ be a field. Then $\mathbf{Vect}_F$ is the category of finite dimensional vector spaces with arrows as linear maps.
• We can also have silly categories such as $\mathbf{0}$, which is the empty category with no objects and no arrows, and $\mathbf{1}$ which is the category of one object and the identity arrow.
• Try to think of a few more categories by yourself!

Before we move on, we will look at the categorical notion of homeomorphism, isomorphism, etc.

Definition: An equivalence in a category $\mathcal{C}$ is an arrow $f: A \to B$ so that there is another arrow $g: B\to A$ where $f \circ g = \mathrm{id}_B$ and $g \circ f = \mathrm{id}_A$.

It is easy to see that an equivalence in $\mathbf{Top}$ is a homeomorphism (continuous bijection) and an equivalence in $\mathbf{Group}$ is a group isomorphism (bijective homomorphism).

Okay, we will move on to see just exactly how the problem of turning a topological problem into an algebraic one is handled. Often in mathematics when we define a structure we have an idea of maps between them. This is handled with categories as follows.

Definition: For two categories $\mathcal{C}$ and $\mathcal{D}$functor $F : \mathcal{C} \to \mathcal{D}$ satisfies the following:

• For every object $A$ of $\mathcal{C}$ there corresponds the object $F(A)$ in $\mathcal{D}$. That is to say that $F$ is a function on the objects of the categories.
• $F$ is also a function of the morphisms, for $f: A\to B$ we have $F(f): F(A) \to F(B)$, but it must have a little more structure here,
• For arrows $f: A\to B$ and $g: B \to C$ we have $F(f \circ g) = F(f) \circ F(g)$.
• $F(\mathrm{id}_X) = \mathrm{id}_{F(X)}$

Now to end this post we see a theorem which will bring us back to the problem set forth in the beginning.

Theorem: Let $\mathcal{C}$ and $\mathcal{D}$ be categories. If $F: \mathcal{C} \to \mathcal{D}$ is a functor and if $f$ is an equivalence in $\mathcal{C}$ then $F(f)$ is an equivalence in $\mathcal{D}$.

We will not prove this one together, but the proof is very short and I recommend trying to prove it. With this we see that if we have a functor between $\mathbf{Top}$ and $\mathbf{Group}$ Then a homeomorphism becomes an isomorphism and vice versa. This problem spurred an entire field of mathematics that is known as Algebraic Topology. Later on, we shall look at an explicit example of how we execute this method.

“Let V be an n-dimensional veetor space over the field F and W an m-dimensional vector space over F. Let $\mathcal{B}$ be an ordered basis for V and $\mathcal{B}'$ an ordered basis for W. For each linear transformation T from V into W, there is an m x n matrix A with entries in F such that $[T\alpha]_{\mathcal{B}'} = A[\alpha]_{\mathcal{B}}$ for every vector $\alpha$ in V. Furthermore, $T \rightarrow A$ is a one-one correspondence between the set of all linear transformations from V into W and the set of all m x n matrices over the field F.”