Virtual Displacements and the Principle of Virtual Work

Look at a tower crane and count the forces you would need to find before Newton lets you say anything: a pin reaction at every joint, a tension in every cable, a stress in every strut — hundreds of unknowns, every one of them an answer rather than an input, each taking whatever value it must to hold the geometry together. Now ask the question an eighteenth-century mechanician would ask instead: if the crane sagged by a hair, would gravity do any work? If the answer is no — for every motion the mechanism allows — the crane stands. That single scalar question, asked once per degree of freedom, is the principle of virtual work, and it answers equilibrium problems without ever meeting a single constraint force. The trick has two halves. First, invent a special kind of displacement — a virtual displacement, an imagined repositioning taken with time frozen, respecting the constraints as they stand at this instant. Second, notice that ideal constraint forces (normal reactions, rod stresses, taut-string tensions, even static friction in rolling contact) are exactly the forces that can do no work under such displacements. Dot Newton's equilibrium condition into a virtual displacement and the entire apparatus of unknown reactions silently vanishes, leaving one clean statement about the applied forces alone: ∑iFi(a)⋅δri=0\sum_i \mathbf{F}_i^{(a)} \cdot \delta \mathbf{r}_i = 0. Johann Bernoulli stated the rule in 1717, three centuries before you were assigned it, and Lagrange built all of analytical mechanics on it. It is the reason a lever balances, the reason a block-and-tackle multiplies force, the working principle inside every finite-element solver, and — once d'Alembert adds the inertial force — the gateway through which Newtonian mechanics becomes Lagrangian mechanics.

Key takeaways
  • A virtual displacement δri\delta \mathbf{r}_i is an infinitesimal, imagined repositioning of the system, consistent with the constraints at a frozen instant: δt=0\delta t = 0 by definition.
  • It differs from a real displacement dri\mathrm{d}\mathbf{r}_i exactly when the constraints move (rheonomic case): the real motion includes the constraint's own drag term (∂ri/∂t) dt(\partial\mathbf{r}_i/\partial t)\,\mathrm{d}t; the virtual one deliberately omits it.
  • Ideal constraint forces — normal reactions, rigid-rod internal forces, inextensible-string tensions, rolling contact — do exactly zero work under any virtual displacement, even when they do nonzero real work.
  • The principle of virtual work: a system is in equilibrium if and only if the applied forces do no net virtual work, ∑iFi(a)⋅δri=0\sum_i \mathbf{F}_i^{(a)}\cdot\delta\mathbf{r}_i = 0 — one scalar equation per degree of freedom, zero constraint forces anywhere.
  • In generalized coordinates this reads Qj=0Q_j = 0 for every generalized force Qj=∑iFi(a)⋅∂ri/∂qjQ_j = \sum_i \mathbf{F}_i^{(a)}\cdot\partial\mathbf{r}_i/\partial q_j; for conservative systems it becomes δV=0\delta V = 0 — equilibrium is stationary potential energy.
  • Every ideal machine obeys Fin δsin=Fout δsoutF_{\mathrm{in}}\,\delta s_{\mathrm{in}} = F_{\mathrm{out}}\,\delta s_{\mathrm{out}}: mechanical advantage is a displacement ratio, readable off the geometry alone.
  • Key idea: test equilibrium by probing, not solving — one frozen-time, constraint-respecting displacement per degree of freedom, and the unknown reaction forces never enter the ledger: ∑iFi(a)⋅δri=0\sum_i \mathbf{F}_i^{(a)} \cdot \delta \mathbf{r}_i = 0.
The core insight

Freeze time and imagine displacing the system consistently with the constraints: ideal constraint forces do no work on such virtual displacements, so equilibrium is captured entirely by the applied forces — ∑iFi(a)⋅δri=0\sum_i \mathbf{F}_i^{(a)} \cdot \delta \mathbf{r}_i = 0.

Where this lives today

The principle of virtual work is the most heavily executed idea of eighteenth-century mechanics — not by physicists, but by software. The finite element method, which sizes aircraft wings, bridge decks, hip implants, and phone frames, is the principle verbatim: a structure is in equilibrium when the internal stresses do virtual work equal to that of the applied loads for every admissible virtual displacement field, and FEM simply restricts "every" to a large finite family of shape functions. Each row of the resulting stiffness system is one virtual-work statement; a million-element model is a million disciplined applications of equation (5). When a 2026 CAD package reports a stress margin overnight, it has been doing Bernoulli's thought experiment at gigahertz rates. The other stronghold is robotics. The statics of a robot arm asks: what motor torques τj\tau_j hold a payload wrench F\mathbf{F} at the end-effector? The answer shipped in every manipulator controller is τ=JTF\tau = J^{\mathsf{T}}\mathbf{F}, where JJ is the kinematic Jacobian — and that formula is equation (7): the joint torque conjugate to qjq_j is the applied force dotted into ∂r/∂qj\partial\mathbf{r}/\partial q_j. Gravity compensation in surgical robots and the whole-body balance controllers of current humanoid robots evaluate exactly these generalized forces hundreds of times per second, holding equilibrium by continuously solving Qj=0Q_j = 0 — virtual work as a real-time control law rather than an exam technique.

The physical picture

Thread a bead on a curved, frictionless wire. The wire can push the bead only perpendicular to itself — that is what frictionless means — while every displacement the bead is allowed to make points along the wire. Perpendicular push, tangential freedom: the wire's force is structurally incapable of doing work on any motion the wire permits. That orthogonality is not an accident of the bead; it is the defining geometry of an ideal constraint, and the principle of virtual work is the art of asking only questions to which that force contributes nothing.

Figure
The one picture behind the whole subject — constraint forces are perpendicular to everything the constraint allows
rigid frictionless wire — the constraint N — the wire’s push, normal δr — allowed probe, tangent −δr also allowed ghost positions — imagined, not taken mg — applied force N · δr = 0 always — the constraint force can never enter the work ledger

The word virtual signals a thought experiment. We are not asking what the system does next — that is dynamics. We are asking what it could do, consistently with its constraints, right now: an exploratory probe of configuration space. Equilibrium is the statement that no admissible probe direction lets the applied forces do positive work — the system has nowhere profitable to go. Instead of balancing three force components at every joint of a linkage, you write one number — the total virtual work — for each independent way the mechanism can flex, and demand that it vanish. The bookkeeping collapses from vectors-and-reactions to exactly as many scalar equations as the system has degrees of freedom. The subtle move — the one that makes the method exact rather than approximate — is freezing time. For a stationary wire, a virtual displacement and a small real displacement look identical, and you may blur the two. But let the constraint itself move — a bead on a rotating hoop, a pendulum whose support point is being cranked — and the real displacement acquires a second part: the piece the moving constraint drags the particle through. That dragged piece is generally parallel to the constraint force, so the constraint force does real work on it. The virtual displacement is defined precisely to strip the drag away: freeze the hoop, freeze the crank, and displace only along what the frozen geometry allows.

Figure
Real versus virtual displacement on a moving constraint — the frozen-time probe is what the constraint force cannot touch
scleronomic — wire at rest δr = dr N virtual and real displacements coincide; N does no work of either kind rheonomic — wire moving upward at u u dt δr (frozen wire) dr = δr-part + drag N the drag piece is along N: the wire does REAL work, but still zero VIRTUAL work — δt = 0 strips the drag the design decision of analytical mechanics: define the probe so that constraint forces can NEVER appear in the work ledger — freezing time is exactly the definition that achieves it, moving constraints included.

Keep one economic image in mind throughout: virtual work is a scalar gatekeeper. Constraint forces are the prices the geometry charges to enforce itself — the sibling article on constraint forces computes them one free-body diagram at a time. The principle of virtual work is the accounting system that never asks for the prices at all, because it only ever proposes trades the enforcer is indifferent to.

Virtual displacements, honestly defined

The whole subject rests on one distinction, so we build it carefully. A holonomic system's configuration is a point q=(q1,…,qf)q = (q_1,\dots,q_f), and each particle's position is a known map ri=ri(q1,…,qf,t)\mathbf{r}_i = \mathbf{r}_i(q_1,\dots,q_f,t) — the explicit tt appears whenever a constraint moves on its own schedule (a rotating hoop, a lengthening pendulum). During a real interval dt\mathrm{d}t the particle moves for two reasons: because the coordinates changed, and because the constraint map itself changed underneath it. Differentiating the map says exactly that:

dri=∑j=1f∂ri∂qj dqj+∂ri∂t dt(1)\mathrm{d}\mathbf{r}_i = \sum_{j=1}^{f} \frac{\partial \mathbf{r}_i}{\partial q_j}\,\mathrm{d}q_j + \frac{\partial \mathbf{r}_i}{\partial t}\,\mathrm{d}t \qquad (1)

where: dri\mathrm{d}\mathbf{r}_i — the real displacement of particle ii in time dt\mathrm{d}t; the first sum is motion within the constraint geometry; the last term is the drag of the moving constraint itself. For a bead on a hoop rotating at ω\omega, that last term is the ω×r\omega\times\mathbf{r} sweep — often the largest piece of the actual velocity. A virtual displacement keeps the first mechanism and amputates the second by decree. It is defined as any infinitesimal change of configuration taken at one frozen instant, δt=0\delta t = 0:

δri=∑j=1f∂ri∂qj δqj(2)\delta \mathbf{r}_i = \sum_{j=1}^{f} \frac{\partial \mathbf{r}_i}{\partial q_j}\,\delta q_j \qquad (2)

where: δqj\delta q_j — free, independent variations of the generalized coordinates (ff of them, one per degree of freedom); no (∂ri/∂t)(\partial\mathbf{r}_i/\partial t) term appears, by definition. Read physically: δri\delta\mathbf{r}_i is tangent to the constraint surface as it stands right now — a probe of where the frozen geometry would let the system go. When constraints are scleronomic (no explicit tt), equations (1) and (2) describe the same set of directions and the distinction evaporates; the moment a constraint moves, they part company, and everything that follows depends on using (2), not (1). Next, split every force in the problem into the two kinds the subject cares about:

Fi=Fi(a)+Fi(c)(3)\mathbf{F}_i = \mathbf{F}_i^{(a)} + \mathbf{F}_i^{(c)} \qquad (3)

where: Fi(a)\mathbf{F}_i^{(a)} — the applied (impressed) forces: gravity, springs, motors, loads — the forces with formulas, the ones you care about; Fi(c)\mathbf{F}_i^{(c)} — the constraint forces: normal reactions, rod stresses, string tensions — formula-less enforcers of geometry. The classification is operational, not fundamental: sliding friction, though it comes from a contact, must be booked as applied, because it fails the test that comes next. That test is the ideal-constraint condition, the load-bearing hypothesis of all analytical mechanics:

∑iFi(c)⋅δri=0(4)\sum_i \mathbf{F}_i^{(c)} \cdot \delta \mathbf{r}_i = 0 \qquad (4)

where: the sum runs over all particles and all constraint forces, dotted into any admissible virtual displacement. This is not a small technical lemma — it is a physical claim about which constraints deserve the name ideal, and it is provable for the standard inventory: smooth surfaces, rigid bodies, inextensible strings, frictionless pins, rolling without slipping. The proof is the first derivation below, and the frozen-time definition (2) is exactly what makes it survive moving constraints.

Derivation AWhy ideal constraint forces do no virtual work

We are proving the workless-constraint condition, equation (4), for the four constraint types that power almost every mechanics problem: a smooth constraint surface (moving or not), a rigid rod between two particles, and rolling contact. The strategy is geometric in each case: show that the constraint force lives in the directions the frozen constraint forbids, while every virtual displacement lives in the directions it allows, so their dot product dies. The step to watch is the moving surface — there the real displacement is not tangent to the frozen surface and the constraint force genuinely pumps energy into the particle, yet the virtual work still vanishes; this is where the δt=0\delta t = 0 definition earns its keep.

Step 1. A smooth surface. Let the constraint be g(r,t)=0g(\mathbf{r},t) = 0. A frictionless surface can push only along its normal, so F(c)=λ ∇g\mathbf{F}^{(c)} = \lambda\,\nabla g for some scalar λ\lambda. A virtual displacement must keep the particle on the surface at frozen time: expanding g(r+δr,t)=0g(\mathbf{r}+\delta\mathbf{r},t) = 0 to first order with δt=0\delta t = 0 gives ∇g⋅δr=0\nabla g \cdot \delta\mathbf{r} = 0. Then

F(c)⋅δr=λ ∇g⋅δr=0\mathbf{F}^{(c)}\cdot\delta\mathbf{r} = \lambda\,\nabla g\cdot\delta\mathbf{r} = 0

Why this needs the freeze: a real displacement instead satisfies ∇g⋅dr+(∂g/∂t) dt=0\nabla g\cdot\mathrm{d}\mathbf{r} + (\partial g/\partial t)\,\mathrm{d}t = 0 — when the surface moves, dr\mathrm{d}\mathbf{r} has a component along the normal of size −(∂g/∂t)/∣∇g∣ dt-(\partial g/\partial t)/|\nabla g|\,\mathrm{d}t, and the normal force does real work F(c)⋅dr=−λ (∂g/∂t) dt≠0\mathbf{F}^{(c)}\cdot\mathrm{d}\mathbf{r} = -\lambda\,(\partial g/\partial t)\,\mathrm{d}t \neq 0. A bead being flung outward by a rotating hoop gains real kinetic energy from the hoop's normal force; virtually, the hoop is frozen and powerless.

Step 2. A rigid rod between particles 1 and 2. The constraint is ∣r1−r2∣2=ℓ2|\mathbf{r}_1-\mathbf{r}_2|^2 = \ell^2. Varying at frozen time: (r1−r2)⋅(δr1−δr2)=0(\mathbf{r}_1-\mathbf{r}_2)\cdot(\delta\mathbf{r}_1-\delta\mathbf{r}_2) = 0. The rod's internal forces are an action–reaction pair along its length: F1=F u^\mathbf{F}_1 = F\,\hat{\mathbf{u}}, F2=−F u^\mathbf{F}_2 = -F\,\hat{\mathbf{u}} with u^=(r1−r2)/ℓ\hat{\mathbf{u}} = (\mathbf{r}_1-\mathbf{r}_2)/\ell. Their combined virtual work is

F1⋅δr1+F2⋅δr2=F u^⋅(δr1−δr2)=0\mathbf{F}_1\cdot\delta\mathbf{r}_1 + \mathbf{F}_2\cdot\delta\mathbf{r}_2 = F\,\hat{\mathbf{u}}\cdot(\delta\mathbf{r}_1-\delta\mathbf{r}_2) = 0

Why each force separately does work but the pair does not: pushing one end of a rod through space certainly costs work — but rigidity means the other end pays it back exactly. Summed over the ∼1023\sim 10^{23} internal pairs of a rigid body, this single line deletes an astronomical number of unknowns; only the six rigid-body freedoms and the external forces survive.

Step 3. An inextensible string over a smooth peg. Same argument as the rod, segment by segment: constant length forces the virtual displacements of the two ends along the string to cancel, and the tension is uniform, so the total virtual work of tension is T (δs1+δs2)=T⋅0=0T\,(\delta s_1 + \delta s_2) = T\cdot 0 = 0. This is the fact that will make pulleys transparent below.

Step 4. Rolling without slipping. Here the constraint force is static friction — tangent to the surface, seemingly primed to do work. But the rolling constraint states that the material contact point has zero velocity, and hence zero virtual displacement: δrcontact=0\delta\mathbf{r}_{\mathrm{contact}} = 0. Work is force dotted into the displacement of its point of application:

Ffric⋅δrcontact=Ffric⋅0=0\mathbf{F}_{\mathrm{fric}}\cdot\delta\mathbf{r}_{\mathrm{contact}} = \mathbf{F}_{\mathrm{fric}}\cdot\mathbf{0} = 0

Why the same force fails the test the moment slipping starts: a skidding contact point moves against the friction force, the virtual work turns negative, and friction must be reclassified as an applied force — the ideal-constraint umbrella covers rolling, never sliding.

The principle, and the machine law it contains

Now the payoff. Take a system at rest and in equilibrium: every particle satisfies Fi=0\mathbf{F}_i = \mathbf{0}, hence Fi(a)+Fi(c)=0\mathbf{F}_i^{(a)} + \mathbf{F}_i^{(c)} = \mathbf{0}. Dot each equation into a virtual displacement, sum over particles, and apply (4) — the constraint forces exit without leaving an address:

δW≡∑iFi(a)⋅δri=0for every admissible {δri}(5)\delta W \equiv \sum_i \mathbf{F}_i^{(a)} \cdot \delta \mathbf{r}_i = 0 \quad \text{for every admissible } \{\delta\mathbf{r}_i\} \qquad (5)

where: δW\delta W — the total virtual work of the applied forces only. This is the principle of virtual work: a system with ideal constraints is in equilibrium precisely when the applied forces do no net work under any virtual displacement. The logic runs both ways — the forward direction is the two lines above; the converse (if δW=0\delta W = 0 for all probes, no admissible motion can start) is what makes the principle a test for equilibrium rather than a mere consequence. One scalar condition per independent probe direction, and the probes number exactly ff, the degrees of freedom. Before generalizing, extract the special case that ran civilization's machinery for two millennia. An ideal machine — lever, pulley system, screw, gear train — is a one-degree-of-freedom constraint connecting an input point to an output point. Apply (5) with an input force FinF_{\mathrm{in}} driving against an output load FoutF_{\mathrm{out}}:

Fin δsin=Fout δsout⟹MA≡FoutFin=δsinδsout(6)F_{\mathrm{in}}\,\delta s_{\mathrm{in}} = F_{\mathrm{out}}\,\delta s_{\mathrm{out}} \qquad \Longrightarrow \qquad \mathrm{MA} \equiv \frac{F_{\mathrm{out}}}{F_{\mathrm{in}}} = \frac{\delta s_{\mathrm{in}}}{\delta s_{\mathrm{out}}} \qquad (6)

where: δsin,δsout\delta s_{\mathrm{in}}, \delta s_{\mathrm{out}} — the virtual displacements of the input and output points along their forces, linked by the machine's geometry. Mechanical advantage is a displacement ratio: what you gain in force you pay in distance, and you can read the price off the kinematics without analyzing a single internal reaction. A screw jack with pitch p=5.0 mmp = 5.0\ \mathrm{mm} and a handle sweeping a circle of radius 0.35 m0.35\ \mathrm{m} trades 2π(0.35)=2.20 m2\pi(0.35) = 2.20\ \mathrm{m} of hand travel for 5.0 mm5.0\ \mathrm{mm} of lift — mechanical advantage 2.20/0.0050=4402.20/0.0050 = 440, which is why 19 N19\ \mathrm{N} of fingertip effort holds up the 8300 N8300\ \mathrm{N} corner of a car.

Figure
Two machines, one law — mechanical advantage is the ratio of virtual displacements
lever: δs ratio = ℓ₁/ℓ₂ fulcrum δy₁ = ℓ₁δθ δy₂ = ℓ₂δθ W₁ℓ₁ = W₂ℓ₂ — the pivot force never appears block-and-tackle: 4 strands pull δs = 4δh load rise δh one string, one tension: F·4δh = W·δh ⇒ F = W/4 the ideal-machine law F_in δs_in = F_out δs_out is equation (5) with one degree of freedom
Go deeper · Derivation B · 1 minThe law of the lever without ever meeting the pivot
Derivation BThe law of the lever without ever meeting the pivot

The target is Archimedes' law of the lever, W1ℓ1=W2ℓ2W_1\ell_1 = W_2\ell_2, derived from the principle of virtual work alone — no pivot reaction, no torque axioms. The strategy: a rigid lever pivoted at a fulcrum has exactly one degree of freedom, its tilt angle θ\theta, so equation (5) is a single scalar condition in δθ\delta\theta. The point to notice is why the pivot never enters: its point of application has zero virtual displacement, so whatever force it exerts is multiplied by nothing.

Step 1. Identify the one probe. Weights W1W_1 and W2W_2 hang at distances ℓ1\ell_1 and ℓ2\ell_2 on opposite sides of the fulcrum. The only admissible virtual displacement is a small rotation δθ\delta\theta about the pivot; the pivot point itself does not move, so the reaction there does zero virtual work automatically. Why the rod's internal forces also vanish: rigidity — Step 2 of the previous derivation, applied to every internal pair.

Step 2. Compute the endpoint displacements for a rotation that lowers side 1: the load points move vertically by δy1=−ℓ1 δθ\delta y_1 = -\ell_1\,\delta\theta (down) and δy2=+ℓ2 δθ\delta y_2 = +\ell_2\,\delta\theta (up), to first order in δθ\delta\theta.

Step 3. Write the virtual work of gravity, the only applied force. Gravity does positive work on what descends and negative on what rises:

δW=W1ℓ1 δθ−W2ℓ2 δθ=(W1ℓ1−W2ℓ2) δθ\delta W = W_1\ell_1\,\delta\theta - W_2\ell_2\,\delta\theta = (W_1\ell_1 - W_2\ell_2)\,\delta\theta

Step 4. Demand δW=0\delta W = 0 for arbitrary δθ\delta\theta — both signs of tilt are admissible probes, so the coefficient itself must vanish:

W1 ℓ1=W2 ℓ2W_1\,\ell_1 = W_2\,\ell_2

Why this is stronger than it looks: the same three lines, with δs\delta s ratios replacing ℓ δθ\ell\,\delta\theta, deliver every ideal machine — pulley stacks, gear trains, screw jacks, hydraulic presses. Equation (6) is this derivation wearing work clothes.

Generalized forces: the principle in its working uniform

For anything richer than a one-knob machine, translate (5) into generalized coordinates. Substitute the virtual displacement (2) into the principle and swap the order of summation — the work sorts itself by knob:

δW=∑j=1fQj δqj,Qj≡∑iFi(a)⋅∂ri∂qj(7)\delta W = \sum_{j=1}^{f} Q_j\,\delta q_j, \qquad Q_j \equiv \sum_i \mathbf{F}_i^{(a)} \cdot \frac{\partial \mathbf{r}_i}{\partial q_j} \qquad (7)

where: QjQ_j — the generalized force conjugate to qjq_j: the work the applied forces deliver per unit twist of that one knob, all other knobs held fixed. Its dimensions are whatever makes Qj δqjQ_j\,\delta q_j an energy — a torque if qjq_j is an angle, an ordinary force if qjq_j is a length. This is the object that will later sit on the right-hand side of Lagrange's equations; here it makes statics one line long:

Qj=0(j=1,…,f)(8)Q_j = 0 \qquad (j = 1,\dots,f) \qquad (8)

where: each generalized force must vanish separately, because the δqj\delta q_j are independent — you may wiggle any one knob while freezing the rest. Equation (8) is the principle of virtual work in its most usable form: ff scalar equations, one per degree of freedom, with every constraint force already gone.

Go deeper · Derivation C · 1 minEquilibrium as stationary potential energy
Derivation CEquilibrium as stationary potential energy

We are deriving the most familiar consequence of the principle: for conservative applied forces, equilibrium configurations are exactly the stationary points of the potential energy, δV=0\delta V = 0. The strategy is a two-line chain rule on top of equation (7), and the reason it is worth doing carefully is the payoff at the end — the entire "ball rests where the landscape is flat" picture of statics, including its stability refinement, is a corollary of virtual work and not an independent axiom. Watch the sign conventions: the generalized force is minus the gradient of VV, and it is the applied forces (not the constraints) that must be conservative.

Step 1. Let every applied force come from a potential: Fi(a)=−∇iV(r1,…,rN)\mathbf{F}_i^{(a)} = -\nabla_i V(\mathbf{r}_1,\dots,\mathbf{r}_N). Insert this into the definition of the generalized force in (7):

Qj=−∑i∇iV⋅∂ri∂qjQ_j = -\sum_i \nabla_i V \cdot \frac{\partial \mathbf{r}_i}{\partial q_j}

Step 2. Recognize the chain rule. Since VV depends on qq only through the positions ri(q,t)\mathbf{r}_i(q,t), the sum is exactly the partial derivative of the composite function:

Qj=−∂V∂qj(9)Q_j = -\frac{\partial V}{\partial q_j} \qquad (9)

Why this identification is the whole theorem: a generalized force conjugate to qjq_j measures work per unit δqj\delta q_j; for a conservative force that work is minus the change in potential energy — the chain rule is just that sentence in symbols.

Step 3. Apply the equilibrium condition (8): every Qj=0Q_j = 0 means every ∂V/∂qj=0\partial V/\partial q_j = 0, i.e.

δV=∑j∂V∂qj δqj=0for all probes\delta V = \sum_j \frac{\partial V}{\partial q_j}\,\delta q_j = 0 \quad \text{for all probes}

— the potential energy is stationary at equilibrium, with the constraints already built into the coordinates.

Step 4. Read the refinement. Stationary is not the same as stable: a minimum of VV resists every probe (positive work required to leave), a maximum or saddle yields to some probe. The second variation of VV — the Hessian ∂2V/∂qj∂qk\partial^2 V/\partial q_j\partial q_k — decides, which is precisely the story the potential-energy-diagram and small-oscillation analyses take up downstream. As a quick check: the lever potential V=−W1ℓ1θ+W2ℓ2θV = -W_1\ell_1\theta + W_2\ell_2\theta has dV/dθ=0\mathrm{d}V/\mathrm{d}\theta = 0 exactly when W1ℓ1=W2ℓ2W_1\ell_1 = W_2\ell_2, recovering the lever law instantly from the stationary-potential condition.

Which tool answers which question

you wantusenotes
test a configuration for equilibrium∑iFi(a)⋅δri=0\sum_i \mathbf{F}_i^{(a)}\cdot\delta\mathbf{r}_i = 0, eq. (5)one probe per degree of freedom
force ratio of an ideal machineMA=δsin/δsout\mathrm{MA} = \delta s_{\mathrm{in}}/\delta s_{\mathrm{out}}, eq. (6)pure kinematics — no internal forces
statics in generalized coordinatesQj=0Q_j = 0, eqs. (7)–(8)the workhorse for linkages
conservative systemsδV=0\delta V = 0, eq. (9)equilibrium = flat landscape; Hessian for stability
an actual constraint forceLagrange multipliers, or Newtonian free-body craftsee the constraint-forces article — virtual work deliberately hides them
dynamics∑i(Fi(a)−p˙i)⋅δri=0\sum_i (\mathbf{F}_i^{(a)} - \dot{\mathbf{p}}_i)\cdot\delta\mathbf{r}_i = 0d'Alembert's principle — the sequel article

Limiting cases

CaseResultMeaning
scleronomic constraints∂ri/∂t=0⇒δri\partial\mathbf{r}_i/\partial t = \mathbf{0} \Rightarrow \delta\mathbf{r}_i and dri\mathrm{d}\mathbf{r}_i span the same directionsvirtual and real displacements are interchangeable; the freeze costs nothing
rheonomic constraintsdri=δri-part+(∂ri/∂t) dt\mathrm{d}\mathbf{r}_i = \delta\mathbf{r}_i\text{-part} + (\partial\mathbf{r}_i/\partial t)\,\mathrm{d}tconstraint forces may do real work yet still zero virtual work — the principle survives intact
no constraints at allδr\delta\mathbf{r} arbitrary ⇒F(a)=0\Rightarrow \mathbf{F}^{(a)} = \mathbf{0}the principle collapses to elementary force balance, as it must
one degree of freedomFinδsin=FoutδsoutF_{\mathrm{in}}\delta s_{\mathrm{in}} = F_{\mathrm{out}}\delta s_{\mathrm{out}}the ideal-machine law; mechanical advantage = displacement ratio
sliding friction presentF⋅δr≠0\mathbf{F}\cdot\delta\mathbf{r} \neq 0 for the friction partreclassify friction as an applied force; the clean elimination covers only the ideal remainder
unilateral constraint (resting contact, slack string)equilibrium requires δW≤0\delta W \leq 0 for admissible probesone-sided constraints allow one-sided probes; the condition becomes an inequality

Worked examples

1 · Block-and-tackle: lifting an engine with one hand (confidence builder)

A mechanic lifts an 80 kg80\ \mathrm{kg} engine block with a block-and-tackle in which the load hangs from n=4n = 4 supporting rope strands. Find the required pull, and how much rope must be hauled to raise the engine 0.50 m0.50\ \mathrm{m}. Treat pulleys and rope as ideal.

Step 1. Set up the one virtual probe. The system has one degree of freedom: let the load rise by δh\delta h. Inextensibility of the single rope means the four supporting strands must each shorten by δh\delta h, so the free end pays out δs=4 δh\delta s = 4\,\delta h of rope. The tensions and pulley-axle reactions are ideal constraint forces — they never enter.

Step 2. Write the virtual work of the applied forces (the pull FF and the weight W=mgW = mg): δW=F (4 δh)−W δh=(4F−W) δh\delta W = F\,(4\,\delta h) - W\,\delta h = (4F - W)\,\delta h.

Step 3. Demand δW=0\delta W = 0 for arbitrary δh\delta h: F=W/4=(80×9.81)/4=784.8/4=196 NF = W/4 = (80 \times 9.81)/4 = 784.8/4 = \boxed{196\ \mathrm{N}} — about the weight of a 20 kg suitcase, one-handed.

Step 4. The distance price, from the same kinematics: Δs=4×0.50=2.0 m\Delta s = 4 \times 0.50 = \boxed{2.0\ \mathrm{m}} of rope for half a metre of lift. Force divided by four, distance multiplied by four — equation (6) audited: 196×2.0=392 J196 \times 2.0 = 392\ \mathrm{J} in, 784.8×0.50=392 J784.8 \times 0.50 = 392\ \mathrm{J} out.

2 · The A-frame and the cord that holds it (exam level)

Two uniform rods, each of mass m=3.0 kgm = 3.0\ \mathrm{kg} and length L=1.2 mL = 1.2\ \mathrm{m}, are hinged together at the top and stand like an A-frame on a frictionless floor, each rod making θ=30°\theta = 30° with the vertical. A light horizontal cord ties the two feet together. Find the cord tension — without ever computing the hinge force or the floor reactions.

Step 1. Choose the probe. With the cord momentarily cut and replaced by its tension TT as an applied force at each foot, the frame has one degree of freedom: the splay angle θ\theta. The floor normals are vertical while the feet move horizontally (workless); the top hinge is an internal ideal constraint (workless); gravity and the two tension forces are the only work-doers.

Step 2. Kinematics of the probe. Each rod's centre of mass sits at height ycm=(L/2)cos⁡θy_{\mathrm{cm}} = (L/2)\cos\theta, so δycm=−(L/2)sin⁡θ δθ\delta y_{\mathrm{cm}} = -(L/2)\sin\theta\,\delta\theta for each rod. The foot separation is s=2Lsin⁡θs = 2L\sin\theta, so δs=2Lcos⁡θ δθ\delta s = 2L\cos\theta\,\delta\theta.

Step 3. Virtual work. Gravity (both rods): δWgrav=−2mg δycm=+mgLsin⁡θ δθ\delta W_{\mathrm{grav}} = -2mg\,\delta y_{\mathrm{cm}} = +mgL\sin\theta\,\delta\theta — splaying lowers the mass, gravity likes it. The cord: tension opposes the feet separating, δWcord=−T δs=−2TLcos⁡θ δθ\delta W_{\mathrm{cord}} = -T\,\delta s = -2TL\cos\theta\,\delta\theta. Setting the total to zero: mgLsin⁡θ=2TLcos⁡θmgL\sin\theta = 2TL\cos\theta, so

T=mg2tan⁡θT = \frac{mg}{2}\tan\theta

Step 4. Numbers: T=12(3.0)(9.81)tan⁡30°=14.715×0.5774=8.5 NT = \tfrac{1}{2}(3.0)(9.81)\tan 30° = 14.715 \times 0.5774 = \boxed{8.5\ \mathrm{N}}.

Step 5. Cross-check by Newton (the long way). One rod, torques about the top hinge: the floor normal on its foot is N=mgN = mg (symmetry: each foot carries one rod's weight), giving mgLsin⁡θ−mgL2sin⁡θ−TLcos⁡θ=0mgL\sin\theta - mg\tfrac{L}{2}\sin\theta - TL\cos\theta = 0, i.e. T=mg2tan⁡θT = \tfrac{mg}{2}\tan\theta — identical, but only after introducing and then eliminating NN and shepherding the hinge force. Virtual work never met either. Note the scaling: as θ→90°\theta \to 90° (frame flattening), T→∞T \to \infty — a nearly flat A-frame shreds its cord, which is why stepladder spreaders are stiff bars, not strings.

Origins · 2 minJohann Bernoulli and how this was discovered
JB
Johann Bernoulli
1667–1748 · Basel and Groningen

Johann Bernoulli was the combative genius of the Bernoulli dynasty — brother and bitter rival of Jakob, father of Daniel, private tutor (by paid contract) of the Marquis de l'Hôpital, and the teacher who discovered the young Leonhard Euler. He posed the brachistochrone problem in 1696, the challenge that midwifed the calculus of variations, and solved it himself with the optical analogy that still opens textbooks. In February 1717, in a letter to Pierre Varignon, he stated the rule he called the principle of virtual velocities: in any equilibrium whatsoever, the "energies" of the applied forces — force times the velocity its point would acquire in an imagined infinitesimal motion — sum to zero. The generality was the news: not just levers and pulleys, but any system of bodies, rigid or linked, with the constraint forces silently absent. Lagrange took him at his word: the Mécanique analytique of 1788 erects the whole of statics on Bernoulli's principle, then reaches dynamics by welding it to d'Alembert's. Bernoulli's own priorities were less serene — he backdated results against his brother and famously expelled his son Daniel from the house over a shared prize — but on virtual work his claim is clean, and every finite-element solver on Earth now runs on his letter.

History
1586
— Simon Stevin publishes his statics, deriving the equilibrium of pulleys and inclined planes from the impossibility of perpetual motion — "what is gained in force is lost in speed," the machine law (6) in embryo.
1717
— Johann Bernoulli, in a letter to Varignon, states the general principle of virtual velocities for any system in equilibrium.
1743
— Jean le Rond d'Alembert's Traité de dynamique extends the idea to moving systems by adjoining the inertial force, opening the road from statics to dynamics.
1788
— Joseph-Louis Lagrange's Mécanique analytique makes virtual work the single foundation of mechanics — "no figures will be found in this work," only the calculus of the principle.
1943
— Richard Courant's variational treatment of equilibrium problems seeds the finite element method: virtual work discretized, and eventually industrialized inside every structural solver.

Going further

References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §1.4 (D'Alembert's Principle and Lagrange's Equations) · Landau & Lifshitz, Mechanics, 3rd ed., §1-2 · Morin, Introduction to Classical Mechanics, Ch. 6 · Taylor, Classical Mechanics, Ch. 7 · Lanczos, The Variational Principles of Mechanics, Ch. IV Three results worth keeping in view: the virtual-displacement formula δri=∑j(∂ri/∂qj)δqj\delta\mathbf{r}_i = \sum_j (\partial\mathbf{r}_i/\partial q_j)\delta q_j carries no time term by construction; the 'cancellation of dots' identity ∂ri/∂qj=∂r˙i/∂q˙j\partial\mathbf{r}_i/\partial q_j = \partial\dot{\mathbf{r}}_i/\partial\dot q_j is used in the inertial-term reduction on the road to Lagrange's equations; and the lever law W1ℓ1=W2ℓ2W_1\ell_1=W_2\ell_2 serves as a concrete worked check. No empirical constants are claimed. Worked-example numbers on this page (F=196 NF = 196\ \mathrm{N} and 2.0 m2.0\ \mathrm{m} of rope for the tackle; T=8.5 NT = 8.5\ \mathrm{N} for the A-frame; the screw-jack advantage of 440) are illustrative arithmetic computed from the stated formulas.

Builds on: Constraints and Their Classification · Generalized Coordinates and Configuration Space · Degrees of Freedom. Leads to: d'Alembert's Principle · The Euler-Lagrange Equations · Generalized Forces and Generalized Momenta · The Lagrangian Function.

Is the principle of virtual work just the work–energy theorem in disguise?

No — they answer different questions with different displacements. The work–energy theorem tracks real work along the actual trajectory and equates it to the change in kinetic energy; it is a statement about motion that happened. The principle of virtual work probes imagined displacements at frozen time and asks whether the applied forces could profit from any of them; it is a statement about whether motion starts. The distinction has teeth: on a moving constraint, a normal force does real work (which the work–energy theorem must count) while doing zero virtual work (so the equilibrium test never sees it). Conflating the two usually smuggles constraint forces back into an accounting that was designed to exclude them.

If time is frozen, nothing can actually move — so what is δr the displacement of?

Of your imagination, deliberately. A virtual displacement is not an event; it is a test direction in configuration space — one of the ways the system could be arranged infinitesimally differently while honoring every constraint as it stands this instant. The physics question being asked is: does the applied-force field have a component along any admissible test direction? If yes, the system can lower its account by moving that way, and equilibrium fails. If no test direction is profitable, the configuration holds. The freeze is what keeps the test honest for moving constraints: you probe the system's own freedoms, not the ride the constraint would give you anyway.

Rolling friction is a force at the contact patch — why is rolling without slipping still an ideal constraint?

Because work is force times the displacement of the material point it acts on, and rolling without slipping means precisely that the contact point has zero velocity — and zero virtual displacement. The static friction under a rolling wheel is real and can be large (it is what accelerates a car), but at every instant it acts on a point that is momentarily at rest, so it does no work, real or virtual. The moment the wheel skids, the contact point acquires a velocity opposite the friction force, the work turns negative and nonzero, and friction must move to the applied side of the ledger. Ideal rolling is workless; skidding never is.

Why is mechanical advantage a displacement ratio rather than something about the forces inside the machine?

Because an ideal machine is one degree of freedom wearing a costume. Whatever gears, strands, or linkages live inside, virtual work sees only: input point moves δsin\delta s_{\mathrm{in}}, output point moves δsout\delta s_{\mathrm{out}}, all internal forces are workless constraints. Equilibrium then forces Finδsin=FoutδsoutF_{\mathrm{in}}\delta s_{\mathrm{in}} = F_{\mathrm{out}}\delta s_{\mathrm{out}} — the force ratio must be the inverse displacement ratio, no matter the mechanism. That is why you can rate a screw jack (advantage 2πR/p2\pi R/p, hundreds) or a pulley stack (advantage nn) from geometry alone, and why "what you gain in force you lose in distance" is not a slogan but a theorem.

The A-frame example treated the cord's tension as an applied force. Isn't a cord a constraint?

It can be booked either way, and choosing is a skill worth having. Left as a constraint, the cord removes the splay freedom entirely — the frame has zero degrees of freedom and the virtual-work statement is empty (true but useless: it confirms equilibrium without revealing TT). The productive move is to cut the constraint mentally and promote its force to applied status: now the splay angle is a live degree of freedom, the tension does virtual work −T δs-T\,\delta s, and equilibrium hands you T=(mg/2)tan⁡θT = (mg/2)\tan\theta. This cut-and-expose trick is the statics twin of the Lagrange-multiplier method, and it is the standard way to extract a specific constraint force from a formalism built to hide them all.

Does the principle work when the potential energy is a maximum rather than a minimum?

Yes — and that is a feature to respect. The principle of virtual work detects stationarity of the potential energy, δV=0\delta V = 0, and a pencil balanced on its tip passes the test as legitimately as a marble in a bowl. First-order virtual work cannot distinguish them; stability is a second-order question, decided by whether the Hessian of VV is positive definite (minimum: every probe costs energy, stable) or has a downhill direction (maximum or saddle: some probe pays, unstable). So the honest summary is: virtual work finds all equilibria; the second variation then sorts them. The downstream small-oscillations machinery is exactly that sorting, made quantitative.

What actually breaks for a unilateral constraint like a block resting on a table?

The two-sidedness of the probes. A bilateral constraint (bead on a wire) admits ±δq\pm\delta q equally, so δW=0\delta W = 0 must hold with both signs and the coefficient vanishes. A unilateral constraint (block on a table, slack-capable string) admits only probes that do not violate the one-sided condition — the block may be lifted virtually but not pushed through the table. Equilibrium then requires only δW≤0\delta W \leq 0 for every admissible probe: no allowed move is profitable. Lift the block virtually: gravity does negative work, fine. The equality form (5) is recovered whenever the constraint is engaged and both directions are legal.

Why bother with virtual work if free-body diagrams already solve statics?

Count unknowns. A free-body treatment of a six-bar linkage introduces two reaction components per pin — a dozen unknowns tangled in a dozen coupled equations, most of which you never wanted. Virtual work writes one equation per degree of freedom — often just one, total — containing only the loads you care about. For the Newtonian craft of finding constraint forces (an axle load, a foundation reaction), free bodies remain the right tool; for equilibrium conditions and force ratios of mechanisms, virtual work is faster by an order of magnitude and scales to continua, where it becomes the finite element method. The deeper answer: virtual work is the version of statics that survives generalization — bolt on the inertial force and it becomes d'Alembert's principle, and from there Lagrange's equations. Free-body diagrams stop at the border.

Before this

Where this leads