In category theory, a branch of mathematics, a pullback (also called a fiber product, fibre product, fibered product or Cartesian square) is the limit of a diagram consisting of two morphisms f : X → Z and g : Y → Z with a common codomain. The pullback is often written
and comes equipped with two natural morphisms P → X and P → Y. The pullback of two morphisms f and g need not exist, but if it does, it is essentially uniquely defined by the two morphisms. In many situations, X ×Z Y may intuitively be thought of as consisting of pairs of elements (x, y) with x in X, y in Y, and f(x) = g(y). For the general definition, a universal property is used, which essentially expresses the fact that the pullback is the "most general" way to complete the two given morphisms to a commutative square.
Explicitly, a pullback of the morphisms f and g consists of an object P and two morphisms p1 : P → X and p2 : P → Y for which the diagram
commutes. Moreover, the pullback (P, p1, p2) must be universal with respect to this diagram. That is, for any other such triple (Q, q1, q2) where q1 : Q → X and q2 : Q → Y are morphisms with f q1 = g q2, there must exist a unique u : Q → P such that
This situation is illustrated in the following commutative diagram.
As with all universal constructions, a pullback, if it exists, is unique up to isomorphism. In fact, given two pullbacks (A, a1, a2) and (B, b1, b2) of the same cospan X → Z ← Y, there is a unique isomorphism between A and B respecting the pullback structure.
The pullback is similar to the product, but not the same. One may obtain the product by "forgetting" that the morphisms f and g exist, and forgetting that the object Z exists. One is then left with a discrete category containing only the two objects X and Y, and no arrows between them. This discrete category may be used as the index set to construct the ordinary binary product. Thus, the pullback can be thought of as the ordinary (Cartesian) product, but with additional structure. Instead of "forgetting" Z, f, and g, one can also "trivialize" them by specializing Z to be the terminal object (assuming it exists). f and g are then uniquely determined and thus carry no information, and the pullback of this cospan can be seen to be the product of X and Y.
In the category of commutative rings (with identity), the pullback is called the fibered product. Let A, B, and C be commutative rings (with identity) and α : A → C and β : B → C (identity preserving) ring homomorphisms. Then the pullback of this diagram exists and given by the subring of the product ring A × B defined by
along with the morphisms
given by and for all . We then have
In complete analogy to the example of commutative rings above, one can show that all pullbacks exist in the category of groups and in the category of modules over some fixed ring.
In the category of sets, the pullback of functions f : X → Z and g : Y → Z always exists and is given by the set
Alternatively one may view the pullback in Set asymmetrically:
where is the disjoint union of sets (the involved sets are not disjoint on their own unless f resp. g is injective). In the first case, the projection π1 extracts the x index while π2 forgets the index, leaving elements of Y.
This example motivates another way of characterizing the pullback: as the equalizer of the morphisms f ∘ p1, g ∘ p2 : X × Y → Z where X × Y is the binary product of X and Y and p1 and p2 are the natural projections. This shows that pullbacks exist in any category with binary products and equalizers. In fact, by the existence theorem for limits, all finite limits exist in a category with binary products and equalizers; equivalently, all finite limits exist in a category with terminal object and pullbacks (by the fact that binary product = pullback on the terminal object, and that an equalizer is a pullback involving binary product).
Another example of a pullback comes from the theory of fiber bundles: given a bundle map π : E → B and a continuous map f : X → B, the pullback (formed in the category of topological spaces with continuous maps) X ×B E is a fiber bundle over X called the pullback bundle. The associated commutative diagram is a morphism of fiber bundles. This is also the case in the category of differentiable manifolds. A special case is the pullback of two fiber bundles E1, E2 → B. In this case E1 × E2 is a fiber bundle over B × B, and pulling back along the diagonal map B → B × B gives a space homeomorphic (diffeomorphic) to E1 ×B E2, which is a fiber bundle over B. The pullback of two smooth transverse maps into the same differentiable manifold is also a differentiable manifold, and the tangent space of the pullback is the pullback of the tangent spaces along the differential maps.
Preimages of sets under functions can be described as pullbacks as follows:
Suppose f : A → B, B0 ⊆ B. Let g be the inclusion map B0 ↪ B. Then a pullback of f and g (in Set) is given by the preimage f−1[B0] together with the inclusion of the preimage in A
and the restriction of f to f−1[B0]
Because of this example, in a general category the pullback of a morphism f and a monomorphism g can be thought of as the "preimage" under f of the subobject specified by g. Similarly, pullbacks of two monomorphisms can be thought of as the "intersection" of the two subobjects.
Consider the multiplicative monoid of positive integers Z+ as a category with one object. In this category, the pullback of two positive integers m and n is just the pair (LCM(m, n)/m, LCM(m, n)/n), where the numerators are both the least common multiple of m and n. The same pair is also the pushout.