An alternative definition of equilibrium that is more general and often more useful is

- A system is in
**mechanical equilibrium**if its position in configuration space is a point at which the gradient of the potential energy is zero.

For example, from elementary calculus, we know that a necessary condition for a local minimum *or* a maximum of a differentiable function is a vanishing first derivative (that is, the first derivative is becoming zero). To determine whether a point is a minimum or maximum, we must take the second derivative. The consequences to the stability of the equilibrium state are as follows:

- Second derivative < 0 : The potential energy is at a local maximum, which means that the system is in an unstable equilibrium state. If the system is perturbed by an arbitrarily small force, the forces of the system do not cause it to return to equilibrium.
- Second derivative = 0 : This could be a region in which the energy does not vary, in which case the equilibrium is marginally stable. Or the region could be a saddle point, in which case the equilibrium is unstable.
- Second derivative > 0 : The potential energy is at a local minimum. This is a stable equilibrium. A small perturbation does not cause the system to leave the region of the equilibrium point. If more than one stable equilibrium state is possible for a system, any equilibria whose potential energy is higher than the absolute minimum represent metastable states.