Convex Conjugate

Extended-Real Convex Functions The Convex Conjugate The Fenchel-Young Inequality A Gallery of Conjugates

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.

  1. \(f\) is convex, that is, \(\operatorname{epi} f\) is convex.
  2. \(\operatorname{dom}(f)\) is convex, and the restriction of \(f\) to \(\operatorname{dom}(f)\) is a convex function in the real-valued sense.
  3. 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.

  1. \(f\) is closed.
  2. Every sublevel set \(L_\alpha = \{\, \mathbf{x} : f(\mathbf{x}) \leq \alpha \,\}\), \(\alpha \in \mathbb{R}\), is closed in \(\mathbb{R}^n\).
  3. \(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.

  1. \(f^* \equiv -\infty\) if and only if \(f \equiv +\infty\).
  2. If \(f(\mathbf{x}_0) = -\infty\) for some \(\mathbf{x}_0\), then \(f^* \equiv +\infty\).
  3. 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]\).

  1. Scaling. For \(\alpha \gt 0\), \((\alpha f)^*(\mathbf{y}) = \alpha f^*(\mathbf{y}/\alpha)\).
  2. Translation. If \(g(\mathbf{x}) = f(\mathbf{x} - \mathbf{c})\), then \(g^*(\mathbf{y}) = f^*(\mathbf{y}) + \mathbf{c}^\top \mathbf{y}\).
  3. 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\).
  4. 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\).
  5. Order reversal. If \(f \leq g\) pointwise for \(g : \mathbb{R}^n \to (-\infty, +\infty]\), then \(f^* \geq g^*\) pointwise.
  6. 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.