Category Theory
2025-08-01

Contents

Introduction
Categories
Morphisms
Duality
Initial and Terminal Objects
Product and Coproduct
Functoriality

1 Introduction

Category Theory is used to understand mathematical objects via relations with each other from an external view.

1.1 Categories

Definition 11A (Category).

A category consists of

The morphisms are subject to these properties:

We say two morphisms are composible if their composition exists.

When working with only one category, we write . We also use to mean " is a morphism in ".

In category theory, we argue via diagrams instead of equations. The most common argument is to assert that a certain diagram commutes.

For instance, Equation 1 and Equation 2 can be expressed by the assertion that the diagrams

commute.

We often refer a category by its objects.

Example 11A.

is the category of sets. Each morphism is a (total) function .

Example 11B.

Every ordinal is a category.

Example 11C.

is the category of groups (where morphisms are group homomorphisms) and is the category of topological spaces (with continuous maps).

Studying the connection between these two categories leads to the notion of fundamental groups and marks the beginning of algebraic topology.

In general, it is more useful to think of a category in terms of its morphisms. Indeed, one can define a category solely in terms of morphisms, since each object corresponds to a identity morphism.

Definition 11B.

A category is said to be

1.2 Morphisms

Definition 12A (Isomorphism).

A morphism is an isomorphism (denoted ) if there exists a morphism , called an inverse isomorphism, such that

If such exists, we say and are isomorphic and denote it as .

In Proposition H, we show that such , if exists, is unique. Therefore, we denote is as .

Definition 12B (Retraction and section).

Whenever and are morphisms so that is the identity, we say is a retraction (i.e. left inverse) of , and is a section (i.e. right inverse) of .

Proposition 12A.

If is an isomorphism, then its left and right inverses are unique.

Proof.

Let be left and right inverses of . Then we have that

as wanted.

Definition 12C (Endomorphism and automorphism).
Example 12A.

todoin a concrete cat, when exactly are isomorphisms bijective? see Lemma 5.5.3

Lemma 12A.

The following are equivalent

  1. is an isomorphism.
  2. For all objects , the postcomposition with defines an isomorphism

  3. For all objects , the precomposition with defines an isomorphism

Proof.

We prove the equivalence between 1 and 2. The equivalence between 1 and 3 follows from duality.

Let be an isomorphism with inverse . Define by

and by

We have that by associativity of composition.

Conversely, there must be a morphism whose image under is . In particular, . Furthermore, by associativity of composition, and have the same image under . Thus .

2 Duality

Definition 2A (Opposite category).

Given a category , the opposite category, denoted , consists of

Proposition 2A.

If is an isomorphsim in , then is an isomorphism in .

2.1 Initial and Terminal Objects

Definition 21A (Initial object).

An initial object is an object such that for every object , there exists a unique morphism from to .

The dual notion of an initial object is a terminal object.

Definition 21B (Terminal object).

A terminal object in an object that is an initial object in . In other words, for every object , there exists a unique morphism from to .

Example 21A.
CategoryInitial objectTerminal object
The empty set Singleton sets
The empty type The unit type
Table 1: Initial and terminal objects in some categories

In general, we rarely consider objects up to equality, but rather consider them up to isomorphism. In this sense, a category only has one initial and one terminal object.

Proposition 21A.

Initial objects are unique up to (unique) isomorphism.

Proof.

Let be initial objects and be the unique morphisms. Thus and . Furthermore, such isomorphism is unique since is a terminal object.

Proposition 21B.

Terminal objects are unique up to (unique) isomorphism.

Proof.

By duality.

Definition 21C (Zero object and pointed category).

A zero object, denoted , is an object that is both initial and terminal. A category with a zero object is said to be pointed.

Proposition 21C.

Let be a pointed category. For any object in , is a zero object iff the only endomorphism of is .

Proof.

follows from definition. We will prove .

Let be a zero object in , we show that its isomorphic to . Let and unique morphisms. First, we have that is the identity because . Then, is the identity because by assumption.

2.2 Product and Coproduct

Definition 22A (Product).

The product of objects and consists of

such that for any object and morphisms and , there exists a unique morphism for which the diagram

commutes.

Again, the dual of products are coproducts.

Definition 22B (Coproduct).

The coproduct of objects and consists of

such that for any object , there exists a unique morphism for which the diagram

commutes.

Remark 22A (Universal property).

As seen from the definition of initial/terminal objects and (co)products, constructions in category theory usually involves (1) the data, and (2) a universal property. In general, a univeral property characterises the result of an construction up to isomorphism.

Proposition 22A.

Products (and coproducts) are unique up to (unique) isomorphism.

Proof.

Given products and of objects and . By the universal property, there exists unique and such that

commutes; and by composing and , so does the diagram

Since the diagram above would still commute if we replace with , we have that by uniqueness. A similar argument shows that .

Example 22A.

In , the product is a cartesian product defined as

where can be defined as . The coproduct of and is the disjoint union

The following proposition gives a construction for using morphisms and .

Proposition 22B.

Given morphisms and , there exists a unique morphism such that

commutes.

Similarly, given and , we can construct .

Proposition 22C.

Given morphisms and , there exists a unique morphism such that

commutes.

In Haskell, corresponds to ; and corresponds to in .

A final remark on products (and coproducts) is that products can be viewed as terminal objects.

Remark 22B.

For objects and in category , consider the category where

Lemma 22A.

Given objects and , the following are equivalent:

  1. is the product of and .
  2. is the terminal object in
  3. For all , there is an isomorphism

natural in .

3 Functoriality

Definition 3A (Functor).

Given categories and , a functor from to , denoted , consists of the following data:

A functor must perserve identity and composition: for any object with composible morphisms and

Proposition 3A.

If is an isomophism, then so is .

For any category , there is an identity functor. For any functors and , we can construct a composite functor . This alludes to the following category:

Definition 3B (Cat).

The category of small categories, denoted , is the category where

Example 3A.

The empty category is the initial object of . The category is its termal object.