Definition of a Category (Mathematics)



By Dan Christensen


(Comments in blue)


Informally, a category is a collection of nodes (objects) connected by directed arrows (morphisms or maps) such that:


1. Every arrow has a unique source and target node.

2. Between any pair of nodes, there may any number arrows in either direction.

3. Composition of pairs of arrows are defined for arrows with compatible source and target nodes. 

4. Composition of arrows with compatible node is associative.

5. Every node x has associated with it a unique identity arrow with source and target nodes of x.


Equivalent Terminology/Notation



nodes       = objects

arrows      = morphisms or maps

arrows(x,y) = hom-class or hom-set or mor(x,y) or C(x,y)

source      = domain or dom

target      = codomain or cod

comp(x,y)   = y o x  (note reversed order of x and y)

id(x)       = 1<sub>x or id<sub>x


Note that the resemblance of equivalent terminology to that of set theory can lead to some confusion for the beginner.

In category theory, for example the domain and codomain of a morphism are not necessarily sets. They should be thought

of source and target nodes at either end of an arrow. Category theory is more like graph theory than set theory in

this respect.



Formally, the ordered 7-tuple (nodes, arrows, source, target, source, comp, id) is a category if and only

if the following axioms hold:



Define: source



source is function mapping arrows to nodes


1     ALL(a):[a e arrows => source(a) e nodes]




Define: target



target is a function mapping arrows to nodes


2     ALL(a):[a e arrows => target(a) e nodes]




Define: comp  (composition of arrows)



comp is a partial functions mapping some pairs of arrows (those with compatible source and target nodes) to other arrows


Diagrammatic ordering is used, i.e. comp(x,y) is the composition of arrow x followed by arrow y.


Also written as y o x (not reversed order of x and y).


3     ALL(a):ALL(b):[a e arrows & b e arrows => [target(a)=source(b) => comp(a,b) e arrows]]




The composition of two arrows must have source and target nodes that are compatible with those of the original arrows


4     ALL(a):ALL(b):[a e arrows & b e arrows

     => [target(a)=source(b) => source(comp(a,b))=source(a) & target(comp(a,b))=target(b)]]




Composition of arrows is associative


5     ALL(a):ALL(b):ALL(c):[a e arrows & b e arrows & c e arrows => [target(a)=source(b) & target(b)=source(c)

     => comp(comp(a,b),c)=comp(a,comp(b,c))]]




Define: id 



id is function mapping nodes to arrows


id(x) is the identity arrow associated with node x


6     ALL(a):[a e nodes => id(a) e arrows]




Identity arrows have the same source and target


7     ALL(a):[a e nodes => source(id(a))=a & target(id(a))=a]




The composition of any arrow x with an identity arrow (assuming compatible target and source nodes) is just arrow x


8     ALL(a):[a e arrows => ALL(b):[b e nodes => [source(a)=b => comp(id(b),a)=a]]]



9     ALL(a):[a e arrows => ALL(b):[b e nodes => [target(a)=b => comp(a,id(b))=a]]]




Define: arrows(a,b)



Subset of arrows with source node a and target node b


Also called the hom-class, hom-set, hom(a,b) or C(a,b)


Note the overloading of the variable arrows:


x e arrows means x is an element of the set (or class) of arrows.


x e arrows(a,b) means x is an element the set (or class) of arrows with source node a and target note b.


10    ALL(a):ALL(b):[a e nodes & b e nodes => ALL(c):[c e arrows(a,b) <=> c e arrows & source(c)=a & target(c)=b]]