A Legendre transform of a differentiable f:U→Rf:U\to\mathbb{R} on an open convex set U⊆RnU\subseteq\mathbb{R}^n is the function fLf^{\mathcal L} defined on the set ∇f(U)⊆Rn\nabla f(U)\subseteq\mathbb{R}^n by

fL(p)  =  ⟨p,x⟩−f(x)where p=∇f(x).f^{\mathcal L}(p) \;=\; \langle p,x\rangle - f(x) \quad\text{where } p=\nabla f(x).

Strict convexity ensures that for each p∈∇f(U)p\in\nabla f(U) there is a unique x∈Ux\in U with p=∇f(x)p=\nabla f(x), so the value is well-defined.

The Legendre transform is the “attained” version of the when ff is smooth enough that the supremum defining f∗f^* is achieved at the unique point with p=∇f(x)p=\nabla f(x). It connects convex analysis with the and through the gradient map x↦∇f(x)x\mapsto\nabla f(x).

Examples
  • If f(x)=12∥x∥22f(x)=\tfrac12\|x\|_2^2 on Rn\mathbb{R}^n, then ∇f(x)=x\nabla f(x)=x and fL(p)=12∥p∥22f^{\mathcal L}(p)=\tfrac12\|p\|_2^2.
  • If f(x)=exf(x)=e^x on R\mathbb{R}, then ∇f(x)=ex\nabla f(x)=e^x so p>0p>0 and fL(p)=plog⁡p−pf^{\mathcal L}(p)=p\log p - p on (0,∞)(0,\infty).