I first met the Legrendre transformation in classical mechanics (self study), I did not pay much attention of how the Hamiltonian is derived from the Lagrangian, by applying a Legrendre transform to the Lagrangian. Now I meet this transformation again in Thermodynamics when one has the internal energy and wants to obtain for example the Gibbs free energy or Enthalpy, etc. Now I try to understand exactly how this transform (is it an operator?) acts on a function of several variables. I must of course be mistaken but I see in wikipedia what happens in the case of a single variable, not several variables. Thus, if you give me a function of several variables, I have no idea how to take the Legendre transform(s) of this function. Could someone explain me more or less what is it, how to apply it or at least give me a good reference (wikipedia would do the job if I knew where to look at exactly)? Thanks!