Generalized coordinates label the possible configurations of a mechanical system. A configuration specifies where its parts are; it does not usually specify its complete dynamical state. For second-order mechanics, velocities are needed as well.
This note revises my original Chinese explanation.
Coordinates adapted to constraints
Consider particles in spatial dimensions, described initially by Cartesian coordinates . Suppose there are smooth holonomic constraints
“Holonomic” means that the restrictions can be expressed in terms of configuration and time. If the Jacobian with respect to has rank near the configuration in question, the implicit function theorem gives a local parametrization with independent coordinates:
The variables are generalized coordinates. Changing them within the chart changes the configuration while automatically satisfying the constraints. They need not be distances or angles, although these are common choices.
For example, a planar pendulum of fixed length satisfies . Locally we can use one angle:
Its configuration needs one coordinate. Its instantaneous mechanical state needs both and .
Why this simplifies the equations
In Cartesian coordinates, ideal holonomic constraints can be enforced with unknown Lagrange multipliers. We then have motion equations and constraint equations for the unknown functions: the positions and multipliers.
In generalized coordinates, the constraints are built into the parametrization. For ideal constraints, whose reaction forces do no virtual work along allowed variations, the equations become
where represents applied nonconservative generalized forces. We solve motion equations without first finding the constraint reactions. A change of coordinates alone does not justify discarding arbitrary forces; the ideal-constraint assumption is doing that work. See Tong's treatment of the Lagrangian formalism.
Fewer variables do not guarantee easy equations. A useful coordinate choice should also reflect the system's symmetries and simplify its kinetic and potential energies.
Local coordinates and nonholonomic constraints
A coordinate chart is generally local. No single real angle labels every point of a circle uniquely and continuously without a cut. At a point where solving for fails, solving for may still work. This is a failure of a particular chart, not necessarily a singularity of the physical system. A pendulum passing over the top remains on the same smooth configuration circle.
Nonholonomic constraints require a separate distinction. A nonintegrable restriction on velocities can reduce the allowed velocity directions without reducing the dimension of configuration space by the same amount. Consequently, counting velocity constraints and subtracting them from the number of coordinates is not a general construction of generalized coordinates.
The reliable starting point is to identify the configuration space, establish the rank of any holonomic constraints, and then choose coordinates on the resulting local chart.