The
class of all sets (as objects) together with all
functions between them (as morphisms), where the composition of morphisms is the usual
function composition, forms a large category,
Set. It is the most basic and the most commonly used category in mathematics. The category
Rel consists of all
sets (as objects) with
binary relations between them (as morphisms). Abstracting from
relations instead of functions yields
allegories, a special class of categories. Any class can be viewed as a category whose only morphisms are the identity morphisms. Such categories are called
discrete. For any given
set I, the
discrete category on I is the small category that has the elements of I as objects and only the identity morphisms as morphisms. Any
preordered set (P,\leq) forms a small category, where the objects are the members of P, the morphisms are arrows pointing from x to y when x\leq y. The existence of identity morphisms and the composability of the morphisms are guaranteed by the
reflexivity and the
transitivity of the preorder. For any two objects, there is at most one morphism from one to the other (such a category is called
thin), and if \leq is in addition
antisymmetric, there can be at most one morphism between any two objects. In particular, any
partially ordered set and any
equivalence relation can be seen as a small category. Any
ordinal number can be seen as a category when viewed as an
ordered set. Any
monoid (any
algebraic structure with a single
associative binary operation and an
identity element) forms a small category with a single object x. (Here, x is any fixed set.) The morphisms from x to x are precisely the elements of the monoid, the identity morphism of x is the identity of the monoid, and the categorical composition of morphisms is given by the monoid operation. Several definitions and theorems about monoids may be generalized for categories. Similarly any
group can be seen as a category with a single object in which every morphism is
invertible, that is, for every morphism f there is a morphism g that is both
left and right inverse to f under composition. A morphism that is invertible in this sense is called an
isomorphism. A
groupoid is a category in which every morphism is an isomorphism. Groupoids are generalizations of groups,
group actions and
equivalence relations. From the point of view of category theory, a group is just a groupoid with exactly one object. Consider a topological space X and fix a base point x_0 of X, then \pi_1(X,x_0) is the
fundamental group of the topological space X and the base point x_0, and as a set it has the structure of group; if one then lets the base point x_0 run over all points of X and takes the union of all \pi_1(X,x_0), then the resulting set has only the structure of groupoid (called the
fundamental groupoid of X): two loops (under equivalence relation of
homotopy) may not have the same base point so they cannot be multiplied with each other. In the language of category theory, this means here two morphisms may not have the same source object (or target object, because in this case for any morphism the source object and the target object are same: the base point) so they cannot compose with each other. Any
directed graph (or, more generally, a
quiver)
generates a small category: the objects are the
vertices of the graph, and the morphisms are the paths in the graph (augmented with
loops as needed) where composition of morphisms is concatenation of paths. Such a category is called the
free category generated by the graph. The class of all preordered sets with order-preserving functions (i.e., monotone-increasing functions) as morphisms forms a category,
Ord. It is a
concrete category, i.e. a category whose objects can be identified with sets with some type of additional structure, while the morphisms are functions that respect this structure. The class of all groups with
group homomorphisms as
morphisms and
function composition as the composition operation forms a large category,
Grp. Like \mathbf{Ord}, \mathbf{Grp} is a concrete category. The category
Ab, consisting of all
abelian groups and their group homomorphisms, is a
full subcategory of \mathbf{Grp}, and the prototype of an
abelian category. The class of all
graphs forms another concrete category, where morphisms are
graph homomorphisms (i.e., mappings between graphs which send vertices to vertices and edges to edges in a way that preserves all adjacency and incidence relations). Examples of concrete categories are given by the following table.
Fiber bundles with
bundle maps between them form a concrete category. The category
Cat consists of all small categories, with
functors between them as morphisms. In turn, a
functor category has as objects functors between two fixed categories and as morphisms
natural transformations between them. == Construction of new categories ==