Category (mathematics)

Written by Mark Chimes, Patrick Stevens last updated

A category consists of a collection of objects with morphisms between them. A morphism goes from one object, say , to another, say , and is drawn as an arrow from to . Note that may equal (in which case is referred to as an endomorphism). The object is called the source or domain of and is called the target or codomain of , though note that itself need not be a function and and need not be sets. This is written as .

These morphisms must satisfy three conditions:

  1. Composition: For any two morphisms and , there exists a morphism , written as or simply .
  2. Associativity: For any morphisms , and composition is associative, i.e., .
  3. Identity: For any object , there is a (unique) morphism, which, when composed with another morphism, leaves it unchanged. I.e., given and it holds that: and .