Category

A structure of objects and morphisms with associative composition and identity morphisms.
Category

Definition

A category C\mathcal C consists of:

  1. A collection Ob(C)\mathrm{Ob}(\mathcal C) of .
  2. For each pair X,YOb(C)X,Y \in \mathrm{Ob}(\mathcal C), a collection HomC(X,Y)\mathrm{Hom}_{\mathcal C}(X,Y) of XYX \to Y.
  3. For each triple X,Y,ZX,Y,Z, a operation :HomC(Y,Z)×HomC(X,Y)HomC(X,Z),(g,f)gf. \circ : \mathrm{Hom}_{\mathcal C}(Y,Z)\times \mathrm{Hom}_{\mathcal C}(X,Y)\to \mathrm{Hom}_{\mathcal C}(X,Z), \quad (g,f)\mapsto g\circ f.
  4. For each object XX, an 1XHomC(X,X)1_X \in \mathrm{Hom}_{\mathcal C}(X,X).

These data satisfy the category axioms (associativity and identity/unit laws); see .

This abstracts the behavior of and their .

Examples

  1. Set\mathbf{Set}: objects are , morphisms are , composition is ordinary function composition, and 1X1_X is the on XX.
  2. Grp\mathbf{Grp}: objects are groups, morphisms are group homomorphisms, with composition given by composing homomorphisms.
  3. Top\mathbf{Top}: objects are topological spaces, morphisms are continuous maps, with composition the usual composition of continuous maps.