Mathematical language of duality

As we’ve discussed at various times on this blog, many of the most important recent developments in string / M-theory are based on duality relations. Physical insight is quite ahead of mathematics in this regard. But, in the last decade or two, mathematics has started to properly formulate a language of duality that, on first look, seems incredibly simple but is ultimately very powerful: namely, the language of categories. In foundational mathematical terms, category theory provides tools to express structures – often very general structures – and their duals in a way that comes out naturally through the concept of a categorical product and coproduct. Below is a very brief summary.

Definition of a category

Let us quickly recall the definition of a category \mathcal{C}  . As mentioned in a past post, a category can be constructed for essentially any mathematical object. We can think of a category as a quintessential representation of structure.

Definition 1. A category \mathcal{C}  consists of a class of objects, and, for every pair of objects A,B \in \mathcal{C}  , a class of morphisms hom(A,B)  satisfying the properties:

  • Each morphism has specified domain and codomain objects. If f is a morphism with domain A and codomain B we write f: A \rightarrow B  .
  • For each A \in \mathcal{C}  , there is an identity morphism id_A \in \text{hom}(A,A)  such that for every B \in \mathcal{C}  we have left-right unit laws:

f \circ id_A = f \text{for all} f \in \text{hom}(A,B),

id_A \circ f = f \text{for all} f \in \text{hom}(B,A).

  • For any pair of morphisms f,g with codomain of f equal to codomain of g, there exists a composite morphism g \circ f  . The domain of the composite morphism is equal to the domain of f and the codomain is equal to the codomain of g.

In simple terms, a category is just a collection of objects (metric spaces, topological spaces, or whatever) and structure preserving maps between those objects. It is, in a sense, like a deeper generalisation of set theory, except that we can have categories of sets. A simple illustration of a category is as follows

There are two axioms that must be satisfied in the defining a category:

  • For any f: A \rightarrow B  , the composites 1_B f  and f1_A  are equal to f.
  • Composition is associative and unital. For all A, B,C,D \in \mathcal{C}  , f \in \text{hom}(A,B)  , g \in \text{hom}(B,C)  , and h \in \text{hom}(C, D)  , we have f \circ (h \circ g) = (g \circ f) \circ h  .


We can also define a functor, which maps between categories. We define the notion of a functor as corresponding to a mapping that sends the objects and arrows of one category to the objects and arrows in another category in a structure preserving way.

Definition 2. A functor F  from C  to D  is a structure preserving map between categories such that for each object A  of C  , we have F(A)  in D  .

For each arrow (morphism) f: A \rightarrow B  in C  , we have F(f): F(A) \rightarrow F(B)  such that F(g) \circ F(f) = F(g \circ f)  and F(Id_A) = Id_{F(A)}  .

Suppose f: A \rightarrow C  is a functor between categories A  and C  . For purposes of illustration, we’ll call A  an indexing category, and let’s suppose it’s a simple one with objects a_1, a_2, \  \text{and} \ a_3  :

A functor f out of this category A  is simply the choice of three objects and three arrows in the category C  such that

where f(a_1) = c_1  , f(a_2) = c_2  , and f(a_3) = c_3  . The image of the arrows in A  are the arrows g, k, and h in C  where g = h \circ k  .

Categorical products

What is very neat and exciting is that we can also define the notion of a categorical product (e.g., a product of two categories). For a long time, it was thought that taking a product between two sets was one of the most fundamental operations in mathematics. But, it turns out, from the definition of a categorical product we can still drill deeper and therefore also capture the essence behind the Cartesian product of sets, the direct product of groups or rings, and the product of topological spaces.

This topic is again quite technical but, in short, a simple definition of a categorical product is as follows:

Definition 3. For any categories C  and D  , there is a category C \times D  , their product, whose

  • objects are ordered pairs c,d  , where c is an object of C  and d is an object of D  ,
  • morphisms are ordered pairs with \pi_1 : C \times D \rightarrow C  , \pi_2 : C \times D \rightarrow D  such that for the other candidate X  we define the maps f: X \rightarrow A  , g: X \rightarrow B  for every unique h: C \times D  , and \pi_1 \circ h = f  and \pi_2 \circ h = g  ,
  • and in which composition and identities are defined componentwise.

A first glimpse at duality

Now, what is absolutely amazing is how, from the notion of a product of categories (which is like a generalisation of the Cartesian product of ordered sets), the first glimpse of a fundamental mathematical description of duality naturally emerges in the definition of a categorical coproduct.

Let us return to the definition of a categorical product and its diagram in the previous section. We want to think of its coproduct (i.e., the product in the opposite category). We will have the same picture, except all of the arrows will be reversed which is the same as exchanging domain and codomain.

Definition 4. The co-product C + D  , p_1 : C \rightarrow C + B  , p_2 : D \rightarrow C +D  is such that for each X  , f: C \rightarrow X  , g: D \rightarrow X  there exists a unique h: C + D \rightarrow X  that makes the diagram commute h \circ p_1 = f  and h \circ p_2 = g  .

The coproduct naturally takes the form of the category-theoretic dual notion to the categorical product. We can think of this in terms of a mapping from C  to C^{\text{op}}  .

Definition 5. Let C  be any category. The opposite category C^{\text{op}}  has

  • the same objects as in C  , and
  • a morphism f^{\text{op}}  in C^{\text{op}}  for each a morphism f \in C  so that the domain of f^{\text{op}}  is defined to be the codomain of f and the codomain of f^{\text{op}}  is defined to be the domain of f: i.e., f^{\text{op}}: X \rightarrow Y \in C^{\text{op}} \leftrightarrow f: Y \rightarrow X \in C  .

What this means is that, given C^{\text{op}}  has the same objects and morphisms as C  , the notion of duality in category theory is defined by a reversal of arrows: i.e., each morphism in C^{\text{op}}  is pointing in the opposite direction.

Statement \Sigma  Dual statement \Sigma^{\star}
f : a \rightarrow b  f : b \rightarrow a
a = \text{dom} f  a = \text{cod} f
i = 1_a  i = 1_a
h = g \circ f  h = f \circ g
f  is monicf  is epis
u  is a right inverse of h  u  is a left inverse of h
f  is invertiblef  is invertible
t is a terminal objectt is an initial object

The dual of each of the axioms for a category is also an axiom, while the dual of the dual returns the original statement. This is the duality principle in a nutshell.


[1] E. Riehl, Category theory in context. Dover Publications, 2016. [online].

[2] S. Mac Lane, Category theory for the working mathematician. Springer, 1978. [online].

[3] P. Smith, Category theory: A gentle introduction. [online].

[4] J. Baez, Category theory course. [online].