Definition
Definition
Group-like structures
TotalAssociativeIdentityDivisiblePartial magmaUnneededUnneededUnneededUnneeded
SemigroupoidUnneededRequiredUnneededUnneeded
Small categoryUnneededRequiredRequiredUnneeded
GroupoidUnneededRequiredRequiredRequired
MagmaRequiredUnneededUnneededUnneeded
QuasigroupRequiredUnneededUnneededRequired
Unital magmaRequiredUnneededRequiredUnneeded
LoopRequiredUnneededRequiredRequired
SemigroupRequiredRequiredUnneededUnneeded
Associative quasigroupRequiredRequiredUnneededRequired
MonoidRequiredRequiredRequiredUnneeded
GroupRequiredRequiredRequiredRequired
There are many equivalent definitions of a category. One commonly used definition is as follows. A category consists of
- a class of objects,
- a class of morphisms or arrows,
- a domain or source class function ,
- a codomain or target class function ,
- for every three objects , a binary operation called composition of morphisms. Here denotes the subclass of morphisms in such that and . Morphisms in this subclass are written , and the composite of and is often written as or .
such that the following axioms hold:
- the associative law: if , and then , and
- the left and right unit laws: for every object , there exists a morphism (some authors write ) called the identity morphism for , such that every morphism satisfies , and every morphism satisfies .
We write , and we say " is a morphism from to ". We write (or when there may be confusion about to which category refers) to denote the hom-class of all morphisms from to .
Some authors write the composite of morphisms in "diagrammatic order", writing (sometimes with ⨟ ) or instead of .
From these axioms, one can prove that there is exactly one identity morphism for every object. Often the map assigning each object its identity morphism is treated as an extra part of the structure of a category, namely a class function .
Some authors use a slight variant of the definition in which each object is identified with the corresponding identity morphism. This stems from the idea that the fundamental data of categories are morphisms and not objects. In fact, categories can be defined without reference to objects at all using a partial binary operation with additional properties.
- ^Barr & Wells 2005, Chapter 1
- ^Some authors write or simply instead.
- ^Fong, Brendan; Spivak, David I. (2018). "Seven Sketches in Compositionality: An Invitation to Applied Category Theory". p. 12. arXiv:1803.05316 [math.CT].