Legendre Transformation explained (with Animation)
Вставка
- Опубліковано 9 лют 2025
- A legendre transformation is a way of transforming a function of some variable into another function of another variable without losing any information. It is used for thermodynamic potentials or in theoretical mechanics when deriving the Hamilton function from the Lagrange function. In this video I show a geometric interpretation for the legendre transformation via a helpful little animation before deriving the legendre transform of a differentiable function from the definition.
My explanation is mainly intended for people who have at least some basic knowledge of single and multi variable calculus and need a quick explanation and derivation of the legendre transformation. For that reason I am not overly exact and thorough in the mathematical details. Consider my explanation a Physicist's approach to a mathematical topic.
"A graphical derivation of the Legendre Transform" by Sam Kennerly (12 April 2011) and
"Making sense of the Legendre transform" by Zia, Redish & McKay, American Journal of Physics, vol. 77, (7), July 2009 present enlightening discussions on the Legendre Transform.
I have to go back and hit the thumb for you! These resources are truly incredibly useful and crystal clear. Thanks for sharing!
While there's a bunch of cool physics/math videos out there, somehow I feel Legendre transform is not getting attention it deserves. Thanks for the very essential explanation!
thank god someone thought about making a video with a visual approach
here have my sub
Concise and well explained, thank you so much!
0:50 To be very explicit, that means this transformation must be *invertible*. Saying that we can get the original function back is not as clear of a statement.
Not only that, but the Legendre Transformation is it’s own inverse! The term for such a transformation is an involution. This is part of why it makes so much sense to use the Legendre transformation in thermodynamics, you use one simple transformation to get between any of the representations of your system
At 4:45, I don't understand why the first derivatives of g equal to x(p) and x ...
Thanks for the video. I didn't understand why you put zero in t(0,x).
First I compute the tangent of my function at the x-coordinate x0 and I call it t(x, x0). It is the tangent at a fixed point whose x-coordinate is x0. I am interested in the y-coordinate of this tangent at x=0, which is t(0, x0). This is just a single value for fixed x0. But if I vary the value of x0 I can get different values. So I take t(0, x0) and put in x instead of x0. This gives a new function g(x). I admit it happens very quickly in the video, but I hope this clears things up a bit.
Brilliant explanation ! I loved it !
Thank you! That was useful.
Hey this is an excellent described 👍👍❤️❤️❤️
Хорошее видео!
Excellent!
Your explanation was very good. However, I still have a question. I understood that the Legendre transformation is like a parameterization of the function f(x) by its derivative at x, f'(x), but I don't understand why g(p) = ±x. Did you arrive at this result or establish it? If you established it, why?
Hi. Usually when we talk of transformations (Fourier, Laplace), these are usually a change of basis of the function (the former into sinusoids and the latter into damped sinusoids). These transforms are intuitive enough to grok. I'm wondering: the coordinates that we're in after taking the Legendre transform are of what exactly?
I must admit this video is very helpful and splendid. But I cannot understand why none is referring to the annoying mouth sounds.
thank you so much!
super thanks a lot
f(x0) is not the y intercept at any point, so why is the equation for the tangent f'(x)(x - x0) + f(x0)? This is the form y = mx + b but f(x0) is not the y intercept.
Some explanations for people who wonder how tangent = f'(x0)(x - x0) + f(x0) relates to the form y = mx + b:
- first of all, you missed a zero in the derivative: f'(x0)(x - x0) + f(x0)
(The x0 is just any number, like 2 or 101 or whatever, just a valid x input)
- Also, the tangent equation is not exactly in the form y=mx + b:
- It's clearer to see with an example how (tangent = f'(x0)(x - x0) + f(x0)) and (y = mx + b) relate:
take y = f(x) = x^2
so f'(x) = 2x
let's get the tangent at point x = 3 using the equation:
tangent t(x, 3) = f'(x0)(x - x0) + f(x0) = 2*3 (x - 3) + 3^2 = 6(x - 3) + 9
you can simplify this now to get the form y = mx + b:
tangent = 6(x - 3) + 9 = 6x - 6*3 + 9 = 6x - 9
so: y = tangent = 6x - 9
(-9) is your y intercept, which is not the same as f(x0), which you mentioned. f(x0) = f(3) = 3^2 =9
- To know where the mysterious tangent equation came from:
The f'(x0)(x - x0) + f(x0) is derived from the definition of the slope at a given point x0:
Slope at x0 = f'(x0) = deltaY/deltaX = [ f(x0) - f(x) ]/[ x0 - x ].
Now solve for f(x) to get the form f(x) = f'(x0)(x - x0) + f(x0)
Expand the bracket if you want to see what the y intercept is: f(x) = f'(x0)x - f'(x0)x0 + f(x0)
So your y intercept b of (y = mx + b) would be: (-f'(x0)x0 + f(x0))
Hi, I do not understand line 7 as you only said we have to express it in p and put into the function g. Later you mentioned we have to compute the inverse of f prime of x but on the screen, it shows inverse of f prime of p instead. Also, what is the difference between directly inserting p/2 as x into the g equation and doing all the inverse function which is confusing? Thank you.
Hi, the relation between x and p is given via f'(x) = p (this is the definition of p). f' is a function of x, but its inverse is a function of p. In the 7th line from the top I just inverted the relation f'(x) = p to obtain x = (f')^-1(p). This is also what I did with my example. I computed f'(x) = 2x = p and solved for x, which gave x = p/2. In doing so, I did actually calculate the inverse of f'(x) = 2x = p, it just happens to be very simple for this example. I hope this helps, if you have any further questions, do not hesitate to contact me.
Hello,
thanks for the video!
Excuse me, x(p) is the inverse of the derivative of f at p. Isnt that just f again?
Answer would be much appreciated! Thanks!
Inverse of the derivative is not the same as the "Stammfunktion" or F
Damn! I came here only to know how legendre is pronounced 😂
This is actually my middle name and they all pronounce it wrong hahah
It sounds more like lejawnd/lejeand and the re is silent lol
Tks. But, why g(p)=g(x(p))? It seems that, p=x(p). But x(p)=p/2, isn't it?
Sorry for my bad English. I mean, if g(p)=g(x(p)), then p=x(p).
I think you are referring to the line that appears at about 2:57, right?
You have a very good point in that g(p) = g(x(p)) is not correct here in a strictly mathematical sense. In the sense of what they do with their argument, they are different functions! g(p) takes its argument, squares it and multiplies it by -1/4. g(x) takes its argument squares it and multiplies by -1. That makes them different functions of their argument. Choosing the same symbol g and not even using a subscript to distinguish the functions is a Physicist's laziness at work. What I mean are two different functions depending on whether the argument is x or p. g(x) is developed in line 3-5. g(p) is then found by plugging x(p) into g(x).
@@MathAndPhysics OK, thank you very much!
what is x_0?
Good.
G O D
wow