You are viewing revision 1.0.0, last edited by
Mark ChimesA category consists of a
collection of objects with morphisms between them. A morphism f goes from one object, say X, to another, say Y, and is drawn as an arrow from X to Y. Note that X may equal Y (in which case f is referred to as an endomorphism). The object X is called the source or domain of f and Y is called the target or codomain of f. This is written as f:X→Y.
These morphisms must satisfy three conditions:
- Composition: For any two morphisms f:X→Y and g:Y→Z, there exists a morphism X→Z, written as g∘f or simply gf.
- Associativity: For any morphisms f:X→Y, g:Y→Z and h:Z→W composition is associative, i.e., h(gf)=(hg)f.
- Identity: For any object X, there is a (unique) morphism, 1X:X→X which, when composed with another morphism, leaves it unchanged. I.e., given f:W→X and g:X→Y it holds that: 1Xf=f and g1X=g.