In general relativity and gravitation the Palatini variation is nowadays thought of as a variation of a Lagrangian with respect to the connection.
In fact, as is well known, the Einstein–Hilbert action for general relativity was first formulated purely in terms of the spacetime metric . In the Palatini variational method one takes as independent field variables not only the ten components but also the forty components of the affine connection , assuming, a priori, no dependence of the from the and their derivatives.