A definition of the Legendre transform from Zorich This is from exercise 8.5.5.2 from Mathematical Analysis I by Zorich. The Legendre transform of a (presumably differentiable) function $f:\mathbb R^n\to\mathbb R$ is
"the transformation to the new variables $\xi_1, ..., \xi_n$ and function $f^*(\xi_1, ..., \xi_n)$" defined by
$$\xi_i = \frac {\partial f} {\partial x_i}(x_1, ... x_n)$$
$$f^*(\xi_1, ..., \xi_n)=\sum_{i=1}^n\xi_i x_i - f(x_1, ... x_n)$$
This definition just seems like nonsense to me. In what sense are the $\xi_i$ "variables"? More importantly, what is the meaning of the second equation? Is the implication that the right hand side only depends on the $\xi_i$? What if there are two points in $\mathbb R^n$ in which $f$ has the same differential? How do I know which $x_i$ to plug into the right hand side?
Basically, how is the above equivalent to an actual definition of a function $f^*$ on $\mathbb R^n$, and what is this definition? The Wikipedia article on the Legendre transform seems to use a very different formalism.
 A: Let us suppose that $f$ is defined and convex in a region $A\subseteq\Bbb R^n$, in other words (supposing $f\in C^2(A)$) the Hessian Matrix should be positive definite. 
If this is the case, then the change of variables (or transformation)
$$\mathbf{p} = \frac {\partial f} {\partial\mathbf{x}}(\mathbf{x})\tag1$$
is invertible from $A$ onto a certain $B\subseteq \Bbb R^n$, because the Jacobian matrix of the transformation is just the Hessian matrix of $f$. So, for every $\mathbf{p}\in B$ there is a unique $\mathbf{x}\in A$ such that $(1)$ holds, we can write the inverse transform as
$$\mathbf{x} = \mathbf{g}(\mathbf{p}).$$
Let us consider now the plane passing through $\mathbf{x}_0$ and tangent to the graph of $f$, i.e.
$$
z = f(\mathbf{x}_0)+\mathbf{p}_0\cdot(\mathbf{x}-\mathbf{x}_0)
$$
where $\mathbf{p}_0 = \frac {\partial f} {\partial\mathbf{x}}(\mathbf{x}_0)$ and define $f^*(\mathbf{p}_0)$ as the opposite of the known term in the equation of the plane, i.e.
$$f^*(\mathbf{p}_0) = \mathbf{p}_0\cdot\mathbf{x}_0-f(\mathbf{x}_0)$$
generalized, with a change of names, as
$$f^*(\mathbf{p}) = \mathbf{p}\cdot\mathbf{x}-f(\mathbf{x})$$
(remember that $\mathbf{x} = \mathbf{g}(\mathbf{p})$, so this function could be considered to only depend on $\mathbf{p}$).
This value also correspond to the maximum (vertical) distance between the graph of the function and the plane passing through the origin and with orientation given by $\mathbf{p}_0$, see image: $OA=BC$.
Here is the connection with the more general definition given in Wikipedia, where the $\sup$ is defined also if the function is not differentiable.

Now, it is easy to see that 
$$\mathbf{x}=\mathbf{g}(\mathbf{p})=\frac{\partial f^*}{\partial \mathbf{p}}(\mathbf{p})$$
so that the inverse transform corresponds to the gradient of $f^*$ in the same way the direct transform corresponds to the gradient of $f$.
In fact (sum implied on repeated indexes)
\begin{align}
\frac{\partial f^*}{\partial p_k}
  &=\delta_{kh}x_h+p_h\frac{\partial g_h}{\partial p_k}-\frac{\partial f}{\partial x_h}\frac{\partial g_h}{\partial p_k}=\\
  &=x_k+\left(p_h-\frac{\partial f}{\partial x_h}\right)\frac{\partial g_h}{\partial p_k}=x_k
\end{align}
For some references, biased toward analytical mechanics, see 


*

*Arnold, Mathematical Methods of Classical Mechanics, Springer

*Gantmacher, Lectures in Analytical Mechanics, Mir Books
