Shorts

1.2 Measuring the World

Units Are Part of the Answer

Why can’t you add metres to seconds, and how can units alone predict a formula you have never seen?

Visual Short · 9:16 The core visual idea in under two minutes

On 23 September 1999, after nine and a half months of travel, NASA’s Mars Climate Orbiter fired its engine to slow into orbit around Mars. It passed behind the planet 49 seconds earlier than expected and was never heard from again.

The plan had been to pass 226 kilometres above the surface. Calculations afterwards showed the spacecraft had gone in at about 57 kilometres — below the 80 kilometres the navigators considered survivable — and either burned in the thin Martian air or skipped back out into space.

The cause was traced to a single interface between two programs. One piece of ground software reported the effect of each small thruster firing in units based on the pound. The navigation software that read those numbers expected metric units. Nobody converted, and every firing was entered as if it were smaller than it really was:

Computed in Python unit-chain script
3. The Mars Climate Orbiter's two units
  1 pound-force second = 4.448 of the metric units the navigators expected
  read as metric, every thruster firing came out 4.45 times too small
Figure 1.2 The Orbiter’s planned and actual closest approach to Mars, drawn to scale. The navigators’ numbers were off by a factor of 4.45 in each small thruster firing; over months of travel the errors carried the spacecraft 169 kilometres lower than planned.

Units do arithmetic

Treat a unit as part of the number, because that is what it is. 3 m3\,\mathrm{m} means 3×(1 m)3 \times (1\,\mathrm{m}), and the 1 m1\,\mathrm{m} obeys the same algebra as any other factor. Multiply two lengths and you get a new unit, the square metre. Divide a length by a time and you get metres per second. What you cannot do is add them:

Computed in Python unit-chain script
1. Adding a length to a time
  3 m + 2 s  ->  refused: cannot convert from 'meter' ([length]) to 'second' ([time])
  3 m * 2 s  ->  6 meter * second  (multiplying is allowed: a new unit)
  3 m / 2 s  ->  1.5 meter / second

That refusal comes from a short Python script that carries every unit through its arithmetic, the same way every calculation in this book does. The bracketed words it prints — length, time — are the heart of the matter. Metres and feet are different units, but both measure the same kind of thing. The kind of quantity a unit measures, regardless of which unit you choose, is its dimension. Three metres plus two feet is a perfectly good length once you convert; three metres plus two seconds is not anything at all, because length and time are different dimensions.

Seven bricks

The SI builds every unit from seven. The metre (length), the second (time), the kilogram (mass), the ampere (electric current), the kelvin (temperature), the mole (amount of substance) and the candela (brightness as the eye sees it) are its base units, one for each dimension the system treats as fundamental. Every other unit is a derived unit: some product or quotient of base units. A square metre is m2\mathrm{m}^2; a speed is m/s\mathrm{m/s}; a density, when we need one, will be kg/m3\mathrm{kg/m^3}. Later chapters will give some derived units names of their own, but every one of them can be taken apart into the seven bricks.

Because units obey algebra, changing from one unit to another is just multiplication by one. The fraction 1000 m1 km\frac{1000\,\mathrm{m}}{1\,\mathrm{km}} equals exactly 1 — the top and bottom are the same length — so multiplying by it changes the units and not the quantity. Chain enough of those fractions together and any unit conversion becomes mechanical:

Computed in Python unit-chain script
2. A chain of conversion factors, each equal to 1
  100 km/h x (1000 m / 1 km) x (1 h / 3600 s) = 27.78 m/s

The kilometres cancel against kilometres and the hours against hours, leaving metres per second. If the units do not cancel into what you wanted, you have set up the fractions upside down, and the units have told you so before you trusted a wrong number.

Predicting a law from its units

Units can do something stranger than catch mistakes. They can tell you the shape of a law of nature you have not discovered yet.

Hang a weight on a string and let it swing. How long does one full swing, there and back, take? Before measuring anything, list what the answer could possibly depend on: the length of the string, LL, in metres; the mass of the weight, mm, in kilograms; and how strongly the Earth pulls things down. That pull shows up in every calculation about falling as a single number, g=9.81g = 9.81 metres per second per second. What the number means is the business of Describing Motion; here only its units matter: m/s2\mathrm{m/s^2}.

The swing time is a time, measured in seconds. So whatever combination of LL, mm and gg gives it must come out in seconds and nothing else. Try La mb gcL^a\, m^b\, g^c and demand that the metres, kilograms and seconds balance:

Computed in Python unit-chain script
4. Dimensional analysis: the swing time of a weight on a string
  candidates: length L [m], mass m [kg], gravity g [m/s^2]; wanted: time T [s]
  metres: a + c = 0   kilograms: b = 0   seconds: -2c = 1
  -> a = 1/2, b = 0, c = -1/2:  T is proportional to L^(1/2) g^(-1/2) = sqrt(L/g)
  the mass drops out entirely

There is exactly one way to make a time out of those ingredients. The swing time must be L/g\sqrt{L/g} times some pure number:

T∝LgT \propto \sqrt{\frac{L}{g}}

Finding the shape of a law by insisting that its dimensions balance is dimensional analysis, and it has just told us two things in advance that nobody had to measure. The mass of the weight cannot matter at all: there is no other ingredient containing kilograms to cancel it against. And the swing time grows with the square root of the length, so a string four times longer swings only twice as slowly:

Computed in Python unit-chain script
  L = 0.25 m:  sqrt(L/g) = 0.160 s
  L =  1.0 m:  sqrt(L/g) = 0.319 s
  L =  4.0 m:  sqrt(L/g) = 0.639 s
  four times the length -> twice the time; a quarter of the length -> half the time

What dimensional analysis cannot give you is the pure number in front. It cannot even promise that the number is the same for every swing: the angle the weight is released from has no units, so the number is free to depend on it, and units alone cannot say how. To find the number, you have to do the physics — or let a simulation do it. Here the book’s own small simulated universe, Tick, swings a weight on three strings and times each one:

Simulated swing-time script
  string     one full swing   sqrt(L/g)   swing / sqrt(L/g)
   0.25 m          1.004 s     0.160 s               6.286
   1.00 m          2.007 s     0.319 s               6.286
   4.00 m          4.015 s     0.639 s               6.286

Each weight was released from the same small angle. The doubling and halving are exactly as the units required, and the missing factor is the same for every length: about 6.29, a number with no units and so invisible to any argument about units. Why it is very nearly 2π≈6.2832\pi \approx 6.283 — a circle is hiding in the swing — is a story for Oscillations & Resonance.

The number we quietly trusted

Many of the laws in this book could be guessed, up to a pure number, by dimensional analysis. But a law gives numbers only when measured numbers are fed into it, and we have been treating those as exact. When we wrote g=9.81g = 9.81, that was a measurement — and no measurement is exact. How far should you trust a reading, and how do you say so honestly? The honest answer is never a single number: Every Measurement Is a Range.