This page is about the concept in mathematics. For the concept of the same name in philosophy see at category (philosophy).
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 collection 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.
A good 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:
Each introduces its own system of notation, both of which are useful in other parts of category theory, so one should know them.
One definition generalises quite nicely to the notion of internal category, while the other generalises quite nicely to the notion of enriched category; these are both important concepts.
When examining alternative foundations, sometimes one definition or the other may be more appropriate; in any case, one will want to examine the question of their equivalence.
The two definitions may be distinguished by whether they use a single collection of all morphisms or several collections of morphisms, a family of collections indexed by pairs of objects.
[Grothendieck 61, Section 4]
A category consists of
a collection (see Foundational issues and Size issues) of objects;
a collection of morphisms (or arrows);
for every morphism , an object (called its source or domain), and an object (called its target or codomain);
for every pair of morphisms and , where , a morphism , called their composite (also written or sometimes — see diagrammatic order);
for every object , a morphism (or ), called the identity morphism on ;
such that the following properties are satisfied:
source and target are respected by composition: and ;
source and target are respected by identities: and ;
composition is associative: whenever and ;
composition satisfies the left and right unit laws: if and , then .
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 .
If the identity-assigning map and its axiom is omitted, then one speaks of a semicategory.
A category consists of
a collection (see Foundational issues and Size issues) of objects;
for each pair of objects, a collection of morphisms from to ;
for each pair of morphisms in and in , a morphism in , called their composite (also written or sometimes — see diagrammatic order);
for each object , a morphism (or ) in , called the identity morphism on ;
such that the following properties are satisfied:
composition is associative: for each quadruple of objects, if , , and , then ;
composition satisfies the left and right unit laws: for each pair of objects, if , then .
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 .
Given a one-collection-of-morphisms category , we define a family-of-collections-of-morphisms category by taking to be the preimage of under the function . Conversely, given a family-of-collections-of-morphisms category we define a one-collection-of-morphisms category by taking to be the disjoint union of the families of morphisms . With the straightforward definitions of functor and natural transformation in both cases, this sets up a strict 2-equivalence? of 2-categories.
Note, though, that this 2-equivalence is not an isomorphism of 2-categories, because the disjoint union operation has to “tag” each morphism with its domain and codomain. It seems that the strongest thing that can be said is that, in a material set theory, if a family-of-collections-of-morphisms category has the property that sets are all disjoint, then there is a one-collection-of-morphisms category with (the non-disjoint union) that gives rise to on the nose. The notion of protocategory is a way to formalize a family-of-collections-of-morphisms category together with the information about how its hom-sets “overlap”.
In ordinary category theory one rarely specifies which of the two definitions is being used, although often language implicitly suggests that it is the latter, e.g. when defining a category one first specifies the objects and then specifies what “the morphisms from to are” rather than specifying what “a morphism” is and then what the domain and codomain of each morphism are. Indeed, when defining a category in this way, one rarely worries about whether the hom-sets are disjoint, meaning that it must be the second definition in use. Even for the prototypical category Set, if constructed in a material-set-theoretic foundation like ZFC, the natural definition “a morphism from to is a function, i.e. a subset of that is total and functional”, produces hom-sets that are not disjoint, since a total and functional set of ordered pairs can have any codomain that is a superset of its range. Moreover, categorical constructions do not “naturally” preserve disjointness of homsets, e.g. in the category of elements of a functor a given morphism in can “be” a morphism between many different elements of , and similarly for a slice category and so on.
We said a category has a ‘collection’ of objects and ‘collection’(s) of morphisms. However, different mathematical foundations have different notions of equality. For foundations whose notion of ‘collection’ have proposition-valued equality, such as in set theory, class-set theory, or extensional type theory, the two definitions above suffice for defining a category. However, in for other foundations, with a weaker notion of equality, such as internally in a (2,1)-topos like Grpd, in Thomas Streicher‘s groupoid model of types, or in homotopy type theory, there are multiple definitions of a category. The naive definition of the category above with a collection of objects and a collection of morphisms results in a wild category. If the morphism collections are sets, then the resulting structure is a precategory, and if the collection of objects is a set as well, then the resulting structure is a strict category. The above definitions in set theory foundations are the same as strict categories in the alternative foundations, but in the alternative foundations categories like Set are not strict categories. Instead, they happen to be a special kind of precategory called univalent categories, where equality of objects is isomorphism of objects.
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 (such as Set) 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.
type-theoretic definition of category– a variant of the second definition, interpreted explicitly in dependent type theory.
protocategory– a sort of mixture of the two definitions, in which all the hom-sets are subsets of a single set , but not necessarily disjoint.
A category is equivalently
a monad in the 2-category of spans of sets;
a monoid in the monoidal category of endospans on the set of objects;
a simplicial set which satisfies the Segal conditions;
a simplicial set which satisfies the weak Kan complex conditions strictly:
hence a directed homotopy type which is “1-truncated”
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.
The second 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.
The notion of indexed category captures the idea of woking “over a base” other than Set.
There is a generalization of the notion of category where one allows a morphism to go from several objects to a single object. This is called a multicategory or operad. If we additionally allow a morphism to go to several objects, we obtain a polycategory or 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:
Vect - vector spaces as objects, linear maps as morphisms.
Top - topological spaces as objects, continuous functions as morphisms.
Diff - smooth manifolds as objects, smooth maps as morphisms.
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.
Monoid More generally, a monoid is a category with a single object. In fact, this is one way to motivate the concept of categories: categories are the many object version of monoids.
Groupoid A groupoid is a category in which all morphisms are isomorphisms.
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.
An equivalence of categories is an equivalence in Cat, hence a pair of functors going back and forth, that are each others inverse up to natural isomorphism.
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
category
(For more extensive references see at category theory.)
The concept originates in
The definition “with a single set of morphisms” (i.e. as internal categories in Set) appears in:
Textbook accounts:
Saunders MacLane, Categories for the Working Mathematician, Graduate Texts in Mathematics 5, Springer (1971, second ed. 1997) [doi:10.1007/978-1-4757-4721-8]
Francis Borceux, Handbook of Categorical Algebra, Encyclopedia of Mathematics and its Applications 50, Cambridge University Press (1994)
Roy L. Crole, Categories for types, Cambridge University Press (1994) [doi:10.1017/CBO9781139172707]
Expositions:
A. Martini, H. Ehrig, and D. Nunes, Elements of basic category theory, Technical Report 96-5, Technical University Berlin.
Jaap van Oosten, Basic category theory.
Paolo Perrone, Notes on Category Theory with examples from basic mathematics. (arXiv)
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 textbook that introduces categories by examples arising in mathematical physics is
A textbook with an eye towards the theory of categories of sheaves and their application in homological algebra is
The definition of categories in the foundations of homotopy type theory (see at internal category in homotopy type theory) is discussed in
Benedikt Ahrens, Chris Kapulkin, Michael Shulman, Univalent categories and the Rezk completion, Mathematical Structures in Computer Science 25.5 (2015): 1010-1039 (arXiv:1303.0584)
Paolo Capriotti, Nicolai Kraus, Univalent Higher Categories via Complete Semi-Segal Types (arXiv:1707.03693)
Jason Gross, Adam Chlipala, David Spivak, Experience Implementing a Performant Category-Theory Library in Coq (arXiv:1401.7694)
For more references see category theory.
Last revised on November 18, 2023 at 05:01:27. See the history of this page for a list of all contributions to it.