Categories, Functors, Natural Transformations, and Universal Properties
Categories make mathematical assignments precise by fixing the admissible objects, the admissible maps, and how those maps compose. Functors transport that typed structure, natural transformations compare whole functors through commuting squares, and universal properties characterize constructions by existence and uniqueness of compatible maps. These laws—not the use of arrows or abstract notation—are what make the language informative.
This page develops that answer through one running example: the free vector space on a set. It then translates the same checks into a bounded QFT-facing example. All categories used below are ordinary locally small categories, so the morphisms between any fixed pair of objects form a set. Questions about foundations for large collections, higher categories, monoidal structure, homological localization, and descent lie outside the present scope.
Typed categories · Running example · Universal properties · QFT translation · Check your understanding
Categories make composition a typed operation
Section titled “Categories make composition a typed operation”A category consists of objects , a collection of morphisms for every ordered pair of objects, identity morphisms , and composition functions
Thus means apply first and then . Composition is defined only when the codomain of is the domain of . For every composable triple, it obeys
and for every ,
A diagram commutes when any two directed paths with the same starting and ending objects have equal composite morphisms. Commutativity is therefore an equation between typed composites, not a visual property of a drawing.
The choice of morphisms is part of the definition, not an afterthought:
| Category | Objects | Morphisms |
|---|---|---|
| sets | functions | |
| vector spaces over a fixed field | -linear maps | |
| open subsets of a topological space | one arrow when |
The same objects with a different allowed class of maps form a different category. Nor must a morphism be an inclusion, an injective function, or an isomorphism. For example, a group can be regarded as a one-object category whose morphisms are the group elements and whose composition is the group operation.
The opposite category has the same objects and all arrows reversed:
This notation turns a contravariant assignment on into an ordinary covariant functor out of . Keeping that variance visible will matter both for state pullback below and for later local-to-global constructions.
Functors preserve the composition law
Section titled “Functors preserve the composition law”A functor assigns an object to each object and a morphism
to every . These assignments must satisfy
An object assignment without an arrow assignment is not yet a functor, and an arrow assignment that violates either equation is not functorial.
The free-vector-space assignment
Section titled “The free-vector-space assignment”Fix a field . For a set , let be the vector space of finite formal linear combinations of symbols :
The symbols form a basis. A function induces the linear map
Repeated values of simply cause coefficients to add, so need not be injective. On a basis element,
and for ,
Equality on the basis proves equality of the linear maps. Hence
is a functor. The forgetful functor sends a vector space or linear map to its underlying set or function. Calling “forgetful” describes what information is suppressed; its functor laws still have to hold.
Naturality compares entire assignments
Section titled “Naturality compares entire assignments”Let be functors with the same source and target. A natural transformation assigns a component
to every object . For every , the naturality square must commute:
Equivalently, the two paths from to must obey
In the running example, define a set map
The maps are the components of
because every satisfies
Notice the types: is a function of sets, not a linear map. The codomain functor is what makes the comparison well-typed.
Objectwise maps do not automatically form a natural transformation. On the category of finite-dimensional vector spaces, define an endomorphism of each by
For a nonzero inclusion ,
The naturality square fails. “Natural” therefore means compatible with every morphism in the source category, not merely canonical-looking or defined at every object. A natural transformation is a natural isomorphism when every component is an isomorphism; the componentwise inverses then satisfy the reverse naturality equations.
Universal means unique factorization
Section titled “Universal means unique factorization”In category theory, “universal” does not mean “useful everywhere.” It means that a stated class of compatible maps factors in a specified direction, uniquely.
For the pair , take any vector space and any set map . There is a linear map
and it satisfies
This proves existence. It also proves uniqueness: any linear map with this property must send each basis vector to , and a linear map is determined by its values on a basis. Thus every has exactly one compatible linear extension.
The factorization can be packaged as a bijection
This bijection is natural in both variables. If and is linear, then
The first equality follows by evaluating both sides on ; the second follows by evaluating on . This natural family of bijections is often summarized by saying that the free-vector-space functor is left adjoint to the forgetful functor, . The label is useful, but the typed factorization and its uniqueness are the content.
The categorical laws, naturality condition, and free-vector-space/forgetful adjunction used here are treated in Leinster 2014, §§1.1–1.3, pp. 10–30, and §2.1, pp. 41–44.
Why the universal object is not literally unique
Section titled “Why the universal object is not literally unique”Suppose another pair has the same free property on . Applying the two universal properties gives unique compatible linear maps
such that and . Both and agree with on , so uniqueness gives
The same argument using the universal property of gives . Thus is the unique isomorphism compatible with the specified universal maps. The claim is not that the two vector spaces are literally equal, nor that there is only one bare vector-space isomorphism between them.
Other familiar constructions differ mainly in the direction and type of their universal arrows:
| Construction | Characterizing bijection |
|---|---|
| product | |
| coproduct | |
| free vector space |
For fixed and , the product and coproduct bijections are natural in the probe ; the free-vector-space bijection is natural in and . Naturality in further variables requires the corresponding constructions to have been chosen functorially. Existence without uniqueness is insufficient: for example, every set admits a function to a chosen nonempty set, but only a singleton receives a unique function from every set. Also, an arbitrary functor need not preserve products, coproducts, tensor products, or other universal constructions; preservation requires its own theorem or additional structure.
A controlled QFT translation
Section titled “A controlled QFT translation”To expose the categorical content without building a full theory, fix two categories schematically:
- has a declared class of admissible spacetimes as objects and a declared class of admissible embeddings as morphisms;
- has algebras of a chosen kind as objects and specified algebra homomorphisms as morphisms.
The exact geometric, analytic, and algebraic choices are part of a physical framework. They cannot be recovered from the category names alone. Once they are fixed, an observable assignment has the shape
The original formulation cited below writes for a particular four-dimensional spacetime category and makes a particular -algebraic choice of target. The labels and here are schematic: they expose the reusable functor laws without turning those source conventions into universal requirements.
For , functoriality requires
The second equation says that embedding a spacetime in one step or through an intermediate spacetime induces the same algebra morphism. It is a genuine consistency condition, not a decorative reformulation.
If are two such assignments, a candidate comparison must satisfy
for every admissible embedding . Objectwise algebra maps alone do not supply that compatibility.
There is a useful variance check for states. Specialize to a -algebraic target whose morphisms are unital -homomorphisms, so pulling a state back along again gives a state. Let be a chosen set of states on , and assume that these chosen subsets are closed under pullback. Then
reverses the spacetime arrow. Indeed,
Thus the state assignment is naturally viewed as a functor , provided the pullback-closure hypothesis actually holds.
Functoriality by itself does not establish Einstein causality, a time-slice axiom, tensoriality, physical equivalence, or any existence theorem. Nor does it make the algebra maps injective unless injectivity is built into the chosen target morphisms. Those are additional statements with additional hypotheses. The functorial observable assignment, natural comparisons, contravariant state-space assignment, and separate causality and time-slice conditions are set out in Brunetti, Fredenhagen, and Verch 2003, §2.2 and Definition 2.1, pp. 6–8; Definition 2.4, p. 13; and §3.1, pp. 15–20.
A reusable validity checklist
Section titled “A reusable validity checklist”When categorical language appears in a mathematical or physical claim, ask:
- What are the objects and exactly which morphisms are allowed?
- Does every displayed composite type-check, and in which order is it read?
- Are the identity and composition laws verified for the proposed functor?
- Does every required naturality square commute, rather than a few selected examples?
- Does the universal claim prove both existence and uniqueness, with the factorization direction explicit?
- Which additional analytic, algebraic, or physical axioms remain outside the categorical statement?
Common pitfalls
Section titled “Common pitfalls”Treating objects as the whole category. The allowed morphisms and their composition are equally part of the structure. Changing the morphisms can change which functors, natural transformations, and universal objects exist.
Treating an objectwise assignment as functorial. A functor acts on arrows and preserves identities and composition. Neither the arrow action nor its laws follow from an object formula alone.
Using “natural” as a synonym for canonical. Naturality is the equation for every source morphism . An objectwise family can be familiar or basis-independent in some cases and still fail this test.
Dropping uniqueness from a universal property. Existence merely supplies a factorization. Universality singles out exactly one compatible factorization and consequently determines the universal object only up to a unique compatible isomorphism, not literal equality.
Assuming functors preserve every extra construction. Identity and composition preservation are part of the definition. Preservation of limits, tensor products, inner products, topology, or other structure is a separate claim.
Reading physical axioms out of functor notation. The expression records typed covariance. Causality, the time-slice property, dynamics, and equivalence require further data or axioms.
Check your understanding
Section titled “Check your understanding”Retrieval. For , type the composites, state associativity, and write both identity laws for .
Answer check. The long composite lies in and satisfies ; also .
Counterexample check. Re-test the family above on a nonzero map . Which naturality equation fails?
Answer check. For a transformation the equation would be , but its two sides are and .
Calculation checkpoint. Let be the constant map. Compute and explain why the answer does not obstruct functoriality.
Answer check. The result is . The induced map is still linear; a noninjective set map simply combines coefficients at a common image.
Transfer. For , derive the composition law for state pullback from the covariance of .
Answer check. Precomposition reverses order:
This conclusion also needs the chosen state classes to be stable under those pullbacks.
What has been established
Section titled “What has been established”Categorical language carries information only when five checks remain visible: types, composition, functoriality, naturality, and unique factorization. The free-vector-space example exhibits all five explicitly. The QFT translation then shows how observable algebras can vary covariantly while states pull back contravariantly, without mistaking those variance laws for the rest of the physics.
The categorical foundation continues in three different directions: Monoidal, Rigid, and Braided Language, Chain Homotopy, Quasi-Isomorphisms, and Derived Vocabulary, and Presheaves, Sheaves, Cosheaves, and Čech Descent. The designated physical continuation is Locally Covariant QFT as a Functor. That link identifies the canonical home for the fuller framework-specific hypotheses and results. They are not consequences of this primer, which also does not by itself supply every prerequisite of the specialist treatment.
References
Section titled “References”-
Romeo Brunetti, Klaus Fredenhagen, and Rainer Verch, “The Generally Covariant Locality Principle—A New Paradigm for Local Quantum Field Theory,” Communications in Mathematical Physics 237 (2003), 31–68, arXiv:math-ph/0112041v1, §2.2 and Definition 2.1, pp. 6–8; Definition 2.4, p. 13; and §3.1, pp. 15–20. Covariant functors from spacetimes to algebras, natural transformations, additional causality and time-slice axioms, and contravariant state-space assignments.
-
Tom Leinster, Basic Category Theory, Cambridge Studies in Advanced Mathematics 143, Cambridge University Press (2014), arXiv:1612.09375v2, Introduction, pp. 1–6; §§1.1–1.3, pp. 10–30; and §2.1, pp. 41–44. Category and functor laws, naturality, universal properties and their compatible uniqueness, and the free-vector-space/forgetful adjunction. The arXiv edition is a minor-correction version of the 2014 text and is licensed CC BY-NC-SA 4.0.