Functor
   HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, specifically
category theory Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
, a functor is a mapping between categories. Functors were first considered in
algebraic topology Algebraic topology is a branch of mathematics that uses tools from abstract algebra to study topological spaces. The basic goal is to find algebraic invariant (mathematics), invariants that classification theorem, classify topological spaces up t ...
, where algebraic objects (such as the fundamental group) are associated to
topological space In mathematics, a topological space is, roughly speaking, a Geometry, geometrical space in which Closeness (mathematics), closeness is defined but cannot necessarily be measured by a numeric Distance (mathematics), distance. More specifically, a to ...
s, and maps between these algebraic objects are associated to continuous maps between spaces. Nowadays, functors are used throughout modern mathematics to relate various categories. Thus, functors are important in all areas within mathematics to which
category theory Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
is applied. The words ''category'' and ''functor'' were borrowed by mathematicians from the philosophers
Aristotle Aristotle (; 384–322 BC) was an Ancient Greek philosophy, Ancient Greek philosopher and polymath. His writings cover a broad range of subjects spanning the natural sciences, philosophy, linguistics, economics, politics, psychology, a ...
and
Rudolf Carnap Rudolf Carnap (; ; 18 May 1891 – 14 September 1970) was a German-language philosopher who was active in Europe before 1935 and in the United States thereafter. He was a major member of the Vienna Circle and an advocate of logical positivism. ...
, respectively. The latter used ''functor'' in a
linguistic Linguistics is the scientific study of language. The areas of linguistic analysis are syntax (rules governing the structure of sentences), semantics (meaning), Morphology (linguistics), morphology (structure of words), phonetics (speech sounds ...
context; see function word.


Definition

Let ''C'' and ''D'' be categories. A functor ''F'' from ''C'' to ''D'' is a mapping that * associates each object X in ''C'' to an object F(X) in ''D'', * associates each morphism f \colon X \to Y in ''C'' to a morphism F(f) \colon F(X) \to F(Y) in ''D'' such that the following two conditions hold: ** F(\mathrm_) = \mathrm_\,\! for every object X in ''C'', ** F(g \circ f) = F(g) \circ F(f) for all morphisms f \colon X \to Y\,\! and g \colon Y\to Z in ''C''. That is, functors must preserve identity morphisms and composition of morphisms.


Covariance and contravariance

There are many constructions in mathematics that would be functors but for the fact that they "turn morphisms around" and "reverse composition". We then define a contravariant functor ''F'' from ''C'' to ''D'' as a mapping that *associates each object X in ''C'' with an object F(X) in ''D'', *associates each morphism f \colon X\to Y in ''C'' with a morphism F(f) \colon F(Y) \to F(X) in ''D'' such that the following two conditions hold: **F(\mathrm_X) = \mathrm_\,\! for every object X in ''C'', **F(g \circ f) = F(f) \circ F(g) for all morphisms f \colon X\to Y and g \colon Y\to Z in ''C''. Variance of functor (composite) *The composite of two functors of the same variance: **\mathrm \circ \mathrm \to \mathrm **\mathrm \circ \mathrm \to \mathrm *The composite of two functors of opposite variance: **\mathrm \circ \mathrm \to \mathrm **\mathrm \circ \mathrm \to \mathrm Note that contravariant functors reverse the direction of composition. Ordinary functors are also called covariant functors in order to distinguish them from contravariant ones. Note that one can also define a contravariant functor as a ''covariant'' functor on the opposite category C^\mathrm. Some authors prefer to write all expressions covariantly. That is, instead of saying F \colon C\to D is a contravariant functor, they simply write F \colon C^ \to D (or sometimes F \colon C \to D^) and call it a functor. Contravariant functors are also occasionally called ''cofunctors''. There is a convention which refers to "vectors"—i.e., vector fields, elements of the space of sections \Gamma(TM) of a
tangent bundle A tangent bundle is the collection of all of the tangent spaces for all points on a manifold, structured in a way that it forms a new manifold itself. Formally, in differential geometry, the tangent bundle of a differentiable manifold M is ...
TM—as "contravariant" and to "covectors"—i.e., 1-forms, elements of the space of sections \Gamma\mathord\left(T^*M\right) of a cotangent bundle T^*M—as "covariant". This terminology originates in physics, and its rationale has to do with the position of the indices ("upstairs" and "downstairs") in expressions such as ^ = \Lambda^i_j x^j for \mathbf' = \boldsymbol\mathbf or \omega'_i = \Lambda^j_i \omega_j for \boldsymbol' = \boldsymbol\boldsymbol^\textsf. In this formalism it is observed that the coordinate transformation symbol \Lambda^j_i (representing the matrix \boldsymbol^\textsf) acts on the "covector coordinates" "in the same way" as on the basis vectors: \mathbf_i = \Lambda^j_i\mathbf_j—whereas it acts "in the opposite way" on the "vector coordinates" (but "in the same way" as on the basis covectors: \mathbf^i = \Lambda^i_j \mathbf^j). This terminology is contrary to the one used in category theory because it is the covectors that have ''pullbacks'' in general and are thus ''contravariant'', whereas vectors in general are ''covariant'' since they can be ''pushed forward''. See also Covariance and contravariance of vectors.


Opposite functor

Every functor F \colon C\to D induces the opposite functor F^\mathrm \colon C^\mathrm\to D^\mathrm, where C^\mathrm and D^\mathrm are the opposite categories to C and D. By definition, F^\mathrm maps objects and morphisms in the identical way as does F. Since C^\mathrm does not coincide with C as a category, and similarly for D, F^\mathrm is distinguished from F. For example, when composing F \colon C_0\to C_1 with G \colon C_1^\mathrm\to C_2, one should use either G\circ F^\mathrm or G^\mathrm\circ F. Note that, following the property of opposite category, \left(F^\mathrm\right)^\mathrm = F.


Bifunctors and multifunctors

A bifunctor (also known as a binary functor) is a functor whose domain is a product category. For example, the
Hom functor In mathematics, specifically in category theory, hom-sets (i.e. sets of morphisms between object (category theory), objects) give rise to important functors to the category of sets. These functors are called hom-functors and have numerous applicati ...
is of the type . It can be seen as a functor in ''two'' arguments; it is contravariant in one argument, covariant in the other. A multifunctor is a generalization of the functor concept to ''n'' variables. So, for example, a bifunctor is a multifunctor with .


Properties

Two important consequences of the functor
axiom An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word (), meaning 'that which is thought worthy or ...
s are: * ''F'' transforms each commutative diagram in ''C'' into a commutative diagram in ''D''; * if ''f'' is an
isomorphism In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
in ''C'', then ''F''(''f'') is an isomorphism in ''D''. One can compose functors, i.e. if ''F'' is a functor from ''A'' to ''B'' and ''G'' is a functor from ''B'' to ''C'' then one can form the composite functor from ''A'' to ''C''. Composition of functors is associative where defined. Identity of composition of functors is the identity functor. This shows that functors can be considered as morphisms in categories of categories, for example in the
category of small categories In mathematics, specifically in category theory, the category of small categories, denoted by Cat, is the category whose objects are all small categories and whose morphisms are functors between categories. Cat may actually be regarded as a 2-c ...
. A small category with a single object is the same thing as a monoid: the morphisms of a one-object category can be thought of as elements of the monoid, and composition in the category is thought of as the monoid operation. Functors between one-object categories correspond to monoid homomorphisms. So in a sense, functors between arbitrary categories are a kind of generalization of monoid homomorphisms to categories with more than one object.


Examples

;
Diagram A diagram is a symbolic Depiction, representation of information using Visualization (graphics), visualization techniques. Diagrams have been used since prehistoric times on Cave painting, walls of caves, but became more prevalent during the Age o ...
: For categories ''C'' and ''J'', a diagram of type ''J'' in ''C'' is a covariant functor D \colon J\to C. ; (Category theoretical) presheaf:For categories ''C'' and ''J'', a ''J''-presheaf on ''C'' is a contravariant functor D \colon C\to J.In the special case when J is Set, the category of sets and functions, ''D'' is called a presheaf on ''C''. ; Presheaves (over a topological space): If ''X'' is a
topological space In mathematics, a topological space is, roughly speaking, a Geometry, geometrical space in which Closeness (mathematics), closeness is defined but cannot necessarily be measured by a numeric Distance (mathematics), distance. More specifically, a to ...
, then the
open set In mathematics, an open set is a generalization of an Interval (mathematics)#Definitions_and_terminology, open interval in the real line. In a metric space (a Set (mathematics), set with a metric (mathematics), distance defined between every two ...
s in ''X'' form a partially ordered set Open(''X'') under inclusion. Like every partially ordered set, Open(''X'') forms a small category by adding a single arrow if and only if U \subseteq V. Contravariant functors on Open(''X'') are called '' presheaves'' on ''X''. For instance, by assigning to every open set ''U'' the associative algebra of real-valued continuous functions on ''U'', one obtains a presheaf of algebras on ''X''. ; Constant functor: The functor which maps every object of ''C'' to a fixed object ''X'' in ''D'' and every morphism in ''C'' to the identity morphism on ''X''. Such a functor is called a ''constant'' or ''selection'' functor. ; : A functor that maps a category to that same category; e.g., polynomial functor. ; : In category ''C'', written 1''C'' or id''C'', maps an object to itself and a morphism to itself. The identity functor is an endofunctor. ; Diagonal functor: The diagonal functor is defined as the functor from ''D'' to the functor category ''D''''C'' which sends each object in ''D'' to the constant functor at that object. ; Limit functor: For a fixed index category ''J'', if every functor has a limit (for instance if ''C'' is complete), then the limit functor assigns to each functor its limit. The existence of this functor can be proved by realizing that it is the right-adjoint to the diagonal functor and invoking the Freyd adjoint functor theorem. This requires a suitable version of the axiom of choice. Similar remarks apply to the colimit functor (which assigns to every functor its colimit, and is covariant). ; Power sets functor: The power set functor maps each set to its power set and each function f \colon X \to Y to the map which sends U \in \mathcal(X) to its image f(U) \in \mathcal(Y). One can also consider the contravariant power set functor which sends f \colon X \to Y to the map which sends V \subseteq Y to its inverse image f^(V) \subseteq X. For example, if X = \ then F(X) = \mathcal(X) = \. Suppose f(0) = \ and f(1) = X. Then F(f) is the function which sends any subset U of X to its image f(U), which in this case means \ \mapsto f(\) = \, where \mapsto denotes the mapping under F(f), so this could also be written as (F(f))(\)= \. For the other values, \ \mapsto f(\) = \ = \,\ \ \mapsto f(\) = \ = \,\ \ \mapsto f(\) = \ = \. Note that f(\) consequently generates the trivial topology on X. Also note that although the function f in this example mapped to the power set of X, that need not be the case in general. ; : The map which assigns to every
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
its dual space and to every
linear map In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that p ...
its dual or transpose is a contravariant functor from the category of all vector spaces over a fixed field to itself. ; Fundamental group: Consider the category of pointed topological spaces, i.e. topological spaces with distinguished points. The objects are pairs , where ''X'' is a topological space and ''x''0 is a point in ''X''. A morphism from to is given by a continuous map with . To every topological space ''X'' with distinguished point ''x''0, one can define the fundamental group based at ''x''0, denoted . This is the group of homotopy classes of loops based at ''x''0, with the group operation of concatenation. If is a morphism of pointed spaces, then every loop in ''X'' with base point ''x''0 can be composed with ''f'' to yield a loop in ''Y'' with base point ''y''0. This operation is compatible with the homotopy equivalence relation and the composition of loops, and we get a
group homomorphism In mathematics, given two groups, (''G'',∗) and (''H'', ·), a group homomorphism from (''G'',∗) to (''H'', ·) is a function ''h'' : ''G'' → ''H'' such that for all ''u'' and ''v'' in ''G'' it holds that : h(u*v) = h(u) \cdot h(v) whe ...
from to . We thus obtain a functor from the category of pointed topological spaces to the category of groups. In the category of topological spaces (without distinguished point), one considers homotopy classes of generic curves, but they cannot be composed unless they share an endpoint. Thus one has the fundamental groupoid instead of the fundamental group, and this construction is functorial. ; 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 real-valued continuous functions on that space. Every continuous map induces an algebra homomorphism by the rule for every ''φ'' in C(''Y''). ; Tangent and cotangent bundles: The map which sends every
differentiable manifold In mathematics, a differentiable manifold (also differential manifold) is a type of manifold that is locally similar enough to a vector space to allow one to apply calculus. Any manifold can be described by a collection of charts (atlas). One ...
to its
tangent bundle A tangent bundle is the collection of all of the tangent spaces for all points on a manifold, structured in a way that it forms a new manifold itself. Formally, in differential geometry, the tangent bundle of a differentiable manifold M is ...
and every smooth map to its
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
is a covariant functor from the category of differentiable manifolds to the category of
vector bundle In mathematics, a vector bundle is a topological construction that makes precise the idea of a family of vector spaces parameterized by another space X (for example X could be a topological space, a manifold, or an algebraic variety): to eve ...
s. Doing this constructions pointwise gives the tangent space, a covariant functor from the category of pointed differentiable manifolds to the category of real vector spaces. Likewise, cotangent space is a contravariant functor, essentially the composition of the tangent space with the dual space above. ; Group actions/representations: Every group ''G'' can be considered as a category with a single object whose morphisms are the elements of ''G''. A functor from ''G'' to Set is then nothing but a
group action In mathematics, a group action of a group G on a set S is a group homomorphism from G to some group (under function composition) of functions from S to itself. It is said that G acts on S. Many sets of transformations form a group under ...
of ''G'' on a particular set, i.e. a ''G''-set. Likewise, a functor from ''G'' to the category of vector spaces, Vect''K'', is a linear representation of ''G''. In general, a functor can be considered as an "action" of ''G'' on an object in the category ''C''. If ''C'' is a group, then this action is a group homomorphism. ; Lie algebras: Assigning to every real (complex)
Lie group In mathematics, a Lie group (pronounced ) is a group (mathematics), group that is also a differentiable manifold, such that group multiplication and taking inverses are both differentiable. A manifold is a space that locally resembles Eucli ...
its real (complex)
Lie algebra In mathematics, a Lie algebra (pronounced ) is a vector space \mathfrak g together with an operation called the Lie bracket, an alternating bilinear map \mathfrak g \times \mathfrak g \rightarrow \mathfrak g, that satisfies the Jacobi ident ...
defines a functor. ; Tensor products: If ''C'' denotes the category of vector spaces over a fixed field, with linear maps as morphisms, then the
tensor product In mathematics, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
V \otimes W defines a functor which is covariant in both arguments. ; Forgetful functors: The functor which maps a group to its underlying set and a
group homomorphism In mathematics, given two groups, (''G'',∗) and (''H'', ·), a group homomorphism from (''G'',∗) to (''H'', ·) is a function ''h'' : ''G'' → ''H'' such that for all ''u'' and ''v'' in ''G'' it holds that : h(u*v) = h(u) \cdot h(v) whe ...
to its underlying function of sets is a functor. Functors like these, which "forget" some structure, are termed ''
forgetful functor In mathematics, more specifically in the area of category theory, a forgetful functor (also known as a stripping functor) "forgets" or drops some or all of the input's structure or properties mapping to the output. For an algebraic structure of ...
s''. Another example is the functor which maps a ring to its underlying additive abelian group. Morphisms in Rng ( ring homomorphisms) become morphisms in Ab (abelian group homomorphisms). ; Free functors: Going in the opposite direction of forgetful functors are free functors. The free functor sends every set ''X'' to the free group generated by ''X''. Functions get mapped to group homomorphisms between free groups. Free constructions exist for many categories based on structured sets. See free object. ; Homomorphism groups: To every pair ''A'', ''B'' of abelian groups one can assign the abelian group Hom(''A'', ''B'') consisting of all
group homomorphism In mathematics, given two groups, (''G'',∗) and (''H'', ·), a group homomorphism from (''G'',∗) to (''H'', ·) is a function ''h'' : ''G'' → ''H'' such that for all ''u'' and ''v'' in ''G'' it holds that : h(u*v) = h(u) \cdot h(v) whe ...
s 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 (where Ab denotes the
category of abelian groups In mathematics, the category Ab has the abelian groups as objects and group homomorphisms as morphisms. This is the prototype of an abelian category: indeed, every small abelian category can be embedded in Ab. Properties The zero object o ...
with group homomorphisms). If and are morphisms in Ab, then the group homomorphism : is given by . See
Hom functor In mathematics, specifically in category theory, hom-sets (i.e. sets of morphisms between object (category theory), objects) give rise to important functors to the category of sets. These functors are called hom-functors and have numerous applicati ...
. ; Representable functors: We can generalize the previous example to any category ''C''. To every pair ''X'', ''Y'' of objects in ''C'' one can assign the set of morphisms from ''X'' to ''Y''. This defines a functor to Set which is contravariant in the first argument and covariant in the second, i.e. it is a functor . If and are morphisms in ''C'', then the map is given by . Functors like these are called representable functors. An important goal in many settings is to determine whether a given functor is representable.


Relation to other categorical concepts

Let ''C'' and ''D'' be categories. The collection of all functors from ''C'' to ''D'' forms the objects of a category: the functor category. Morphisms in this category are natural transformations between functors. Functors are often defined by universal properties; examples are the
tensor product In mathematics, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
, 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.


Computer implementations

Functors sometimes appear in
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declarat ...
. For instance, the programming language Haskell has a
class Class, Classes, or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used d ...
Functor where fmap is a polytypic function used to map functions (''morphisms'' on ''Hask'', the category of Haskell types) between existing types to functions between some new types.See https://wiki.haskell.org/Category_theory/Functor#Functors_in_Haskell for more information.


See also

* Anafunctor * Profunctor * Functor category * Kan extension * Pseudofunctor


Notes


References

* . *


External links

* * see and the variations discussed and linked to there. * André Joyal
CatLab
a wiki project dedicated to the exposition of categorical mathematics * * J. Adamek, H. Herrlich, G. Stecker
Abstract and Concrete Categories-The Joy of Cats
*
Stanford Encyclopedia of Philosophy The ''Stanford Encyclopedia of Philosophy'' (''SEP'') is a freely available online philosophy resource published and maintained by Stanford University, encompassing both an online encyclopedia of philosophy and peer-reviewed original publication ...
:
Category Theory
— by Jean-Pierre Marquis. Extensive bibliography.
List of academic conferences on category theory
* Baez, John, 1996

An informal introduction to higher order categories.
WildCats
is a
category theory Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
package for Mathematica. Manipulation and visualization of objects, morphisms, categories, functors, natural transformations, universal properties.
The catsters
a YouTube channel about category theory.
Video archive
of recorded talks relevant to categories, logic and the foundations of physics.
Interactive Web page
which generates examples of categorical constructions in the category of finite sets. {{Functions navbox