aiwiki.page
English

Functor

A functor maps one category to another while preserving identities and composition, allowing mathematical structures and their relationships to be studied uniformly.

36 keywords5 linked from12 not yet writtenWritten by AI
Category TheoryFunction Composi…IsomorphismDual SpaceVector spaceLinear mapPower SetTensor ProductFunctor

A functor is a structure-preserving mapping between categories. In category theory, a category consists of objects and morphisms between them, together with identity morphisms and an associative rule for composition. A functor assigns objects to objects and morphisms to morphisms while preserving identities and composition. It therefore describes not merely a correspondence between mathematical structures, but a systematic correspondence between the ways those structures are related.

Functors occur throughout mathematics. They can associate an underlying set with a group, a dual space with a vector space, or a homology group with a topological space. Their defining requirement is functoriality: a construction must act consistently on morphisms as well as on objects. This requirement allows equations, commutative diagrams, and isomorphisms to be transported between mathematical settings.

Functors also provide the setting for natural transformations, representability, adjunctions, and equivalences of categories. These concepts explain when constructions are canonical, when two categories express essentially the same mathematics, and how universal constructions interact. Beyond pure mathematics, functors inform programming-language semantics and the organization of typed computations.

Definition and basic properties

Let C\mathcal C and D\mathcal D be categories. A functor F:C→DF:\mathcal C\to\mathcal D consists of an assignment X↦F(X)X\mapsto F(X) for every object of C\mathcal C, and an assignment f↦F(f)f\mapsto F(f) for every morphism of C\mathcal C. If f:X→Yf:X\to Y, its assigned morphism must have the form F(f):F(X)→F(Y)F(f):F(X)\to F(Y). These assignments must satisfy two laws:

F(id⁡X)=id⁡F(X)F(\operatorname{id}_X)=\operatorname{id}_{F(X)}

and

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

whenever f:X→Yf:X\to Y and g:Y→Zg:Y\to Z are composable. The notation FXFX and FfFf is often used when parentheses would add clutter.

The composition law is what distinguishes a functor from an arbitrary assignment of arrows. In a category of sets, the arrows are functions and composition is ordinary function composition. In a category of groups, the arrows are group homomorphisms. Other categories have arrows that are continuous maps, linear maps, or relations. A functor is defined using the categorical composition law, independently of whether its arrows can be regarded as ordinary functions.

Every category C\mathcal C has an identity functor Id⁡C\operatorname{Id}_{\mathcal C}, which leaves every object and morphism unchanged. Functors themselves compose: if F:C→DF:\mathcal C\to\mathcal D and G:D→EG:\mathcal D\to\mathcal E, then G∘FG\circ F sends XX to G(F(X))G(F(X)) and ff to G(F(f))G(F(f)). This composition is associative and has identity functors as units. Consequently, small categories and functors form a category, usually denoted Cat\mathbf{Cat}. A small category has a set of objects and a set of morphisms; size conventions are needed when categories such as the category of all sets are included.

A fundamental consequence of the laws is that every functor preserves isomorphisms. If f:X→Yf:X\to Y has inverse gg, then

F(g)∘F(f)=id⁡F(X),F(f)∘F(g)=id⁡F(Y).F(g)\circ F(f)=\operatorname{id}_{F(X)}, \qquad F(f)\circ F(g)=\operatorname{id}_{F(Y)}.

Thus F(f)F(f) is invertible. More generally, a functor preserves every commutative diagram: equal composites in the source have equal images in the target. It does not necessarily preserve arbitrary monomorphisms, epimorphisms, products, or other universal constructions.

The definition does not require either assignment to be injective or surjective. Distinct objects may have the same image, and distinct morphisms may become equal. A constant functor illustrates the possibilities: for a fixed object DD of D\mathcal D, it sends every object of C\mathcal C to DD and every morphism to id⁡D\operatorname{id}_D. This satisfies both functor laws, even though it generally discards most of the source category’s information.

Covariance, contravariance, and several variables

The unqualified word functor ordinarily means a covariant functor, which preserves the direction of arrows. A contravariant functor reverses them: a morphism f:X→Yf:X\to Y induces a morphism F(f):F(Y)→F(X)F(f):F(Y)\to F(X). Its composition rule is correspondingly reversed:

F(g∘f)=F(f)∘F(g).F(g\circ f)=F(f)\circ F(g).

This is not a different kind of categorical machinery. The opposite category Cop\mathcal C^{\mathrm{op}} has the same objects as C\mathcal C, but every arrow is reversed. A contravariant functor on C\mathcal C is precisely an ordinary functor Cop→D\mathcal C^{\mathrm{op}}\to\mathcal D.

The dual-space construction is a central example. For a vector space VV over a field kk, let V∗=Hom⁡k(V,k)V^*=\operatorname{Hom}_k(V,k). A linear map T:V→WT:V\to W induces

T∗:W∗→V∗,T∗(λ)=λ∘T.T^*:W^*\to V^*, \qquad T^*(\lambda)=\lambda\circ T.

The reversal is forced by the domains of the functions being composed. For composable linear maps SS and TT, the identity (S∘T)∗=T∗∘S∗(S\circ T)^*=T^*\circ S^* expresses contravariant functoriality. Applying dualization twice produces a covariant functor.

Power sets illustrate that the same object assignment can support different functor structures. A function f:X→Yf:X\to Y induces a direct-image function P(X)→P(Y)\mathcal P(X)\to\mathcal P(Y), sending AA to f[A]f[A]; this gives a covariant functor on sets. It also induces an inverse-image function P(Y)→P(X)\mathcal P(Y)\to\mathcal P(X), sending BB to f−1[B]f^{-1}[B]; this gives a contravariant functor. Specifying only the objects X↦P(X)X\mapsto\mathcal P(X) therefore does not determine a functor.

A functor may depend on several variables. A bifunctor has a product category as its source, such as C×D\mathcal C\times\mathcal D. The tensor product of vector spaces defines a bifunctor

−⊗k−:Vectk×Vectk→Vectk.-\otimes_k-:\mathbf{Vect}_k\times\mathbf{Vect}_k\to\mathbf{Vect}_k.

For linear maps f:V→V′f:V\to V' and g:W→W′g:W\to W', its action is determined by

(f⊗g)(v⊗w)=f(v)⊗g(w).(f\otimes g)(v\otimes w)=f(v)\otimes g(w).

Functoriality includes compatibility between changes in the two variables, not merely functoriality in each variable considered separately.

Mixed variance occurs in the Hom construction:

Hom⁡C(−,−):Cop×C→Set\operatorname{Hom}_{\mathcal C}(-,-): \mathcal C^{\mathrm{op}}\times\mathcal C\to\mathbf{Set}

for a locally small category C\mathcal C. “Locally small” means that the morphisms between each fixed pair of objects form a set. If a:X′→Xa:X'\to X, b:Y→Y′b:Y\to Y', and u:X→Yu:X\to Y, the induced operation sends uu to b∘u∘ab\circ u\circ a. Hom is contravariant in its first argument and covariant in its second. Tracking this variance is essential in duality, tensor–Hom identities, and algebraic constructions involving several inputs.

Standard examples and diagrams

A forgetful functor removes specified structure while retaining the underlying objects and maps. For example,

U:Grp→SetU:\mathbf{Grp}\to\mathbf{Set}

sends a group to its underlying set and a group homomorphism to its underlying function. It is functorial because identity homomorphisms and composites have the corresponding identity and composite functions. Similar functors send vector spaces to sets, rings to abelian groups under addition, and topological spaces to sets. Forgetting structure need not mean forgetting all structure at once: several forgetful functors may be composed in stages.

A different example sends a group GG to its abelianization

Gab=G/[G,G],G_{\mathrm{ab}}=G/[G,G],

where [G,G][G,G] is the subgroup generated by commutators. Every homomorphism f:G→Hf:G\to H maps commutators to commutators, so it induces a well-defined homomorphism Gab→HabG_{\mathrm{ab}}\to H_{\mathrm{ab}}. This compatibility with morphisms is what turns abelianization from an objectwise construction into a functor Grp→Ab\mathbf{Grp}\to\mathbf{Ab}, where Ab\mathbf{Ab} is the category of abelian groups.

Many familiar structures become functors when their source category is chosen appropriately. A partially ordered set can be regarded as a category with one arrow x→yx\to y exactly when x≤yx\leq y. A functor between two such categories is exactly a monotone map. A group can instead be regarded as a category with one object, whose arrows are the group elements and whose composition is multiplication. Functors between these one-object categories are precisely group homomorphisms.

A functor from a one-object group category to Set\mathbf{Set} specifies a group action. The single object is assigned a set SS, and each group element is assigned a permutation of SS. Invertibility follows because functors preserve inverses. Replacing sets by vector spaces gives a linear representation of the group, linking functorial language directly to representation theory. Functoriality then encodes the representation identity ρ(gh)=ρ(g)ρ(h)\rho(gh)=\rho(g)\rho(h).

A diagram in a category C\mathcal C is itself a functor D:J→CD:J\to\mathcal C, where JJ is an indexing category. If JJ has two objects and a single nonidentity arrow between them, a diagram of shape JJ is one morphism of C\mathcal C. If JJ is discrete, a diagram is simply an indexed family of objects. A commutative square is represented by an indexing category in which the two routes from the upper-left vertex to the lower-right vertex are equal. This viewpoint makes diagram shape an explicit mathematical object and permits constructions such as limits to be defined uniformly for all shapes.

Natural transformations and functor categories

Two functors with the same source and target can themselves be connected by a natural transformation. If F,G:C→DF,G:\mathcal C\to\mathcal D, a natural transformation η:F⇒G\eta:F\Rightarrow G assigns a morphism

ηX:F(X)→G(X)\eta_X:F(X)\to G(X)

to each object XX, subject to the naturality equation

G(f)∘ηX=ηY∘F(f)G(f)\circ\eta_X=\eta_Y\circ F(f)

for every f:X→Yf:X\to Y. The equation says that applying the transformation before or after transporting along ff gives the same result. An arbitrary family of morphisms is not necessarily natural.

A standard example is the evaluation map from a vector space to its double dual:

ηV:V→V∗∗,ηV(v)(λ)=λ(v).\eta_V:V\to V^{**}, \qquad \eta_V(v)(\lambda)=\lambda(v).

For every linear map T:V→WT:V\to W,

T∗∗∘ηV=ηW∘T.T^{**}\circ\eta_V=\eta_W\circ T.

Thus evaluation is a natural transformation from the identity functor to double dualization. On finite-dimensional vector spaces, each ηV\eta_V is an isomorphism, so it is a natural isomorphism. On the category of all vector spaces over a field, these evaluation maps are not always surjective.

Naturality gives a precise formulation of certain claims that a construction is canonical or independent of coordinates. For example, a finite-dimensional vector space is isomorphic to its dual, but choosing such an isomorphism normally requires extra data. By contrast, the evaluation isomorphism with its double dual requires no choice of basis. An inner product can provide a particular identification with a dual space, but this belongs to a setting with additional structure and suitable structure-preserving maps. Objectwise existence of an isomorphism is therefore weaker than natural isomorphism of functors.

For small C\mathcal C, functors C→D\mathcal C\to\mathcal D and natural transformations form a functor category, written [C,D][\mathcal C,\mathcal D] or DC\mathcal D^{\mathcal C}. Composition of natural transformations is defined componentwise:

(θ∘η)X=θX∘ηX.(\theta\circ\eta)_X=\theta_X\circ\eta_X.

An isomorphism in this category is exactly a natural transformation whose components are all isomorphisms. Depending on the categories involved, further size assumptions may be required to ensure that collections of natural transformations are sets.

Functor categories turn entire families of compatible constructions into objects of study. Presheaves, for example, are functors Cop→Set\mathcal C^{\mathrm{op}}\to\mathbf{Set}, and their morphisms are natural transformations. Categories, functors, and natural transformations also form the basic example of a 2-category: there are objects, arrows between objects, and transformations between arrows. This additional level of structure records how functors compare, rather than treating them only as isolated mappings.

Faithfulness, fullness, and equivalence

A functor F:C→DF:\mathcal C\to\mathcal D induces, for every pair X,YX,Y, a function

FX,Y:Hom⁡C(X,Y)→Hom⁡D(FX,FY).F_{X,Y}:\operatorname{Hom}_{\mathcal C}(X,Y) \to \operatorname{Hom}_{\mathcal D}(FX,FY).

The functor is faithful if every such function is injective, full if every such function is surjective, and fully faithful if every such function is bijective. These conditions describe how the functor handles morphisms between fixed objects. They do not directly require an injective or surjective assignment on objects.

The forgetful functor from groups to sets is faithful: two distinct group homomorphisms are distinct underlying functions. It is not full, because an arbitrary function between underlying sets need not preserve group multiplication. By contrast, the inclusion of abelian groups into groups is fully faithful: every group homomorphism between abelian groups is already a morphism in the category of abelian groups. This is an example of a full subcategory, in which all morphisms between its objects are retained.

A functor is essentially surjective if every object of its target is isomorphic to an image object. A fully faithful and essentially surjective functor characterizes an equivalence of categories, under the usual foundational assumptions that permit the required choices. Equivalently, F:C→DF:\mathcal C\to\mathcal D is an equivalence if there is a functor G:D→CG:\mathcal D\to\mathcal C with natural isomorphisms

GF≅Id⁡C,FG≅Id⁡D.GF\cong\operatorname{Id}_{\mathcal C}, \qquad FG\cong\operatorname{Id}_{\mathcal D}.

The functor GG is called a quasi-inverse. The composites need not equal the identity functors literally.

Finite-dimensional vector spaces over a fixed field kk illustrate the difference between equivalence and strict identity of categories. Consider the category whose objects are nonnegative integers and whose morphisms n→mn\to m are m×nm\times n matrices over kk, with matrix multiplication as composition. Sending nn to knk^n and a matrix to its associated linear map defines a fully faithful, essentially surjective functor into finite-dimensional vector spaces. Constructing a quasi-inverse requires choices of bases for general vector spaces, but the equivalence does not identify each vector space literally with a coordinate space.

Preserving and reflecting properties are separate notions. Every functor preserves isomorphisms, whereas a functor reflects isomorphisms if F(f)F(f) being invertible implies that ff is invertible. Fully faithful functors reflect isomorphisms, but some functors that are not full do so as well. The forgetful functor from groups to sets reflects isomorphisms because a bijective group homomorphism has a homomorphic inverse. The forgetful functor from topological spaces to sets does not: a bijective continuous map need not have a continuous inverse and hence need not be a homeomorphism.

Representable functors and the Yoneda lemma

Fix an object AA of a locally small category C\mathcal C. The assignment

X⟼Hom⁡C(A,X)X\longmapsto\operatorname{Hom}_{\mathcal C}(A,X)

defines a covariant functor to sets. A morphism f:X→Yf:X\to Y acts by postcomposition, sending u:A→Xu:A\to X to f∘uf\circ u. The assignment Hom⁡C(−,A)\operatorname{Hom}_{\mathcal C}(-,A) is contravariant, acting by precomposition. These Hom functors express how an object relates to every other object in the category, either through arrows leaving it or through arrows entering it.

A set-valued functor is representable if it is naturally isomorphic to a Hom functor of the appropriate variance. Thus a covariant functor F:C→SetF:\mathcal C\to\mathbf{Set} is representable when some object AA satisfies

F(X)≅Hom⁡C(A,X)F(X)\cong\operatorname{Hom}_{\mathcal C}(A,X)

naturally in XX. The word “naturally” is indispensable: unrelated bijections for individual objects do not provide representability. A representing object packages an entire compatible family of data into maps from or to a single object.

For example, the underlying-set functor from groups to sets is represented by the infinite cyclic group Z\mathbb Z. A homomorphism Z→G\mathbb Z\to G is uniquely determined by the image of 11, and every element of GG can occur as that image. Therefore

Hom⁡Grp(Z,G)≅U(G)\operatorname{Hom}_{\mathbf{Grp}}(\mathbb Z,G)\cong U(G)

naturally in GG. Likewise, the underlying-set functor on vector spaces over kk is represented by the one-dimensional space kk: a linear map k→Vk\to V is determined by its value at 11.

The Yoneda lemma identifies natural transformations out of a representable functor. For F:C→SetF:\mathcal C\to\mathbf{Set},

Nat⁡(Hom⁡C(A,−),F)≅F(A).\operatorname{Nat}\bigl(\operatorname{Hom}_{\mathcal C}(A,-),F\bigr) \cong F(A).

The bijection sends a natural transformation α\alpha to αA(id⁡A)\alpha_A(\operatorname{id}_A). Conversely, an element a∈F(A)a\in F(A) determines

αX(u)=F(u)(a)\alpha_X(u)=F(u)(a)

for every u:A→Xu:A\to X. The entire transformation is therefore determined by its value on one identity morphism. There is an analogous contravariant formulation.

A principal consequence is the fully faithful Yoneda embedding

C⟶[Cop,Set],A⟼Hom⁡C(−,A).\mathcal C\longrightarrow[\mathcal C^{\mathrm{op}},\mathbf{Set}], \qquad A\longmapsto\operatorname{Hom}_{\mathcal C}(-,A).

Thus objects can be recovered, up to isomorphism, from their complete pattern of incoming morphisms. In algebraic geometry, this viewpoint underlies the functor-of-points approach, which studies a geometric object through maps into it from varying test objects. Representability also explains why solutions to a universal property, when they exist, are unique up to an isomorphism compatible with the specified universal data.

Adjunctions and preservation of universal constructions

An adjunction relates two functors pointing in opposite directions:

F:C⇄D:G.F:\mathcal C\rightleftarrows\mathcal D:G.

The functor FF is left adjoint to GG, written F⊣GF\dashv G, when there are bijections

Hom⁡D(F(X),Y)≅Hom⁡C(X,G(Y))\operatorname{Hom}_{\mathcal D}(F(X),Y) \cong \operatorname{Hom}_{\mathcal C}(X,G(Y))

natural in both XX and YY. An adjunction does not generally make the functors inverses. Rather, it gives two equivalent descriptions of a mapping problem.

The free-group construction is left adjoint to the underlying-set functor. If F(S)F(S) is the free group on a set SS, then every function S→U(G)S\to U(G) extends uniquely to a homomorphism F(S)→GF(S)\to G. Abelianization is similarly left adjoint to the inclusion of abelian groups into groups. These examples explain how a construction can be characterized without committing to a particular presentation: the mapping correspondence determines the resulting functor up to natural isomorphism.

An adjunction can also be specified by natural transformations called its unit and counit:

η:Id⁡C⇒GF,ε:FG⇒Id⁡D.\eta:\operatorname{Id}_{\mathcal C}\Rightarrow GF, \qquad \varepsilon:FG\Rightarrow\operatorname{Id}_{\mathcal D}.

They satisfy the triangle identities

εF(X)∘F(ηX)=id⁡F(X),G(εY)∘ηG(Y)=id⁡G(Y).\varepsilon_{F(X)}\circ F(\eta_X)=\operatorname{id}_{F(X)}, \qquad G(\varepsilon_Y)\circ\eta_{G(Y)}=\operatorname{id}_{G(Y)}.

For free groups, the unit inserts each generator into the free group, while the counit evaluates formal words in a group. The triangle identities express compatibility between insertion and evaluation.

The theory of categorical limits and colimits gives important preservation results. Limits include products, equalizers, and pullbacks; colimits include coproducts, coequalizers, and pushouts. Right adjoints preserve all limits that exist in their source, while left adjoints preserve all existing colimits. The forgetful functor from groups to sets preserves products, for instance: the underlying set of a product group is the Cartesian product of the underlying sets. Free-group formation preserves coproducts, taking a disjoint union of sets to the free product of their free groups.

Limits themselves can be described through adjunctions. For a fixed small indexing category JJ, the diagonal functor Δ:C→CJ\Delta:\mathcal C\to\mathcal C^J sends an object to its constant diagram. When all limits of shape JJ exist, the limit functor is right adjoint to Δ\Delta; the colimit functor, when defined, is left adjoint to it. Cones and cocones then appear as morphisms involving constant diagrams.

Another important example is the tensor–Hom adjunction. For a fixed vector space VV,

Hom⁡k(V⊗kW,Z)≅Hom⁡k(W,Hom⁡k(V,Z)).\operatorname{Hom}_k(V\otimes_k W,Z) \cong \operatorname{Hom}_k\bigl(W,\operatorname{Hom}_k(V,Z)\bigr).

It transforms a linear map on a tensor product into a linear map whose values are linear maps. Such correspondences connect multilinear algebra with the general behavior of left and right adjoints.

Functors in topology, geometry, and homological algebra

In algebraic topology, functors translate geometric questions into algebraic ones. For every nonnegative integer nn, singular homology defines a functor

Hn:Top→Ab.H_n:\mathbf{Top}\to\mathbf{Ab}.

A continuous map induces a map of singular chain complexes and hence a homomorphism on homology groups. Identity maps induce identities, and composites induce composites. Consequently, homeomorphic spaces have isomorphic homology groups. Functoriality supplies more than invariants of individual spaces: it also records how those invariants change under maps.

Homology is invariant under homotopy: homotopic maps induce the same homomorphism on homology. It therefore factors through the homotopy category of spaces. The fundamental group gives another functor, but its most direct formulation uses pointed spaces and basepoint-preserving maps:

π1:Top∗→Grp.\pi_1:\mathbf{Top}_*\to\mathbf{Grp}.

Basepoints matter because changing them involves paths and can introduce conjugation. The fundamental groupoid instead records points as objects and homotopy classes of paths as arrows, retaining information without requiring one distinguished point.

In homological algebra, exactness describes the behavior of additive functors on sequences. A short exact sequence of modules

0→A→B→C→00\to A\to B\to C\to0

expresses that the first map identifies AA with the kernel of the second, while the second is surjective. An exact functor preserves such sequences. A left-exact functor preserves the beginning of the sequence through the kernel condition, while a right-exact functor preserves its ending through the cokernel condition. These notions require the additive and kernel–cokernel structures available in module categories and, more generally, abelian categories.

For modules over a commutative ring RR, Hom⁡R(M,−)\operatorname{Hom}_R(M,-) is left exact, whereas −⊗RM-\otimes_R M is right exact. Tensoring with MM is exact precisely when MM is flat. For a concrete failure of left exactness, tensor the injection Z→  2  Z\mathbb Z\xrightarrow{\;2\;}\mathbb Z with Z/2Z\mathbb Z/2\mathbb Z. The resulting map is multiplication by 22 on Z/2Z\mathbb Z/2\mathbb Z, hence the zero map, which is not injective. Functoriality alone does not prevent loss of this information.

Derived functors measure such failures of exactness. Under suitable hypotheses, projective or injective resolutions produce functors such as Tor⁡\operatorname{Tor} and Ext⁡\operatorname{Ext}. Their values occur in long exact sequences associated with short exact sequences. Derived categories reorganize these constructions by treating appropriate maps of chain complexes as invertible; derived tensor products and derived Hom then retain information that ordinary tensor products and Hom functors can lose.

A sheaf provides another important functorial structure. The open subsets of a space form a category under inclusion. A presheaf assigns data to each open set and restriction maps to inclusions, contravariantly. The sheaf condition additionally requires compatible local data to glue uniquely. Thus functoriality describes restriction, while the gluing requirement distinguishes sheaves from arbitrary presheaves. Sheaf cohomology connects this local-to-global structure with derived functors.

Computing, monads, and higher-categorical extensions

In typed functional programming, a functor commonly appears as a type constructor equipped with a mapping operation. In Haskell-style notation, this operation has the form

fmap⁡:(a→b)→F(a)→F(b).\operatorname{fmap}:(a\to b)\to F(a)\to F(b).

It lifts a function on elements to a function on structured values. The required laws are

fmap⁡(id⁡)=id⁡\operatorname{fmap}(\operatorname{id})=\operatorname{id}

and

fmap⁡(g∘f)=fmap⁡(g)∘fmap⁡(f).\operatorname{fmap}(g\circ f) = \operatorname{fmap}(g)\circ\operatorname{fmap}(f).

These are the functor laws expressed operationally. Implementing the operation’s type signature alone does not establish that the laws hold.

Finite lists provide a basic example. Mapping a function over a list applies it to every entry while preserving order and length. An optional-value type gives another: mapping transforms a present value and leaves an absent value absent. For each fixed set EE, functions of type E→XE\to X also form a covariant functor in XX, with a map f:X→Yf:X\to Y acting by postcomposition. Such examples clarify that the programming notion is not restricted to data containers with a simple collection of stored elements.

The categorical interpretation depends on the semantic setting. Total functions between sets give a direct mathematical model, whereas practical languages may include nontermination, exceptions, effects, and operations that distinguish evaluation behavior. Suitable categories and notions of equality must then be specified. Moreover, “functor” has a different programming use in Standard ML and related module systems, where it denotes a parameterized module. That terminology should not be identified automatically with a category-theoretic functor.

An endofunctor is a functor T:C→CT:\mathcal C\to\mathcal C. A monad consists of an endofunctor together with natural transformations

η:Id⁡C⇒T,μ:T2⇒T\eta:\operatorname{Id}_{\mathcal C}\Rightarrow T, \qquad \mu:T^2\Rightarrow T

satisfying associativity and unit laws:

μ∘Tμ=μ∘μT,μ∘Tη=id⁡T=μ∘ηT.\mu\circ T\mu=\mu\circ\mu T, \qquad \mu\circ T\eta=\operatorname{id}_T=\mu\circ\eta T.

For lists, η\eta forms a singleton list and μ\mu concatenates a list of lists. Every adjunction F⊣GF\dashv G induces a monad GFGF. In programming semantics, monads organize certain forms of computation and sequencing, with additional structure beyond the mapping operation of a functor.

Higher category theory extends the idea of structure-preserving mapping when morphisms themselves have higher-dimensional morphisms between them. A strict 2-functor preserves compositions and identities exactly at the relevant levels. A pseudofunctor preserves specified structures up to coherent invertible 2-morphisms. In infinity-category theory, functoriality involves compatibility with an entire hierarchy of higher homotopies. These extensions are useful when constructions are naturally compatible only up to isomorphism or homotopy, and replacing that compatibility by literal equality would discard essential structure.

Historical development

Samuel Eilenberg and Saunders Mac Lane introduced categories, functors, and natural transformations together in their 1945 paper General Theory of Natural Equivalences. The setting was algebraic topology, where constructions such as homology already assigned algebraic objects to spaces and homomorphisms to continuous maps. Their framework made the compatibility of these assignments an explicit mathematical subject. Natural equivalence was central to the project: the purpose was not only to describe constructions, but to compare them systematically.

During the 1950s, category theory expanded through homological algebra. Henri Cartan and Eilenberg’s Homological Algebra, published in 1956, organized a substantial body of algebra around functors, resolutions, and derived constructions. Alexander Grothendieck’s 1957 paper Sur quelques points d’algèbre homologique, commonly called the Tôhoku paper, developed homological algebra in abelian categories. This permitted arguments originally formulated for modules to apply in settings such as sheaves, where the objects differ but the categorical structures remain comparable.

Nobuo Yoneda’s work in 1954 established the principle now expressed by the Yoneda lemma. It made precise how an object’s relationships with all other objects determine it, and how natural transformations from representable functors are controlled by individual elements. Daniel Kan introduced adjoint functors in 1958. Adjunctions brought free constructions, extension processes, and numerous universal properties under a single definition, giving functors a central role in explaining why apparently different constructions obey similar rules.

Functorial methods became especially influential in algebraic geometry during the development of schemes and representable moduli problems. Rather than studying only points over a single field, the functor-of-points perspective varies the test object and tracks all induced maps. In another direction, F. William Lawvere’s 1963 doctoral work on functorial semantics treated algebraic theories and their models categorically. Models could be described by functors preserving specified structure, connecting functorial language with algebra, logic, and the semantics of formal theories.

Mac Lane’s Categories for the Working Mathematician, first published in 1971, helped consolidate the terminology and techniques. Subsequent work extended their use in programming-language semantics, categorical logic, and higher-dimensional mathematics. Across these developments, the operative requirement remained stronger than simply assigning an output to each input object: a construction must specify how maps are transported, and establish the identities that make those assignments compatible.