MAS61015 Algebraic Topology

6. Interlude on categories and functors

Video (Definition 6.1 to Example 6.6)

Definition 6.1.

A category 𝒞 consists of

  • (a)

    A class obj(𝒞) of mathematical objects (such as groups, rings or metric spaces).

  • (b)

    For each pair of objects A,Bobj(𝒞), a set 𝒞(A,B) of morphisms from A to B. We will write f:AB or A𝑓B to indicate that f𝒞(A,B).

  • (c)

    For each object Aobj(𝒞), a morphism idA𝒞(A,A) (called the identity morphism).

  • (d)

    A composition rule for morphisms. This should define, for every pair of morphisms A𝑓B𝑔C, a new morphism gf:AC.

These must satisfy the following properties:

  • (e)

    For every morphism f:AB, we have fidA=f=idBf.

  • (f)

    For every triple of morphisms A𝑓B𝑔CD, we have h(gf)=(hg)f.

Example 6.2.

There is a category Group of groups. The objects are groups, and the morphisms are group homomorphisms. The identity morphism idG is just the identity function GG, 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.

Remark 6.3.
  • (a)

    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.

  • (b)

    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 𝒞 as in (a), and define an equivalence relation on each morphism set 𝒞(A,B), and put 𝒞¯(A,B)=𝒞(A,B)/. We then want to say that we have a new category with the same objects as 𝒞 and morphism sets 𝒞¯(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.

Example 6.4.

Some other algebraic categories:

  • (a)

    The category 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 α:AB satisfying α(a0+a1)=α(a0)+α(a1) for all a0,a1A. (This implies α(0)=0 and α(-a)=-α(a), by standard arguments.)

  • (b)

    The category Ring of rings and ring homomorphisms.

  • (c)

    The categories Vect, Vect and Vect of vector spaces over , and respectively. In each case, the morphisms are maps that are linear over the relevant field.

  • (d)

    Underlying all of these, we have the category Set: the objects are just sets, and the morphisms are just functions.

  • (e)

    We can also consider subcategories defined by various finiteness conditions. For example, we have the category 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.

Example 6.5.

We have a category 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 Metric1: the objects are again metric spaces, but the morphisms are

Metric1(X,Y)={f:XY|d(f(x),f(x))d(x,x) for all x,xX}.

It is straightforward to check that if fMetric1(X,Y) and gMetric1(Y,Z) then gfMetric1(X,Z), so this definition does indeed give a category. Lemma 3.5 tells us that Metric1(X,Y)Metric(X,Y).

Example 6.6.

Similarly, there is a category 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:

Video (Definition 6.7 to Example 6.11)

Definition 6.7.

Let 𝒞 and 𝒟 be categories. A functor F from 𝒞 to 𝒟 consists of

  • (a)

    A rule giving an object FAobj(𝒟) for every object Aobj(𝒞); and

  • (b)

    A rule giving a morphism Ff𝒟(FA,FA) for each morphism f𝒞(A,A)

such that

  • (c)

    For each Aobj(𝒞), we have F(idA)=idFA

  • (d)

    For every pair of morphisms A𝑓AfA′′ in 𝒞, we have F(ff)=F(f)F(f)𝒟(FA,FA′′). In other words, the following diagram should commute:

We will sometimes write f* (or f# or f or some similar notation) instead of Ff.

Example 6.8.

For every topological space Xobj(Top), we have a set π0(X)obj(Set), as in Definition 5.10. For every continuous map fTop(X,Y), we have a function f*=π0(f)Set(π0(X),π0(Y)), as in Proposition 5.20. The same proposition proves conditions (c) and (d) in Definition 6.7, so we have a functor π0:TopSet.

Example 6.9.

For any metric space X, we let TX denote the same set regarded as a topological space using the metric topology. If fMetric(X,Y) then f is just a continuous map from X to Y and so can also be regarded as an element of Top(TX,TY). We define Tf=f. This gives a functor T:MetricTop.

Example 6.10.

For any set X, we have another set PX=X×. We would like to make this construction into a functor P:SetSet. Given a morphism fSet(X,Y) (i.e. a function f:XY), we need to define a corresponding function Pf:PXPY, or in other words Pf:X×Y×. Thus, given a function f:XY, a point xX and a number n, we need to define a point (Pf)(x,n)Y×. This must have the form (Pf)(x,n)=(y,m) for some yY and m. 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(idX)=id:X×X×, so in the case f=idX 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×id:X×Y×. This gives

P(idX)(x,n)=(idX(x),n)=(x,n)=idPX(x,n).

Also, if we have functions X𝑓Y𝑔Z, then

P(g)(P(f)(x,n))=P(g)(f(x),n)=(g(f(x)),n)=((gf)(x),n)=P(gf)(x,n).

Thus, we have P(idX)=idPX and P(gf)=P(g)P(f). We have therefore succeeded in defining a functor.

Example 6.11.

For any abelian group A we note that the subset DA={2a|aA} is a subgroup of A. If α:AB is a homomorphism, then α(2a)=2α(a) for all aA, so α(DA)DB, so we have a function Dα=α|DA:DADB, which is again a homomorphism. It is easy to see that D(idA)=idDA and D(βα)=(Dβ)(Dα), so we have defined a functor D:AbAb. This satisfies D(/2)=0 and D(/3)=/3, for example. We can also define QA=A/DA. Given a coset a+DAQA, we would like to define (Qα)(a+DA)=α(a)+DBQB. This is well-defined, because if a+DA=a+DA then a-aDA, so α(a)-α(a)=α(a-a)α(DA)DB, so α(a)+DB=α(a)+DB. One can check that this gives a homomorphism Qα:QAQB, and that Q(idA)=idQA and Q(βα)=(Qβ)(Qα). Thus, we have defined another functor Q:AbAb. This satisfies Q(/2)/2 and Q(/3)=0, for example.

Video (Definition 6.12 to Corollary 6.18)

Definition 6.12.

Let 𝒞 be a category, and let f:XY be a morphism in 𝒞. An inverse for f is a morphism g:YX such that gf=idX and fg=idY. 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 XY to indicate that X and Y are isomorphic.

Lemma 6.13.

If f has an inverse, then it is unique.

Proof.

Let g1 and g2 be inverses for f. Then

g1=g1idY=g1(fg2)=(g1f)g2=idXg2=g2.

Because of the lemma, we can write f-1 for the inverse of f without creating any ambiguity.

Example 6.14.

In the category Group, the isomorphisms are just group isomorphisms as usually defined in abstract algebra. In the category Set, the isomorphisms are just bijections. In the categories Metric and Top, the isomorphisms are homeomorphisms.

Proposition 6.15.
  • (a)

    For every object X𝒞, the identity morphism idX is an isomorphism.

  • (b)

    If f:XY is an isomorphism, then so is f-1:YX.

  • (c)

    If f:XY and g:YZ are isomorphisms, then so is gf:XZ.

Proof.
  • (a)

    idX is an inverse for itself.

  • (b)

    f is an inverse for f-1.

  • (c)

    f-1g-1 is an inverse for gf.

Corollary 6.16.

Let X, Y and Z be objects in a category 𝒞.

  • (a)

    XX

  • (b)

    If XY then YX

  • (c)

    If XY and YZ then XZ.

Proof.

Immediate from the proposition. ∎

Proposition 6.17.

Let F:𝒞𝒟 be a functor, and let f:XY be an isomorphism in 𝒞. Then the morphism Ff:FXFY is an isomorphism in 𝒟, with inverse F(f-1).

Proof.

By the definition of an inverse, we have f-1f=idX and ff-1=idY. Using the functor axioms we obtain

F(f-1)Ff =F(f-1f)=F(idX)=idFX
FfF(f-1) =F(ff-1)=F(idY)=idFY.

These prove that F(f-1) is an inverse for Ff, as required. ∎

Corollary 6.18.

Let F:𝒞𝒟 be a functor, and let X and Y be objects of 𝒞. If XY in 𝒞, then FXFY in 𝒟.

Proof.

Immediate from the proposition. ∎

Video (Definition 6.19 to Proposition 6.26)

We will also need a weaker concept, which is only half as good as being isomorphic.

Definition 6.19.

Let X and Y be objects in a category 𝒞. We say that X is a retract of Y if there exist morphisms X𝑓Y𝑔X with gf=idX. (We make no assumption about fg.) Any pair (f,g) with this property will be called a retraction pair for (X,Y).

Example 6.20.

Let G and H be groups. We can define homomorphisms

G𝑗G×H𝑞G

by j(g)=(g,1) and q(g,h)=g. These satisfy qj=idG, so G is a retract of G×H in Group.

Example 6.21.

We can define continuous maps S2𝑓3{0}𝑔S2 by f(u)=u and g(v)=v/v. These satisfy gf=idS2, so S2 is a retract of 3{0} in Top.

Example 6.22.

Let X and Y be nonempty finite sets with |X||Y|. We claim that X is a retract of Y in the category Set. Indeed, we can list the elements as X={x1,,xn} and Y={y1,,ym} with 1nm. We can then define f:XY by f(xi)=yi. In the opposite direction, we define g:YX by

g(yi)={xi if 1inxn if n<im.

We then have gf=idX, 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:

Proposition 6.23.

Let 𝒞 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 (f,g) be a retraction pair in 𝒞. Then f is injective, and g is surjective.

Proof.

We can ignore the structure-preserving properties of f and g; we just need to know that we have functions f:XY and g:YX satisfying g(f(x))=x for all xX. 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,xX with f(x)=f(x). By applying g to both sides we obtain g(f(x))=g(f(x)), but g(f(x))=x and g(f(x))=x so we get x=x. This proves that f is injective. ∎

Corollary 6.24.

Let G and H be groups.

  • (a)

    If G is nonabelian and H is abelian, then G is not a retract of H.

  • (b)

    If G is infinite and H is finite, then G is not a retract of H.

  • (c)

    If G/2 and H, then G is not a retract of H.

Proof.

Suppose that G𝑗H𝑞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 have order 1 or , so again G cannot be isomorphic to any subgroup of H. ∎

Proposition 6.25.

Let F:𝒞𝒟 be a functor, and let X and Y be objects of 𝒞. If X is a retract of Y in 𝒞, then FX is a retract of FY in 𝒟. Thus, by the contrapositive, if FX is not a retract of FY, then X cannot be a retract of Y.

Proof.

If X is a retract of Y, then we can choose a retraction pair X𝑓Y𝑔X with gf=idX. This gives maps FXFfFYFgFX with FgFf=F(gf)=F(idX)=idFX, proving that FX is a retract of FY. ∎

As a basic example of how this can be used, we have the following:

Proposition 6.26.

Let X and Y be topological spaces such that |π0(Y)| is finite and |π0(X)|>|π0(Y)|. Then X is not a retract of Y.

Proof.

If X was a retract of Y, then π0(X) would be a retract of π0(Y), so in particular, we would have an injective function f*:π0(X)π0(Y). This is impossible because |π0(X)|>|π0(Y)|. ∎