For questions about the Legendre transformation, an involution transform commonly used in classical mechanics and thermodynamics as well as for it's generalization, the Legendre–Fenchel Transformation.
In mathematics and physics, the Legendre transformation, named after Adrien-Marie Legendre, is an involutive transformation on the real-valued convex functions of one real variable. In physical problems, it is used to convert functions of one quantity (such as position, pressure, or temperature) into functions of the conjugate quantity (momentum, volume, and entropy, respectively). In this way, it is commonly used in classical mechanics to derive the Hamiltonian formalism out of the Lagrangian formalism and in thermodynamics to derive the thermodynamic potentials, as well as in the solution of differential equations of several variables.
Definition. Let $I\subset \mathbb {R}$ be an interval, and $f:I\to \mathbb {R}$ a convex function; then its Legendre transform is the function $f^*:I^*\to \mathbb {R}$ defined by $$f^*(x^*) = \sup_{x\in I}(x^*x-f(x)),\quad x^*\in I^*$$ where the domain $I^{*}$ is $$I^*= \left \{x^*\in \mathbb{R}:\sup_{x\in I}(x^*x-f(x))<\infty \right \} ~.$$