In classical mechanics, holonomic constraints are relations between the position variables (and possibly time) that can be expressed in the following form:
f ( u 1 , u 2 , u 3 , … , u n , t ) = 0 {\displaystyle f(u_{1},u_{2},u_{3},\ldots ,u_{n},t)=0}
where { u 1 , u 2 , u 3 , … , u n } {\displaystyle \{u_{1},u_{2},u_{3},\ldots ,u_{n}\}} are n generalized coordinates that describe the system (in unconstrained configuration space). For example, the motion of a particle constrained to lie on the surface of a sphere is subject to a holonomic constraint, but if the particle is able to fall off the sphere under the influence of gravity, the constraint becomes non-holonomic. For the first case, the holonomic constraint may be given by the equation
r 2 − a 2 = 0 {\displaystyle r^{2}-a^{2}=0}
where r {\displaystyle r} is the distance from the centre of a sphere of radius a {\displaystyle a} , whereas the second non-holonomic case may be given by
r 2 − a 2 ≥ 0 {\displaystyle r^{2}-a^{2}\geq 0}
Velocity-dependent constraints (also called semi-holonomic constraints) such as
f ( u 1 , u 2 , … , u n , u ˙ 1 , u ˙ 2 , … , u ˙ n , t ) = 0 {\displaystyle f(u_{1},u_{2},\ldots ,u_{n},{\dot {u}}_{1},{\dot {u}}_{2},\ldots ,{\dot {u}}_{n},t)=0}
are not usually holonomic.