# Universal property

In category theory, a branch of mathematics, a universal property is an important property which is satisfied by a universal morphism (see Formal Definition). Universal morphisms can also be thought of more abstractly as initial or terminal objects of a comma category (see Connection with Comma Categories). Universal properties occur almost everywhere in mathematics, and hence the precise category theoretic concept helps point out similarities between different branches of mathematics, some of which may even seem unrelated.

Universal properties may be used in other areas of mathematics implicitly, but the abstract and more precise definition of it can be studied in category theory.

This article gives a general treatment of universal properties. To understand the concept, it is useful to study several examples first, of which there are many: all free objects, direct product and direct sum, free group, free lattice, Grothendieck group, Dedekind–MacNeille completion, product topology, Stone–Čech compactification, tensor product, inverse limit and direct limit, kernel and cokernel, pullback, pushout and equalizer.

## Motivation

Before giving a formal definition of universal properties, we offer some motivation for studying such constructions.

• The concrete details of a given construction may be messy, but if the construction satisfies a universal property, one can forget all those details: all there is to know about the construction is already contained in the universal property. Proofs often become short and elegant if the universal property is used rather than the concrete details. For example, the tensor algebra of a vector space is slightly painful to actually construct, but using its universal property makes it much easier to deal with.
• Universal properties define objects uniquely up to a unique isomorphism. Therefore, one strategy to prove that two objects are isomorphic is to show that they satisfy the same universal property.
• Universal constructions are functorial in nature: if one can carry out the construction for every object in a category C then one obtains a functor on C. Furthermore, this functor is a right or left adjoint to the functor U used in the definition of the universal property.
• Universal properties occur everywhere in mathematics. By understanding their abstract properties, one obtains information about all these constructions and can avoid repeating the same analysis for each individual instance.

## Formal definition

To understand the definition of a universal construction, it is important to look at examples. Universal constructions were not defined out of thin air, but were rather defined after mathematicians began noticing a pattern in many mathematical constructions (see Examples below). Hence, the definition may not make sense to one at first, but will become clear when one reconciles it with concrete examples.

Let $F:C\to D$  be a functor between categories $C$  and $D$ . In what follows, let $X$  be an object of $D$  and $A$  an object of $C$ .

A universal morphism from $X$  to $F$  is a unique pair $(A,u:X\to F(A))$  in $D$  which has the following property, commonly referred to as a universal property. For any morphism of the form $f:X\to F(A')$  in $D$ , there exists a unique morphism $h:A\to A'$  such that the following diagram commutes:

We can dualize this categorical concept. A universal morphism from $F$  to $X$  is a unique pair $(A,u:F(A)\to X)$  that satisfies the following universal property. For any morphism of the form $f:F(A')\to X$  in $D$ , there exists a unique morphism $h:A'\to A$  such that the following diagram commutes:

Note that in each definition, the arrows are reversed. Both definitions are necessary to describe universal constructions with appear in mathematics; but they also arise due to the inherent duality present in category theory. In either case, we say that the pair $(A,u)$  which behaves as above satisfies a universal property.

As a side note, some authors present the second diagram is as follows.

Of course, the diagrams are the same; choosing which way to write it is a matter of taste. They simply differ by a counterclockwise rotation of 180 degrees. However, the original diagram is preferable, because it illustrates the duality between the two definitions, as it is clear the arrows are being reversed in each case.

## Connection with Comma Categories

Universal morphisms can be described more concisely as initial and terminal objects in a comma category.

Let $F:C\to D$  be a functor and $X$  an object of $D$ . Then recall that the comma category $(X\downarrow F)$  is the category where

• Objects are pairs of the form $(B,f:X\to F(B))$ , where $B$  is an object in $C$
• A morphism from $(B,f:X\to F(B))$  to $(B',f':X\to F(B'))$  is given by a morphism $h:B\to B'$  in $C$  such that the diagram commutes:

Now suppose that the object $(A,u:X\to F(A))$  in $(X\downarrow F)$  is initial. Then for every object $(A',f:X\to F(A'))$ , there exists a unique morphism $h:A\to A'$  such that the following diagram commutes.

Note that the equality here simply means the diagrams are the same. Also note that the diagram on the right side of the equality is the exact same as the one offered in defining a universal morphism from $X$  to $F$ . Therefore, we see that a universal morphism from $X$  to $F$  is equivalent to an initial object in the comma category $X\downarrow F$ .

Conversely, recall that the comma category $(F\downarrow X)$  is the category where

• Objects are pairs of the form $(B,f:F(B)\to X)$  where $B$  is an object in $C$
• A morphism from $(B,f:F(B)\to X)$  to $(B',f':F(B')\to X)$  is given by a morphism $h:B\to B'$  in $C$  such that the diagram commutes:

Suppose $(A,u:F(A)\to X)$  is a terminal object in $(F\downarrow X)$ . Then for every object $(A',f:F(A')\to X)$ , there exists a unique morphism $h:A'\to A$  such that the following diagrams commute.

The diagram on the right side of the equality is the same diagram pictured when defining a universal morphism from $F$  to $X$ . Hence, a universal morphism from $F$  to $X$  corresponds with a terminal object in the comma category $F\downarrow X$ .

## Examples

Below are a few examples, to highlight the general idea. The reader can construct numerous other examples by consulting the articles mentioned in the introduction.

### Tensor algebras

Let $C$  be the category of vector spaces $K$ -Vect over a field $K$  and let $D$  be the category of algebras $K$ -Alg over $K$  (assumed to be unital and associative). Let

$U$  : $K$ -Alg$K$ -Vect

be the forgetful functor which assigns to each algebra its underlying vector space.

Given any vector space $V$  over $K$  we can construct the tensor algebra $T(V)$ . The tensor algebra is characterized by the fact:

“Any linear map from $V$  to an algebra $A$  can be uniquely extended to an algebra homomorphism from $T(V)$  to $A$ .”

This statement is an initial property of the tensor algebra since it expresses the fact that the pair $(T(V),i)$ , where $i:V\to U(T(V))$  is the inclusion map, is a universal morphism from the vector space $V$  to the functor $U$ .

Since this construction works for any vector space $V$ , we conclude that $T$  is a functor from $K$ -Vect to $K$ -Alg. This means that $T$  is left adjoint to the forgetful functor $U$  (see the section below on relation to adjoint functors).

### Products

A categorical product can be characterized by a universal construction. For concreteness, one may consider the Cartesian product in Set, the direct product in Grp, or the product topology in Top, where products exist.

Let $X$  and $Y$  be objects of a category $D$  with finite products. The product of $X$  and $Y$  is an object $X$  × $Y$  together with two morphisms

$\pi _{1}$  : $X\times Y\to X$
$\pi _{2}$  : $X\times Y\to Y$

such that for any other object $Z$  of $D$  and morphisms $f:Z\to X$  and $g:Z\to Y$  there exists a unique morphism $h:Z\to X\times Y$  such that $f=\pi _{1}\circ h$  and $g=\pi _{2}\circ h$ .

To understand this characterization as a universal property, take the category $C$  to be the product category $D\times D$  and define the diagonal functor

$\Delta :C\to C\times C$

by $\Delta (X)=(X,X)$  and $\Delta (f:X\to Y)=(f,f)$ . Then $(X\times Y,(\pi _{1},\pi _{2}))$  is a universal morphism from $\Delta$  to the object $(X,Y)$  of $D\times D$ : if $(f,g)$  is any morphism from $(Z,Z)$  to $(X,Y)$ , then it must equal a morphism $\Delta (h:Z\to X\times Y)=(h,h)$  from $\Delta (Z)=(Z,Z)$  to $\Delta (X\times Y)=(X\times Y,X\times Y)$  followed by $(\pi _{1},\pi _{2})$ .

### Limits and colimits

Categorical products are a particular kind of limit in category theory. One can generalize the above example to arbitrary limits and colimits.

Let $J$  and $C$  be categories with $J$  a small index category and let $C^{J}$  be the corresponding functor category. The diagonal functor

$\Delta :C\to C^{J}$

is the functor that maps each object $N$  in $C$  to the constant functor $\Delta (N):J\to C$  to $N$  (i.e. $\Delta (N)(X)=N$  for each $X$  in $J$ ).

Given a functor $F:J\to C$  (thought of as an object in $C^{J}$ ), the limit of $F$ , if it exists, is nothing but a universal morphism from $\Delta$  to $F$ . Dually, the colimit of $F$  is a universal morphism from $F$  to $\Delta$ .

## Properties

### Existence and uniqueness

Defining a quantity does not guarantee its existence. Given a functor $F:C\to D$  and an object $X$  of $C$ , there may or may not exist a universal morphism from $X$  to $F$ . If, however, a universal morphism $(A,u)$  does exist, then it is essentially unique. Specifically, it is unique up to a unique isomorphism: if $(A',u')$  is another pair, then there exists a unique isomorphism $k:A\to A'$  such that $u'=F(k)\circ u$ . This is easily seen by substituting $(A,u')$  in the definition of a universal morphism.

It is the pair $(A,u)$  which is essentially unique in this fashion. The object $A$  itself is only unique up to isomorphism. Indeed, if $(A,u)$  is a universal morphism and $k:A\to A'$  is any isomorphism then the pair $(A',u')$ , where $u'=F(k)\circ u$  is also a universal morphism.

### Equivalent formulations

The definition of a universal morphism can be rephrased in a variety of ways. Let $F:C\to D$  be a functor and let $X$  be an object of $D$ . Then the following statements are equivalent:

• $(A,u)$  is a universal morphism from $X$  to $F$
• $(A,u)$  is an initial object of the comma category $(X\downarrow F)$
• $(A,u)$  is a representation of ${\text{Hom}}_{D}(X,F(-))$

The dual statements are also equivalent:

• $(A,u)$  is a universal morphism from $F$  to $X$
• $(A,u)$  is a terminal object of the comma category $(F\downarrow X)$
• $(A,u)$  is a representation of ${\text{Hom}}_{D}(F(-),X)$

Suppose $(A_{1},u_{1})$  is a universal morphism from $X_{1}$  to $F$  and $(A_{2},u_{2})$  is a universal morphism from $X_{2}$  to $F$ . By the universal property of universal morphisms, given any morphism $h:X_{1}\to X_{2}$  there exists a unique morphism $g:A_{1}\to A_{2}$  such that the following diagram commutes:

If every object $X_{i}$  of $D$  admits a universal morphism to $F$ , then the assignment $X_{i}\mapsto A_{i}$  and $h\mapsto g$  defines a functor $G:D\to C$ . The maps $u_{i}$  then define a natural transformation from $1_{C}$  (the identity functor on $C$ ) to $F\circ G$ . The functors $(F,G)$  are then a pair of adjoint functors, with $G$  left-adjoint to $F$  and $F$  right-adjoint to $G$ .

Similar statements apply to the dual situation of terminal morphisms from $F$ . If such morphisms exist for every $X$  in $C$  one obtains a functor $G:C\to D$  which is right-adjoint to $F$  (so $F$  is left-adjoint to $G$ ).

Indeed, all pairs of adjoint functors arise from universal constructions in this manner. Let $F$  and $G$  be a pair of adjoint functors with unit $\eta$  and co-unit $\epsilon$  (see the article on adjoint functors for the definitions). Then we have a universal morphism for each object in $C$  and $D$ :

• For each object $X$  in $C$ , $(F(X),\eta _{X})$  is a universal morphism from $X$  to $G$ . That is, for all $f:X\to G(Y)$  there exists a unique $g:F(X)\to Y$  for which the following diagrams commute.
• For each object $Y$  in $D$ , $(G(Y),\eta _{Y})$  is a universal morphism from $F$  to $Y$ . That is, for all $g:F(X)\to Y$  there exists a unique $f:X\to G(Y)$  for which the following diagrams commute.

Universal constructions are more general than adjoint functor pairs: a universal construction is like an optimization problem; it gives rise to an adjoint pair if and only if this problem has a solution for every object of $C$  (equivalently, every object of $D$ ).

## History

Universal properties of various topological constructions were presented by Pierre Samuel in 1948. They were later used extensively by Bourbaki. The closely related concept of adjoint functors was introduced independently by Daniel Kan in 1958.