A collection of objects A, together with a related set of morphismsM. An object is a generalization of a set and a morphism is a generalization of a function that maps between sets.
The set M is the disjoint union of sets of the form [A,B], where A and B are elements of A; if α is a member of [A,B], A is the domain of α, B is the codomain of α, and α is said to be a morphism from A to B. For each triple (A,B,C) of elements of A there is a dyadic operation ° from the Cartesian product[B,C] × [A,B]to [A,C]. The image β°α of the ordered pair (β,α) is the composition of β with α; the composition operation is associative. In addition, when the composition is defined there is an identity morphism for each A in A.
[B,C] × [A,B]
Examples of categories include the set of groups and homomorphisms on groups, and the set of rings and homomorphisms on rings. See functor.