Category

A category $\cC = (\Obj, \Hom, \id, \circ)$ consists of

  • $\Obj$: a collection of objects $A, B, C, \dots$
  • $\Hom(A, B)$: a collection of morphisms (arrows) $f, g, h, \dots$ from $A$ to $B$ for each pair $(A, B)$ of objects
  • $\id_A$: an identity morphism for each object $A$
  • $\circ$: composition $\Hom(B, C) \times \Hom(A, B) \to \Hom(A, C)$

subject to the following conditions:

  • composition is associative: $h \circ (g \circ f) = (h \circ g) \circ f$. associativity
  • identity and composition are compatible: $f = f \circ \id_A = \id_B \circ f$. identity

$A \in \cC$ means $A \in \Obj_\cC$ and $f \in \cC$ means $f \in \Hom_\cC(A, B)$ for some $A$ and $B$.
A morphism $f$ from $A$ to $B$ is also denoted by $f: A \to B$ or $A \xrightarrow{f} B$.

Roughly speaking, a category consists of a collection of objects and a collection of arrows between them,
and we have an identity arrow for each object and we know how to compose two arrows to get a new one.

Indeed, the subject might better have been called abstract function theory, or, perhaps even better: archery [Awodey, 2006].

Examples

  • The first example is the category $\cSet$ of sets with functions between sets as morphisms.
    The identity $\id_A$ is the identity function $\id_A: a \mapsto a$ and the composition is the function composition.
  • More generally, we have the category $\cRel$ of sets with binary relations as morphisms.
  • Further, we have categories of structured sets and structure-preserving functions between them, such as:
    • $\cPos$: posets and monotonic functions
    • $\cMon$: monoids and monoid homomorphisms
    • $\cGrp$: groups and group homomorphisms
    • $\cAb$: Abelian groups and group homomorphisms
    • $\cVect$: vector spaces and linear functions
  • A monoid is a single-object category where morphisms are its elements.
  • A proset is a single-morphism category where objects are its elements.
  • A groupoid is a category in which all morphisms are isomorphisms.
    A group is a single-object groupoid.

Size

  • small: $\Obj$ is a set and $\Hom(A, B)$ is a set.
  • locally small: $\Hom(A, B)$ is a set.
  • large: otherwise.

Isomorphism

An inverse of a morphism $f: A \to B$ is $f\inv: B \to A$ that $f\inv \circ f = \id_A$ and $f \circ f\inv = \id_B$.
A morphism which has an inverse is called an isomorphism.
Two objects $A$ and $B$ are isomorphic if there is an insomorphism between them, denoted by $A \cong B$.

Functor

For two categories $\cA$ and $\cB$, a functor $F: \cA \to \cB$ is a function sending $\cA$-objects to $\cB$-objects $F(A) = FA$ and $\cA$-morphisms to $\cB$-morphisms $F(A \xrightarrow{f} A’) = FA \xrightarrow{Ff} FA’$, in such a way that

  • $F$ preserves composition: $F(g \circ_\cA f) = Fg \circ_\cB Ff$. composition
  • $F$ preserves identity morphisms: $F(\id_A) = \id_{FA}$. identity

A category is a generalized monoid and a functor is a generalized monoid homomorphism.
A category is a generalized proset and a functor is a generalized monotonic function.

Forgetful functor

For ordinary categories, an essentially $k$-surjective functor $F: \cA \to \cB$ is

  1. essentially surjective: $F_\Obj$ is surjective up to isomorphism.
  2. full: $F_{\Hom(A, A’)}$ is surjective.
  3. faithful: $F_{\Hom(A, A’)}$ is injective.
  4. essentially $k$-surjective for all $k \geq 3$.

Then, a forgetful functor is defined as follows:

  • ($k \geq 0$) a fully faithful and essentially surjective functor forgets nothing.
  • ($k \geq 1$) a fully faithful functor forgets only properties.
  • ($k \geq 2$) a faithful functor forgets at most structure.
  • ($k \geq 3$) a functor may forget everything.

A fully faithful and essentially surjective functor realizes an equivalence of categories.

Natural Transformation

For functors $F, G: \cA \to \cB$, a natural transformation $\tau$ from $F$ to $G$ is a collection of $\cB$-morphisms indexed by $\cA$-objects $\tau_A: FA \to GA$ in such a way that the following diagram commutes:

natural transformation