Virtual work
There is a way of writing equilibrium that never mentions a reaction. Imagine the machine moving in a way its joints would permit, add up the work every force would do, and set the total to zero. Everything you did not want to know about does no work, and drops out of the equation before you have written it down.
Force and moment balance will solve anything in statics, given enough patience. On a machine of six linked members it costs six free-body diagrams and eighteen equations, most of them producing pin forces nobody asked about, in order to find one clamping force at the end of the chain. This topic is the alternative: a single equation that finds that one force and never names any of the others.
The principle
Work is the part of a force that goes along the motion, times the motion. For a force through a small displacement, and for a couple through a small rotation,
with \(\delta\theta\) in radians. A force at right angles to the motion does no work at all — not a little, none — and that is the fact the whole method is built on.
The principle itself is one sentence. If a body is in equilibrium, the total work done by all the forces acting on it through any small virtual displacement consistent with its constraints is zero.
It is not weaker than the conditions it replaces, and it is worth seeing why. Give the body a virtual displacement that is a pure translation \(\delta \mathbf{r}\), the same for every point. Then \(\delta U = \left(\sum \mathbf{F}\right) \cdot \delta \mathbf{r}\), and since this must vanish for every choice of \(\delta \mathbf{r}\), we recover \(\sum \mathbf{F} = \mathbf{0}\). Give it a pure rotation instead and the same argument returns \(\sum \mathbf{M} = \mathbf{0}\). Nothing has been lost; the information has only been repackaged into a scalar.
Take the lever in the figure: a bar on a pin, a known 300 N hanging 200 mm to one side and an unknown \(P\) 400 mm to the other. Let it turn through \(\delta\theta\). One end sinks by \(a\,\delta\theta\) and the other rises by \(b\,\delta\theta\), so
Two features of that line matter more than the answer. The pin reaction never appeared, although it is certainly there and is certainly not small. And \(\delta\theta\) cancelled — it had to, since it was never a real quantity. If a virtual displacement survives into your final answer, something has gone wrong.
A bar on a pin, one load known and one wanted.
What virtual means
Three words carry the whole meaning: imagined, infinitesimal, and admissible. Each is doing a job.
Imagined. The displacement does not happen. No time passes, nothing accelerates, no kinetic energy appears anywhere, and the body is in exactly the same position after the argument as before it. This is why the symbol is \(\delta\) rather than \(d\): it is a variation, a comparison with a neighbouring configuration the body could have occupied, not a change it undergoes. A machine that is bolted solid still has virtual displacements available to it.
Infinitesimal. Only first-order terms are kept. The consequence is practical: throughout the virtual displacement, the forces keep their magnitudes and directions and the geometry keeps its angles. A weight that hangs vertically still hangs vertically. Nothing in a virtual work equation is allowed to notice that the mechanism has moved, which is what makes the equation linear and the algebra short.
Admissible. The displacement must be one the constraints would allow. A block on a plane may slide along the plane; it may not sink into it or lift off it. A bar on a pin may rotate about the pin and do nothing else. An inextensible cord keeps its length, so its two ends are not free to move independently. In the figure, sliding the block up the slope is admissible and lifting it away from the surface is not.
That last requirement is not fussiness, and it is where most wrong answers come from. The reason the normal reaction does not appear in the equation is precisely that it is perpendicular to every motion the constraint permits. Choose a displacement that violates the constraint and the reaction starts doing work, so it must be carried in the sum — at which point the method has lost its only advantage.
There is a deliberate version of that move, and it is legitimate. If the reaction is the thing you actually want, remove the support, replace it by its unknown force, and let the body take up the one degree of freedom you have just given it. The released reaction is now an applied load, it does work through the displacement you allowed, and one virtual work equation delivers it. Releasing constraints on purpose is the standard way of using the method on structures that do not move.
A block on a smooth plane. It can only slide along it.
Why the reactions vanish
The power of the method is entirely in what is missing from the equation. Three whole categories of force do no virtual work, for three different reasons.
A reaction at a fixed pin or a built-in support acts at a point that cannot move. Its displacement is zero, so its work is zero however large the force is. A reaction at a smooth roller, a frictionless surface or a smooth guide is perpendicular to the only motion the support permits, so \(\mathbf{N} \cdot \delta \mathbf{r}\) is zero by the dot product. The two cases look different but amount to the same thing: an ideal constraint is one that does no work.
The third is the useful one. At an internal pin joining two members, each pushes on the other with equal and opposite forces, and both act at the same material point, which has one displacement. Their works are \(\mathbf{F} \cdot \delta \mathbf{r}\) and \(-\mathbf{F} \cdot \delta \mathbf{r}\), and they cancel identically, whatever the displacement is. The same argument disposes of the internal forces inside a rigid member: rigidity means no relative displacement, so no net work.
Put those together and a whole machine can be treated as a single system. Every pin force, every bearing reaction, every internal load drops out, and the equation contains only what is applied from outside. The crank and slider in the figure has three ideal constraints and not one of them survives into \(\delta U = M\,\delta\theta - P\,\delta x_B = 0\).
The exceptions deserve naming, because they are the traps. Friction is not an ideal constraint: a friction force opposes sliding, so it is antiparallel to the displacement and does negative work that must be included, which is why virtual work is awkward for problems where friction is being developed. A cable that stretches, or a spring, does work too — springs are usually handled through their potential energy instead. And if a member is not rigid, the strain energy stored in it belongs in the equation as well.
A crank, a rod and a slider — with three supports between them.
One coordinate, one equation
The procedure is mechanical once the idea is clear, and it is worth following in a fixed order because the steps that get skipped are always the same ones.
Count the degrees of freedom first. One is the case the method is built for. Choose a single coordinate \(q\) that fixes the configuration — an angle is nearly always better than a length, because angles usually make the trigonometry symmetric. Then locate every point where a force acts, measuring from a fixed origin, and write its position as a function of \(q\). This is the step people rush, and it is the only one with any content: a virtual work problem is a geometry problem wearing a disguise.
Differentiate to get the virtual displacements, \(\delta s = (ds/dq)\,\delta q\). Then sum the work, taking a term positive when the force component points along the displacement of its own point of application, and set the total to zero:
For the two-bar toggle in the figure — bars of length \(L\), pinned to the ground at one foot and on a roller at the other, carrying \(W\) at the apex and resisted by a horizontal \(P\) at the roller — the coordinate is the angle \(\theta\) the bars make with the ground. Then \(y_B = L\sin\theta\) and \(x_C = 2L\cos\theta\), so \(\delta y_B = L\cos\theta\,\delta\theta\) and \(\delta x_C = -2L\sin\theta\,\delta\theta\). The weight moves up when \(y_B\) increases, so it does negative work; \(P\) pushes inwards while \(x_C\) decreases, so it does positive work:
At \(\theta = 60^\circ\) with \(W = 400\) N that is 115 N. One equation, one unknown, and no free-body diagram was drawn. Notice also what the formula tells you for free: as the bars flatten and \(\theta \to 0\), \(\cot\theta\) runs away and \(P\) becomes enormous. That is the toggle-clamp effect, and it fell out of the geometry without any further work.
Two limits are worth knowing. Virtual work gives one equation per degree of freedom, so with several degrees of freedom you vary one coordinate at a time, holding the others fixed, and collect one equation from each. And because it produces only the forces that do work, it will never hand you the pin reactions — if you need those, you are back to free-body diagrams. It is a scalpel, not a replacement.
Two bars, a pin and a roller. One degree of freedom.
Potential energy and stability
When every force that does work is conservative — gravity, springs — the work it does can be written as the loss of a stored quantity:
with \(y\) the height of the centre of gravity above any datum you like and \(s\) the stretch of the spring. The principle of virtual work then reads \(\delta V = 0\), and for a system described by one coordinate that is
Equilibrium is a stationary point of the potential energy. This is usually the faster route, because it replaces the vector bookkeeping of displacements and directions with writing down one scalar function and differentiating it. Signs stop being a matter of judgement.
It also answers a question that force balance cannot even ask. A pencil balanced on its point satisfies every equilibrium equation exactly, and is useless. The distinction is in the second derivative — the term that was deliberately discarded as second-order back when the displacement was only infinitesimal, now deliberately kept:
The picture is a marble on a landscape whose height is \(V\). At a minimum, any displacement raises \(V\); energy would have to be supplied to move the system, so left alone it returns. At a maximum, any displacement lowers \(V\) and releases energy, so the system runs away from where it was. On a flat shelf nothing changes and it simply stays where it is put. A ball in a bowl, a ball on a dome, a ball on a table.
When the second derivative also vanishes the test is inconclusive and you must go on to the next non-zero derivative: if it is of even order and positive the equilibrium is stable, and otherwise it is not. That case is rare in coursework but it is the honest statement.
One restriction carries over from earlier. This whole treatment assumes the forces doing work are derivable from a potential, so friction and any other dissipative force is excluded. A constant applied load can be brought inside by giving it the potential \(V = -\mathbf{F} \cdot \mathbf{r}\), which is often the neatest way to handle a machine that carries both a weight and a fixed pull.