A functor is a function that maps objects and arrows between two categories preserving structure.

Given , : Cat, A functor is a pair of maps:

  • Such that:
  • In words, preserves domain, codomain and composition. Preserving identity follows from this.

An endofunctor is just a functor where the domain equals the codomian.

Remarks

Not all images of a functor are a category. See Image of a Functor.