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: . 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.
- A virtual displacement is an infinitesimal, imagined repositioning of the system, consistent with the constraints at a frozen instant: by definition.
- It differs from a real displacement exactly when the constraints move (rheonomic case): the real motion includes the constraint's own drag term ; 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, — one scalar equation per degree of freedom, zero constraint forces anywhere.
- In generalized coordinates this reads for every generalized force ; for conservative systems it becomes — equilibrium is stationary potential energy.
- Every ideal machine obeys : 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: .
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 — .
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 hold a payload wrench at the end-effector? The answer shipped in every manipulator controller is , where is the kinematic Jacobian — and that formula is equation (7): the joint torque conjugate to is the applied force dotted into . 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 — 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.
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.
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 , and each particle's position is a known map — the explicit appears whenever a constraint moves on its own schedule (a rotating hoop, a lengthening pendulum). During a real interval 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:
where: — the real displacement of particle in time ; 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 , that last term is the 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, :
where: — free, independent variations of the generalized coordinates ( of them, one per degree of freedom); no term appears, by definition. Read physically: 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 ), 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:
where: — the applied (impressed) forces: gravity, springs, motors, loads — the forces with formulas, the ones you care about; — 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:
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.
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 definition earns its keep.
Step 1. A smooth surface. Let the constraint be . A frictionless surface can push only along its normal, so for some scalar . A virtual displacement must keep the particle on the surface at frozen time: expanding to first order with gives . Then
Why this needs the freeze: a real displacement instead satisfies — when the surface moves, has a component along the normal of size , and the normal force does real work . 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 . Varying at frozen time: . The rod's internal forces are an action–reaction pair along its length: , with . Their combined virtual work is
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 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 . 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: . Work is force dotted into the displacement of its point of application:
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 , hence . Dot each equation into a virtual displacement, sum over particles, and apply (4) — the constraint forces exit without leaving an address:
where: — 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 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 , 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 driving against an output load :
where: — 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 and a handle sweeping a circle of radius trades of hand travel for of lift — mechanical advantage , which is why of fingertip effort holds up the corner of a car.
Go deeper · Derivation B · 1 minThe law of the lever without ever meeting the pivot
The target is Archimedes' law of the lever, , 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 , so equation (5) is a single scalar condition in . 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 and hang at distances and on opposite sides of the fulcrum. The only admissible virtual displacement is a small rotation 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 (down) and (up), to first order in .
Step 3. Write the virtual work of gravity, the only applied force. Gravity does positive work on what descends and negative on what rises:
Step 4. Demand for arbitrary — both signs of tilt are admissible probes, so the coefficient itself must vanish:
Why this is stronger than it looks: the same three lines, with ratios replacing , 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:
where: — the generalized force conjugate to : the work the applied forces deliver per unit twist of that one knob, all other knobs held fixed. Its dimensions are whatever makes an energy — a torque if is an angle, an ordinary force if 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:
where: each generalized force must vanish separately, because the 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: scalar equations, one per degree of freedom, with every constraint force already gone.
Go deeper · Derivation C · 1 minEquilibrium 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, . 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 , and it is the applied forces (not the constraints) that must be conservative.
Step 1. Let every applied force come from a potential: . Insert this into the definition of the generalized force in (7):
Step 2. Recognize the chain rule. Since depends on only through the positions , the sum is exactly the partial derivative of the composite function:
Why this identification is the whole theorem: a generalized force conjugate to measures work per unit ; 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 means every , i.e.
— 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 resists every probe (positive work required to leave), a maximum or saddle yields to some probe. The second variation of — the Hessian — decides, which is precisely the story the potential-energy-diagram and small-oscillation analyses take up downstream. As a quick check: the lever potential has exactly when , recovering the lever law instantly from the stationary-potential condition.
Which tool answers which question
| you want | use | notes |
|---|---|---|
| test a configuration for equilibrium | , eq. (5) | one probe per degree of freedom |
| force ratio of an ideal machine | , eq. (6) | pure kinematics — no internal forces |
| statics in generalized coordinates | , eqs. (7)–(8) | the workhorse for linkages |
| conservative systems | , eq. (9) | equilibrium = flat landscape; Hessian for stability |
| an actual constraint force | Lagrange multipliers, or Newtonian free-body craft | see the constraint-forces article — virtual work deliberately hides them |
| dynamics | d'Alembert's principle — the sequel article |
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| scleronomic constraints | and span the same directions | virtual and real displacements are interchangeable; the freeze costs nothing |
| rheonomic constraints | constraint forces may do real work yet still zero virtual work — the principle survives intact | |
| no constraints at all | arbitrary | the principle collapses to elementary force balance, as it must |
| one degree of freedom | the ideal-machine law; mechanical advantage = displacement ratio | |
| sliding friction present | for the friction part | reclassify friction as an applied force; the clean elimination covers only the ideal remainder |
| unilateral constraint (resting contact, slack string) | equilibrium requires for admissible probes | one-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 engine block with a block-and-tackle in which the load hangs from supporting rope strands. Find the required pull, and how much rope must be hauled to raise the engine . 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 . Inextensibility of the single rope means the four supporting strands must each shorten by , so the free end pays out 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 and the weight ): .
Step 3. Demand for arbitrary : — about the weight of a 20 kg suitcase, one-handed.
Step 4. The distance price, from the same kinematics: of rope for half a metre of lift. Force divided by four, distance multiplied by four — equation (6) audited: in, out.
2 · The A-frame and the cord that holds it (exam level)
Two uniform rods, each of mass and length , are hinged together at the top and stand like an A-frame on a frictionless floor, each rod making 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 as an applied force at each foot, the frame has one degree of freedom: the splay angle . 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 , so for each rod. The foot separation is , so .
Step 3. Virtual work. Gravity (both rods): — splaying lowers the mass, gravity likes it. The cord: tension opposes the feet separating, . Setting the total to zero: , so
Step 4. Numbers: .
Step 5. Cross-check by Newton (the long way). One rod, torques about the top hinge: the floor normal on its foot is (symmetry: each foot carries one rod's weight), giving , i.e. — identical, but only after introducing and then eliminating and shepherding the hinge force. Virtual work never met either. Note the scaling: as (frame flattening), — 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
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.
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 carries no time term by construction; the 'cancellation of dots' identity is used in the inertial-term reduction on the road to Lagrange's equations; and the lever law serves as a concrete worked check. No empirical constants are claimed. Worked-example numbers on this page ( and of rope for the tackle; 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 , output point moves , all internal forces are workless constraints. Equilibrium then forces — the force ratio must be the inverse displacement ratio, no matter the mechanism. That is why you can rate a screw jack (advantage , hundreds) or a pulley stack (advantage ) 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 ). 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 , and equilibrium hands you . 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, , 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 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 equally, so 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 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.