The Fleet That Lost by Squaring
Twenty-Seven Against Thirty-Three
At about noon on 21 October 1805, off Cape Trafalgar, 27 British ships of the line sailed into a line of 33 French and Spanish ones. They came in two columns, almost at right angles to the enemy, and the wind was so light that the leading British ships were under heavy fire for almost an hour before their own guns could bear. By the end of the afternoon 17 allied ships had struck their colours and one had blown up. No British ship was lost. Nelson, shot from the mizzentop of the Redoutable, died at half past four.
Twenty-seven against thirty-three sounds like a fight between two fleets of about the same size. It was not. In the arithmetic of a sea battle fought with guns, it was 729 against 1,089.

The Square Law
In 1916 the engineer Frederick Lanchester, who had built one of the first British motor cars, published Aircraft in Warfare, and in it a pair of equations. When every gun can reach every enemy, each side loses ships in proportion to the number of enemy ships still firing:
Here $A$ and $F$ are the two fleets, and $\alpha$ and $\beta$ measure how hard each ship hits. Multiply the first equation by $2\alpha A$ and the second by $2\beta F$: both right-hand sides become $-2\alpha\beta AF$, so the difference vanishes:
So $\alpha A^2 – \beta F^2$ never changes, and a fleet’s fighting strength goes as the square of its numbers. When one side is gone, the other keeps exactly what the squares say. With equal guns, 27 British against 33 allied is $729$ against $1{,}089$: the British fleet is destroyed and $\sqrt{1089 – 729} = 19$ allied ships are left. To survive that fight, each British ship would have had to be $(33/27)^2 = 1.49$ times as effective as each enemy ship.
The square comes from aimed fire. In a line of spearmen, where a man can fight only the one in front of him, numbers count once, and Lanchester had a linear law for that too. Cannon changed it: every gun of the larger fleet finds a target, and the smaller fleet’s losses come faster the smaller it gets.
Divide, and the Squares Fall
The square law has a corollary that decides every battle in this post. Cut a fleet of $N$ ships into two groups of $n$ and $N – n$ that fight one after the other, and its strength is no longer $N^2$ but
with the least at $n = N/2$. Cut in half, a fleet is worth $N/\sqrt{2}$ ships fighting together. Forty-six ships cut in two are as strong as 32.5.
On 9 October 1805, twelve days before the battle, Nelson wrote a memorandum for his captains. He expected 40 ships of the line against 46: “Thinking it almost impossible to bring a fleet of forty sail of the line into line of battle in variable winds, thick weather, and other circumstances which must occur”, he would instead attack in the order of sailing, “placing the fleet in two lines of sixteen ships each, with an advance squadron of eight of the fastest sailing two-decked ships”. One line would cut the enemy about the twelfth ship from the rear, the other near the centre, and he expected “twenty sail of the enemy’s line to be untouched” for some time. “Something must be left to chance; nothing is sure in a sea fight beyond all others.”

Lanchester read the memorandum as the square law at work. Thirty-two British ships would overwhelm the rear half of the enemy, 23 ships, while 8 held off the van, the other 23. His arithmetic: $32^2 + 8^2 = 1{,}088$ against $23^2 + 23^2 = 1{,}058$, a British advantage of 30, or $\sqrt{30} = 5\tfrac{1}{2}$ ships left at the end. Fought line against line, $46^2 – 40^2 = 516$, and about 23 allied ships survive the British fleet. He noticed something else: 32 is the whole number nearest to $23\sqrt{2} = 32.5$, the force that meets half the enemy at exactly twice its strength. “Nelson, if not actually acquainted with the n-square law,” he concluded, “must have had some equivalent basis on which to figure his tactical values.”

Where the Advantage Comes From
Lanchester’s sum is exact if the fights happen one after the other. Solving the equations in time shows something his arithmetic hides. While every group still has an enemy to fire at, splitting the battle changes nothing at all: two fights side by side add up to exactly the same totals as one big fight. In the memorandum, after 0.3 exchange times (one exchange time is how long one ship, firing unopposed, takes to destroy one enemy ship), the British have 27.81 ships of strength and the allies 35.90, whether the fleets are split or not.
The difference begins when a group runs out of targets. Nelson’s eight ships are destroyed after 0.36 exchange times. From then on, 21.6 ships of the allied van have nobody to shoot at, while 32 British ships finish off the rear, which takes until 0.91. The square law does not reward cleverness. It rewards silence: every enemy gun that has no target is a gun that is not in the sum.
That is also why the plan is fragile. For the British to win, the van has to be kept out of the fight for at least 0.87 exchange times, 97% of the time the rear takes to beat. And the eight ships are a price, not a weapon: if the van would have stayed out anyway, the same 40 ships thrown all at the rear win with 23.3 ships left instead of 5.5. Lanchester knew it, and called their part “admittedly a losing action”. Their job is to buy time.
Algorithm — Nelson’s Scheme in Lanchester’s Equations
input: British main body a, detachment b
allied rear f, van g
T: when the van joins; r: British gunnery (allied = 1)
duel(A, F, t): s ← √r
if sA < F: British side gone at t* = artanh(sA/F)/s
if F < sA: allied side gone at t* = artanh(F/(sA))/s
for t < t*: A ← A cosh(st) − (F/s) sinh(st)
F ← F cosh(st) − sA sinh(st)
for t ≥ t*: the winner keeps √(A² − F²/r) or √(F² − rA²)
(a, f) ← duel(a, f, T) the main body against the rear
(b, g) ← duel(b, g, T) the detachment against the van
A ← a + b; F ← f + g the van joins: everything left
fights everything left
return √(A² − F²/r) if rA² > F² British ships left
−√(F² − rA²) otherwise allied ships left
To check it, I solved the same battles a second way, by brute-force time-stepping (fourth-order Runge–Kutta, with a group falling silent when it reaches zero), and compared both at six moments in four battles. They agree to $2 \times 10^{-8}$ of a ship.

On the Day
At Trafalgar the odds were worse than the memorandum’s, 27 against 33, and Nelson attacked in two columns, not three. No ships were sent to hold the van. Lanchester thought the weather did that job: “The fact that the wind was of the lightest was alone sufficient to determine the exclusion of the enemy’s van from the action.” The allied van, by one account, “after long remaining quiescent, made a futile demonstration and then sailed away”.
If the allied line is cut in the middle, 17 ships in the rear group and 16 in the van, and all 27 British ships go at the rear, the van has to be kept out for 0.47 exchange times, 63% of the time the rear takes to beat. If it stays out, 13.6 British ships of strength are left at the end. Then the British could have been worse gunners, ship for ship, by a quarter (0.75 of the enemy’s effectiveness) and still have won. Line against line, they needed to be half as good again. Where the line was really cut is the board’s job: the museum’s description of Pocock’s painting has Collingwood breaking it about a third from the rear and Nelson just ahead of the centre.
The model counts fighting strength, not hulls. Ships at Trafalgar struck their colours long before they sank, and the British had faster gunnery and better seamanship, which the gunnery slider stands for. The approach broke the law’s assumptions too: for almost an hour the leading British ships fought alone, the very thing the square law punishes. The plan could afford it only because the enemy’s van was not firing.
Fight It Yourself
The board solves every battle from the formulas above. Choose the fleets, where the allied line is cut, how many British ships hold the van, how late the van joins and how well each side shoots, and press fight to watch the ships fall away from above. The map underneath shows the winner for every size of van and every delay at once, with your setting as a dot. I checked the board against Python on 400 random battles, with fleets from 5 to 50 ships, every kind of cut and every delay, and the two agreed to $8 \times 10^{-15}$ of a ship; for both presets, the delay and gunnery it reports match Python’s exactly.
The Admiral Who Saw It Coming
Before the battle, Villeneuve wrote to his captains exactly what Nelson would do: “The British Fleet will not be formed in a line-of-battle parallel to the combined fleet according to the usage of former days. Nelson, assuming him to be, as represented, really in command, will seek to break our line, envelop our rear, and overpower with groups of his ships as many as he can isolate and cut off.”
He was right in every particular, and it made no difference. The square law does not care who knows it. A fleet that has been cut in two is worth the sum of its squares, and a van that cannot reach the fight has guns that count for nothing, however clearly its admiral saw it coming.

Villeneuve was taken with his flagship and sent to England on parole, where he was allowed to attend Nelson’s funeral. Freed, he went home and asked to serve again, and his requests went unanswered. On 22 April 1806 he was found dead in an inn at Rennes, with six stab wounds and a farewell letter to his wife. A verdict of suicide was recorded; the British press mocked it, and historians still argue over it. The law that beat him was written down 111 years later, by a man who built motor cars.
Sources
- H. Nelson, memorandum to the captains of the fleet, Victory, off Cádiz, 9 October 1805, in N. H. Nicolas (ed.), The Dispatches and Letters of Vice Admiral Lord Viscount Nelson, vol. 7, Henry Colburn, London, 1846.
- N. Pocock, The Battle of Trafalgar, 21 October 1805: Beginning of the Action and End of the Action, oil paintings, about 1808, National Maritime Museum, Greenwich, BHC0548 and BHC0549.
- E. Fraser, The Enemy at Trafalgar, Hodder and Stoughton, London, 1906.
- F. W. Lanchester, Aircraft in Warfare: The Dawn of the Fourth Arm, Constable, London, 1916, chapters V and VI.
- D. Hannay, “Trafalgar, Battle of”, Encyclopædia Britannica, 11th edition, vol. 27, Cambridge University Press, 1911.
- “Battle of Trafalgar”, Wikipedia: the approach in a light wind and the losses.
- “Pierre-Charles Villeneuve”, Wikipedia: his parole and death.
Every number in the text, the two charts and the board are computed by the scripts archived with this post, from the closed-form solution of Lanchester’s equations, checked against a Runge–Kutta solve; the board was checked against the same Python code in a browser.
Interested in applying these ideas to your work? Get in touch.