Informally, a category can be thought of as a kind of directed graph -- a collection of nodes connected by arrows. Each arrow has a source and target node. An ordered pair of arrows with compatible sources and targets can be composed (placed head-to-tail) to obtain another arrow (like the addition of vectors).
Using the imagery of a directed graph, we can define a category as a logical structure that satisfies the following axioms (in my DC Proof notation):
1. ALL(f):[f @ arrows => source(f) @ nodes]
where: @ = epsilon (set/class membership) arrows is a class nodes is a class source(f) is the source node for arrow f
2. ALL(f):[f @ arrows => target(f) @ nodes]
where: target(f) is the target node of arrow f
3. ALL(f):ALL(g):[f @ arrows & g @ arrows => [target(f)=source(g) => comp(f,g) @ arrows]] where: comp(f,g) is the composition of arrow f followed by and arrow g
Note the order of arguments. They are reversed from the usual, less intuitive presentation.
The source and target of the composition of two arrows must be compatible with the the targets and sources of those two arrows.
5. ALL(f):ALL(g):ALL(h):[f @ arrows & g @ arrows & h @ arrows => [target(f)=source(g) & target(g)=source(h) => comp(comp(f,g),h)=comp(f,comp(g,h))]]
The composition of arrows is associative.
6, ALL(a):ALL(b):[a @ nodes & b @ nodes => ALL(f):[f @ arrows(a,b) <=> f @ arrows & source(f)=a & target(f)=b]] where: arrows(a,b) is the class of arrows with source a and target b
Although this construction is not referred to by other axioms here, traditionally, it is part of the definition of a category. It may be referred to in other definitions and theorems of category theory.