1 Definitions and Examples

Definition 1.1 (Category). A category C consists of:

  • (a)
    a collection ob⁡C of objects A,B,C,….
  • (b)
    a collection mor⁡C of morphisms f,g,h,….
  • (c)
    two operations dom⁡, cod⁡ from mor⁡C to ob⁡C: we write f:A→B for “f is a morphism and dom⁡f=A and cod⁡f=B”.
  • (d)
    an operation from ob⁡C to mor⁡C sending A to 1A:A→A.
  • (e)
    a partial binary operation (f,g)↦fg on mor⁡C, such that fg is defined if and only if dom⁡f=cod⁡g, and in this case we have dom⁡fg=dom⁡g and cod⁡fg=cod⁡f.

These are subject to the axioms:

  • (f)
    f1A=f and 1Ag=g when the composites are defined.
  • (g)
    f(gh)=(fg)h whenever fg and gh are defined.

Remark 1.2.

  • (a) ob⁡C and mor⁡C needn’t be sets. If they are, we call C a small category.
  • (b) We could formalise the definition without mentioning objects, but we don’t.
  • (c) fg means “first g, then f”.

Example 1.3.

  • (a) Set= category of all sets and the functions between them. (Formally, a morphism of Set is a pair (f,B) where f is a set-theoretic function, and B is its codomain.)
  • (b) We have categories:
    • Group of groups and group homomorphisms

    • Rng of rings and homomorphisms

    • Vectk of vector spaces over a field k

    • and so on

  • (c) We have categories
    • Top of topological spaces and continuous maps

    • Met of metric spaces and non-expansive maps (i.e. f such that d(f(x),f(y))≤d(x,y))

    • Mfd of smooth manifolds and C∞ maps

    Also TopGp for topological groups and continuous homomorphisms, etc...

  • (d) We have a category Htpy with the same objects as Top, but morphisms X→Y are homotopy classes of continuous maps.

    In general, given C and an equivalence relation ≡ on mor⁡C such that

    f≡g⟹dom⁡f=dom⁡g and cod⁡f=cod⁡g

    and

    f≡g⟹fg≡gh and kf≡kg when the composites are defined

    we can form a quotient category C∕≡.

  • (e) The category Rel has the same objects as Set, but morphisms A→B are relations R⊆A×B, with composition defined by
    R∘S={(a,c)|(∃⁡b)(a,b)∈S∧(b,c)∈R}.

    We can also define the category Part of sets with partial functions.

  • (f) For any category C, the opposite category Cop has the same objects and morphisms as C but dom⁡ and cod⁡ are interchanged and composition is reversed.

    This yields a duality principle: if P is a true statement about categories, so is P∗ obtained by reversing arrows in P.

  • (g) A (small) category with one object ∗ is a monoid (a semigroup with an identity). In particular, a group is a 1−object small category whose morphisms are all isomorphisms.
  • (h) A groupoid is a category whose morphisms are all isomorphisms. For example, the fundamental groupoid π1(X) of a topological space X has points of X as objects, and morphisms x→y are homotopy classes of paths from x to y (c.f. the fundamental group π1(X,x)).
  • (i) A discrete category is one whose only morphisms are identities. If C is such that for any pair of objects (A,B) there is at most one morphism A→B then mor⁡C becomes a reflexive, transitive relation on ob⁡C. We call such a C a preorder. In particular, a poset is a small preorder whose only isomorphisms are identities.
  • (j) Given a field k, the category Matk has natural numbers as objects, and morphisms n→p are p×n matrices, with entries from k, and composition is matrix multiplication.

Definition 1.4 (Functor). Let C and D be categories. A functor F:C→D consists of mappings F:ob⁡C→ob⁡D and F+mor⁡C→mor⁡D such that:

  • F(dom⁡f)=dom⁡Ff

  • F(cod⁡f)=cod⁡Ff

  • F(1A)=1FA

  • F(fg)=(Ff)(Fg) whenever fg is defined.

We write Cat for the category of small categories and the functors between them.

Example 1.5.

  • (a) We have forgetful functors Gp→Set, Rng→Set, Top→Set, … or slightly more interestingly, Rng→AbGp, Met→Top, TopGp→Top, TopGp→Gp, …
  • (b) The construction of free groups is a functor Set→Gp: given a set A, FA is the group freely generated by A, such that every mapping A→G where G has a group structure extends uniquely to a homomorphism FA→G. Given A→fB, we define Ff:FA→FB to be the unique homomorphism extending A→fB↪FB. If we also have B→gC, F(gf) and (Fg)(Ff) are both homomorphisms extending A→fB→gC↪FC.
  • (c) Given a set A, we define PA to be the set of subsets of A. Given f:A→B, we define Pf:PA→PB by Pf(A′)=f(a)|a∈A′⊆B. So P is a functor Set→Set.
  • (d) But we also have a functor P∗:Setop→Set (or Set→Setop): P∗A=PA and, for A→fB, G∗f:PB→PA is given by P∗f(B′)=ainA|f(a)∈B′. We use the term “contravariant functor C→D” for a functor C→Dop.
  • (e) Given a vector space V over k, we write V∗ for the space of linear maps V→k. Given f:V→W, we write f∗:W∗→V∗ for the mapping 𝜃↦𝜃f. This defines a functor (∙)∗:Vectkop→Vectk.
  • (f) The mapping C↦Cop, F↦F defines a functor Cat→Cat.
  • (g) A functor between monoids is a monoid homomorphism; a functor between posets is a monotone map.
  • (h) Given a group G, a functor G→Set is given by a set A equipped with a G-action (g,a)↦g⋅a, i.e. a permutation representation of G. Similarly, a functor G→Vectk is a k-linear representation of G.
  • (i) The fundamental group construction is a functor Π1:Top∗→Gp, where Top∗ is the category of topological spaces with basepoints, and morphisms being the continuous maps which preserve the basepoints.

Definition 1.6 (Natural transformation). Given categories C and D, and two functors C⇉GFD, a natural transformation α:F→G assigns to each A∈ob⁡C a morphism αA:FA→GA in D, such that for any A→fB in C, the square

  FA       F B


FααGfABfGA       GB
commutes (we call this square the naturality square for α at f). Given α as above, and β:G→H, we define βα:F→H by (βα)A=βAαA. We write [C,D] for the category of functors C→D and natural transformations between them.

Example 1.7.

  • (a) Given a vector space V, we have a linear map αV:V→V∗∗ sending v∈V to the linear form 𝜃↦𝜃(v) on V∗∗. These maps define a natural transformation 1Vectk→(∙)∗∗.
  • (b) There is a natural transformation α:1Set→UF, where F is the free group functor and U is the forgetful functor Gp→Set, whose value at A is the inclusion A↪UFA. The naturality square
       A          B


fααUABF Uf FA       U FB
    commutes by the definition of Ff.
  • (c) For any A, we have a mapping ηA:A→PA given by AηA(a)={a}. This is a natural transformation 1Set→P since Pf({a})={f(a)} for any a∈A.
  • (d) Given order-preserving maps P⇉gfQ between posets, there exists a unique natural transformation f→g if and only if f(p)≤g(p) for all P∈P.
  • (e) Given two group homomorphisms G⇉vuH, a natural transformation u→v is given by h∈H such that hu(g)=v(g)h for all g∈G, or equivalently u(g)=h−1v(g)h, i.e. u and v are conjugate homomorphisms. In particular, the group of natural transformations u→u is the centraliser of the image of u.
  • (f) If A and B are G-sets considered as functors G→Set, a natural transformation f:A→B is a G-invariant map, i.e. f:A→B such that gf(a)=f(ga) for all a∈A, g∈G.
  • (g) The Hurewicz homomorphism links the homotopy and homology groups of a space X. Elements of πn(X,x) are homotopy classes of basepoint-preserving maps Sn→fX. If we think of Sn as ∂Δn+1, f defines a singular n-cycle on X and homotopic maps differ by an n-boundary, so we get a well-defined map πn(X,x)→hnHn(X). hn is a homomorphism, and it’s a natural transformation πn→HnU, where U is the forgetful functor Top∗→Top.

We have isomorphisms of categories: e.g. F:Rel→Relop defined by FA=A, FR=Ro={(b,a)|(a,b)∈R} is its own inverse.

But we have a weaker notion of equivalence of categories.

Lemma 1.8. Assuming that:

Then α is an isomorphism in [C,D] if and only if αA is an isomorphism in D for each A.

Proof.

  • ⇒ Obvious since composition in [C,D].
  • ⇐ Suppose each αA has an inverse βA. Given A→fB in C, in the diagram
      GA       GB


GββFααfABfABF A      F B
    we have βB(Gf)=βB(Gf)αAβA=βBαB(Ff)βA=(Ff)βA. □

Definition 1.9 (Equivalence of categories). Let C and D be categories. An equivalence between C and D consists of functors F:C→D and G:D→C together with natural isomorphisms α:1C→GF, β:FG→1D. We write C≡D if there exists an equivalence between C and D.

We say P is a categorical property if

(C has P and C≡D)⟹D has P.

Example 1.10.

  • (a) The category Part of sets and partial functions is equivalent to Set∗ (the category of pointed sets). We define F:Set∗→Part by F(A,a)=A∖{a} and if f:(A,a)→(B,b), with (Ff)(x)=f(x) if f(x)≠b and undefined otherwise. Then define G:Part→Set∗ by G(A)=(A∪{A},A) and if f:A⇁B, then
    Gf(x)={f(x)if x∈A and f(x) is definedBotherwise.

    Then FG=1Part; GF≠1Set∗, but there is an isomorphism 1Set∗→GF. Note that Part⁄≅Set∗.

  • (b) We have an equivalence fdVectk≡fdVectkop: both functors are (∙)∗, and both isomorphisms are α:1fdVectk→(∙)∗∗.
  • (c) We have an equivalence fdVectk≡Matk: we define F:Matk→fdVectk by F(n)=kn, F(n→Ap) is the linear map kn→kp represented by A (with respect to standard bases). TO define G, choose a basis for each V, and define G(V)=dim⁡V,
    G(V→fW)=matrix representing f with respect to chosen bases.

    GF=1Matk; the choice of bases yields isomorphisms kdim⁡V→V for each V, which form a natural transformation FG→1fdVectk.

Definition 1.11 (Faithful / full / essentially surjective). Let F:C→D be a functor.

  • (a)
    We say F is faithful if, given f and g in mor⁡C, (Ff=Fg, dom⁡f=dom⁡g, cod⁡f=cod⁡g)⟹f=g.
  • (b)
    We say F is full if, for every g:FA→FB in D, there exists f:A→B in C with Ff=g.
  • (c)
    We say F is essentially surjective if, for any B∈ob⁡D, there exists A∈ob⁡C with FA≅B.

Note that if F is full and faithful, it’s essentially injective: given FA →≅gFB in D, the unique A→fB with Ff=g is an isomorphism.

We say D⊆C is a full subcategory if the inclusion D→C is a full functor.

Lemma 1.12. Assuming that:

  • F:C→D

Then F is part of an equivalence C≡D if and only if F is full, faithful, essentially surjective.

Proof.

  • ⇒ Suppose give G, α and β as in Definition 1.9. Then βB:FGB→B witnesses the fact that F is essentially surjective. If A⇉gfB satisfy Fg=Fg, then GFf=GFg; but f=αB−1(GFf)αA, so f=g. Suppose given FA→gFB; then f=αB−1(Gg)αA satisfies GFf=Gf but G is faithful for the same reason as F, so Ff=g.
  • ⇐ For each B∈ob⁡D, chose GB∈ob⁡C and an isomorphism βB:FGB→B. Given B→gC, define Gg:GB→GC to be the unique morphism such that FGg=βC−1gβB. Functoriality follows from uniqueness, and naturality of β. We define αA:A→GFA to be the unique morphism such that FαA=βFA−1:FA→FGFA. αA is an isomorphism, and naturality squares for α are mapped by F to naturality squares for β−1, so they commute. □

Definition 1.13 (Skeleton). By a skeleton of a category C, we mean a full subcategory containing just one object from each isomorphism class.

We say C is skeletal if it’s a skeleton of itself.

Example. Matk is a skeletal category; it’s isomorphic to the skeleton of fdVectk consisting of the spaces kn.

However, working with skeletal categories involves heavy use of the axiom of choice.

Definition 1.14 (Monomorphism / epimorphism). Let f:A→B be a morphism in a category C. We say f is a monomorphism (or monic) if, given C⇉hgA, fg=fh⟹g=h. We say f is an epimorphism (or epic) if it’s a monomorphism in Cop.

We write A↣fB to indicate that f is monic, and A↠fB to indicate that it’s epic.

We say C is balanced if every arrow which is monic and epic is an isomorphism.

We will call a monic morphism e split if it has a left inverse (and similarly we may define the notion of split epic).

Example 1.15.

  • (a) In Set, monic ⟺ injective (⇐ obvious; for ⇒ consider morphisms {∗}→A). Also, epic ⟺ surjective (⇐ obvious; for ⇒ consider morphisms B→{0,1}).
  • (b) In Gp, monic ⟺ injective (for ⇒ consider homomorphisms ℤ→G), and epic ⟺ surjective (but ⇒ is quite non-trivial – it uses free products with amalgamation).
  • (c) In Rng, monic ⟺ injective, but epic does not imply surjective (for example, consider ℤ↪ℚ).
  • (d) In Top, monic ⟺ injective and epic ⟺ surjective (as in Set) but Top isn’t balanced.
  • (e) In preorder, all morphisms are monic and epic, so a preorder is balanced if and only if it’s an equivalence relation.