  Regardless of the long history of gauge theories, it is not well recognized
under which condition gauge fixing at the action level is legitimate. We
address this issue from the Lagrangian point of view, and prove the following
theorem on the relation between gauge fixing and Euler-Lagrange equations: In
any gauge theory, if a gauge fixing is complete, i.e., the gauge functions are
determined uniquely by the gauge conditions, the Euler-Lagrange equations
derived from the gauge-fixed action are equivalent to those derived from the
original action supplemented with the gauge conditions. Otherwise, it is not
appropriate to impose the gauge conditions before deriving Euler-Lagrange
equations as it may in general lead to inconsistent results. The criterion to
check whether a gauge fixing is complete or not is further investigated. We
also provide applications of the theorem to scalar-tensor theories and make
comments on recent relevant papers on theories of modified gravity, in which
there are confusions on gauge fixing and counting physical degrees of freedom.
