# What properties make the Legendre transform so useful in physics?

The Legendre transform plays a pivotal role in physics in its connecting Lagrangian and Hamiltonian formalisms. This is well-known and has been discussed at length in this site (related threads are e.g. Physical meaning of Legendre transformation, Why is the Hamiltonian the Legendre transform of the Lagrangian?, Equivalence between Hamiltonian and Lagrangian Mechanics, as well as many others).

I am not asking how the Legendre transform is defined, or how it works to connect Lagrangian and Hamiltonian formalisms, so let's take all of this for granted here.

(The main question) Why specifically is the Legendre transform so useful? Starting from a Lagrangian viewpoint, principle of least action and all that, one typically defines the Hamiltonian via Legendre transform and shows that this new formalism is oh so useful for a myriad of reasons. But why does this happen? What is it about the Legendre transform that makes this possible?

(Geometrical viewpoint) The Legendre transform has a pretty clear geometrical interpretation in the context of convex analysis: it can be used to switch to a "dual" description of a convex set in terms of its supporting hyperplanes (see e.g. the nice description of how this works in this answer, or any introductory book about convex geometry). Lagrangian and Hamiltonian are also often understood in (differential) geometric terms: one can think of the Lagrangian as a functional on the tangent bundle of some underlying differential manifold, $$L:TM\to\mathbb R$$, while the Hamiltonian is a functional on the cotangent bundle, $$H:T^*M\to\mathbb R$$.

Are these geometrical interpretations related in any way? Is there merit in thinking the Hamiltonian as related to the Lagrangian in a similar fashion as how one can describe convex sets in terms of their supporting hyperplanes? I suppose to some degree this is trivially true: $$H$$ being the Legendre transform of $$L$$ with respect to the $$\dot q,p$$ parameters means (I think) that some sections of the epigraphs of $$L$$ and $$H$$ are related in this way. But that still doesn't tell me why such a dual description of sections of the epigraph of the Lagrangian should be of physical interest..

(Functional viewpoint) Another possible route to an answer might be in asking about the properties of the transform that make it useful. In other words, if I were to start from the Lagrangian formalism, and consider different possible functional transforms $$L\mapsto G[L]$$, would I get to the conclusion that $$G=(\text{Legendre transform})$$ is a good choice by asking for some specific property I want in the new formalism? Are there formalisms other than the Lagrangian and Hamiltonian ones that can be obtained via this sort of reasoning? (this part might be better asked in a different question if there is an answer that is independent of the context of this one, I'm not sure).

• One sometimes reads that the Legendre transform creates a function that contains all of the information and capability of another function, but in terms of more accessible variables. The price is that the new function has obscure interpretation. It's hard to see this in $L\rightarrow H$. A little easier with the thermodynamic potentials. Easy to see in the analysis of the brushless dc motor where the energy can be written in terms of flux linkage, but how does one measure and control linkage. Much easier to control current. Solution: an energy $\rightarrow$ co-energy Legendre transform. Apr 14, 2021 at 12:13
• Possible duplicate: What's the point of Hamiltonian mechanics? and links therein. Apr 14, 2021 at 12:58
• @Qmechanic I guess I should have linked that one too; I nearly did. But no, I'm not asking what is the point of Hamiltonian, nor Lagrangian, mechanics. I'm asking why specifically the Legendre transform manages to produce a formalism as useful as the Hamiltonian. For example, whether there is some intuition as to why the geometric interpretation of the Legendre transform turns out to be insightful for the description of physical systems. Or whether one can isolate properties of a general transformation between different formalisms that end up pinpointing the Legendre transform.
– glS
Apr 14, 2021 at 13:22
• I just saw that similar questions were raised in the related question physics.stackexchange.com/q/192480/58382. Specifically in some of the comments to the question, and one of the answers. However, the "conclusion" there seems to be that the Legendre transform is the "natural choice" because of its geometrical interpretation. I suppose here I'm inquiring as to whether there is a why to understand why such geometrical features turn out to be insightful for the description of physical systems
– glS
Apr 14, 2021 at 13:28

In Lagrangian/Hamiltonian the crucial property of the Legendre transform is that it preserves all information. One way to demonstrate that the Legendre transform preserves all information is to show that it is its own inverse. When the Legrendre transform is applied twice you are back to the starting point.

The required properties of the transform are very specific, I rather expect that the Legendre tranform is the only transform that has the required properties.

It seems to me that in the end asking what makes the Legendre transformation especially useful is similar to asking what is special about integration by parts that makes it so useful for calculating integrals.

Recommended reading: 2007 article by R. K. P. Zia, Edward F. Redish, and Susan R. McKay
Making sense of the Legendre transform

Blog post by Jess Riedel:
Legendre transform

• the crucial property of the Legendre transform is that it preserves all information. as far as a I can tell, also reading the discussion in physics.stackexchange.com/q/192480/58382, this is far from being true. Applying any invertible transformation to the Lagrangian gives you a different functional which preserves all the information required for the physics. The Legendre transform being an involution might be a more characteristic property though.
– glS
Apr 14, 2021 at 20:43
• It seems to me that in the end asking what makes the Legendre transformation especially useful is similar to asking what is special about integration by parts that makes it so useful for calculating integrals. well, that is also a good question in my opinion, and also a fairly answerable one. See e.g. math.stackexchange.com/a/827604/173147
– glS
Apr 14, 2021 at 20:45

I second @garyp's advice of looking into thermodynamics, where the origin of Legendre transforms and their usefulness is clearer.

To answer your main question, It is not that Legendre transformations are useful, it is that momenta are in many situations more useful than velocities. And to switch to a momentum picture you need to do Legendre transformations.

Let's take the example of thermodynamic energy. Energy depends on entropy, the derivative of energy wrt entropy is the temperature. The temperature of the system is much easier to measure than its entropy, so you want to come up with an alternative function that will depend on temperature so that the entropy is its derivative wrt temperature. You realize that to do this you need to perform Legendre transformations and the new function you get is the Helmholtz free energy.

In mechanics reasoning is similar. Your Lagrangian depends on velocity, but momentum (the derivative of Lagrangian wrt velocity) is often a more useful quantity (e.g. in many cases it is conserved). So you want to find an alternative function that depends on momentum so that the velocity is its derivative wrt momentum.

• I feel like this doesn't really change much. If you want to say that momenta are more useful, and implicitly saying that they also have a direct physical interpretation as in the examples you mentioned, the question simply becomes: why are all of these "more physically useful" quantities related to the standard coordinates via a Legendre transform? What properties of this transform are such that you end up with "more useful" coordinates?
– glS
Feb 8 at 23:56
• Let's say you have a function $f(x)$, that has a derivative $q = df/dx = g(x)$. You want to find a function $h(q)$ that has a derivative $x = dh/dq = g^{-1}(q)$. Then you can show that f and h have to be related by a Legendre transform (as long as f does not change convexity, in which case this is impossible). It is not that Legendre's transformation necessarily results in better coordinates. You know that the derivatives are better coordinates. And to switch to a new function where derivative is the main argument and the old argument is a derivative you have to make Legendre transform. Feb 9 at 16:01
• In other words, there is no fundamental reason why the Legendre transformations had to be useful. It is just that you know the coordinates that are useful and the Legendre transformations just happen to be the right transformations to go to those coordinates. Feb 9 at 16:05
• the Legendre transform doesn't just give the derivatives as new coordinates. You could say it gives coordinates whose derivative is the inverse of the derivative of the old ones. But you interpret it more clearly because it amounts to a description of the original function via the set of its supporting hyperplanes (or more precisely, the support function of the epigraph of the original function, parametrising the directions in a specific way). There's no intrinsic reason to believe this process should give more useful coordinates, and yet it does, which is the point of the question.
– glS
Feb 9 at 19:03
• and it's not just that we know that the new coordinates are useful and the Legendre transform just happens to be the function mapping old to new coordinates. It's more than that, because a description in terms of momenta is useful for any Lagrangian system, and in many situations there is really no easy way to even interpret what the generalised momenta the Legendre transform produces even mean physically. Such argument also don't explain the conservation properties often associated to these generalised momenta.
– glS
Feb 9 at 19:04

I think that the momentum v.s. velocities case is actually a misleading distraction. It is clearer in thermodynamics, and I will later connect that to mechanics.

The viewpoint of what the Legendre transform geometrically means is relevant here. The expression of this is already inside what you linked, but they are worded way too mathematically. The version I like is that, really, the relationship between two variables, say y and x, is a relationship, say y = f(x). What if we want to not use x as the independent variable, but rather dy/dx = the slope m? Then m(x) loses us a bit of information, namely the vertical translation of the relationship. It turns out that using the y-intercept $$y_0=h(m)$$ allows us to recreate the relationship without loss of information, provided we have some limitations upon the type of relationship. Things like convexity and so forth, I do not remember all the details at this point.

Now, we come back to the annoying conversation about derivatives / velocities. This is really a red herring. If you think about why they are useful in thermodynamics, it is clear that E(S,V,N) or S(E,V,N), we want to convert to the derivatives because they give us temperature, pressure, chemical potentials (and other potentials or Mathieu functions). The reason why this is useful is because they represent the cost or reward of an exchange, and in thermal equilibrium, these cost functions must equilibriate. That is a physical reason we want to pay attention to the Legendre transformed quantities as opposed to the originally defined quantities.

Then you come back to mechanics. Be careful---velocities $$\dot q$$ are actually the base quantities here. Instead, the slopes are $$p = \partial_{\dot q}\mathcal L$$. Why would this be useful? Other than the basic fact that they are the conserved quantities when the Lagrangians are independent of the corresponding coördinates, I am not sure why. It just happens to be useful in general, possibly because of some deeper quantum mystery. After all, it is no longer the case in mechanics that the momenta correspond to anything equilibrated as was the case in thermal equilibrium. For whatever reason it is useful, it should be useful for another reason.