##### Tools

This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# Category

A category ${\mathscr C}$ consists of

• a class $\text{Obj}({\mathscr C})$ of objects;
• a class $\text{Hom}({\mathscr C})$ of morphisms between some pairs of objects.

Morphisms are also called arrows, which emphasizes the point that they are not functions just as the objects aren't sets.

Each morphism $f$ has a unique source object $X \in \text{Obj}({\mathscr C})$ and target object $Y\in \text{Obj}({\mathscr C})$. We write $f: X \to Y$. We write $\text{Hom}_{\mathscr C}(X,Y)$ (or simply $\text{Hom}(X,Y)$ when there is no confusion about to which category it refers) to denote the the class of all morphisms from $X$ to $Y$.


We assume that the following axioms hold:

• (identity) for every object $X \in \text{Obj}({\mathscr C})$, there exists a morphism $\text{Id}_X \in \text{Hom}_{\mathscr C}(X,X)$, called the identity morphism for $X$, such that for every morphism $f : X \to Y$, we have

$$\text{Id}_Y f = f = f\text{Id}_X.$$

• (associativity) if $f : X \to Y, g : Y \to Z$ and $h : Z \to W$ then $h(gf) = (hg)f$, and


From these axioms, one can prove that there is exactly one identity morphism for every object.

Examples of categories with morphisms:

A functor ${\mathscr F}$ from category ${\mathscr C}$ to category ${\mathscr D}$ consists of two functions

• the first associates to each object $X$ in ${\mathscr C}$ an object ${\mathscr F}(X)$ in ${\mathscr D}$,
• the second associates to each morphism $f:X\rightarrow Y$ in ${\mathscr C}$ a morphism ${\mathscr F}(f):{\mathscr F}(X) \rightarrow {\mathscr F}(Y)$ in ${\mathscr D}$.

So, we have $${\mathscr F}:\text{Obj}({\mathscr C}) \rightarrow \text{Obj}({\mathscr D}),$$ and, if ${\mathscr F}(X)=U,{\mathscr F}(Y)=V$, we have $${\mathscr F}={\mathscr F}_{X,Y}:\text{Hom}_{\mathscr C}(X,Y) \rightarrow \text{Hom}_{\mathscr D}(U,V).$$ We assume that the following two conditions hold:

• ${\mathscr F}(\text{Id}_{X}) = \text{Id}_{{\mathscr F}(X)}$, for every object $X$ in ${\mathscr C}$;
• ${\mathscr F}(g f) = {\mathscr F}(g) {\mathscr F}(f)$, for all morphisms $f:X \rightarrow Y$, and $g:Y\rightarrow Z$.

Examples:

• a forgetful functor ${\mathscr F}:{\mathscr Top} \to {\mathscr Sets},{\mathscr Ab} \to {\mathscr Sets}$ etc,
• homology $H:{\mathscr Top} \to {\mathscr Ab}$.

Such a functor is called covariant as opposed to a contravariant functor ${\mathscr G}$ which will "reverse" the arrows, i.e., it has two functions as before but

• the second associates to each morphism $f:X\rightarrow Y$ in ${\mathscr C}$ a morphism ${\mathscr G}(f):{\mathscr G}(Y) \rightarrow {\mathscr G}(X)$ in ${\mathscr D}$.

So, if ${\mathscr G}(X)=U,{\mathscr G}(Y)=V$, we have: $${\mathscr G}={\mathscr G}_{X,Y}:\text{Hom}_{\mathscr C}(X,Y) \rightarrow \text{Hom}_{\mathscr D}(V,U).$$

Examples:

• dual space functor $D:{\mathscr Vec} \to {\mathscr Vec}$,
• cohomology $H^*:{\mathscr Top} \to {\mathscr Ab}$.


If both functors are contravariant, the horizontal arrows in this diagram are reversed.

Example. The isomorphism between a vector space $V$ and its dual $V^{*}$ is not natural (arrow are reversed) but between a vector space and its second $V^{**}$ dual is.