Category theory is also used in a foundational way in functional programming, for example to discuss the idea of typed lambda calculus in terms of cartesianclosed categories.
A category attempts to capture the essence of a class of related mathematical objects, for instance the class of groups. Instead of focusing on the individual objects (groups) as has been done traditionally, the morphisms, i.e. the structure preserving maps between these objects, are emphasized. In the example of groups, these are the group homomorphisms. Then it becomes possible to relate different categories by functors, generalizations of functions which associate to every object of one category an object of another category and to every morphism in the first category a morphism in the second. Very commonly, certain "natural constructions", such as the fundamental group, can be expressed as functors. Furthermore, different such constructions are often "naturally related" which leads to the concept of natural transformation, a way to "map" one functor to another.

A category consists of:
such that the following axioms hold:
From these axioms, one can prove that there is exactly one identity morphism for every object.
If the class of objects is actually a set, the category is said to be small. Many important categories are not small.
Each category is presented in terms of its objects and its morphisms.
A morphism f : A > B is called a
Functors are structurepreserving maps between categories.
A (covariant) functor F between categories C and D
A contravariant functor F between categories C and D is a functor that "turns morphisms around"; the quickest way to define it is as a covariant funtor between C^{op} and D.
Dual vectorspace: an example of a contravariant functor from the category of all real vector spaces to the category of all real vector spaces is given by assigning to every vector space its dual space and to every linear map its dual or transpose.
Algebra of continuous functions: a contravariant functor from the category of topological spaces (with continuous maps as morphisms) to the category of real associative algebras is given by assigning to every topological space X the algebra C(X) of all realvalued continuous functions on that space. Every continuous map f : X > Y induces an algebra homomorphism C(f) : C(Y) > C(X) by the rule C(f)(φ) = φ o f for every φ in C(Y).
Homomorphism groups: to every pair A, B of abelian groups and can assign the abelian group Hom(A,B) consisting of all group homomorphisms from A to B. This is a functor which is contravariant in the first and covariant in the second argument, i.e. it is a functor Ab^{op} x Ab > Ab (where Ab denotes the category of abelian groups with group homomorphisms). If f : A_{1} > A_{2} and g : B_{1} > B_{2} are morphisms in Ab, then the group homomorphism Hom(f,g) : Hom(A_{2},B_{1}) > Hom(A_{1},B_{2}) is given by φ > g o φ o f.
Forgetful functors: the functor F : Ring > Ab which maps a ring to its underlying abelian additive group. Morphisms in Ring (ring homomorphisms) become morphisms in Ab (abelian group homomorphisms).
Tensor products: If C denotes the category of vectorspaces over a fixed field, with linear maps as morphisms, then the tensor product V
Lie algebras: Assigning to every real (complex) Lie group its real (complex) Lie algebra defines a functor.
Fundamental group: Consider the category of topological spaces. The morphisms in this category are the continuous maps. There is also the category of groups, with group homomorphisms as morphisms. Given a topological space X and a distinguished point x in X, we can create a group. Let f be a continuous function from the unit interval [0,1] into X so that f(0) = f(1) = x. (Equivalently, f is a continuous map from the unit circle in the complex plane so that f(1) = x.) We call such a function a loop in X. If f and g are loops in X, we can glue them together by defining h(t) = f(2t) when t is in [0,0.5] and h(t) = g(2(t  0.5)) when t is in [0.5,1]. It is easy to check that h is again a loop. If there is a continuous map F(x,t) from [0,1] × [0,1] to X so that f(t) = F(0,t) is a loop and g(t) = F(1,t) is also a loop then f and g are said to be equivalent. It can be checked that this defines an equivalence relation. Our composition rule survives this process. Now, in addition, we can see that we have an identity element e(t) = x (a constant map) and further that every loop has an inverse. Indeed, if f(t) is a loop then f(1  t) is its inverse. The set of equivalence classes of loops thus forms a group (the fundamental group of X). One may check that the map from the category of Hausdorff topological spaces with a distinguished point to the category of groups is functorial: a topological (homo/iso)morphism will naturally correspond to a group (homo/iso)morphism.
Universal constructions: Functors are often defined by universal properties; examples are the tensor product discussed above, the direct sum and direct product of groups or vector spaces, construction of free groups and modules, direct and inverse limits. The concepts of limit and colimit generalize several of the above. Universal constructions often give rise to pairs of adjoint functors.
PreSheaves: If X is a topological space, then the open sets in X can be considered as the objects of a category C_{}X; there is a morphism from U to V if and only if U is a subset of V. In itself, this category is not very exciting, but the functors from C_{}X^{op} into other categories, the socalled presheaves on X, are interesting. For instance, by assigning to every open set U the associative algebra of realvalued continuous functions on U, one obtains a presheaf of algebras on X.
This motivating example of sheaves is generalized by considering presheaves on arbitrary categories: a presheaf on C is a functor defined on C^{op}. The Yoneda lemma explains that often a category C can be extended by considering a category of presheaves on C.
Category of small categories: The category Cat has the small categories as objects, and the functors between them as morphisms.
A natural transformation is a relation between two functors. Functors often describe "natural constructions" and natural transformations often describe "natural homomorphisms" between two such constructions.
If F and G are (covariant) functors between the categories C and D, then a natural transformation from F to G associates to every object X in C a morphism η_{X} : F(X) > G(X) in D such that for every morphism f : X > Y in C we have η_{Y} o F(f) = G(f) o η_{X}.
The two functors F and G are called naturally isomorphic if there exists a natural transformation from F to G such that η_{X} is an isomorphism for every object X in C.
If K is a field, then for every vector space V over K we have a "natural" injective linear map V > V^{**} from the vector space into its double dual. These maps are "natural" in the following sense: the double dual operation is a functor, and the maps form a natural transformation from the identity functor to the double dual functor.
Consider the category Ab of abelian groups and group homomorphisms. For all abelian groups X, Y and Z we have a group isomorphism
These isomorphisms are "natural" in the sense that they define a natural transformation between the two involved functors Ab^{op} x Ab^{op} x Ab > Ab.
If X is an object of the category C, then the assignment Y > Mor_{C}(X, Y) defines a covariant functor F_{X} : C > Set. This functor is called representable. The natural transformations from a representable functor to an arbitrary functor F : C > Set are completely known and easy to describe; this is the content of the Yoneda lemma.
If C is any category and I is a small category, we can form the functor category C^{I} having as objects all functors from I to C and as morphisms the natural transformations between those functors. This is especially useful if I arises from a directed graph. For instance, if I is the category of the directed graph * > *, then C^{I} has as objects the morphisms of C, and a morphism between φ : U > V and ψ : X > Y in C^{I} is a pair of morphisms f : U > X and g : V > Y in C such that the "square commutes", i.e. ψ f = g φ.
Intuitively, two equivalent categories cannot be distinguished from the standpoint of category theory.
One of the central themes of algebraic geometry is the equivalence of the category C of affine schemes and the category D of commutative rings. This is in fact a contravariant equivalence or duality, meaning that the two functor F and G are contravariant functors. The functor G associates to every commutative ring its spectrum, the scheme defined by the prime ideals of the ring. The functor F associates to every scheme its ring of global sections.
Another important duality occurs in functional analysis: the category of commutative C*algebras with identity is contravariantly equivalent to the category of compact Hausdorff spaces. Under this duality, every compact Hausdorff space X is associated with the algebra of continuous complexvalued function on X, and every commutative C*algebra is associated with the space of its maximal ideals. This is the Gelfand representation[?].
Categories, functors and natural transformations were introduced by Eilenberg and MacLane in 1945. Initially, the notions were applied in topology, especially algebraic topology, later also in homological algebra and algebraic geometry.
Search Encyclopedia
