---
video: measurement-dimensions-short
---

# 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?

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:

```text verify=unit-chain
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
```

```text figure=orbiter-altitudes
A strip of the Martian surface seen edge-on, with altitude drawn to scale from 0 to 250 km.
A white baseline marks the surface.
A teal dashed curve dips to its lowest point at 226 km: the planned path.
A coral dashed horizontal line at 80 km: the lowest altitude the orbiter could survive.
A coral solid curve dips to 57 km, below the line: the path it actually flew.
Labels give each altitude in kilometres.
```

*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\,\mathrm{m}$ means $3 \times (1\,\mathrm{m})$, and the $1\,\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:

```text verify=unit-chain
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 $\mathrm{m}^2$; a speed is $\mathrm{m/s}$; a density, when we need one, will be $\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 $\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:

```text verify=unit-chain
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.

> **Trap.** The Orbiter's two units were *both* units of the same dimension. A check that only asks "is this the right kind of quantity?" would have passed them. What failed was that a number crossed from one program to another stripped of its unit, so nothing remained to convert. The lesson the investigators drew was about the interface, not the arithmetic: a bare number travelling between people or programs is an accident waiting to happen.

## 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, $L$, in metres; the mass of the weight, $m$, 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.81$ metres per second per second. What the number means is the business of [Describing Motion](../motion.md); here only its units matter: $\mathrm{m/s^2}$.

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

```text verify=unit-chain
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 $\sqrt{L/g}$ times some pure number:

$$
T \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:

```text verify=unit-chain
  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:

```text sim=swing-time
  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\pi \approx 6.283$ — a circle is hiding in the swing — is a story for [Oscillations & Resonance](../oscillations.md).

> **Try it.** Tie a key to a piece of string about a metre long and time ten full swings with your phone; then shorten the string to a quarter of a metre. Ten swings should take about half as long — and swapping the key for a heavier bunch should change nothing.

> **History.** When the French Academy chose the metre in the 1790s, a strong rival proposal was to define the unit of length as the length of a weight on a string whose swing takes exactly one second each way. The commission chose a fraction of the Earth's meridian instead, partly because a swing's timing depends on where on Earth it hangs: gravity is slightly weaker at the equator than at the poles. Two centuries later, units were tied at last to constants that do not vary anywhere.

## 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.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](uncertainty.md).
