Extended-Real Convex Functions
On the gradient-descent page, a
convex function
\(f : \mathcal{S} \to \mathbb{R}\) is real-valued and defined on a convex set
\(\mathcal{S} \subseteq \mathbb{R}^n\). A constrained problem minimizes such an \(f\) over a nonempty feasible set
\(C \subseteq \mathcal{S}\), so it is given by two objects, the objective and the feasible set. One reformulation
combines the two objects into a single function. We let the objective take the value \(+\infty\) outside \(C\).
Minimizing the extended objective over all of \(\mathbb{R}^n\) is the same as minimizing \(f\) over \(C\), because
the extended objective equals \(+\infty\) at every point outside \(C\).
This page develops the calculus of such extended-real functions and its central construction, the convex conjugate.
The conjugate turns a function of a point into a function of a slope, and the duality theory of convex optimization
can be written in its terms.
Convention. Throughout this page \(n \geq 1\), vectors \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\)
are paired by \(\mathbf{y}^\top \mathbf{x}\), and functions take values in the extended real line
\([-\infty, +\infty]\), ordered so that \(-\infty \lt a \lt +\infty\) for every real \(a\). The logarithm \(\log\) is
the natural logarithm. We use only the following arithmetic. Adding \(+\infty\) gives
\(a + (+\infty) = (+\infty) + a = +\infty\) for \(a \in (-\infty, +\infty]\), and adding \(-\infty\) gives
\(a + (-\infty) = (-\infty) + a = -\infty\) for \(a \in [-\infty, +\infty)\). Scaling and negation give
\(t \cdot (\pm\infty) = \pm\infty\) for real \(t \gt 0\) and \(-(\pm\infty) = \mp\infty\). The expression
\(+\infty + (-\infty)\) is never formed.
Every set \(A \subseteq [-\infty, +\infty]\) has a least upper bound \(\sup A\) in \([-\infty, +\infty]\). It equals
\(+\infty\) if \(A\) contains \(+\infty\) or if \(A \cap \mathbb{R}\) is unbounded above. Otherwise it equals the
real supremum of
\(A \cap \mathbb{R}\) when that set is nonempty, and \(-\infty\) when \(A \subseteq \{-\infty\}\). In particular,
\(\sup \emptyset = -\infty\). Infima are defined symmetrically, with \(\inf \emptyset = +\infty\). The space
\(\mathbb{R}^{n+1} = \mathbb{R}^n \times \mathbb{R}\) carries the Euclidean distance.
Epigraph and Effective Domain
Definition: Epigraph
The epigraph of a function \(f : \mathbb{R}^n \to [-\infty, +\infty]\) is the set of
points on or above its graph,
\[
\operatorname{epi} f = \{\, (\mathbf{x}, t) \in \mathbb{R}^n \times \mathbb{R} : f(\mathbf{x}) \leq t \,\}
\subseteq \mathbb{R}^{n+1}.
\]
The second coordinate \(t\) is always a real number.
Definition: Effective Domain
The effective domain of \(f : \mathbb{R}^n \to [-\infty, +\infty]\) is
\[
\operatorname{dom}(f) = \{\, \mathbf{x} \in \mathbb{R}^n : f(\mathbf{x}) \lt +\infty \,\}.
\]
It is the image of \(\operatorname{epi} f\) under the projection \((\mathbf{x}, t) \mapsto \mathbf{x}\), since a
real \(t \geq f(\mathbf{x})\) exists exactly when \(f(\mathbf{x}) \lt +\infty\).
The notation \(\operatorname{dom}(f)\) agrees with that of the gradient-descent page, where the
subgradient is defined on the domain of a
real-valued convex function. A real-valued function on a set \(\mathcal{S}\), extended by \(+\infty\) off
\(\mathcal{S}\), has effective domain exactly \(\mathcal{S}\). The
Lagrange dual function is
concave and takes values in \([-\infty, +\infty)\). Its effective domain, the set where it is finite, is the mirror
image of the notion above, with the roles of \(+\infty\) and \(-\infty\) exchanged.
Convexity
Definition: Extended-Real Convex Function
A function \(f : \mathbb{R}^n \to [-\infty, +\infty]\) is convex if its epigraph
\(\operatorname{epi} f\) is a
convex subset of
\(\mathbb{R}^{n+1}\).
For functions that never take the value \(-\infty\), the next result shows that this definition agrees with the
real-valued one, applied on the effective domain.
Proposition: Convexity Through the Effective Domain
Let \(f : \mathbb{R}^n \to (-\infty, +\infty]\). The following are equivalent.
- \(f\) is convex, that is, \(\operatorname{epi} f\) is convex.
- \(\operatorname{dom}(f)\) is convex, and the restriction of \(f\) to \(\operatorname{dom}(f)\) is a
convex function
in the real-valued sense.
- For all \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\) and all \(\lambda \in (0, 1)\),
\[
f\big(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y}\big) \leq \lambda f(\mathbf{x}) + (1 - \lambda) f(\mathbf{y}),
\]
where \(\lambda \cdot (+\infty) = +\infty\) for \(\lambda \gt 0\) and \(a + (+\infty) = (+\infty) + a = +\infty\)
for every \(a \in (-\infty, +\infty]\).
Proof
(1) \(\Rightarrow\) (2). Let \(\mathbf{x}, \mathbf{y} \in \operatorname{dom}(f)\) and \(\lambda \in [0, 1]\).
Since \(f\) never equals \(-\infty\), the values \(f(\mathbf{x})\) and \(f(\mathbf{y})\) are real, so
\((\mathbf{x}, f(\mathbf{x}))\) and \((\mathbf{y}, f(\mathbf{y}))\) lie in \(\operatorname{epi} f\). By
convexity of the epigraph, the point
\(\big(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y},\ \lambda f(\mathbf{x}) + (1 - \lambda) f(\mathbf{y})\big)\)
lies in \(\operatorname{epi} f\), which means
\[
\begin{align*}
f\big(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y}\big)
&\leq \lambda f(\mathbf{x}) + (1 - \lambda) f(\mathbf{y}) \\\\
&\lt +\infty.
\end{align*}
\]
The strict inequality puts \(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y}\) in \(\operatorname{dom}(f)\), so
\(\operatorname{dom}(f)\) is convex, and the non-strict inequality is the convexity of the restriction.
(2) \(\Rightarrow\) (3). Fix \(\lambda \in (0, 1)\). If \(\mathbf{x}\) and \(\mathbf{y}\) both lie in
\(\operatorname{dom}(f)\), the inequality holds because the restriction is convex. Otherwise one of
\(f(\mathbf{x})\), \(f(\mathbf{y})\) equals \(+\infty\) and the other is not \(-\infty\). Since
\(\lambda \gt 0\) and \(1 - \lambda \gt 0\), the right-hand side equals \(+\infty\) and the inequality holds.
(3) \(\Rightarrow\) (1). Let \((\mathbf{x}, s)\) and \((\mathbf{y}, t)\) lie in \(\operatorname{epi} f\) and let
\(\lambda \in [0, 1]\). The endpoints \(\lambda = 0, 1\) return the given points. For \(\lambda \in (0, 1)\), the
values \(f(\mathbf{x})\) and \(f(\mathbf{y})\) are real, with \(f(\mathbf{x}) \leq s\) and
\(f(\mathbf{y}) \leq t\), and (3) gives
\[
\begin{align*}
f\big(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y}\big)
&\leq \lambda f(\mathbf{x}) + (1 - \lambda) f(\mathbf{y}) \\\\
&\leq \lambda s + (1 - \lambda) t.
\end{align*}
\]
Hence \(\big(\lambda \mathbf{x} + (1 - \lambda) \mathbf{y},\ \lambda s + (1 - \lambda) t\big) \in \operatorname{epi} f\).
In particular, a real-valued convex function on a convex set \(\mathcal{S}\), extended by \(+\infty\) off
\(\mathcal{S}\), is convex in the extended sense. The restriction to functions that never equal \(-\infty\) is
needed in (3), where a value \(-\infty\) at one point and \(+\infty\) at another would produce the forbidden sum.
Definition: Proper Function
A function \(f : \mathbb{R}^n \to [-\infty, +\infty]\) is proper if
\(f(\mathbf{x}) \gt -\infty\) for every \(\mathbf{x}\) and \(\operatorname{dom}(f) \neq \emptyset\). A
proper convex function is a function that is both proper and convex. A
proper map
of topology, whose preimages of compact sets are compact, is an unrelated notion.
A proper function thus takes values in \((-\infty, +\infty]\) and is finite somewhere. Improper functions cannot be
avoided entirely, because the conjugate of a proper function can be identically \(+\infty\), as we will see.
Closedness and Lower Semicontinuity
Definition: Closed Function
A function \(f : \mathbb{R}^n \to [-\infty, +\infty]\) is closed if \(\operatorname{epi} f\) is
a closed subset of
\(\mathbb{R}^{n+1}\). A closed convex function is a function that is both closed and convex. A
closed map of topology,
which sends closed sets to closed sets, is an unrelated notion.
The next theorem expresses closedness through sublevel sets and through sequences, which is how it is used in
practice. The definition applies to improper functions as well, and every result on this page that needs properness
assumes it explicitly.
Theorem: Characterizations of Closed Functions
For a sequence \(\{a_k\}\) in \([-\infty, +\infty]\), let
\(\liminf_{k \to \infty} a_k = \sup_{m \geq 1} \inf_{k \geq m} a_k \in [-\infty, +\infty]\). A function
\(f : \mathbb{R}^n \to [-\infty, +\infty]\) is lower semicontinuous (lsc) at
\(\mathbf{x}\) if \(f(\mathbf{x}) \leq \liminf_{k \to \infty} f(\mathbf{x}_k)\) for every sequence
\(\mathbf{x}_k \to \mathbf{x}\). The following are equivalent.
- \(f\) is closed.
- Every sublevel set \(L_\alpha = \{\, \mathbf{x} : f(\mathbf{x}) \leq \alpha \,\}\), \(\alpha \in \mathbb{R}\),
is closed in \(\mathbb{R}^n\).
- \(f\) is lsc at every point of \(\mathbb{R}^n\).
Proof
We first record how closed sets meet sequences in a metric space \((X, d)\). A subset \(S \subseteq X\) is closed
if and only if \(S\) contains the limit of every convergent sequence of points of \(S\). Convergence
\(x_k \to x\) means, by the
criteria for convergence,
that every open ball centered at \(x\) includes a tail of \(\{x_k\}\).
Suppose \(S\) is closed, that is, \(S\) contains the set \(\partial S\) of its
boundary points, and let
\(x_k \in S\) converge to \(x\). Every ball around \(x\) meets \(S\), so the
distance
\(\operatorname{dist}(x, S)\) is \(0\). If \(x\) were outside \(S\), then \(\operatorname{dist}(x, S^c) = 0\) as
well, so \(x\) would be a boundary point of \(S\) and hence lie in \(S\), a contradiction.
Conversely, suppose \(S\) contains the limits of its convergent sequences, and let \(a \in \partial S\). Then
\(\operatorname{dist}(a, S) = 0\), so \(S\) is nonempty, because the distance to the empty set is \(+\infty\).
Moreover, for each \(k\) there is \(s_k \in S\) with \(d(a, s_k) \lt 1/k\). Every ball around \(a\) contains a
tail of \(\{s_k\}\), so \(s_k \to a\) and \(a \in S\). Hence \(\partial S \subseteq S\).
In \(\mathbb{R}^{n+1}\), the distance from \((\mathbf{x}, t)\) to \((\mathbf{x}', t')\) dominates both the
Euclidean norm \(\|\mathbf{x} - \mathbf{x}'\|\) and \(|t - t'|\), and is at most their sum. So
\((\mathbf{x}_k, t_k) \to (\mathbf{x}, t)\) exactly when \(\mathbf{x}_k \to \mathbf{x}\) and \(t_k \to t\).
(1) \(\Rightarrow\) (2). Let \(\mathbf{x}_k \in L_\alpha\) converge to \(\mathbf{x}\). Then
\((\mathbf{x}_k, \alpha) \in \operatorname{epi} f\) converges to \((\mathbf{x}, \alpha)\), which lies in the
closed set \(\operatorname{epi} f\). So \(f(\mathbf{x}) \leq \alpha\), that is, \(\mathbf{x} \in L_\alpha\).
(2) \(\Rightarrow\) (3). Suppose \(\mathbf{x}_k \to \mathbf{x}\) but
\(\liminf_{k \to \infty} f(\mathbf{x}_k) \lt f(\mathbf{x})\). Choose a real \(\alpha\) strictly between these two
extended reals. Every tail infimum \(\inf_{k \geq m} f(\mathbf{x}_k)\) is at most the liminf, hence below
\(\alpha\), so infinitely many indices \(k\) satisfy \(f(\mathbf{x}_k) \lt \alpha\). The corresponding terms form
a subsequence \(\{\mathbf{x}_{k_j}\}\) in \(L_\alpha\), which still converges to \(\mathbf{x}\) because
every subsequence of a convergent sequence has the same limit.
Since \(L_\alpha\) is closed, \(f(\mathbf{x}) \leq \alpha\), which contradicts the choice of \(\alpha\).
(3) \(\Rightarrow\) (1). Let \((\mathbf{x}_k, t_k) \in \operatorname{epi} f\) converge to \((\mathbf{x}, t)\), so
\(\mathbf{x}_k \to \mathbf{x}\) and \(t_k \to t\). Given \(\varepsilon \gt 0\), there is \(m\) with
\(t_k \lt t + \varepsilon\) for all \(k \geq m\), and then \(f(\mathbf{x}_k) \leq t_k \lt t + \varepsilon\) for
these \(k\). Every tail infimum of \(\{f(\mathbf{x}_k)\}\) that starts at an index of at least \(m\) is therefore
below \(t + \varepsilon\), and the earlier tail infima are no larger, so the liminf is at most
\(t + \varepsilon\). By lower semicontinuity, \(f(\mathbf{x}) \leq t + \varepsilon\) for every
\(\varepsilon \gt 0\), hence \(f(\mathbf{x}) \leq t\) and \((\mathbf{x}, t) \in \operatorname{epi} f\).
On the weak-topology page the same inequality, taken along weakly convergent sequences in a normed space,
defines
weak lower semicontinuity.
The norm version used there is the lsc condition of the theorem above, with \(\mathbb{R}^n\) replaced by
a normed space.
Example: The Entropy Integrand and Its Value at Zero
Let \(\phi_1(x) = x \log x\) for \(x \gt 0\) and \(\phi_1(x) = +\infty\) for \(x \leq 0\). On \((0, \infty)\)
we have \(\phi_1''(x) = 1/x \gt 0\), so the restriction to \((0, \infty)\) is convex by the
second-order condition,
and since \(\operatorname{dom}(\phi_1) = (0, \infty)\) is convex, \(\phi_1\) is convex by the proposition
above. It is not closed. The sublevel set \(\{\phi_1 \leq 0\} = (0, 1]\) contains the points \(1/k\) but not
their limit \(0\).
Now set \(\phi(x) = \phi_1(x)\) for \(x \neq 0\) and \(\phi(0) = 0\), the convention \(0 \log 0 = 0\). For
\(v \geq 1\) we have \(\log v \leq v\), since the function \(v - \log v\) equals \(1\) at \(v = 1\) and has
derivative \(1 - 1/v \geq 0\). For \(0 \lt u \leq 1\), this bound applied to \(v = 1/\sqrt{u}\) gives
\(\log(1/u) = 2 \log(1/\sqrt{u}) \leq 2/\sqrt{u}\), hence
\[
|u \log u| \leq 2\sqrt{u} \quad \text{for } 0 \lt u \leq 1.
\]
For convexity of \(\phi\), the restriction to \(\operatorname{dom}(\phi) = [0, \infty)\) satisfies the convexity
inequality for points in \((0, \infty)\) as \(\phi_1\) does, and trivially when both points are \(0\). It
remains to treat one endpoint at \(0\). For \(y \gt 0\) and \(\lambda \in (0, 1)\),
\(\log((1 - \lambda) y) \leq \log y\) gives
\(\phi((1 - \lambda) y) \leq (1 - \lambda) \phi(y) = \lambda \phi(0) + (1 - \lambda) \phi(y)\). The order of the
two points does not matter. As \([0, \infty)\) is convex, the proposition above shows that \(\phi\) is convex.
For closedness we check lower semicontinuity. At \(x \gt 0\), \(\phi\) is continuous. At \(x \lt 0\), every
sequence converging to \(x\) eventually stays in \((-\infty, 0)\), where \(\phi = +\infty\). At \(x = 0\), let
\(x_k \to 0\), so that \(|x_k| \leq 1\) for all large \(k\). For such \(k\), a term with \(x_k \lt 0\) has
\(\phi(x_k) = +\infty\), and a term with \(0 \leq x_k \leq 1\) has \(\phi(x_k) \geq -2\sqrt{x_k}\). Given
\(\varepsilon \gt 0\), all large \(k\) also have \(|x_k| \leq \varepsilon^2/4\), so all late terms satisfy
\(\phi(x_k) \geq -\varepsilon\). Every late tail infimum is therefore at least \(-\varepsilon\). Hence
\(\liminf_{k \to \infty} \phi(x_k) \geq 0 = \phi(0)\), and \(\phi\) is a closed proper convex function.
Changing a single value turned a convex function that is not closed into a closed one. The function \(\phi\)
reappears in the negative entropy of the last section.
The Convex Indicator
Definition: Convex Indicator Function
The convex indicator of a set \(C \subseteq \mathbb{R}^n\) is
\[
\iota_C(\mathbf{x}) =
\begin{cases}
0 & \text{if } \mathbf{x} \in C, \\
+\infty & \text{if } \mathbf{x} \notin C.
\end{cases}
\]
The indicator function of integration
theory, with values \(1\) and \(0\), is a different function.
The letter \(\iota\) also denotes interior multiplication and inclusion maps on our manifold pages. On this page
\(\iota_C\) is always the function above, with values \(0\) and \(+\infty\), never a map between spaces.
The epigraph of the convex indicator is \(\operatorname{epi} \iota_C = C \times [0, \infty)\), and its sublevel sets
are \(\{\iota_C \leq \alpha\} = \emptyset\) for \(\alpha \lt 0\) and \(C\) for \(\alpha \geq 0\). Three facts follow.
First, \(\iota_C\) is convex if and only if \(C\) is convex. If \(C\) is convex, so is the product
\(C \times [0, \infty)\). Conversely, \(C = \operatorname{dom}(\iota_C)\) inherits convexity from the epigraph by the
proposition above. Second, \(\iota_C\) is closed if and only if \(C\) is closed, by the sublevel-set
characterization. Third, \(\iota_C\) is proper exactly when \(C \neq \emptyset\).
For any \(f : \mathbb{R}^n \to (-\infty, +\infty]\), the function \(f + \iota_C\) agrees with \(f\) on \(C\) and
equals \(+\infty\) off \(C\), so
\[
\inf_{\mathbf{x} \in C} f(\mathbf{x}) = \inf_{\mathbf{x} \in \mathbb{R}^n} \big(f + \iota_C\big)(\mathbf{x}).
\]
This identity is the reformulation announced at the start of the page. A constraint becomes a term
of the objective.
The Convex Conjugate
An affine function \(\mathbf{x} \mapsto \mathbf{y}^\top \mathbf{x} - \beta\) lies below \(f\) everywhere exactly when
\(\beta \geq \mathbf{y}^\top \mathbf{x} - f(\mathbf{x})\) for every \(\mathbf{x}\). For a fixed slope \(\mathbf{y}\),
the admissible real \(\beta\) are therefore exactly those that are at least the supremum of
\(\mathbf{y}^\top \mathbf{x} - f(\mathbf{x})\) over \(\mathbf{x}\). When this supremum is finite, it is the smallest
admissible \(\beta\). Recording the supremum for every slope gives a new function.
Definition: Convex Conjugate
The convex conjugate (or Fenchel conjugate) of
\(f : \mathbb{R}^n \to [-\infty, +\infty]\) is the function \(f^* : \mathbb{R}^n \to [-\infty, +\infty]\),
\[
f^*(\mathbf{y}) = \sup_{\mathbf{x} \in \mathbb{R}^n} \big( \mathbf{y}^\top \mathbf{x} - f(\mathbf{x}) \big).
\]
A point with \(f(\mathbf{x}) = +\infty\) contributes the value \(-\infty\), and a point with
\(f(\mathbf{x}) = -\infty\) contributes \(+\infty\). When \(f\) never equals \(-\infty\), the supremum may
therefore be taken over \(\operatorname{dom}(f)\) alone.
The star is the usual notation of convex analysis. This use of the star differs from its use for the
dual space
\(\mathcal{X}^*\) and for the adjoint \(A^*\) of an operator, although the pairing \(\mathbf{y}^\top \mathbf{x}\)
does treat \(\mathbf{y}\) as a linear functional.
The opening remark can be restated in terms of \(f^*\). For a real \(\beta\), the affine function
\(\mathbf{x} \mapsto \mathbf{y}^\top \mathbf{x} - \beta\) lies below \(f\) if and only if
\(\beta \geq f^*(\mathbf{y})\). An affine function lying below \(f\) is an affine minorant of
\(f\). When \(f^*(\mathbf{y})\) is finite, the largest affine minorant with slope \(\mathbf{y}\) is
\(\mathbf{x} \mapsto \mathbf{y}^\top \mathbf{x} - f^*(\mathbf{y})\), and \(-f^*(\mathbf{y})\) is its value at
\(\mathbf{x} = \mathbf{0}\). When \(f^*(\mathbf{y}) = +\infty\), no affine function with slope \(\mathbf{y}\) lies
below \(f\). When \(f^*(\mathbf{y}) = -\infty\), which by the theorem below happens only for \(f \equiv +\infty\),
every affine function lies below \(f\).
Theorem: The Conjugate Is Closed and Convex
For every \(f : \mathbb{R}^n \to [-\infty, +\infty]\), the conjugate \(f^*\) is a closed convex function.
Moreover, the following hold.
- \(f^* \equiv -\infty\) if and only if \(f \equiv +\infty\).
- If \(f(\mathbf{x}_0) = -\infty\) for some \(\mathbf{x}_0\), then \(f^* \equiv +\infty\).
- If \(f\) is proper, then \(f^*(\mathbf{y}) \gt -\infty\) for every \(\mathbf{y}\).
Proof
For each \(\mathbf{x}\), let
\(a_{\mathbf{x}}(\mathbf{y}) = \mathbf{y}^\top \mathbf{x} - f(\mathbf{x})\). It is an affine function of
\(\mathbf{y}\) when \(f(\mathbf{x})\) is real, the constant \(-\infty\) when
\(f(\mathbf{x}) = +\infty\), and the constant \(+\infty\) when \(f(\mathbf{x}) = -\infty\). Since
\(f^* = \sup_{\mathbf{x}} a_{\mathbf{x}}\), a pair
\((\mathbf{y}, t) \in \mathbb{R}^n \times \mathbb{R}\) satisfies \(f^*(\mathbf{y}) \leq t\) exactly when
\(a_{\mathbf{x}}(\mathbf{y}) \leq t\) for every \(\mathbf{x}\). Hence
\[
\operatorname{epi} f^* = \bigcap_{\mathbf{x} \in \mathbb{R}^n} E_{\mathbf{x}},
\]
where \(E_{\mathbf{x}} = \{\, (\mathbf{y}, t) : a_{\mathbf{x}}(\mathbf{y}) \leq t \,\}\).
Each \(E_{\mathbf{x}}\) is all of \(\mathbb{R}^{n+1}\), the empty set, or the half-space
\(\{\, (\mathbf{y}, t) : \mathbf{x}^\top \mathbf{y} - t \leq f(\mathbf{x}) \,\}\). Sets of all three kinds are
convex, so the intersection is convex. They are also closed. For the half-space, let
\((\mathbf{y}_k, t_k) \to (\mathbf{y}, t)\) with \((\mathbf{y}_k, t_k) \in E_{\mathbf{x}}\). Every coordinate of
\(\mathbf{y}_k\) converges to the corresponding coordinate of \(\mathbf{y}\), so the finite sum
\(\mathbf{x}^\top \mathbf{y}_k\) converges to \(\mathbf{x}^\top \mathbf{y}\). Letting \(k \to \infty\) in
\(\mathbf{x}^\top \mathbf{y}_k - t_k \leq f(\mathbf{x})\) gives \((\mathbf{y}, t) \in E_{\mathbf{x}}\). The
intersection inherits this property, so it contains the limits of its convergent sequences. By the sequential
test for closed sets, recorded at the start of the proof of the closed-function characterizations, it is closed.
Thus \(f^*\) is closed and convex.
For (1), if \(f \equiv +\infty\), every \(a_{\mathbf{x}}\) is the constant \(-\infty\) and so is \(f^*\).
If instead \(f(\mathbf{x}_0) \lt +\infty\) for some \(\mathbf{x}_0\), then
\(f^*(\mathbf{y}) \geq a_{\mathbf{x}_0}(\mathbf{y}) \gt -\infty\) for every \(\mathbf{y}\). For (2), the term
\(a_{\mathbf{x}_0}\) is the constant \(+\infty\). Statement (3) follows from the argument for the second half
of (1), since a proper function is finite at some point.
The theorem places no hypothesis on \(f\). Whatever \(f\) is, \(f^*\) is closed and convex. By the opening remark,
\(f^*(\mathbf{y})\) records only which affine functions with slope \(\mathbf{y}\) lie below \(f\), so two functions
with the same affine minorants have the same conjugate. A later page takes up, through the biconjugate, the question
of which functions share their affine minorants with \(f\).
Properness of \(f\), however, does not make \(f^*\) proper. The function \(f(\mathbf{x}) = -\|\mathbf{x}\|^2\), with
the Euclidean norm, is proper. For any \(\mathbf{y}\), choose a unit vector \(\mathbf{u}\) with
\(\mathbf{y}^\top \mathbf{u} \geq 0\), for instance \(\mathbf{u} = \mathbf{y}/\|\mathbf{y}\|\) when
\(\mathbf{y} \neq \mathbf{0}\). The points \(\mathbf{x} = s\mathbf{u}\) with \(s \gt 0\) give
\[
\mathbf{y}^\top \mathbf{x} - f(\mathbf{x}) = s\, \mathbf{y}^\top \mathbf{u} + s^2 \geq s^2,
\]
which grows without bound as \(s \to \infty\). So \(f^* \equiv +\infty\).
Rules of Calculation
Theorem: Rules for Conjugates
Let \(f : \mathbb{R}^n \to (-\infty, +\infty]\).
- Scaling. For \(\alpha \gt 0\), \((\alpha f)^*(\mathbf{y}) = \alpha f^*(\mathbf{y}/\alpha)\).
- Translation. If \(g(\mathbf{x}) = f(\mathbf{x} - \mathbf{c})\), then
\(g^*(\mathbf{y}) = f^*(\mathbf{y}) + \mathbf{c}^\top \mathbf{y}\).
- Adding an affine function. If \(g(\mathbf{x}) = f(\mathbf{x}) + \mathbf{b}^\top \mathbf{x} + d\)
with \(\mathbf{b} \in \mathbb{R}^n\) and \(d \in \mathbb{R}\), then \(g^*(\mathbf{y}) = f^*(\mathbf{y} - \mathbf{b}) - d\).
- Invertible linear change of variables. If \(A \in \mathbb{R}^{n \times n}\) is invertible and
\(g(\mathbf{x}) = f(A\mathbf{x})\), then \(g^*(\mathbf{y}) = f^*(A^{-\top} \mathbf{y})\), where
\(A^{-\top} = (A^{-1})^\top\).
- Order reversal. If \(f \leq g\) pointwise for \(g : \mathbb{R}^n \to (-\infty, +\infty]\),
then \(f^* \geq g^*\) pointwise.
- Separable sums. Let \(f_1 : \mathbb{R}^{n_1} \to (-\infty, +\infty]\) and
\(f_2 : \mathbb{R}^{n_2} \to (-\infty, +\infty]\) be proper, and
\(f(\mathbf{x}_1, \mathbf{x}_2) = f_1(\mathbf{x}_1) + f_2(\mathbf{x}_2)\). Then
\(f^*(\mathbf{y}_1, \mathbf{y}_2) = f_1^*(\mathbf{y}_1) + f_2^*(\mathbf{y}_2)\). Here \(n = n_1 + n_2\), and
\(\mathbb{R}^n = \mathbb{R}^{n_1} \times \mathbb{R}^{n_2}\) carries the pairing
\(\mathbf{y}^\top \mathbf{x} = \mathbf{y}_1^\top \mathbf{x}_1 + \mathbf{y}_2^\top \mathbf{x}_2\).
Proof
Each rule rewrites the supremum defining the conjugate. Terms with \(f(\mathbf{x}) = +\infty\) equal
\(-\infty\) on both sides and can be ignored.
(1) We have
\(\mathbf{y}^\top \mathbf{x} - \alpha f(\mathbf{x}) = \alpha \big( (\mathbf{y}/\alpha)^\top \mathbf{x} - f(\mathbf{x}) \big)\).
Multiplication by \(\alpha \gt 0\) is a bijection of \([-\infty, +\infty]\) that preserves order in both
directions, its inverse being multiplication by \(1/\alpha\). Hence the supremum is
\(\alpha f^*(\mathbf{y}/\alpha)\). This includes the values \(\pm\infty\), by the rule
\(\alpha \cdot (\pm\infty) = \pm\infty\).
(2) Substituting \(\mathbf{x} = \mathbf{z} + \mathbf{c}\), which runs over \(\mathbb{R}^n\) as
\(\mathbf{z}\) does, gives
\(\mathbf{y}^\top \mathbf{x} - g(\mathbf{x}) = \mathbf{y}^\top \mathbf{z} - f(\mathbf{z}) + \mathbf{c}^\top \mathbf{y}\).
The constant \(\mathbf{c}^\top \mathbf{y}\) comes out of the supremum.
(3) Here \(\mathbf{y}^\top \mathbf{x} - g(\mathbf{x}) = (\mathbf{y} - \mathbf{b})^\top \mathbf{x} - f(\mathbf{x}) - d\).
(4) Substituting \(\mathbf{x} = A^{-1} \mathbf{z}\), which runs over \(\mathbb{R}^n\) as \(\mathbf{z}\) does,
gives
\(\mathbf{y}^\top \mathbf{x} = \mathbf{y}^\top A^{-1} \mathbf{z} = (A^{-\top} \mathbf{y})^\top \mathbf{z}\), so
\(\mathbf{y}^\top \mathbf{x} - g(\mathbf{x}) = (A^{-\top} \mathbf{y})^\top \mathbf{z} - f(\mathbf{z})\).
(5) Each term satisfies \(\mathbf{y}^\top \mathbf{x} - f(\mathbf{x}) \geq \mathbf{y}^\top \mathbf{x} - g(\mathbf{x})\),
and suprema preserve this inequality.
(6) Write \(b_i(\mathbf{x}_i) = \mathbf{y}_i^\top \mathbf{x}_i - f_i(\mathbf{x}_i)\). These take values in
\([-\infty, +\infty)\), and \(f_i^* = \sup b_i \gt -\infty\) because \(f_i\) is proper. Each term of the supremum
defining \(f^*(\mathbf{y}_1, \mathbf{y}_2)\) equals \(b_1(\mathbf{x}_1) + b_2(\mathbf{x}_2)\), both sides being
\(-\infty\) when \(f_1(\mathbf{x}_1)\) or \(f_2(\mathbf{x}_2)\) is \(+\infty\). Each term is at most
\(f_1^*(\mathbf{y}_1) + f_2^*(\mathbf{y}_2)\), a sum of two values in \((-\infty, +\infty]\) and hence defined,
so \(f^* \leq f_1^* + f_2^*\). For the reverse inequality, fix \(\mathbf{x}_1 \in \operatorname{dom}(f_1)\).
Taking the supremum over \(\mathbf{x}_2\) gives
\(f^*(\mathbf{y}_1, \mathbf{y}_2) \geq b_1(\mathbf{x}_1) + f_2^*(\mathbf{y}_2)\), and taking the supremum over
such \(\mathbf{x}_1\) gives \(f^*(\mathbf{y}_1, \mathbf{y}_2) \geq f_1^*(\mathbf{y}_1) + f_2^*(\mathbf{y}_2)\).
Example: Linear Functions and Indicators
The zero function has conjugate
\[
0^*(\mathbf{y}) = \sup_{\mathbf{x} \in \mathbb{R}^n} \mathbf{y}^\top \mathbf{x} = \iota_{\{\mathbf{0}\}}(\mathbf{y}).
\]
The supremum is \(0\) at \(\mathbf{y} = \mathbf{0}\). For \(\mathbf{y} \neq \mathbf{0}\), the points
\(\mathbf{x} = s\mathbf{y}\) give \(s\, \mathbf{y}^\top \mathbf{y}\), which tends to \(+\infty\) as
\(s \to \infty\). Rule (3), applied to the zero function, shows that the affine function
\(g(\mathbf{x}) = \mathbf{b}^\top \mathbf{x} + d\) has
\(g^*(\mathbf{y}) = \iota_{\{\mathbf{b}\}}(\mathbf{y}) - d\). Its conjugate is finite only at the slope of \(g\).
In the other direction, the conjugate of a convex indicator is
\[
\iota_C^*(\mathbf{y}) = \sup_{\mathbf{x} \in C} \mathbf{y}^\top \mathbf{x},
\]
the support function of \(C\). Since every conjugate is closed and convex, so is the support
function, for every set \(C\), convex or not. For the closed unit ball of a norm, it is the dual norm, which we
meet in the last section.
The Fenchel-Young Inequality
In the definition of \(f^*\), every term of the supremum is at most the supremum itself. With \(\mathbf{x}\) fixed
instead of \(\mathbf{y}\), this trivial bound gives an inequality between \(f\) and \(f^*\), and for convex \(f\)
the equality case of the inequality is described by the subgradient.
Let \(f : \mathbb{R}^n \to (-\infty, +\infty]\) be a proper convex function. By the proposition on convexity through
the effective domain, the restriction of \(f\) to the convex set \(\operatorname{dom}(f)\) is a convex function. The
definition of a subgradient therefore
applies at every \(\mathbf{x} \in \operatorname{dom}(f)\). The subgradient inequality
\(f(\mathbf{z}) \geq f(\mathbf{x}) + \mathbf{g}^\top (\mathbf{z} - \mathbf{x})\) is required only for
\(\mathbf{z} \in \operatorname{dom}(f)\), but it holds automatically for every other \(\mathbf{z}\), where
\(f(\mathbf{z}) = +\infty\). We extend the
subdifferential to all of
\(\mathbb{R}^n\) by setting \(\partial f(\mathbf{x}) = \emptyset\) for \(\mathbf{x} \notin \operatorname{dom}(f)\).
Theorem: The Fenchel-Young Inequality
Let \(f : \mathbb{R}^n \to (-\infty, +\infty]\) be proper. For all \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\),
\[
f(\mathbf{x}) + f^*(\mathbf{y}) \geq \mathbf{y}^\top \mathbf{x}.
\]
Equality holds if and only if \(\mathbf{x} \in \operatorname{dom}(f)\) and \(\mathbf{x}\) attains the supremum
defining \(f^*(\mathbf{y})\). If \(f\) is also convex, equality holds if and only if
\(\mathbf{y} \in \partial f(\mathbf{x})\).
Proof
Since \(f\) is proper, statement (3) of the theorem that the conjugate is closed and convex gives
\(f^*(\mathbf{y}) \gt -\infty\). So the left side is a sum of two values in \((-\infty, +\infty]\) and is
defined. If \(\mathbf{x} \notin \operatorname{dom}(f)\), the left side is \(+\infty\) and the inequality is
strict. If \(\mathbf{x} \in \operatorname{dom}(f)\), then \(f(\mathbf{x})\) is real, and
\(\mathbf{y}^\top \mathbf{x} - f(\mathbf{x})\) is one term of the supremum, so
\(f^*(\mathbf{y}) \geq \mathbf{y}^\top \mathbf{x} - f(\mathbf{x})\). Adding \(f(\mathbf{x})\) gives the
inequality, with equality exactly when this term equals the supremum.
For convex \(f\) and \(\mathbf{x} \in \operatorname{dom}(f)\), the point \(\mathbf{x}\) attains the supremum
if and only if \(\mathbf{y}^\top \mathbf{x} - f(\mathbf{x}) \geq \mathbf{y}^\top \mathbf{z} - f(\mathbf{z})\)
for every \(\mathbf{z} \in \operatorname{dom}(f)\). Rearranged, this is
\(f(\mathbf{z}) \geq f(\mathbf{x}) + \mathbf{y}^\top (\mathbf{z} - \mathbf{x})\) for every such \(\mathbf{z}\),
which says \(\mathbf{y} \in \partial f(\mathbf{x})\). For \(\mathbf{x} \notin \operatorname{dom}(f)\),
equality fails and \(\partial f(\mathbf{x}) = \emptyset\), so the equivalence holds there as well.
Geometrically, equality says that the largest affine minorant with slope \(\mathbf{y}\),
\(\mathbf{z} \mapsto \mathbf{y}^\top \mathbf{z} - f^*(\mathbf{y})\), touches the graph of \(f\) at \(\mathbf{x}\).
For convex \(f\), a subgradient at \(\mathbf{x}\) is thus the slope of an affine minorant touching the graph at
\(\mathbf{x}\). The supremum defining \(f^*(\mathbf{y})\) need not be attained. In that case there is no equality at
any \(\mathbf{x}\), and for convex \(f\) no point has \(\mathbf{y}\) as a subgradient. The exponential at \(y = 0\),
treated in the first of the three scalar examples below, is such a case.
Computing Conjugates in One Variable
To compute a conjugate, we take, for each \(y\), the supremum of \(h(x) = yx - f(x)\). In one variable, if \(h\) is
continuous on an interval and its derivative is strictly decreasing inside it, a zero of the derivative at an
interior point is the unique maximizer. The lemma below supplies every attained supremum in this section, and the
last section reduces a computation on the simplex to it.
Lemma: A Stationary Point Is the Unique Maximizer
Let \(I \subseteq \mathbb{R}\) be an interval and \(h : I \to \mathbb{R}\) continuous, differentiable at every
interior point of \(I\), with \(h'\) strictly decreasing on the interior of \(I\). If \(\hat{x}\) is an interior
point of \(I\) with \(h'(\hat{x}) = 0\), then \(h(x) \lt h(\hat{x})\) for every \(x \in I\) with
\(x \neq \hat{x}\).
Proof
Let \(x \in I\) with \(x \gt \hat{x}\). The interval \([\hat{x}, x]\) lies in \(I\), and \((\hat{x}, x)\) lies in
the interior of \(I\) because it is an open interval contained in \(I\). So \(h\) is continuous on
\([\hat{x}, x]\) and differentiable on \((\hat{x}, x)\). By the
mean value theorem there is
\(c \in (\hat{x}, x)\) with
\[
h(x) - h(\hat{x}) = h'(c)\,(x - \hat{x}).
\]
Since \(c \gt \hat{x}\), we have \(h'(c) \lt h'(\hat{x}) = 0\), so the right side is negative. For
\(x \lt \hat{x}\), the same argument on \([x, \hat{x}]\) gives a point \(c \lt \hat{x}\), hence \(h'(c) \gt 0\),
and \(h(x) - h(\hat{x}) = -h'(c)\,(\hat{x} - x) \lt 0\).
The first application is the power function. Its conjugate, combined with the Fenchel-Young inequality, gives
Young's inequality together with
its equality case.
Theorem: Conjugate of a Power
Let \(1 \lt p \lt \infty\), let \(q\) be its
Hölder conjugate, and let
\(f(x) = |x|^p / p\) on \(\mathbb{R}\). Then
\[
f^*(y) = \frac{|y|^q}{q} \quad \text{for every } y \in \mathbb{R}.
\]
For each \(y\), the supremum defining \(f^*(y)\) is attained at the single point
\(\hat{x} = \operatorname{sgn}(y)\,|y|^{q-1}\), where \(\operatorname{sgn}(t)\) is \(1\), \(0\) or \(-1\)
according as \(t \gt 0\), \(t = 0\) or \(t \lt 0\).
Proof
The function \(f\) is differentiable on \(\mathbb{R}\) with \(f'(x) = \operatorname{sgn}(x)\,|x|^{p-1}\). For
\(x \gt 0\) this is the power rule, and for \(x \lt 0\) it follows from \(f(x) = f(-x)\). At \(x = 0\), the
difference quotient \(f(t)/t\) has absolute value \(|t|^{p-1}/p\), which tends to \(0\) because \(p - 1 \gt 0\).
The map \(x \mapsto \operatorname{sgn}(x)\,|x|^{p-1}\) is odd and strictly increasing on \([0, \infty)\), hence
strictly increasing on \(\mathbb{R}\).
Fix \(y\) and let \(h(x) = yx - |x|^p/p\). Then \(h'(x) = y - \operatorname{sgn}(x)\,|x|^{p-1}\) is strictly
decreasing on \(\mathbb{R}\). The relation \(1/p + 1/q = 1\) gives \((q - 1)(p - 1) = 1\), so the point
\(\hat{x} = \operatorname{sgn}(y)\,|y|^{q-1}\) satisfies
\(\operatorname{sgn}(\hat{x})\,|\hat{x}|^{p-1} = y\), that is, \(h'(\hat{x}) = 0\). By the lemma, \(\hat{x}\)
is the unique maximizer of \(h\). Using \(y\hat{x} = |y|^q\) and \(|\hat{x}|^p = |y|^{p(q-1)} = |y|^q\),
where \(p(q - 1) = q\) is the same relation, we obtain
\[
f^*(y) = h(\hat{x}) = |y|^q - \frac{|y|^q}{p} = \frac{|y|^q}{q}.
\]
Fenchel-Young for this pair is Young's inequality. For \(a, b \geq 0\) it reads
\[
ab \leq \frac{a^p}{p} + \frac{b^q}{q},
\]
with equality if and only if \(a\) is the maximizer for \(y = b\), that is, \(a = b^{q-1}\). Since \(t \mapsto t^p\)
is strictly increasing on \([0, \infty)\) and \(p(q - 1) = q\), this holds if and only if \(a^p = b^q\), the
equality case of Young's inequality. The argument here rests on the uniqueness of the maximizer, not on a
computation of \(\partial f\).
The function \(\mathbf{x} \mapsto \sum_{i=1}^n |x_i|^p / p\) on \(\mathbb{R}^n\) has conjugate
\(\mathbf{y} \mapsto \sum_{i=1}^n |y_i|^q / q\). This follows from the rule for separable sums, applied \(n - 1\)
times to partial sums that are finite everywhere and hence proper.
Three Scalar Examples
Example: Conjugate of the Exponential
Let \(f(x) = \exp(x)\) on \(\mathbb{R}\) and \(h(x) = yx - \exp(x)\). For \(y \gt 0\), the derivative
\(h'(x) = y - \exp(x)\) is strictly decreasing and vanishes at \(\hat{x} = \log y\), so the lemma gives
\(f^*(y) = y \log y - y\). For \(y = 0\), \(h(x) = -\exp(x)\) is negative and tends to \(0\) as
\(x \to -\infty\), so \(f^*(0) = 0\), a supremum that is not attained. For \(y \lt 0\), taking \(x = -s\) with
\(s \gt 0\) gives \(h(-s) = -ys - \exp(-s) \geq |y|s - 1\), and the right side tends to \(+\infty\) as
\(s \to \infty\), so \(f^*(y) = +\infty\). With the closed entropy integrand \(\phi\) of the first section,
\[
\exp^*(y) = \phi(y) - y \quad \text{for every } y \in \mathbb{R},
\]
where the right side equals \(+\infty\) for \(y \lt 0\) by the arithmetic convention fixed at the start
of the page.
Example: Conjugate of the Entropy Integrand
Let \(\phi\) again be the closed entropy integrand. Points \(u \lt 0\) contribute \(-\infty\), so we maximize
\(h(u) = yu - \phi(u)\) over \(I = [0, \infty)\). The function \(h\) is continuous on \(I\), at \(0\) because
\(|u \log u| \leq 2\sqrt{u}\) for \(0 \lt u \leq 1\). On \((0, \infty)\) its derivative
\(h'(u) = y - \log u - 1\) is strictly decreasing and vanishes at \(\hat{u} = \exp(y - 1)\). By the lemma, for
every \(y \in \mathbb{R}\),
\[
\begin{align*}
\phi^*(y) &= y \exp(y - 1) - \exp(y - 1)\,(y - 1) \\\\
&= \exp(y - 1).
\end{align*}
\]
By the previous example, \(u \mapsto \phi(u) - u\) is \(\exp^*\), and by the rule for adding an affine function
its conjugate is \(y \mapsto \phi^*(y + 1) = \exp(y)\). So the conjugate of \(\exp^*\) is \(\exp\). Conjugating
twice returned the function we started from, a first instance of the biconjugate studied on a later page.
Example: Conjugate of the Negative Logarithm
Let \(f(x) = -\log x\) for \(x \gt 0\) and \(f(x) = +\infty\) for \(x \leq 0\), and maximize
\(h(x) = yx + \log x\) over \(I = (0, \infty)\). For \(y \geq 0\), we have \(h(x) \geq \log x\), and
\(\log x \to +\infty\) as \(x \to \infty\), so \(f^*(y) = +\infty\). For \(y \lt 0\), the derivative
\(h'(x) = y + 1/x\) is strictly decreasing and vanishes at \(\hat{x} = -1/y\). Since \(h\) is continuous on
\(I\), the lemma gives
\[
f^*(y) = -1 + \log(-1/y) = -1 - \log(-y)
\]
for \(y \lt 0\). In other words, \(f^*(y) = f(-y) - 1\) for every \(y\), both sides being \(+\infty\) when
\(y \geq 0\). The negative logarithm is its own conjugate up to a reflection and a shift.
A Gallery of Conjugates
We now compute the conjugates that recur in optimization and machine learning. Norms lead to dual norms, and the
positive definite quadratic form of a matrix leads to the form of its inverse. The negative entropy on the
probability simplex has the log-sum-exp function as its conjugate, and the supremum defining that conjugate is
attained at the softmax of the argument.
Norms and Dual Norms
In this subsection \(\|\cdot\|\) is an arbitrary
norm on \(\mathbb{R}^n\), not
necessarily the Euclidean one. For \(\mathbf{y} \in \mathbb{R}^n\), the linear functional
\(\mathbf{x} \mapsto \mathbf{y}^\top \mathbf{x}\) is bounded, because
every linear operator on a finite-dimensional space is bounded.
Its operator norm is
the supremum of \(|\mathbf{y}^\top \mathbf{x}|\) over the closed unit ball, by the
equivalent formulations of the operator norm.
The ball is symmetric, since \(\|-\mathbf{x}\| = \|\mathbf{x}\|\), so the absolute value may be dropped. The
dual norm of \(\|\cdot\|\) is this number,
\[
\|\mathbf{y}\|_* = \sup_{\|\mathbf{x}\| \leq 1} \mathbf{y}^\top \mathbf{x}.
\]
The map sending \(\mathbf{y}\) to the functional \(\mathbf{x} \mapsto \mathbf{y}^\top \mathbf{x}\) is linear and
injective, since the functional takes the value \(\mathbf{y}^\top \mathbf{y} \gt 0\) at \(\mathbf{x} = \mathbf{y}\)
when \(\mathbf{y} \neq \mathbf{0}\). So \(\|\cdot\|_*\) is a norm on \(\mathbb{R}^n\) by the
operator norm axioms.
For \(\mathbf{x} \neq \mathbf{0}\), applying the definition to \(\pm \mathbf{x} / \|\mathbf{x}\|\) gives
\[
|\mathbf{y}^\top \mathbf{x}| \leq \|\mathbf{y}\|_* \, \|\mathbf{x}\|,
\]
and this holds trivially for \(\mathbf{x} = \mathbf{0}\). The dual norm is the support function of the closed unit
ball \(B = \{\, \mathbf{x} : \|\mathbf{x}\| \leq 1 \,\}\), that is, \(\|\cdot\|_* = \iota_B^*\), as promised in the
example on linear functions and indicators.
Theorem: Conjugates of a Norm
Let \(\|\cdot\|\) be a norm on \(\mathbb{R}^n\) with dual norm \(\|\cdot\|_*\), and let
\(B_* = \{\, \mathbf{y} : \|\mathbf{y}\|_* \leq 1 \,\}\).
- The conjugate of \(f(\mathbf{x}) = \|\mathbf{x}\|\) is \(f^* = \iota_{B_*}\).
- The conjugate of \(g(\mathbf{x}) = \frac{1}{2}\|\mathbf{x}\|^2\) is \(g^*(\mathbf{y}) = \frac{1}{2}\|\mathbf{y}\|_*^2\).
Proof
(1) If \(\|\mathbf{y}\|_* \leq 1\), then
\(\mathbf{y}^\top \mathbf{x} - \|\mathbf{x}\| \leq (\|\mathbf{y}\|_* - 1)\|\mathbf{x}\| \leq 0\) for every
\(\mathbf{x}\), with equality at \(\mathbf{x} = \mathbf{0}\), so \(f^*(\mathbf{y}) = 0\). If
\(\|\mathbf{y}\|_* \gt 1\), the definition of the supremum gives some \(\mathbf{x}\) with
\(\|\mathbf{x}\| \leq 1\) and \(\mathbf{y}^\top \mathbf{x} \gt 1\). For \(t \gt 0\),
\[
\mathbf{y}^\top (t\mathbf{x}) - \|t\mathbf{x}\| \geq t\,(\mathbf{y}^\top \mathbf{x} - 1),
\]
which tends to \(+\infty\) as \(t \to \infty\). Hence \(f^*(\mathbf{y}) = +\infty\).
(2) For real \(a, b\), the inequality \(ab - \frac{1}{2}a^2 \leq \frac{1}{2}b^2\) is equivalent to
\(\frac{1}{2}(a - b)^2 \geq 0\). With \(a = \|\mathbf{x}\|\) and \(b = \|\mathbf{y}\|_*\),
\[
\begin{align*}
\mathbf{y}^\top \mathbf{x} - \tfrac{1}{2}\|\mathbf{x}\|^2
&\leq \|\mathbf{y}\|_* \, \|\mathbf{x}\| - \tfrac{1}{2}\|\mathbf{x}\|^2 \\\\
&\leq \tfrac{1}{2}\|\mathbf{y}\|_*^2,
\end{align*}
\]
so \(g^*(\mathbf{y}) \leq \frac{1}{2}\|\mathbf{y}\|_*^2\). For the reverse inequality, take any \(\mathbf{x}\)
with \(\|\mathbf{x}\| \leq 1\) and \(\mathbf{y}^\top \mathbf{x} \geq 0\), and let
\(s = \mathbf{y}^\top \mathbf{x}\). The point \(s\mathbf{x}\) gives
\[
\begin{align*}
\mathbf{y}^\top (s\mathbf{x}) - \tfrac{1}{2}\|s\mathbf{x}\|^2 &\geq s^2 - \tfrac{1}{2}s^2 \\\\
&= \tfrac{1}{2}s^2.
\end{align*}
\]
Since \(\mathbf{x} = \mathbf{0}\) gives \(s = 0\), the supremum of \(\mathbf{y}^\top \mathbf{x}\) over the unit
ball is also the supremum of the values \(s \geq 0\). Hence \(g^*(\mathbf{y}) \geq \frac{1}{2}s^2\) for values
\(s\) arbitrarily close to \(\|\mathbf{y}\|_*\), and \(g^*(\mathbf{y}) \geq \frac{1}{2}\|\mathbf{y}\|_*^2\).
For a general norm, part (2) is not an instance of the conjugate of a power, even with the rule for separable
sums, because \(\frac{1}{2}\|\mathbf{x}\|^2\) need not be a sum of functions of single coordinates. The upper
bound in part (2) rests on the inequality \(|\mathbf{y}^\top \mathbf{x}| \leq \|\mathbf{y}\|_* \, \|\mathbf{x}\|\)
and on the scalar inequality \(ab \leq \frac{1}{2}a^2 + \frac{1}{2}b^2\), which is Young's inequality for
\(p = q = 2\). The lower bound comes from the definition of the dual norm as a supremum. Two families of norms
make the dual norm concrete.
Example: The \(\ell^p\) Norms
For \(1 \leq p \lt \infty\), let \(\|\mathbf{x}\|_p\) be the
\(p\)-norm, and let
\(\|\mathbf{x}\|_\infty = \max_i |x_i|\). Let \(q\) be the
Hölder conjugate of
\(p\), with \(q = \infty\) for \(p = 1\) and \(q = 1\) for \(p = \infty\). Then the dual norm of
\(\|\cdot\|_p\) is \(\|\cdot\|_q\) for every \(1 \leq p \leq \infty\).
Equip \(\{1, \ldots, n\}\) with counting measure. Every function on this set is measurable, its integral is the
finite sum of its values, and its essential supremum is the maximum of its absolute values, because the only null
set is \(\emptyset\). Once \(\mathbf{x}\) is identified with the function \(i \mapsto x_i\), the \(L^p\) norm
becomes \(\|\mathbf{x}\|_p\) for every \(1 \leq p \leq \infty\), so each \(\|\cdot\|_p\) is a norm on
\(\mathbb{R}^n\), the triangle inequality being
Minkowski's inequality.
For the upper bound,
Hölder's inequality becomes
\[
\begin{align*}
|\mathbf{y}^\top \mathbf{x}| &\leq \sum_{i=1}^n |x_i y_i| \\\\
&\leq \|\mathbf{x}\|_p \, \|\mathbf{y}\|_q,
\end{align*}
\]
so the dual norm of \(\mathbf{y}\) with respect to \(\|\cdot\|_p\) is at most \(\|\mathbf{y}\|_q\). For the lower
bound, fix \(\mathbf{y} \neq \mathbf{0}\), the case \(\mathbf{y} = \mathbf{0}\) being trivial, and let
\(\operatorname{sgn}\) be the sign function of the theorem on the conjugate of a power. The following vectors
have \(\|\mathbf{x}\|_p = 1\) and \(\mathbf{y}^\top \mathbf{x} = \|\mathbf{y}\|_q\).
- For \(1 \lt p \lt \infty\), \(x_i = \operatorname{sgn}(y_i)\,|y_i|^{q-1} / \|\mathbf{y}\|_q^{q-1}\). Here
\(p(q - 1) = q\) gives \(\sum_i |x_i|^p = \sum_i |y_i|^q / \|\mathbf{y}\|_q^q = 1\), and
\(\mathbf{y}^\top \mathbf{x} = \sum_i |y_i|^q / \|\mathbf{y}\|_q^{q-1} = \|\mathbf{y}\|_q\).
- For \(p = 1\), \(\mathbf{x} = \operatorname{sgn}(y_k)\,\mathbf{e}_k\), where \(k\) is an index with
\(|y_k| = \|\mathbf{y}\|_\infty\) and \(\mathbf{e}_k\) is the \(k\)-th standard basis vector.
- For \(p = \infty\), \(x_i = \operatorname{sgn}(y_i)\) when \(y_i \neq 0\) and \(x_i = 1\) otherwise, so that
\(\|\mathbf{x}\|_\infty = 1\) and \(\mathbf{y}^\top \mathbf{x} = \|\mathbf{y}\|_1\).
The upper bound and these vectors are finite-dimensional counterparts of the estimate and the extremal functions
in the discussion of Hölder's inequality. That discussion shows that a
function in \(L^q\) acts on \(L^p\) with norm equal to its \(L^q\) norm, with \(\sigma\)-finiteness of the
measure assumed when \(p = 1\). On \(\mathbb{R}^n\) the supremum is attained for every \(p\), including
\(p = 1\). In particular, the conjugate of \(\|\cdot\|_1\) is the indicator of the cube
\(\{\, \mathbf{y} : \|\mathbf{y}\|_\infty \leq 1 \,\}\), and the conjugate of \(\|\cdot\|_\infty\) is the
indicator of the \(\ell^1\) unit ball. The norm \(\|\cdot\|_1\) is also the maximum of the linear functions
\(\mathbf{x} \mapsto \mathbf{u}^\top \mathbf{x}\) over \(\|\mathbf{u}\|_\infty \leq 1\). The Euclidean norm is
its own dual, the case \(p = q = 2\).
Example: The Spectral and Nuclear Norms
On \(\mathbb{R}^{m \times n}\) we pair matrices by the
Frobenius inner product
\(\langle W, A \rangle_F = \sum_{i,j} w_{ij} a_{ij}\). Listing the entries identifies \(\mathbb{R}^{m \times n}\)
with \(\mathbb{R}^{mn}\) and this pairing with \(\mathbf{y}^\top \mathbf{x}\), so every result of this page
applies to matrices.
On matrices \(\|\cdot\|_2\) always means the
spectral norm. It
never means the Euclidean norm of the entry vector, which is the Frobenius norm. The symbol \(\|\cdot\|_{\ast}\)
denotes the
nuclear norm. To
avoid two meanings of one symbol, we state the dual relations between matrix norms in words and do not use the
dual-norm notation on matrices. The spectral norm is the operator norm of \(\mathbf{x} \mapsto A\mathbf{x}\)
between Euclidean spaces. Since \(A \mapsto (\mathbf{x} \mapsto A\mathbf{x})\) is linear and injective, the
columns of \(A\) being the images \(A\mathbf{e}_j\), \(\|\cdot\|_2\) is a norm on \(\mathbb{R}^{m \times n}\) by
the operator norm axioms.
The variational characterization of the nuclear norm
says \(\|A\|_{\ast} = \max_{\|W\|_2 \leq 1} \langle W, A \rangle_F\), so the dual norm of the spectral norm is
the nuclear norm. The relation also holds with the two norms exchanged. Scaling that characterization gives
\(\langle W, A \rangle_F \leq \|W\|_2 \, \|A\|_{\ast}\), so the supremum of \(\langle W, A \rangle_F\) over
\(\|A\|_{\ast} \leq 1\) is at most \(\|W\|_2\). For \(W = 0\) both sides vanish.
For \(W \neq 0\), let \(\mathbf{v}_1\) be a Euclidean unit eigenvector of \(W^\top W\) for its largest
eigenvalue, so that
the largest singular value
is \(\sigma_1 = \|W\mathbf{v}_1\|_2 = \|W\|_2 \gt 0\), and let \(\mathbf{u}_1 = W\mathbf{v}_1 / \sigma_1\). The
rank-one matrix \(A_1 = \mathbf{u}_1 \mathbf{v}_1^\top\) has \(A_1^\top A_1 = \mathbf{v}_1 \mathbf{v}_1^\top\),
whose eigenvalues are \(1\) once and \(0\) otherwise, so \(\|A_1\|_{\ast} = 1\). Moreover, by the
cyclic property of the trace,
\[
\begin{align*}
\langle W, A_1 \rangle_F &= \operatorname{tr}(W^\top \mathbf{u}_1 \mathbf{v}_1^\top) \\\\
&= \mathbf{v}_1^\top W^\top \mathbf{u}_1 \\\\
&= \sigma_1.
\end{align*}
\]
So the dual norm of the nuclear norm is the spectral norm. The conjugate of the spectral norm is the indicator of
the nuclear unit ball, and the conjugate of the nuclear norm is the indicator of the spectral unit ball.
Quadratic Forms
Theorem: Conjugate of a Positive Definite Quadratic Form
Let \(Q \in \mathbb{R}^{n \times n}\) be symmetric and
positive definite,
and let \(f(\mathbf{x}) = \frac{1}{2}\mathbf{x}^\top Q \mathbf{x}\). Then \(Q\) is invertible,
\[
f^*(\mathbf{y}) = \tfrac{1}{2}\mathbf{y}^\top Q^{-1} \mathbf{y} \quad \text{for every } \mathbf{y} \in \mathbb{R}^n,
\]
and the supremum defining \(f^*(\mathbf{y})\) is attained at the single point \(\hat{\mathbf{x}} = Q^{-1}\mathbf{y}\).
Proof
If \(Q\mathbf{z} = \mathbf{0}\), then \(\mathbf{z}^\top Q \mathbf{z} = 0\), so \(\mathbf{z} = \mathbf{0}\) by positive
definiteness. Thus the square matrix \(Q\) is invertible, and \(Q^{-1}\) is symmetric because
\((Q^{-1})^\top = (Q^\top)^{-1} = Q^{-1}\). With \(\hat{\mathbf{x}} = Q^{-1}\mathbf{y}\), expanding the right side
and using \(Q\hat{\mathbf{x}} = \mathbf{y}\) gives
\[
\begin{align*}
\mathbf{y}^\top \mathbf{x} - \tfrac{1}{2}\mathbf{x}^\top Q \mathbf{x}
&= \tfrac{1}{2}\mathbf{y}^\top Q^{-1} \mathbf{y} \\\\
&\quad - \tfrac{1}{2}(\mathbf{x} - \hat{\mathbf{x}})^\top Q (\mathbf{x} - \hat{\mathbf{x}}).
\end{align*}
\]
By positive definiteness the subtracted term
\(\frac{1}{2}(\mathbf{x} - \hat{\mathbf{x}})^\top Q (\mathbf{x} - \hat{\mathbf{x}})\) is positive for
\(\mathbf{x} \neq \hat{\mathbf{x}}\) and zero at \(\mathbf{x} = \hat{\mathbf{x}}\). So the supremum equals
\(\frac{1}{2}\mathbf{y}^\top Q^{-1}\mathbf{y}\) and is attained at \(\hat{\mathbf{x}}\) only.
For \(Q = I\) the function \(\frac{1}{2}\|\mathbf{x}\|_2^2\) is its own conjugate, in agreement with part (2) of the
theorem on norms and the self-duality of the Euclidean norm. The maximizer \(Q^{-1}\mathbf{y}\) inverts the gradient
map \(\mathbf{x} \mapsto Q\mathbf{x}\), a pattern taken up for general convex functions on a later page.
Negative Entropy and Log-Sum-Exp
Let \(\Delta_n = \{\, \mathbf{p} \in \mathbb{R}^n : p_i \geq 0, \ \sum_{i=1}^n p_i = 1 \,\}\) be the probability
simplex, the set written \(S_K\) in our discussion of the
Dirichlet distribution. Using the closed entropy integrand \(\phi\)
from the first section, define the negative entropy on the simplex
\[
f(\mathbf{p}) = \sum_{i=1}^n \phi(p_i) + \iota_{\Delta_n}(\mathbf{p}).
\]
The function \(f\) is finite exactly on \(\Delta_n\) and equals \(+\infty\) off \(\Delta_n\), so it is proper.
For \(\mathbf{x} \in \mathbb{R}^n\), define the log-sum-exp function and the
softmax map by
\[
\begin{align*}
\operatorname{lse}(\mathbf{x}) &= \log \sum_{j=1}^n \exp(x_j), \\\\
\operatorname{softmax}(\mathbf{x})_i &= \frac{\exp(x_i)}{\sum_{j=1}^n \exp(x_j)}.
\end{align*}
\]
The vector \(\operatorname{softmax}(\mathbf{x})\) lies in \(\Delta_n\) and has all coordinates positive.
Theorem: Negative Entropy and Log-Sum-Exp Are Conjugate
For every \(\mathbf{x} \in \mathbb{R}^n\), the negative entropy \(f\) on \(\Delta_n\) satisfies
\[
f^*(\mathbf{x}) = \operatorname{lse}(\mathbf{x}),
\]
and the supremum defining \(f^*(\mathbf{x})\) is attained at the single point
\(\hat{\mathbf{p}} = \operatorname{softmax}(\mathbf{x})\).
Proof
Since \(f = +\infty\) off \(\Delta_n\), the conjugate is the supremum over \(\mathbf{p} \in \Delta_n\) of the
real number \(\Psi(\mathbf{p}) = \mathbf{x}^\top \mathbf{p} - \sum_i \phi(p_i)\). Write
\(L = \operatorname{lse}(\mathbf{x})\). Every coordinate of \(\hat{\mathbf{p}}\) is positive with
\(\log \hat{p}_i = x_i - L\), so
\[
\begin{align*}
\sum_{i=1}^n \phi(\hat{p}_i) &= \sum_{i=1}^n \hat{p}_i (x_i - L) \\\\
&= \mathbf{x}^\top \hat{\mathbf{p}} - L,
\end{align*}
\]
and \(\Psi(\hat{\mathbf{p}}) = L\).
Now fix \(\mathbf{p} \in \Delta_n\) with \(\mathbf{p} \neq \hat{\mathbf{p}}\), and let
\(\mathbf{d} = \mathbf{p} - \hat{\mathbf{p}}\), so that \(\mathbf{d} \neq \mathbf{0}\) and \(\sum_i d_i = 0\).
Let \(\varepsilon = \min_i \hat{p}_i \gt 0\) and \(\mathbf{p}(t) = \hat{\mathbf{p}} + t\mathbf{d}\) for
\(t \in I = (-\varepsilon, 1]\). Each coordinate is \(p(t)_i = (1 - t)\hat{p}_i + t p_i\). For \(0 \leq t \lt 1\)
this is at least \((1 - t)\hat{p}_i \gt 0\). For \(-\varepsilon \lt t \lt 0\) it is at least
\(\hat{p}_i + t p_i \geq \hat{p}_i + t \gt \hat{p}_i - \varepsilon \geq 0\), using \(p_i \leq 1\). So
\(p(t)_i \gt 0\) for \(t \in (-\varepsilon, 1)\), \(p(1)_i = p_i \geq 0\), and since the coordinates sum to
\(1\), \(\mathbf{p}(t) \in \Delta_n\) for every \(t \in I\).
Let \(g(t) = \Psi(\mathbf{p}(t))\). Since \(\phi\) is continuous on \((0, \infty)\) and
\(|u \log u| \leq 2\sqrt{u}\) for \(0 \lt u \leq 1\), \(\phi\) is continuous on \([0, \infty)\), and so \(g\) is
continuous on \(I\). On \((-\varepsilon, 1)\) every coordinate is positive. Since \(\phi'(u) = \log u + 1\) for
\(u \gt 0\), the chain rule together with \(\sum_i d_i = 0\) gives, for \(t \in (-\varepsilon, 1)\),
\[
\begin{align*}
g'(t) &= \sum_{i=1}^n \big( x_i - \log p(t)_i \big) d_i, \\\\
g''(t) &= -\sum_{i=1}^n \frac{d_i^2}{p(t)_i} \lt 0.
\end{align*}
\]
For \(s \lt t\) in \((-\varepsilon, 1)\), the mean value theorem applied to \(g'\) gives
\(g'(t) - g'(s) = g''(c)(t - s) \lt 0\), so \(g'\) is strictly decreasing. At \(t = 0\),
\(g'(0) = \sum_i (x_i - \log \hat{p}_i) d_i = L \sum_i d_i = 0\). Since \(0\) is an interior point of \(I\), the
lemma on unique maximizers gives \(g(1) \lt g(0)\), that is, \(\Psi(\mathbf{p}) \lt L\).
The proof uses neither Jensen's inequality nor the Kullback-Leibler divergence. Uniqueness comes from the
one-variable lemma applied along a segment. Three consequences follow.
First, at \(\mathbf{x} = \mathbf{0}\) the maximizer is the uniform vector and
\(\operatorname{lse}(\mathbf{0}) = \log n\). So \(-\sum_i p_i \log p_i \leq \log n\) for every
\(\mathbf{p} \in \Delta_n\), with equality only at the uniform vector. The statement that the
uniform distribution maximizes entropy,
together with its equality case, thus follows from the conjugate.
Second, \(\operatorname{lse}\) is finite everywhere, and it is closed and convex because it is a conjugate. No
Hessian computation is needed.
Third, \(\operatorname{lse}\) is a smoothed maximum. For \(\mathbf{p} \in \Delta_n\) every \(p_i \leq 1\), so
\(\sum_i \phi(p_i) \leq 0\), and the first consequence gives \(\sum_i \phi(p_i) \geq -\log n\). Hence
\(\iota_{\Delta_n} - \log n \leq f \leq \iota_{\Delta_n}\). The conjugate of \(\iota_{\Delta_n}\) is the support
function \(\sup_{\mathbf{p} \in \Delta_n} \mathbf{p}^\top \mathbf{x} = \max_i x_i\), since a convex combination never
exceeds the largest coordinate and a standard basis vector attains it. Order reversal and the rule for adding an
affine function, with the constant \(-\log n\), give
\[
\max_i x_i \leq \operatorname{lse}(\mathbf{x}) \leq \max_i x_i + \log n.
\]
Conjugates in Machine Learning
The softmax. The class probabilities of
multinomial logistic regression
are the map \(\operatorname{softmax}\) evaluated at the logit vector
\(\mathbf{a} = (\mathbf{w}_c^\top \mathbf{x} + b_c)_{c=1}^{C}\) of an input vector \(\mathbf{x}\). Here \(C\) is
the number of classes and \(\mathbf{w}_c\), \(b_c\) are the weight vector and bias of class \(c\). The last
theorem characterizes \(\operatorname{softmax}(\mathbf{a})\) as the unique maximizer, over the simplex
\(\Delta_C\), of the linear score \(\mathbf{p}^\top \mathbf{a}\) plus the entropy of \(\mathbf{p}\). This is a
property of the map itself, not of any trained model.
The \(\ell^1\) penalty. The
Lasso
penalty \(\lambda \|\boldsymbol{\beta}\|_1\) equals
\(\lambda \max_{\|\mathbf{u}\|_\infty \leq 1} \mathbf{u}^\top \boldsymbol{\beta}\), a maximum of linear functions
indexed by the \(\ell^\infty\) unit ball. This form is a starting point for a duality theory of such penalized
problems, a theory that a later page on Fenchel duality develops.
Steepest descent in a norm. For a gradient \(\mathbf{g}\), a norm \(\|\cdot\|\) and
\(\lambda \gt 0\), consider minimizing the linear model of the loss plus a penalty on the step length. Writing
the infimum as minus a supremum, using the definition of the conjugate at \(-\mathbf{g}\), and then applying the
rule for scaling, part (2) of the theorem on norms and \(\|-\mathbf{g}\|_* = \|\mathbf{g}\|_*\), we obtain
\[
\begin{align*}
\inf_{\mathbf{d}} \Big( \mathbf{g}^\top \mathbf{d} + \tfrac{\lambda}{2}\|\mathbf{d}\|^2 \Big)
&= -\Big( \tfrac{\lambda}{2}\|\cdot\|^2 \Big)^*(-\mathbf{g}) \\\\
&= -\frac{\|\mathbf{g}\|_*^2}{2\lambda}.
\end{align*}
\]
For the \(\ell^\infty\) norm and \(\mathbf{g} \neq \mathbf{0}\), the step
\(\hat{\mathbf{d}} = -(\|\mathbf{g}\|_1 / \lambda)\operatorname{sgn}(\mathbf{g})\), with \(\operatorname{sgn}\)
taken coordinatewise, has \(\mathbf{g}^\top \hat{\mathbf{d}} = -\|\mathbf{g}\|_1^2/\lambda\) and
\(\|\hat{\mathbf{d}}\|_\infty = \|\mathbf{g}\|_1/\lambda\), so it attains the value. Under the spectral norm,
whose dual norm is the nuclear norm, a matrix gradient \(G \neq 0\) of rank \(r\) gives the value
\(-\|G\|_{\ast}^2/(2\lambda)\). Let \(U\) and \(V\) be the orthogonal factors in the
singular value decomposition
of \(G\), and let \(U_r\) and \(V_r\) keep their first \(r\) columns, so that
\(U_r^\top U_r = V_r^\top V_r = I_r\). By block multiplication, \(G = U_r D V_r^\top\), where \(D\) is the
diagonal matrix of the positive singular values. The step
\(\hat{S} = -(\|G\|_{\ast}/\lambda)\, U_r V_r^\top\) attains the value, because
\(\langle G, U_r V_r^\top \rangle_F = \operatorname{tr}(V_r D V_r^\top) = \operatorname{tr} D = \|G\|_{\ast}\),
and \((U_r V_r^\top)^\top (U_r V_r^\top) = V_r V_r^\top\) has eigenvalues \(1\) and \(0\) only, so
\(\|U_r V_r^\top\|_2 = 1\). So updating along \(-\operatorname{sgn}(\mathbf{g})\) or along
\(-U_r V_r^\top\) moves in a steepest-descent direction for the \(\ell^\infty\) or the spectral norm, with
the step length chosen separately.
Carlson et al. (2015) proposed stochastic spectral descent, a training method for restricted Boltzmann
machines. The method is based on steepest descent in the spectral norm for the weight matrix and in the
\(\ell^\infty\) norm for the bias vectors. Bernstein and Newhouse (2024) apply this steepest-descent
interpretation to several deep learning optimizers, among them Adam and Shampoo. We ignore the small
stabilizing constants of both optimizers and restrict Shampoo's matrix inverse roots to the range of the
gradient. Then Adam, without its moving averages, updates along \(-\operatorname{sgn}(\mathbf{g})\), and
Shampoo, without its accumulation, updates each weight matrix along \(-U_r V_r^\top\).
References.
- D. Carlson, V. Cevher and L. Carin, Stochastic Spectral Descent for Restricted Boltzmann Machines,
Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, PMLR 38 (2015).
- J. Bernstein and L. Newhouse, Old Optimizer, New Norm: An Anthology, OPT 2024 Workshop on
Optimization for Machine Learning, arXiv:2409.20325 (2024).