In physics, the number of degrees of freedom (DOF) of a mechanical system is the number of independent parameters required to completely specify its configuration or state. That number is an important property in the analysis of systems of bodies in mechanical engineering, structural engineering, aerospace engineering, robotics, and other fields.
As an example, the position of a single railcar (engine) moving along a track has one degree of freedom because the position of the car can be completely specified by a single number expressing its distance along the track from some chosen origin. A train of rigid cars connected by hinges to an engine still has only one degree of freedom because the positions of the cars behind the engine are constrained by the shape of the track.