Definition
A category
is the following data:
- A collection
of objects.
- For any objects
, a collection
of morphisms. Every element in
is termed a morphism from
(i.e., with source or domain
) to
(i.e., with target or co-domain
). The morphism sets for different pairs of objects are disjoint. Note that
is also written as
.
- For every object
, a distinguished morphism
.
- For
, a map, called composition of morphisms, from
to
. This map is denoted by
.
satisfying the following compatibility conditions:
- For
, with
, we have
.
- For
, with
, we have
.
The collections of objects and morphisms need not be sets. If the collection of objects is a set, and the collection of morphisms between any two objects is a set, the category is termed a small category. If the collection of morphisms between any two objects is a set, the category is termed a locally small category.