A category $\mathcal{C}$ consists of
A class $\mathrm{obj}(\mathcal{C})$ of mathematical objects (such as groups, rings or metric spaces).
For each pair of objects $A,B\in \mathrm{obj}(\mathcal{C})$, a set $\mathcal{C}(A,B)$ of morphisms from $A$ to $B$. We will write $f:A\to B$ or $A\stackrel{\mathit{f}}{\to}B$ to indicate that $f\in \mathcal{C}(A,B)$.
For each object $A\in \mathrm{obj}(\mathcal{C})$, a morphism ${\mathrm{id}}_{A}\in \mathcal{C}(A,A)$ (called the identity morphism).
A composition rule for morphisms. This should define, for every pair of morphisms $A\stackrel{\mathit{f}}{\to}B\stackrel{\mathit{g}}{\to}C$, a new morphism $g\circ f:A\to C$.
These must satisfy the following properties:
For every morphism $f:A\to B$, we have $f\circ {\mathrm{id}}_{A}=f={\mathrm{id}}_{B}\circ f$.
For every triple of morphisms $A\stackrel{\mathit{f}}{\to}B\stackrel{\mathit{g}}{\to}C\stackrel{\u210e}{\to}D$, we have $h\circ (g\circ f)=(h\circ g)\circ f$.
There is a category $\mathrm{Group}$ of groups. The objects are groups, and the morphisms are group homomorphisms. The identity morphism ${\mathrm{id}}_{G}$ is just the identity function $G\to G$, which is a group homomorphism by a trivial argument. The composition rule is just ordinary composition of functions. For this to be valid, we need to check that the composite of any two group homomorphisms is another group homomorphism, but this is easy. Properties (e) and (f) are also straightforward.
Most of our other examples will have the same nature: the objects will be sets with some kind of added structure, and the morphisms will be functions that preserve that structure in some sense. The only point of any real content will be to check that if we compose two structure-preserving maps, then the composite also preserves structure in the same sense.
Two examples considered later will be a bit different: the category of topological spaces and homotopy classes of continuous functions, and the category of chain complexes and chain-homotopy classes of chain maps. In these examples we start with a category $\mathcal{C}$ as in (a), and define an equivalence relation on each morphism set $\mathcal{C}(A,B)$, and put $\overline{\mathcal{C}}(A,B)=\mathcal{C}(A,B)/\sim $. We then want to say that we have a new category with the same objects as $\mathcal{C}$ and morphism sets $\overline{\mathcal{C}}(A,B)$. For this to work, we need to check that the equivalence relations are compatible with composition in an appropriate sense. See Definition 9.9 for an example of this.
Some other algebraic categories:
The category $\mathrm{Ab}$ of abelian groups and group homomorphisms. In abelian groups, we will always write the group operation as addition, the identity element as $0$ and the inverse of $a$ as $-a$. Thus, the morphisms from $A$ to $B$ are functions $\alpha :A\to B$ satisfying $\alpha ({a}_{0}+{a}_{1})=\alpha ({a}_{0})+\alpha ({a}_{1})$ for all ${a}_{0},{a}_{1}\in A$. (This implies $\alpha (0)=0$ and $\alpha (-a)=-\alpha (a)$, by standard arguments.)
The category $\mathrm{Ring}$ of rings and ring homomorphisms.
The categories ${\mathrm{Vect}}_{\mathbb{Q}}$, ${\mathrm{Vect}}_{\mathbb{R}}$ and ${\mathrm{Vect}}_{\u2102}$ of vector spaces over $\mathbb{Q}$, $\mathbb{R}$ and $\u2102$ respectively. In each case, the morphisms are maps that are linear over the relevant field.
Underlying all of these, we have the category $\mathrm{Set}$: the objects are just sets, and the morphisms are just functions.
We can also consider subcategories defined by various finiteness conditions. For example, we have the category $\mathrm{FAb}$: the objects are finite abelian groups, and the morphisms are just group homomorphisms between finite abelian groups.
In some sense, the main project of algebraic topology is to compare these algebraic categories with various topological categories.
We have a category $\mathrm{Metric}$: the objects are metric spaces, and the morphisms are continuous maps. To validate this, we need to know that composites of continuous maps are continuous, which is Proposition 3.24 above, or [MS, page 54]. It is sometimes also useful to consider a slightly different category ${\mathrm{Metric}}_{1}$: the objects are again metric spaces, but the morphisms are
$${\mathrm{Metric}}_{1}(X,Y)=\{f:X\to Y|d(f(x),f({x}^{\prime}))\le d(x,{x}^{\prime})\text{for all}x,{x}^{\prime}\in X\}.$$ |
It is straightforward to check that if $f\in {\mathrm{Metric}}_{1}(X,Y)$ and $g\in {\mathrm{Metric}}_{1}(Y,Z)$ then $g\circ f\in {\mathrm{Metric}}_{1}(X,Z)$, so this definition does indeed give a category. Lemma 3.5 tells us that ${\mathrm{Metric}}_{1}(X,Y)\subseteq \mathrm{Metric}(X,Y)$.
Similarly, there is a category $\mathrm{Top}$ whose objects are topological spaces, and whose morphisms are continuous maps.
We next need to discuss how to compare different categories. The key concept here is as follows:
Let $\mathcal{C}$ and $\mathcal{D}$ be categories. A functor $F$ from $\mathcal{C}$ to $\mathcal{D}$ consists of
A rule giving an object $FA\in \mathrm{obj}(\mathcal{D})$ for every object $A\in \mathrm{obj}(\mathcal{C})$; and
A rule giving a morphism $Ff\in \mathcal{D}(FA,F{A}^{\prime})$ for each morphism $f\in \mathcal{C}(A,{A}^{\prime})$
such that
For each $A\in \mathrm{obj}(\mathcal{C})$, we have $F({\mathrm{id}}_{A})={\mathrm{id}}_{FA}$
For every pair of morphisms $A\stackrel{\mathit{f}}{\to}{A}^{\prime}\stackrel{{f}^{\prime}}{\to}{A}^{\prime \prime}$ in $\mathcal{C}$, we have $F({f}^{\prime}\circ f)=F({f}^{\prime})\circ F(f)\in \mathcal{D}(FA,F{A}^{\prime \prime})$. In other words, the following diagram should commute:
We will sometimes write ${f}_{*}$ (or ${f}_{\mathrm{\#}}$ or ${f}_{\bullet}$ or some similar notation) instead of $Ff$.
For every topological space $X\in \mathrm{obj}(\mathrm{Top})$, we have a set ${\pi}_{0}(X)\in \mathrm{obj}(\mathrm{Set})$, as in Definition 5.10. For every continuous map $f\in \mathrm{Top}(X,Y)$, we have a function ${f}_{*}={\pi}_{0}(f)\in \mathrm{Set}({\pi}_{0}(X),{\pi}_{0}(Y))$, as in Proposition 5.20. The same proposition proves conditions (c) and (d) in Definition 6.7, so we have a functor ${\pi}_{0}:\mathrm{Top}\to \mathrm{Set}$.
For any metric space $X$, we let $TX$ denote the same set regarded as a topological space using the metric topology. If $f\in \mathrm{Metric}(X,Y)$ then $f$ is just a continuous map from $X$ to $Y$ and so can also be regarded as an element of $\mathrm{Top}(TX,TY)$. We define $Tf=f$. This gives a functor $T:\mathrm{Metric}\to \mathrm{Top}$.
For any set $X$, we have another set $PX=X\times \mathbb{Z}$. We would like to make this construction into a functor $P:\mathrm{Set}\to \mathrm{Set}$. Given a morphism $f\in \mathrm{Set}(X,Y)$ (i.e. a function $f:X\to Y$), we need to define a corresponding function $Pf:PX\to PY$, or in other words $Pf:X\times \mathbb{Z}\to Y\times \mathbb{Z}$. Thus, given a function $f:X\to Y$, a point $x\in X$ and a number $n\in \mathbb{Z}$, we need to define a point $(Pf)(x,n)\in Y\times \mathbb{Z}$. This must have the form $(Pf)(x,n)=(y,m)$ for some $y\in Y$ and $m\in \mathbb{Z}$. The only element of $Y$ that we can produce from these ingredients is $f(x)$, so we need to take $y=f(x)$. We must have $P({\mathrm{id}}_{X})=\mathrm{id}:X\times \mathbb{Z}\to X\times \mathbb{Z}$, so in the case $f={\mathrm{id}}_{X}$ we need to take $m=n$, so the simplest thing is to take $m=n$ in all cases. We therefore arrive at the definition $(Pf)(x,n)=(f(x),n)$, or in other words $Pf=f\times {\mathrm{id}}_{\mathbb{Z}}:X\times \mathbb{Z}\to Y\times \mathbb{Z}$. This gives
$$P({\mathrm{id}}_{X})(x,n)=({\mathrm{id}}_{X}(x),n)=(x,n)={\mathrm{id}}_{PX}(x,n).$$ |
Also, if we have functions $X\stackrel{\mathit{f}}{\to}Y\stackrel{\mathit{g}}{\to}Z$, then
$$P(g)(P(f)(x,n))=P(g)(f(x),n)=(g(f(x)),n)=((g\circ f)(x),n)=P(g\circ f)(x,n).$$ |
Thus, we have $P({\mathrm{id}}_{X})={\mathrm{id}}_{PX}$ and $P(g\circ f)=P(g)\circ P(f)$. We have therefore succeeded in defining a functor.
For any abelian group $A$ we note that the subset $DA=\{2a|a\in A\}$ is a subgroup of $A$. If $\alpha :A\to B$ is a homomorphism, then $\alpha (2a)=2\alpha (a)$ for all $a\in A$, so $\alpha (DA)\le DB$, so we have a function $D\alpha ={\alpha |}_{DA}:DA\to DB$, which is again a homomorphism. It is easy to see that $D({\mathrm{id}}_{A})={\mathrm{id}}_{DA}$ and $D(\beta \circ \alpha )=(D\beta )\circ (D\alpha )$, so we have defined a functor $D:\mathrm{Ab}\to \mathrm{Ab}$. This satisfies $D(\mathbb{Z}/2)=0$ and $D(\mathbb{Z}/3)=\mathbb{Z}/3$, for example. We can also define $QA=A/DA$. Given a coset $a+DA\in QA$, we would like to define $(Q\alpha )(a+DA)=\alpha (a)+DB\in QB$. This is well-defined, because if $a+DA={a}^{\prime}+DA$ then ${a}^{\prime}-a\in DA$, so $\alpha ({a}^{\prime})-\alpha (a)=\alpha ({a}^{\prime}-a)\in \alpha (DA)\le DB$, so $\alpha ({a}^{\prime})+DB=\alpha (a)+DB$. One can check that this gives a homomorphism $Q\alpha :QA\to QB$, and that $Q({\mathrm{id}}_{A})={\mathrm{id}}_{QA}$ and $Q(\beta \circ \alpha )=(Q\beta )\circ (Q\alpha )$. Thus, we have defined another functor $Q:\mathrm{Ab}\to \mathrm{Ab}$. This satisfies $Q(\mathbb{Z}/2)\simeq \mathbb{Z}/2$ and $Q(\mathbb{Z}/3)=0$, for example.
Let $\mathcal{C}$ be a category, and let $f:X\to Y$ be a morphism in $\mathcal{C}$. An inverse for $f$ is a morphism $g:Y\to X$ such that $g\circ f={\mathrm{id}}_{X}$ and $f\circ g={\mathrm{id}}_{Y}$. We say that $f$ is an isomorphism if it has an inverse. We say that $X$ and $Y$ are isomorphic if there exists an isomorphism from $X$ to $Y$. We will usually write $X\simeq Y$ to indicate that $X$ and $Y$ are isomorphic.
If $f$ has an inverse, then it is unique.
Let ${g}_{1}$ and ${g}_{2}$ be inverses for $f$. Then
$${g}_{1}={g}_{1}\circ {\mathrm{id}}_{Y}={g}_{1}\circ (f\circ {g}_{2})=({g}_{1}\circ f)\circ {g}_{2}={\mathrm{id}}_{X}\circ {g}_{2}={g}_{2}.$$ |
∎
Because of the lemma, we can write ${f}^{-1}$ for the inverse of $f$ without creating any ambiguity.
In the category $\mathrm{Group}$, the isomorphisms are just group isomorphisms as usually defined in abstract algebra. In the category $\mathrm{Set}$, the isomorphisms are just bijections. In the categories $\mathrm{Metric}$ and $\mathrm{Top}$, the isomorphisms are homeomorphisms.
For every object $X\in \mathcal{C}$, the identity morphism ${\mathrm{id}}_{X}$ is an isomorphism.
If $f:X\to Y$ is an isomorphism, then so is ${f}^{-1}:Y\to X$.
If $f:X\to Y$ and $g:Y\to Z$ are isomorphisms, then so is $g\circ f:X\to Z$.
${\mathrm{id}}_{X}$ is an inverse for itself.
$f$ is an inverse for ${f}^{-1}$.
${f}^{-1}\circ {g}^{-1}$ is an inverse for $g\circ f$.
∎
Let $X$, $Y$ and $Z$ be objects in a category $\mathcal{C}$.
$X\simeq X$
If $X\simeq Y$ then $Y\simeq X$
If $X\simeq Y$ and $Y\simeq Z$ then $X\simeq Z$.
Immediate from the proposition. ∎
Let $F\mathrm{:}\mathcal{C}\mathrm{\to}\mathcal{D}$ be a functor, and let $f\mathrm{:}X\mathrm{\to}Y$ be an isomorphism in $\mathcal{C}$. Then the morphism $F\mathit{}f\mathrm{:}F\mathit{}X\mathrm{\to}F\mathit{}Y$ is an isomorphism in $\mathcal{D}$, with inverse $F\mathit{}\mathrm{(}{f}^{\mathrm{-}\mathrm{1}}\mathrm{)}$.
By the definition of an inverse, we have ${f}^{-1}\circ f={\mathrm{id}}_{X}$ and $f\circ {f}^{-1}={\mathrm{id}}_{Y}$. Using the functor axioms we obtain
$F({f}^{-1})\circ Ff$ | $=F({f}^{-1}\circ f)=F({\mathrm{id}}_{X})={\mathrm{id}}_{FX}$ | ||
$Ff\circ F({f}^{-1})$ | $=F(f\circ {f}^{-1})=F({\mathrm{id}}_{Y})={\mathrm{id}}_{FY}.$ |
These prove that $F({f}^{-1})$ is an inverse for $Ff$, as required. ∎
Let $F\mathrm{:}\mathcal{C}\mathrm{\to}\mathcal{D}$ be a functor, and let $X$ and $Y$ be objects of $\mathcal{C}$. If $X\mathrm{\simeq}Y$ in $\mathcal{C}$, then $F\mathit{}X\mathrm{\simeq}F\mathit{}Y$ in $\mathcal{D}$.
Immediate from the proposition. ∎
We will also need a weaker concept, which is only half as good as being isomorphic.
Let $X$ and $Y$ be objects in a category $\mathcal{C}$. We say that $X$ is a retract of $Y$ if there exist morphisms $X\stackrel{\mathit{f}}{\to}Y\stackrel{\mathit{g}}{\to}X$ with $g\circ f={\mathrm{id}}_{X}$. (We make no assumption about $f\circ g$.) Any pair $(f,g)$ with this property will be called a retraction pair for $(X,Y)$.
Let $G$ and $H$ be groups. We can define homomorphisms
$$G\stackrel{\mathit{j}}{\to}G\times H\stackrel{\mathit{q}}{\to}G$$ |
by $j(g)=(g,1)$ and $q(g,h)=g$. These satisfy $q\circ j={\mathrm{id}}_{G}$, so $G$ is a retract of $G\times H$ in $\mathrm{Group}$.
We can define continuous maps ${S}^{2}\stackrel{\mathit{f}}{\to}{\mathbb{R}}^{3}\setminus \{0\}\stackrel{\mathit{g}}{\to}{S}^{2}$ by $f(u)=u$ and $g(v)=v/\parallel v\parallel $. These satisfy $g\circ f={\mathrm{id}}_{{S}^{2}}$, so ${S}^{2}$ is a retract of ${\mathbb{R}}^{3}\setminus \{0\}$ in $\mathrm{Top}$.
Let $X$ and $Y$ be nonempty finite sets with $|X|\le |Y|$. We claim that $X$ is a retract of $Y$ in the category $\mathrm{Set}$. Indeed, we can list the elements as $X=\{{x}_{1},\mathrm{\dots},{x}_{n}\}$ and $Y=\{{y}_{1},\mathrm{\dots},{y}_{m}\}$ with $1\le n\le m$. We can then define $f:X\to Y$ by $f({x}_{i})={y}_{i}$. In the opposite direction, we define $g:Y\to X$ by
$$ |
We then have $g\circ f={\mathrm{id}}_{X}$, as required.
We will mostly be interested in cases where we can prove that $X$ is not a retract of $Y$. The main tool for this is as follows:
Let $\mathcal{C}$ be a category in which the objects are sets with extra structure, and the morphisms are the functions that preserve that structure. (This covers all the examples that we have discussed so far.) Let $\mathrm{(}f\mathrm{,}g\mathrm{)}$ be a retraction pair in $\mathcal{C}$. Then $f$ is injective, and $g$ is surjective.
We can ignore the structure-preserving properties of $f$ and $g$; we just need to know that we have functions $f:X\to Y$ and $g:Y\to X$ satisfying $g(f(x))=x$ for all $x\in X$. In particular, this shows that $x$ can be written as $g(y)$ for some $y$ (namely $y=f(x)$), so $g$ is surjective. Now suppose we have $x,{x}^{\prime}\in X$ with $f(x)=f({x}^{\prime})$. By applying $g$ to both sides we obtain $g(f(x))=g(f({x}^{\prime}))$, but $g(f(x))=x$ and $g(f({x}^{\prime}))={x}^{\prime}$ so we get $x={x}^{\prime}$. This proves that $f$ is injective. ∎
Let $G$ and $H$ be groups.
If $G$ is nonabelian and $H$ is abelian, then $G$ is not a retract of $H$.
If $G$ is infinite and $H$ is finite, then $G$ is not a retract of $H$.
If $G\simeq \mathbb{Z}/2$ and $H\simeq \mathbb{Z}$, then $G$ is not a retract of $H$.
Suppose that $G\stackrel{\mathit{j}}{\to}H\stackrel{\mathit{q}}{\to}G$ is a retraction pair. Then $j$ is injective, so $G$ is isomorphic to $j(G)$, which is a subgroup of $H$. By the contrapositive, if $G$ is not isomorphic to any subgroup of $H$, then $G$ cannot be a retract of $H$. In case (a), every subgroup of $H$ is abelian, so $G$ cannot be isomorphic to any subgroup of $H$. In case (b), every subgroup of $H$ is finite, so $G$ cannot be isomorphic to any subgroup of $H$. In case (c), the group $G$ contains an element of order precisely two, but all elements of $\mathbb{Z}$ have order $1$ or $\mathrm{\infty}$, so again $G$ cannot be isomorphic to any subgroup of $H$. ∎
Let $F\mathrm{:}\mathcal{C}\mathrm{\to}\mathcal{D}$ be a functor, and let $X$ and $Y$ be objects of $\mathcal{C}$. If $X$ is a retract of $Y$ in $\mathcal{C}$, then $F\mathit{}X$ is a retract of $F\mathit{}Y$ in $\mathcal{D}$. Thus, by the contrapositive, if $F\mathit{}X$ is not a retract of $F\mathit{}Y$, then $X$ cannot be a retract of $Y$.
If $X$ is a retract of $Y$, then we can choose a retraction pair $X\stackrel{\mathit{f}}{\to}Y\stackrel{\mathit{g}}{\to}X$ with $g\circ f={\mathrm{id}}_{X}$. This gives maps $FX\stackrel{Ff}{\to}FY\stackrel{Fg}{\to}FX$ with $Fg\circ Ff=F(g\circ f)=F({\mathrm{id}}_{X})={\mathrm{id}}_{FX}$, proving that $FX$ is a retract of $FY$. ∎
As a basic example of how this can be used, we have the following:
Let $X$ and $Y$ be topological spaces such that $\mathrm{|}{\pi}_{\mathrm{0}}\mathit{}\mathrm{(}Y\mathrm{)}\mathrm{|}$ is finite and $\mathrm{|}{\pi}_{\mathrm{0}}\mathit{}\mathrm{(}X\mathrm{)}\mathrm{|}\mathrm{>}\mathrm{|}{\pi}_{\mathrm{0}}\mathit{}\mathrm{(}Y\mathrm{)}\mathrm{|}$. Then $X$ is not a retract of $Y$.
If $X$ was a retract of $Y$, then ${\pi}_{0}(X)$ would be a retract of ${\pi}_{0}(Y)$, so in particular, we would have an injective function ${f}_{*}:{\pi}_{0}(X)\to {\pi}_{0}(Y)$. This is impossible because $|{\pi}_{0}(X)|>|{\pi}_{0}(Y)|$. ∎