Functor

Let C and D be categories.
A (covariant) functor F:C→D consists of:

  1. Identity preservationF(idX)=idF(X).
  2. Composition preservation
    For all morphisms f:X→Y and g:Y→Z,F(g∘f)=F(g)∘F(f).

Thus, functors preserve identities and composition.

The category of (small) categories.
Categories themselves form a category, commonly denoted Cat:

An important relationship between functors is adjunction.

Related: natural transformation.