A category consists of a collection of things and binary relationships (or transitions) between them, such that these relationships can be combined and include the “identity” relationship “is the same as.”
A category is a quiver (a directed graph with multiple edges) with a rule saying how to compose two edges that fit together to get a new edge. Furthermore, each vertex has an edge starting and ending at that vertex, which acts as an identity for this composition.
A category is a combinatorial model for a directed space – a “directed homotopy 1-type” in some sense. It has “points”, called objects, and also directed “paths”, or “processes” connecting these points, called morphisms. There is a rule for how to compose paths; and for each object there is an identity path that starts and ends there.
More precisely, a category consists of a collections of objects and a collection of morphisms. Every morphism has a source object and a target object. If is a morphism with as its source and as its target, we write
and we say that is a morphism from to . In a category, we can compose a morphism and a morphism to get a morphism . Composition is associative and satisfies the left and right unit laws.
The example to keep in mind is the category Set, in which the objects are sets and a morphism is a function from the set to the set . Here composition is the usual composition of functions.
For more background on and context for categories see
There are two broad ways to write down the definition of category; in the usual foundations of mathematics, these two definitions are equivalent. It is good to know both, for several reasons:
A category consists of
a collection of morphisms (or arrows);
a function which assigns to each object a morphism or , the identity morphism on ;
such that the following properties are satisfied:
People also often write instead of as a short way to indicate that is an object of . Also, some people write and instead of and . One usually writes if to state that and . Finally, people often write , , or for the collection of morphisms .
A category consists of
for each pair of objects, a collection of morphisms from to ;
such that the following properties are satisfied:
People also often write instead of as a short way to indicate that is an object of . Also, some people write instead of and , , or instead of . One usually writes to state that . Finally, people often write or for the disjoint union .
We said a category has a ‘collection’ of objects and ‘collection’(s) of morphisms. A category is said to be small if these collections are all sets — as opposed to proper classes, for example. (The alternatives depend on ones foundations for mathematics.)
Similarly, a category is locally small if is a set for every pair of objects in that category. The most common motivating examples of categories are all locally small but not small (unless one restricts their objects in some way).
For some purposes it is useful or necessary to vary the way the ordinary definition of category is expressed. See
single-sorted definition of a category – a variant of the first definition, with only one collection at all (, no ). This is sometimes convenient for technical reasons.
The first definition, with a single collection of morphisms, generalises to the notion of internal category; essentially, we define a category internal to (some other category) as above, with ‘collection’ interpreted as an object of and ‘function’ interpreted as a morphism of . In particular, a category internal to Set is the same thing as a small category.
A category is equivalently
hence a directed homotopy type which is “1-truncated”;
The definition, of a category as a family of collections of morphisms, generalises to the notion of enriched category: we define a category enriched over (some other category) as above, with the collection of objects still a ‘collection’ as before, but with objects of in place of the collections of morphisms and morphisms of in place of the various functions. In particular, a category enriched over Set is the same thing as a locally small category.
There is a rather obvious generalization of the notion of catgeory where one allows a morphism to go from several objects to a single object. This is called a multicategory or operad. See also polycategory and PROP.
There is the beginning of a database of categories listing well-known categories (with links to articles on these categories, if such articles exist) and some of their properties.
The classic example of a category is Set, the category with sets as objects and functions as morphisms, and the usual composition of functions as composition. Here are some other famous examples, which arise as variations on this theme:
Note that in all these cases the morphisms are actually special sorts of functions. these are concrete categories. That need not be the case in general!
These classic examples are the original motivation for the term “category”: all of the above categories encapsulate one “kind of mathematical structure”. These are often called “concrete” categories (that term also has a technical definition that these examples all satisfy). But just as widespread in applications as these categorization examples of categories are are other categories (often “small” ones) which, roughly, model something like states and processes of some system.
Poset A poset can be thought of as a category with its elements as objects and one morphism in each if is less than or equal to , but none otherwise.
Group A group is just a category where there’s one object and all the morphisms have inverses - we call the morphisms “elements” of the group. This may seem weird, but it’s actually a very useful viewpoint. Here’s another way to say it: A group is a groupoid with a single object.
Quiver A quiver may be identified with the free category on its directed graph. Given a directed graph with collection of vertices and collection of edges , there is the free category on the graph whose collection of objects coincides with the collection of vertices, and whose collection of morphisms consists of finite sequences of edges in that fit together head-to-tail. The composition operation in this free category is the concatenation of sequences of edges.
Universal structure A category bearing a structure making it initial (or 2-initial) in some doctrine. Examples include the permutation category as the free symmetric monoidal category generated by a single object, or the simplex category which is initial among monoidal categories equipped with a monoid.
A homomorphism between categories is a functor.
This way small categories themselves form a category, the category Cat whose objects are small categories and whose morphisms are functors. This naturally enhances to a 2-category whose 2-morphisms are natural transformations between functors.
Weaker than the notion of a pair of functors exhibiting an equivalence is the notion of a pair of adjoint functors.
Other standard operations on categories include
(See also the references at category theory.)
The concept originates in
The standard textbook is
Jaap van Oosten, Basic category theory.
Andrea Schalk and H. Simmons, An introduction to category theory in four easy movements, notes for a course offered as part of the MSc. in Mathematical Logic, Manchester University.
Daniele Turim, Category theory lecture notes, 1996-2001. Based on Mac Lane’s book (1998).
A. Martini, H. Ehrig, and D. Nunes, Elements of basic category theory, Technical Report 96-5, Technical University Berlin.
For more references see category theory.