nLab
functor

Contents

Idea

  • A functor is what goes between categories.

  • A functor from C to D is an image of C in D (but the naive image need not be a subcategory of D).

  • A functor between (small) categories is a morphism of the underlying directed graphs that respects the composition of edges.

So a functor F:CD is a morphism between two categories that

  • constsis of a map F 0:Obj(C)Obj(D) of the objects of the categories

  • and a map F 1:Mor(C)Mor(D) of the morphisms of the categories

such that

  • it respect source and target: F 1 coincides with F 0 on source and target objects;

  • it respects composition: the image of the composite of two morphisms under F is the composite of their images.

This last property is the decicive one of a functor. It is called the functoriality condition. It is a direct generalization of the notion of homomorphism (of monoids, groups, algebras, etc.) to the case that there are more objects. As a slogan we have

The notion of functor is a horizontal categorification of that of homomorphism.

Definition

External definition

A functor F from a category C to a category D is a map sending each object xC to an object F(x)D and each morphism f:xy in C to morphism F(f):F(x)F(y) in D, such that

  • F preserves composition: F(gf)=F(g)F(f) whenever the left-hand side is well-defined,

  • F preserves identity morphisms: for each object xX, F(1 x)=1 F(x).

Or equivalently, since compositions gf=gf (commuting triangles) and identities 1 x (commuting loops) are both simple commuting diagrams, we can combine the above conditions to the single statement

  • F preserves commuting diagrams.

Given morphisms f:XY, g:YZ, and h:XZ, declaring the triangle commutes amounts to declaring

h=gf.h = g\circ f.

In this case, for F:CD to preserve the commutative triangle means

F(h)=F(g)F(f)F(h) = F(g)\circ F(f)

as depicted below

Preserving commuting triangles means F preserves compositions.

Given morphisms f:XY, g:YZ, and h:ZX, declaring the loop commutes amounts to declaring

1 X=hgf.1_X = h\circ g\circ f.

In this case, for F:CD to preserve the commutative loop means

F(1 X)=F(h)F(g)F(f)F(1_X) = F(h)\circ F(g)\circ F(f)

as depicted below

However, it means more than that. Since any commutative loop is equal to the identity morphism, we must also have

1 F(X)=F(h)F(g)F(f)1_{F(X)} = F(h)\circ F(g)\circ F(f)

implying

F(1 X)=1 F(X).F(1_X) = 1_{F(X)}.

Preserving commuting loops means F preserves identity morphisms.

Another equivalent way to say this is that a functor F:CD is precisely a morphism of simplicial sets N(F):N(C)N(D) between the nerves of these categories

  • the objects of C and D are the 0-cells of N(C) and N(D), so N(F) 0:N(F) 0N(F) 0 maps objects of C to objects of D;

  • the morphisms of C and D are the 1-cells of N(C) and N(D), so N(F) 1:N(F) 1N(F) 1 maps morphisms of C to objects of D;

  • the identity morphisms of C and D are the degenerate 1-cellsof N(C) and N(D), so the fact that N(F) respects degeneracy maps means that F respects identities;

  • the commuting triangles of C and D are the 2-cells of N(C) and N(D), so the fact that N(F) maps 2-cells to 2-cells means that it respects commuting triangles, hence that it respects composition.

See nerve for more details on this.

The functors between two categories C and D form themselves a category, the functor category [C,D], whose morphisms are natural transformations. Equipped with these functor categories as hom-objects, we have a 2-category Cat of categories, functors and natural transformations. In other words, functors are morphisms in Cat.

Internal definition

If C and D are internal categories in some ambient category A, then an internal functor F:CD is

  • a morphism of objects F 0:C 0D 0 in A;

  • a morphisms of morphisms F 1:C 1D 1 in A;

  • such that the following diagrams commute

    • respect for the source map: C 1 f 1 D 1 s s C 0 f 0 D 0;

    • respect for the target map: C 1 f 1 D 1 t t C 0 f 0 D 0;

    • respect for identities C 0 f 0 D 0 i i C 1 f 1 D 1;

    • respect for composition C 1× t,sC 1 f 1× t,sf 1 D 1× t,sD 1 C 1 f 1 D 1.

This reproducces the external definition of functors above for small categories, which are categories internal to Set

In many cases, this notion is too restrictive, and we should use internal anafunctors instead.

Enriched definition

In enriched category theory a functor maps not hom-sets but the given hom-objects to each other, in a way that respects their composition. This is described at

Profunctors

A generalization of the notion of enriched functor is the notion of profunctor.

Higher categorical functors

In higher category theory there are corresponding higher notions of functor, such as

Special properties of functors

Functors with special properties are important in applications. See for instance

And for more background on this see stuff, structure, property.

Examples

Morphisms of monoids and groups

For A,B monoids or G,H groups, let BA,BB, BG, BH be the corresponding obe-object categories (as described at delooping). Then functors

BABB\mathbf{B}A \to \mathbf{B}B

are canonically in bijection with monoid homomorphisms AB and accordingly functors

BGBH\mathbf{B}G \to \mathbf{B}H

are canonically in bijection with group homomorphisms GH.

Representations

With BG as above, functors on BG with values in Vect are the same as linear representations of the group G. In fact, we have a canonical isomorphism of categories

Funct(BG,Vect)Rep(G)Funct(\mathbf{B}G, Vect) \simeq Rep(G)

of the functor category with the representation category.

Linear Maps

Let BEnd(U) and BEnd(V) be one-object categories whose objects are each finite-dimensional vector space and whose morphisms are all of the linear endomorphisms on that space, i.e. one-object full subcategories of FinVect.

Left Inverses

If the linear map F:UV has a left inverse, i.e.

F *F=1 U,F^*\circ F = 1_U,

where F * is the preimage, then we can construct a functor

F *:BEnd(U)BEnd(V)F_*:\mathbf{B} End(U)\to\mathbf{B} End(V)

by defining its action on objects by

F *(U)=F *UF_*(U) = F_* U

where F * on the right-hand side is the image and its action on endomorphisms by

F *(f)=FfF *.F_*(f) = F f F^*.

Composition follows immediately

F *(fg)=FfgF *=FfF *FgF *=F *(f)F *(g).F_*(f g) = F f g F^* = F f F^* F g F^* = F_*(f) F_*(g).

Identity morphisms are preserved since for any vector y in F *UV, then

y=Fxy = F x

for some vector x in U and we have

F *(1 U)y=FF *y=FF *Fx=Fx=yF_*(1_U)y = F\circ F^* y = F\circ F^*\circ F x = F x = y

so that

F *(1 U)=1 F *(U)F_*(1_U) = 1_{F_*(U)}

as required. Hence, F * is a functor.

Right Inverses

If the linear map F:UV has a right inverse, i.e.

FF *=1 V,F\circ F^* = 1_V,

where F * is the preimage, then we can construct a functor

F *:BEnd(V)BEnd(U)F^*:\mathbf{B} End(V)\to\mathbf{B} End(U)

by defining its action on objects by

F *(V)=F *VF^*(V) = F^*V

where F * on the right-hand side is preimage, and its action on endomorphisms by

F *(f)=F *fF.F^*(f) = F^* f F.

Composition follows immediately

F *(fg)=F *fgF=F *fFF *gF=F *(f)F *(g).F^*(f g) = F^* f g F = F^* f F F^* g F = F^*(f) F^*(g).

Identity morphisms are preserved since for any vector x in F *VU, then

x=F *yx = F^*y

for some vector y in V and we have

F *(1 V)x=F *Fx=F *FF *y=F *y=xF^*(1_V)x = F^*\circ F x = F^*\circ F \circ F^* y = F^* y = x

so that

F *(1 V)=1 F *(V)F^*(1_V) = 1_{F^*(V)}

as required. Hence, F * is a functor.

Presheaves

Functors F:CSet with values in Set are also called presheaves. As such one calls them presheaves on the opposite category C op of C. See presheaf for more on this.

Functors and generalized elements

For C a category, and XC an object, and U any other object, a morphism x:UX may be regarded as a generalized element of X, written xX (For this language applied to the category Set of sets see ETCS. For the general case see type theory).

The set of generalized elements of an object XC is thus the union of hom-sets UCHom C(U,X).

While a morphism f:XY in an arbitrary category C need not at all come to us as a function of sets, it always induces a function of sets of generalized elements : it sends the generalized element x:UX of X to the generalized element

f(x):UxXfYf(x) : U \stackrel{x}{\to} X \stackrel{f}{\to} Y

of Y, using the composition of the morphism f with the morphism x in C.

In terms of this notation, the functoriality condition on a functor F:CD, which is

F(UxXfY)=F(U)F(x)F(X)F(f)F(Y)F(U \stackrel{x}{\to} X \stackrel{f}{\to} Y) = F(U) \stackrel{F(x)}{\to} F(X) \stackrel{F(f)}{\to} F(Y)

appears as

F(f(x))=F(f)(F(x)).F(f(x)) = F(f)(F(x)) \,.

This can be illustrated in the following diagram

which provides an alternative expression of the functoriality condition as simply a statement that commuting diagrams in C map to commuting diagrams in D.