Duality is a very pervasive and important concept in (modern) mathematics. See Encyclopedia of Mathematics for a list.

Whenever we have two mathematical objects A and B, a set F of "scalars" of some kind, and a function $\beta: A \times B \to F$ that is a structure-preserving map in each variable separately, we can think of the elements of A as elements of the dual of B, and vice versa. Functions like $\beta$ are called

pairings. {III.19 Gowers}

Given two distinct sets of mathematical objects, **duality** means they are isomorphic: $A \cong B$,
or equivalently, $\exists f: A \to B, f^{-1}: B \to A$.
The mathematical structure of the objects are preserved;
all propositions that hold in one formulation also hold in the dual formulation.

When the two sets are identical,
the duality (isomorphism) $∗: A \to A$ is often (but not always) an **involution** (对合):
$x^{∗∗} = x, \forall x \in A$.
In this case, an element is **self-dual** to a dual operation
if it is a fixed point of the dual operation: $x^∗ = x$.

Dual object itself does not carry any extra value than its primal object, but it may be much easier to understand, or make certain otherwise unthinkable calculations possible, which is the major motivation of studying dual objects. Understood more broadly, every Math and Formal Theory is a candidate dual representation of (certain aspects of) the physical world. When a duality is properly established, a formal theory can help us understand the world with parsimony.

A **category** (范畴) $\mathcal{C} = (\text{Ob}\mathcal{C}, \text{Mor}\mathcal{C}, \circ)$
consists of a class $\text{Ob}\mathcal{C}$ of **objects** (物件),
a class $\text{Mor}\mathcal{C}$ of **morphisms** (态射) from one object to another,
and a **composition** (复合) operator $\circ$ on compatible pairs of morphisms,
which satisfies:

- Identity morphisms: $\forall A \in \text{Ob}\mathcal{C}, \exists 1_A \in \text{Mor}\mathcal{C}, 1_A: A \to A$, so that $\forall \alpha: X \to A, \beta: A \to Y$, $1_A \circ \alpha = \alpha, \beta \circ 1_b = \beta$;
- Closed under composition: $\forall \alpha, \beta \in \text{Mor}\mathcal{C}, \alpha: A \to B, \beta: B \to C$, $\exists \beta \circ \alpha \in \text{Mor}\mathcal{C}, \beta \circ \alpha: A \to C$;
- Associative composition: Given $\alpha: A \to B, \beta: B \to C, \gamma: C \to D$, $(\gamma \circ \beta) \circ \alpha = \gamma \circ (\beta \circ \alpha)$;

A category $\mathcal{C}$ is said to be **small**
if $\text{Ob}\mathcal{C}$ and $\text{Mor}\mathcal{C}$ are sets.
Given two objects $A,B \in \text{Ob}\mathcal{C}$,
their set of morphisms $H(A,B)$ in category $\mathcal{C}$ is defined such that
$\alpha \in H(A,B) \iff \alpha: A \to B, \alpha \in \text{Mor}\mathcal{C}$.
A morphism $f: A \to B$ is an **isomorphism** (同构) if it has an inverse:
$\exists f^{-1}: B \to A$, $f \circ f^{-1} = 1_B, f^{-1} \circ f = 1_A$.
Two objects are **isomorphic** if there is an isomorphism between them.

In most concrete categories over sets, an object is some mathematical structure; a morphism is a map between two objects; and the composition is just function composition.

**Logic**:

- operation: negation
- pairs: (proposition, negation); (conjunction, disjunction); (material implication, converse implication);

Bi-implication is self-dual.

**Set theory**:

- operation: complement
- pairs: (set, complement set); (union, intersection); (contained in, contains);

In **projective geometry**, line and point are dual concepts.
In three-dimensional projective geometry, point and plane are dual, while line is self-dual.
In projective geometry, once you have proved a theorem you get a dual theorem for free,
unless the theorem is self-dual or the dual is trivial.
A pair of dual theorems is "Two points determine a line" and "Two lines determine a point".

**Differential geometry**: k-form and k-dimensional surface.

**Linear algebra**, only considering finite dimensional vector spaces:

- Operation: bilinear map from pairs of vector spaces to scalars
- inner product: $\langle , \rangle: V \times V \to \mathbb{R}$

- Pairs: (vector, linear functional), (vector space, dual vector space), (linear map, adjoint linear map), (surjection, injection);

A function from object A to object B very often gives rise to a function from the dual of B to the dual of A. One kind of problem (existence; surjection) is converted into a different kind (uniqueness; injection) in the dual formulation.

**Abstract Algebra**: Pontryagin duality, Abelian groups;

In topology, closed and open are dual concepts.

(closed convex set, polar set)

Structure: linearity, topology, etc.

**Manifold**: Poincare duality

- operation: intersection number $H_i(X) \times H_i(X) \rightarrow Z$
- pairs: (homology, cohomology)

The importance of the duality concept in functional analysis relies chiefly in the possibility of relating properties of representations in one space to those in its dual, a space that can be shown to possess certain analytical regularity properties, such as closure, even if its domain space does not. [@Red-horse2009]

**Functional analysis** duality pairing: $\langle , \rangle$.
Some properties of a function are naturally expressed in the dual formulation.

- Algebraic dual of linear vector space: the set of all linear functionals defined on the space
- Topological dual (phase space) of linear topological vector space:
the set of all continuous linear functionals defined on this space, with a naturally induced topology;
- weak topology in the original space: topology induced by continuous linear functionals;
- the dual of a normed space is a Banach space;
- the dual of a Hilbert space is itself a Hilbert space;
- weak integral (Pettis integral);
- strong integral;

- Distribution and test function

Fourier transform $\mathcal{F}$ on absolutely integrable continuous functions with real domain and complex range. Dual spaces in Fourier transform: time domain and frequency domain.

It is not always easy to translate a statement about a function into an equivalent statement about its Fourier transform.

**Banach space**:

- operation: continuous bilinear map $\langle,): : X×Y→R$
- pairs: (element, continuous linear functional), (Banach space, dual Banach space);

In mathematical optimization theory, duality means that optimization problems may be viewed from either of two perspectives, the primal problem or the dual problem. The solution to the dual problem provides a lower bound to the solution of the primal (minimization) problem. The difference is called the duality gap.

von Neumann conjectured the duality theorem for linear optimization, realizing that two person zero sum matrix game (where minimax = maximin) was equivalent to linear programming.

edge and vertex (undirected graph and its line graph)