Let $V$ be a finite-dimensional vector space with basis $e_1, ... e_n$. Then we may write any vector $v$ in the form
$$v = \sum c_i e_i$$
for some coefficients $c_i$. Sending a vector $v$ to the coefficient $c_i$ for fixed $i$ defines a linear functional $e_i^{\ast} : V \to k$. These linear functionals together constitute the dual basis to $V$, and what confused me for a long time is that linear functionals do not transform in the same way as vectors under change of coordinates; we say that vectors transform covariantly but linear functionals transform contravariantly. Before I understood this I was constantly getting confused about the difference between transforming a vector and transforming its components.
For an infinite-dimensional example, consider the vector space $k[x]$ of polynomials in one variable over a field. It has a distinguished set of dual vectors given by the functions $[x^n]$ which return the coefficient of $x^n$ in a polynomial. To be suggestive you can write these functions as $\frac{1}{n!} \frac{d^n}{dx^n}_{x = 0}$. It turns out that the dual space $k[x]^{\ast}$ is precisely the product of the spaces containing each of these dual vectors; for example, the dual space contains vectors that ought to be called
$$(e^{t \frac{d}{dx} })_{x=0} = \sum_{n \ge 0} \frac{t^n}{n!} \frac{d^n}{dx^n}_{x=0}$$
that given a polynomial $f(x)$ return the numerical value of $f(t)$.
Thinking of $\frac{d^0}{dx^0}_{x=0}$ as a toy model for the Dirac delta function, you can think of this construction as a toy model for (Schwartz) distributions.
In differential geometry, the dual of a tangent space $T_p(M)$ at a point $p$ on a manifold $M$ is the cotangent space $T_p^{\ast}(M)$ at $p$. Just as the tangent space captures the infinitesimal behavior of smooth functions $\mathbb{R} \to M$ near $p$ (curves), the cotangent space captures the infinitesimal behavior of smooth functions $M \to \mathbb{R}$ near $p$ (coordinates). Just as a nice family of tangent vectors gives a vector field, a nice family of cotangent vectors gives a 1-form. In classical mechanics, the cotangent bundle is the phase space of a classical particle traveling on $M$; cotangent vectors give momenta.
For me duality really shines when you combine it with tensor products and start using the language of tensors. Then you can describe any kind of linear-ish thing using a combination of tensor products and duals, at least for finite-dimensional vector spaces:
- What's a linear function $V \to W$? It's an element of $V^{\ast} \otimes W$.
- What's a bilinear form $V \times V \to k$? It's an element of $V^{\ast} \otimes V^{\ast}$.
- What's a multiplication $V \times V \to V$? It's an element of $V^{\ast} \otimes V^{\ast} \otimes V$.
When you have a bunch of linear-ish things around, writing them as all tensors helps you keep track of exactly how you can combine them (using tensor contraction). For example, an endomorphism $V \to V$ is an element of $V^{\ast} \otimes V$, but I have a distinguished dual pairing
$$V^{\ast} \otimes V \to k.$$
What does this do to endomorphisms? It's just the trace!
Best Answer
Duality is a very general and broad concept, without a strict definition that captures all those uses. When applied to specific concepts, there usually is a precise definition for just that context. The common idea is that there are two things which basically are just two sides of the same coin.
Common themes in this topic include:
(e.g. roles of points and lines interchanged, roles of variables in LP changed)
(e.g. incidence configuration, vector space, linear program, planar graph, …)
Not every use of the word strictly satisfies all of these aspects, but the general idea usually is still the same.