# Understanding the Legendre transform

In physics, I've seen the Legendre transform motivated by "changing the variable $$x$$ of a function $$x \mapsto f(x)$$ to the variable $$u = \frac{df}{dx}$$."

I don't quite see what that means and why the Legendre transform is the answer to this heuristic. I'd understand it as follows:

Let $$f: \mathbb{R} \to\mathbb{R}$$ be strictly convex and differentiable. Then for every $$x_0 \in \mathbb{R}$$ the slope $$\frac{df(x_0)}{dx}$$ is unique. We want to find a function $$f^*: f'(\mathbb{R}) \to \mathbb{R}$$ such that $$f(x_0)=f^*(\frac{df(x_0)}{dx})$$ for every $$x_0 \in \mathbb{R}$$. In fact we can view the function $$f^*$$ as a function on a subset of the dual space $$\mathbb{R^*}$$ such that $$f^*(df(x_0))=f(x_0)$$.

However, this doesn't seem to capture the Legendre transform, for example by the above the Legendre transform of the exponential function should be the identity function. How can the physicists heuristic be made precise?

## 1 Answer

The change of variable part you got right. However, the Legendre transform of $$f:\mathbb R\to\mathbb R$$ is $$f^*(p)=\sup_{x\in\mathbb R}\{xp-f(x)\}\,.$$ Since $$f$$ is convex: $$f^*(p)=xp-f(x)\,,\text{ for }f'(x)=p\,.$$ In other words: $$f^*(p)$$ is a function of $$p=f'(x)$$ which contains the same information as $$f\,.$$

Example: $$f(x)=e^x,f'(x)=e^x$$ leads to $$f^*(p)=xp-e^x$$ with $$p=e^x$$, or $$x=\log p\,.$$ That is: $$f^*(p)=p\log p-p\,.$$

A marvelous paper motivating the Legendre transform this in physiscs is

R.K.P. Zia, E.F. Redish, S.R. McKay, Making Sense of the Legendre Transform, arXiv:0806.1147v2,2009.

• But in the case $f(x) = \mathrm{e}^x$, $f^*(f'(x)) = \mathrm{e}^x \log(\mathrm{e}^x) - \mathrm{e}^x = x\,\mathrm{e}^x - \mathrm{e}^x \neq f(x)$, right? Nov 14 '21 at 16:50
• @FeiCao : Right . Nowhere though I saw the requirement that $f^*(p)$ must equal $f(x)\,.$ Nov 14 '21 at 19:09