Prologue · Chapter 0

What I Cannot Create

A puzzle about muons, and how this workshop works.

About 35 minutes · Needs only algebra, a square root and some curiosity · Start here

“What I cannot create, I do not understand.”

Written on Richard Feynman’s blackboard at Caltech, as it was found at his death in 1988.

What this chapter does

This course teaches special relativity, Einstein’s 1905 theory of space and time. You learn it by building it. That’s the idea in Feynman’s line above. You guess, test your guesses against real experiments, and write small programs (no coding experience needed: the course teaches the code it uses). By the last chapter you’ll have built a working simulator of space and time.

This first chapter does two jobs.

  1. A real mystery (about 15 minutes). Tiny particles called muons reach the ground when, by the rules physicists trusted in 1900, almost none should. You’ll run those rules as a simulator and hold it up against Nature: what real muons do.
  2. How the workshop works (about 20 minutes). Who you’ll meet, the loop every chapter follows, and your first function.

You won’t solve the mystery today. You’ll leave able to say what it is, why it’s a problem, and how this course will solve it.

Job 1 of 2 · A real mystery

The puzzle

About 15 kilometers above your head, cosmic rays from deep space slam into the air and make particles called muons. A muon is a heavier cousin of the electron, and it doesn’t last. On average it falls apart after about 2.2 microseconds: 2.2 millionths of a second.

Nothing outruns light, and in 2.2 μs light covers only about 660 meters. Fifteen kilometers is more than twenty times farther. Muons should fall apart high in the sky, long before they reach anyone.

They don’t. They are raining through you as you read this sentence.

Predict

Real muons are made at many heights and speeds. Let’s make it a clean experiment: one speed, and one height, a round 10 km. A batch of muons is made there, all heading straight down at 99.5% of light’s speed, and nothing slows them down. Some muons do reach the ground. But what fraction of this batch does?

  • Almost none
  • About 1 in 5
  • About half
  • Almost all

Lock in a guess, however rough: a gut feeling or the arithmetic above. Nobody grades it. You’ll see how it did in a few minutes, and again in Chapter 8.

Experiment

How would a physicist in 1900, five years before Einstein, answer that question? Take the rules everyone trusted and work out what they say. The lab below does exactly that. It’s a simulator: a small world inside the computer that follows a short list of rules and nothing else. You’ll count how many muons reach the ground, then ask Nature. If a careful simulator and Nature disagree, at least one of its rules is wrong.

The simulator’s rulebook

  1. The trip. Each batch of 36 muons is made 10 km up and falls straight down at 99.5% of light’s speed, without slowing. Where it comes from: our clean experiment.
  2. The lifetime. Each muon decays, or falls apart, at a random moment. On its own clock it lasts 2.2 μs on average. (Picture a tiny stopwatch riding along with each muon, started when the muon is made.) Where it comes from: measured, on muons sitting still in a lab.
  3. The clocks. Every clock ticks at the same rate, moving or not. So a muon’s clock always agrees with the Earth’s clocks: two clocks fixed to the ground, one at the top of the column and one at the bottom. Where it comes from: everyday experience. In 1900 nobody had checked it on anything this fast.

Rule 1 is our setup. Rules 2 and 3 are the physics. Call a world that follows rule 3 the Galileo universe.

Start here: Drop one batch sends 36 muons down in slow motion. Play rains a new batch every 1.2 s, five times faster.With reduced motion, each press shows the batch’s final picture.

How to read the lab
  1. The column is 10 km of air, seen from the side, with heights down its left edge. Batches are made at the top. The Ground detector is at the bottom.
  2. Each circle is one muon. Its lifetime is picked at random when it is made, and its ring counts that lifetime down on the muon’s own clock. When the ring runs out, the muon decays and leaves a where it happened.
  3. The zoom panel under the column blows up the shaded top 1.5 km, where about 9 in 10 of the muons decay.
  4. Still alive, the graph beside the column, uses the same heights as the column. The curve shows what fraction of a batch the rules expect to be still alive at each height, on average: all of it at the top, less and less lower down. Its dots mark where ½, ¾ and ⅞ of a batch are gone. One batch’s × marks won’t sit exactly on it.
  5. The cards hold the numbers: how long the fall takes by the Earth’s clocks and by the muon’s own clock (rule 3 makes these equal), and what fraction should reach the ground.
Muons falling through 10 km of air, Galileo universe A tall column of air with a detector on the ground. A batch of muons starts at the top. In the Galileo simulator, half the batch has decayed within about 450 m and about 4 in 5 within the first kilometer; about 1 in 4.2 million reach the detector. 10 km 5 km 0 decays: mostly in the top kilometer ground detector: about 1 in 4.2 million

In the Galileo simulator a muon at 0.995 of light’s speed takes 33.5 μs to fall 10 km, about 15 average lifetimes. Half the batch is gone in the first 450 m, about 4 in 5 in the first kilometer, and about 1 in 4.2 million reach the ground.

Simulator: the Galileo universe. The three rules above, 36 muons at a time. In Chapter 8 this simulator comes back, on a real mountain, with a switch that lets you change rule 3.
Describe this lab

A simulator of a column of air 10 km tall, with heights marked every kilometer and a ground detector at the bottom. It follows three rules. Muons fall straight down at a steady speed that you can set between 0.9 and 0.999 of light’s speed (0.995 at the start). Each lives a random time, 2.2 μs on average, on its own clock. And every clock ticks at the same rate, moving or not.

The lab starts empty. Drop one batch makes 36 muons at the top and follows them down in slow motion. Each muon is a small circle whose ring shows the life it has left. When the ring runs out, the muon decays and leaves a × at that height. A zoom panel under the column shows its top 1.5 km, where about 9 in 10 of them decay.

The Still alive graph beside the column shows, at each height, the fraction of a batch the rules expect to be still alive, on average. Dots mark where half, three quarters and seven eighths of the batch are gone.

The cards show:

  • the fall time by the Earth’s clocks and by the muon’s own clock (the same, by rule 3);
  • the fraction expected to reach the ground (about 1 in 4.2 million at 0.995);
  • how many muons have been made and how many reached the ground so far.

Play rains a new batch every 1.2 s, five times faster than a single drop; Pause stops them. With reduced motion, Drop one batch shows each batch’s final picture.

Try it 1 of 3

Press Drop one batch and watch the zoom panel under the column. Where do the × marks pile up? How many of the 36 reach the ground detector?

Compare with our reading

Most die in the top kilometer: on average about 28 of the 36. Even the luckiest muon in a batch usually decays somewhere between 8 km and 6 km. None reach the ground.

Try it 2 of 3

Now read the Still alive graph. Three dots mark where half, three quarters and seven eighths of a batch are gone. Read their heights. They sit at roughly equal steps: about how far apart?

Compare with our reading

About 9.5 km, 9.1 km and 8.6 km: about 450 m apart. So every 450 m of falling, half of the muons still alive decay. After one stretch 1 in 2 is left, after two 1 in 4, after three 1 in 8.

Try it 3 of 3

Push the speed to 0.999 of light’s speed (99.9%), the top of the slider. It stops short of light’s speed because no particle like a muon has ever been measured reaching it. Does the chance of reaching the ground improve much?

Compare with our reading

Barely: from about 1 in 4.2 million to about 1 in 4.0 million. The muons were already within half a percent of light’s speed, and nothing outruns light. Even light needs 33.4 μs to fall 10 km by the Earth’s clocks, against the muons’ 33.5 μs at 0.995. Under these rules, no speed short of light’s is fast enough.

Where does the 4.2 million come from? Every 450 m or so, half of the muons still alive decay. Ten kilometers holds about 22 of those halvings, so a muon has to survive 22 in a row. Multiply 22 twos together (2 × 2 × 2 × …, two to the power 22) and you get 4,194,304: about 1 in 4.2 million.

Free play: press Play and let the batches rainkeep pressing Drop one batch for as long as you like. The line under the big “About 1 in …” number says how many batches you’d wait through, on average, for one muon to land. At one batch every 1.2 s, that’s about 39 hours.

Simulator vs Nature

Now ask Nature. Real detectors on mountaintops and at sea level count far more muons than the 1900 rules allow. One rule fits all of those counts: call it Nature’s rule. For our tidy batch it lets about 1 in 5 through. You’ll meet that rule, and compute the 1 in 5 yourself, in Chapter 8.

The Galileo simulator’s answer and the answer from the rule real muon counts fit, for a batch made 10 km up at 99.5% of light’s speed
The simulator rules from 1900 Nature’s rule fits real muon counts
Out of one batch of 36 0 about 8
Out of 4.2 million muons about 1 about 900,000
Chance of reaching the ground about 1 in 4.2 million 0.000024% a bit more than 1 in 5 22%

Off by nearly a million times.

Same height, same speed, same lifetime. Bad luck can’t do that, and neither can rounding. The simulator is wrong about the world, so at least one of its rules must be wrong.

Real muons are messier than our batch: they are made at many heights and speeds, and the air slows them. That changes the exact number, not the verdict. In Chapter 8 you’ll see real counts from a mountain, and the 1900 rules fail there too.

What just happened?

The simulator let almost none through: about 1 in 4.2 million. Nature’s rule lets about 1 in 5 through.

If you guessed “almost none”, you reasoned exactly like the simulator, and like a careful physicist of 1900: 33.5 μs of falling by the Earth’s clocks, 2.2 μs of life. The arithmetic looks airtight. Nature disagrees anyway.

So which rule is wrong? Look back at the rulebook.

  • Rule 1, the trip, is our own clean experiment. Real air would slow the muons down. Slower muons take longer to fall, so by these rules, adding air would make the simulator’s count even lower.
  • Rule 2, the lifetime, was measured, on muons sitting still in a lab.
  • Rule 3, the clocks, was never checked on anything moving this fast.

That doesn’t prove rule 3 is the culprit. It tells a good detective where to look first. You’ll write down your suspect in the last box of this chapter.

Sagredo, who questions everything (you’ll meet him properly in a moment), has an objection.

A fair worry, and a good habit: question the setup before the physics. In Chapter 8 we’ll settle it: count muons on a mountaintop, then again at sea level, allowing for how much the air slows them.

So what do we do about it?

We do what physicists do: we put the rules on trial. That takes sharper tools for time and distance than anyone had in 1900. Here is the road.

  1. Chapters 1 to 7: build the tools. What a clock really measures, what “at the same moment” means for two clocks far apart, and how to draw it all. In Chapter 5 a clock made of light hides a right triangle. Pythagoras, your warm-up later in this chapter, solves it.
  2. Chapter 8: the trial. The muons come back, and the simulator returns on a real mountain with a switch that changes rule 3. You’ll check the rules against real counts there, and compute the 1 in 5 with functions you wrote yourself.
  3. Chapter 9: the muon’s side. The same fall, told from the muon’s point of view.
  4. Chapter 15: your own simulator. You’ll build one from the functions you collect along the way (your Toolbox), and it will agree with Nature where this one failed.

Say it back

A friend skipped this part of the page. In two sentences, tell them why we ran a simulator, and what it showed.

Model answer

We built the rules physicists trusted in 1900 into a simulator, to test them, and it let only about 1 in 4.2 million muons from 10 km up reach the ground. The rule real muon counts follow lets about 1 in 5 through, so at least one of those old rules must be wrong.

  • Says the simulator runs on the old (1900) rules, as a way to test them
  • Gives both answers: almost none (about 1 in 4.2 million) and about 1 in 5
  • Concludes that one of the rules must be wrong

Job 2 of 2 · How the workshop works

How this workshop works

You’ve already been around the loop once. You made a guess. You ran a lab. You saw some arithmetic. You checked the simulator against Nature, and Nature said no. Every chapter turns the same loop. You’ve even met two of the cast already, without their names (you’ll meet them properly in a moment). The Earth, with its clocks at the top and at the ground, was Lin’s lab. Each muon, carrying its own clock, was a tiny Rae. Here’s the rest of the tour: who you’ll meet, how a chapter flows, what you’ll build, and the one piece of math you need today.

The cast

Four characters carry the whole course. Lin works in the lab. As far as she’s concerned she stands still, beside a lattice of rods and clocks, and she speaks for the whole lab frame. Rae rides a rocket that coasts past the lab at a steady speed, and she speaks for the rocket frame. Light is the strictest character. On our spacetime drawings, where time runs up the page and distance runs across, light always climbs at exactly 45°: one square across for every square up. It never changes its speed for anyone.

The cast Four panels. Lin, a blue clockhead with a measuring rod, stands beside a corner of the lab’s lattice of rods and clocks. Rae, a vermilion clockhead drawn with dashed lines, rides an open rocket moving to the right. On square grid paper with time running up and distance across, a gold ray of light leaves a firecracker spark at exactly 45 degrees. Sagredo, in plain ink, appears as a quill beside a margin line, asking “Are you sure?”. Lin the lab frame · solid lines Rae the rocket frame · dashed lines v Light always at exactly 45° an event (a spark) distance → time → Sagredo the doubting voice in the margin “Are you sure?”
Plate 0.1 The cast. Lin and Rae are clockheads: each head is a clock showing her own wristwatch time.

Look at their heads. Lin and Rae are clockheads: each head is a clock that shows its owner’s own wristwatch time (physicists call it proper time). That’s deliberate. Much of this course is about two honest clocks that disagree, so everybody carries one. A firecracker spark marks an event: something that happens at one place, at one instant.

Both, Sagredo. The cartoons are drawn to scale. One more convention before we move on: speeds in this course are fractions of light’s speed. When Rae’s rocket moves at \(v = 0.6\), measured with Lin’s lattice, it covers 60% of the distance light would cover in the same time. So \(v = 1\) would be light itself, and anything that carries a clock has \(v\) below 1.

The loop

Every chapter turns the same loop. You predict before you see. You play with a live lab. You reason it through, first with friendly numbers, then with a picture, and only then with symbols. You ask Nature, using real experiments and real data. You practice with pencil and paper. You build a small function in JavaScript. At the end you explain it all to Sagredo, in your own words.

The workshop loop A ring drawn as a worldline, with six events around it, clockwise from the top: Predict (commit to a guess), Play (drive the lab), Reason (numbers, picture, symbols), Ask Nature (real data), Practice (pencil and paper), Build (write the function). Arrows run clockwise. In the middle, a quill: explain it to Sagredo. 1 · Predict commit to a guess 2 · Play drive the lab 3 · Reason numbers, picture, then symbols 4 · Ask Nature real experiments, real data 5 · Practice pencil and paper 6 · Build write the function Explain it to Sagredo
Plate 0.2 The workshop loop. Each chapter goes around once, starting from the gold event at the top.

Why predict first? Because a guess you committed to is a guess you can be surprised by, and surprise is what makes an idea stick. Predictions are never graded. A wrong one is the most useful kind, and you’ve already made your first. We’ll come back to it in Chapter 8.

Quick check

Why does every chapter ask you to predict before you open the lab?

  • So the course can grade you
  • So that the result can surprise you, which helps you remember it
  • Because the lab won’t run otherwise
Hint

Reread the paragraph under the loop plate.

Solution

A committed guess can surprise you, and a surprise sticks. Predictions are never graded, and the lab lock has a Skip link.

Put the steps of the workshop loop in order, starting with the first thing you do in a chapter.

  1. Predict what will happen
  2. Play with the lab
  3. Reason it through: numbers, picture, symbols
  4. Ask Nature for real data
  5. Practice with pencil and paper
  6. Build a function
Hint

A guess only counts if it comes before you see the answer.

Solution

Predict, play, reason, ask Nature, practice, build (and then explain it all to Sagredo). It’s the order of the sections in every chapter: look at the list of sections in the margin.

The Toolbox

This course takes its title line literally. If you can build it, you understand it. So in most chapters you’ll write one small function, never more than eight lines, that computes a piece of relativity. When its tests pass, it goes into your Toolbox, and from then on the labs can run on your code instead of ours. The muon simulator you ran today was built on the rules of 1900, and Nature rejected it. In the last chapter you’ll put your tools together into a spacetime simulator of your own, one that gets those muons right.

The Toolbox shelf A pegboard with seven tool outlines, each locked until earned: a set square for hypotenuse (Chapter 0), a gear for gamma (Chapter 5), a folding ruler for intervalSquared (Chapter 6), scissors for lorentz (Chapter 10), a prism for dopplerFactor (Chapter 12), a chain for addVelocities (Chapter 13) and a kettle for momenergy (Chapter 14). Earned tools are drawn solid in purple. The Toolbox earned tools are yours to keep hypotenuse earn it today gamma Chapter 5 intervalSquared Chapter 6 lorentz Chapter 10 dopplerFactor Chapter 12 addVelocities Chapter 13 momenergy Chapter 14
Plate 0.3 The Toolbox shelf: seven of the tools you’ll build, each locked until you earn it. Your first is the set square.

Your Toolbox starts empty. The first tool is waiting in the Build it section below.

Myth

“Programming is for experts.” Every function in this course fits in eight lines, and the first one fits in one. Each new piece of JavaScript is taught right before you need it, in a box called “Code you need”. When a test fails, the page tells you which one and why, in plain words. And if you’re stuck, you can borrow our version and keep going.

Which of these will you need to finish this course? Tick every one that applies.

  • Algebra
  • Pythagoras
  • Square roots
  • Calculus
  • Years of programming experience
  • A willingness to be surprised
Hint

Reread the Myth box just above, and the chapter’s promise: “Needs only algebra, a square root and some curiosity”.

Solution

Algebra, Pythagoras, square roots, and a willingness to be surprised. No calculus and no programming background: the course teaches the code it uses.

Colors that mean something

Color in this course always carries meaning, and the meaning never changes. Shapes and dash patterns carry it too, so you never need to tell colors apart.

  • Blue, solid: the lab, Lin’s frame.
  • Vermilion, dashed: the rocket, Rae’s frame.
  • Gold, with an arrow: light.
  • Teal, double line, ≡: an invariant, a number every observer agrees on.
  • Purple: your own code at work.

The rule our authors follow above all others: if a number is the same for every observer, it’s teal. Watch for the teal on the Pythagoras workbench below. It’s the most important number in this chapter.

Where your work is kept

There are no accounts. Your predictions, answers and code are saved only in this browser, on this device. Nothing is sent to us. To move to another device, download a progress file and load it there; the buttons are on the privacy page. Clearing this site’s data in your browser erases your progress, so keep a copy if it matters to you.

The only theorem you need today

Myth

“You need calculus for relativity.” You don’t. This whole course runs on algebra, square roots, Pythagoras and careful drawing. In the few places where a bigger tool would help, we build it from plain arithmetic in the Math Toolkit.

Numbers first. Take a right triangle with legs 3 and 4. Draw a square on each leg: one holds 9 unit cells, the other holds 16. Now draw a square on the long side. It holds 25, which is exactly 9 + 16. So the long side is 5, because 5 × 5 = 25. That’s the whole of Pythagoras: the squares on the two legs fill the square on the long side. Need a refresher?

A 3-4-5 triangle with a square on each side A right triangle with legs 3 and 4 on grid paper. The square on the short leg holds 9 unit cells, the square on the other leg holds 16, and the tilted square on the long side holds 25, so the long side is 5. 9 16 25 a = 3 b = 4 c = 5

Legs 3 and 4: the squares on the legs hold 9 and 16 unit cells, and the square on the long side holds 25, so the long side is 5.

Pythagoras workbench. Drag corner A or B (or use the sliders) to change the legs. Turn the triangle and watch what changes, and what doesn’t.
Describe this lab

A right triangle on grid paper with legs a and b, each a whole number from 1 to 15. A square is drawn on every side, divided into unit cells you can count: a² cells on leg a, b² cells on leg b, and the same total on the long side c. A side panel shows a² + b² and the long side c = √(a² + b²), marked as unchanged when the triangle turns. A turn slider rotates the triangle from 0° to 90° over the fixed grid; dashed lines then show how far the long side runs east–west and north–south along the grid, and a button reveals those two spans. A list collects every differently shaped triangle you find whose three sides are all whole numbers (a 6-8-10 counts as the 3-4-5 shape). Corners A and B can be dragged, or focused with Tab and moved with the arrow keys. C shows or hides the unit cells.

Try it

Find three differently shaped right triangles whose sides are all whole numbers, with legs up to 15. (A 4-3-5 is the same shape as a 3-4-5, just flipped, and a 6-8-10 is a 3-4-5 drawn twice as big: same shape again.)

Try it

Set the legs to 3 and 4, then turn the triangle by 30°. Count squares along the dashed lines: how far does the long side run east–west now, and how far north–south? Is it still 5 long?

Compare with our reading

At 30° the long side runs about 4.60 east–west and 1.96 north–south. Neither is 3 or 4 any more, yet \(4.60^2 + 1.96^2\) is still 25, and the long side is still 5. Turning the paper changes the pieces, never the length. That’s the teal thing.

Now the shorthand for what we just did. Call the legs \(a\) and \(b\) and the long side \(c\), the hypotenuse:

\[ \begin{gathered} a^2 + b^2 = \inv{c}^{\,2} \\ \text{so}\quad \inv{c} = \sqrt{a^2 + b^2}. \end{gathered} \]

Running it backward finds a missing leg: \(b = \sqrt{c^2 - a^2}\). Get comfortable with that backward version. A few chapters from now, it turns out to be how spacetime measures time.

Pitfall

The long side is not \(a + b\). Walk 3 m east, then 4 m north: you’ve walked 7 m, but the straight shortcut back is only 5 m. Pythagoras adds the squares, never the sides: \(\sqrt{3^2 + 4^2} = 5\), while \(3 + 4 = 7\). The same goes backward: \(\sqrt{13^2 - 5^2}\) is 12, not \(13 - 5 = 8\).

  1. A pulse of light climbs 2 m between two mirrors while the whole gadget slides 1.5 m sideways. How long is the light’s slanted path? Sketch it: the climb and the slide are the two legs. The climb is straight up and the slide is straight across, so they meet at a right angle.
  2. Square the legs: \(2^2 = 4\) and \(1.5^2 = 2.25\). Pythagoras talks about squares, so squares come first.
  3. Add them: \(4 + 2.25 = 6.25\). The squares on the legs fill the square on the long side, so 6.25 is \(c^2\).
  4. Take the square root: \(\sqrt{6.25} = 2.5\). The slant is 2.5 m. Check it: 2.5 × 2.5 = 6.25. Keep this little triangle in your pocket. In Chapter 5 it comes back, inside a clock made of light.

Why, really?

Why should the squares add up at all? Here’s a proof you can check by eye. Take a big square with side \(a + b\) and four copies of the triangle. Lay the copies in the corners one way, and the space left over is one tilted square: \(c^2\). Slide them into pairs, and the space left over is two squares: \(a^2\) and \(b^2\). Same big square, same four triangles, so the two leftovers must have the same area.

Pythagoras by rearrangement Two equal squares of side a plus b, each holding four copies of a right triangle with legs a and b. On the left the triangles sit in the corners and leave a tilted square c squared. On the right they are paired into two rectangles and leave a square a squared and a square b squared. c² a² b² a b a b = same big square, same four triangles
Plate 0.4 Pythagoras by rearrangement: what’s left over on the left (\(c^2\)) equals what’s left over on the right (\(a^2 + b^2\)).

That’s the whole kit for today: a loop, a toolbox, a color code and one theorem. Time to use them.

Practice

Three levels: ◇ back of the envelope, ◆ pencil and paper, ★ head-scratcher. Answers can be fractions or roots: type 5/3 or sqrt(2). A calculator is welcome.

A right triangle has legs 3 and 4. How long is its hypotenuse?

Hint

Square each leg, add, then take the square root.

Solution

\(3^2 + 4^2 = 9 + 16 = 25\), and \(\sqrt{25} = 5\).

In this course, “\(v = 0.6\)” means a speed of…

  • 0.6 meters per second
  • 60% of light’s speed
  • 0.6 kilometers per second
Hint

What would \(v = 1\) be?

Solution

60% of light’s speed. Every speed is measured as a fraction of light’s, so \(v = 1\) is light itself.

Rae’s rocket moves at \(v = 0.6\). While a flash of light travels 10 m, how far does the rocket go?

Hint

\(v = 0.6\) means 60% of the distance light covers in the same time.

Solution

\(0.6 \times 10 = 6\) m. Speeds in this course are always “this much of light’s distance, in the same time”.

Which side lengths make a right triangle? Check: does the square of the longest side equal the sum of the squares of the other two? Need a refresher?

  • 6, 8, 10
  • 2, 3, 4
  • 5, 12, 13
  • 4, 5, 6
  • 8, 15, 17
  • 1, 1, 2
Hint

For 6, 8, 10: is \(36 + 64\) equal to \(100\)?

Solution

Right: 6-8-10 (\(36 + 64 = 100\)), 5-12-13 (\(25 + 144 = 169\)), 8-15-17 (\(64 + 225 = 289\)). Not right: 2-3-4 (\(4 + 9 = 13 \ne 16\)), 4-5-6 (\(16 + 25 = 41 \ne 36\)), and 1-1-2 (\(1 + 1 = 2 \ne 4\); a right triangle with legs 1 and 1 has a long side of \(\sqrt{2} \approx 1.41\)).

A right triangle has hypotenuse 13 and one leg 5. How long is the other leg?

Hint

Run Pythagoras backward: \(b^2 = c^2 - a^2\).

Solution

\(b^2 = 13^2 - 5^2 = 169 - 25 = 144\), so \(b = 12\).

Work out \(\sqrt{5^2 - 3^2}\).

Hint

\(25 - 9 = 16\).

Solution

\(\sqrt{25 - 9} = \sqrt{16} = 4\). Notice the minus sign: this is Pythagoras run backward, and the same shape returns in Chapter 6 as the most important formula in the course.

If \(a^2 = 13^2 - 12^2\), what is \(a^2\)?

Hint

\(13^2 = 169\) and \(12^2 = 144\).

Solution

\(a^2 = 169 - 144 = 25\), so \(a = 5\): the 5-12-13 triangle.

Finish this worked example. A 2.5 m ladder leans against a wall with its foot 1.5 m from the wall. How high up the wall does it reach?

  1. The ladder is the long side: \(c = 2.5\). The ground is one leg: \(a = 1.5\). The wall is the leg \(b\) we want.
  2. Run Pythagoras backward: \(b^2 = c^2 - a^2 = 6.25 - 2.25 = \;?\)
  3. Take the square root: \(b = \;?\)

Hint

\(6.25 - 2.25\) is a whole number.

Solution

\(b^2 = 6.25 - 2.25 = 4\), so \(b = 2\) m. It’s the light-clock triangle from the worked example, with the long side known instead.

Something moves at \(3 \times 10^8\) m/s, about light’s speed. How far, \(d\), does it go in 2.2 μs? Answer in meters. (Type just the number; the unit is shown.)

Hint

Distance = speed × time, with the time in seconds: \(2.2\ \mu\text{s} = 2.2 \times 10^{-6}\ \text{s}\).

Solution

\((3 \times 10^8) \times (2.2 \times 10^{-6}) = 6.6 \times 10^2 = 660\) m. That’s a muon’s whole travel budget in an average lifetime, if nothing about its clock changes.

A muon falls 10 km at \(v = 0.995\). Taking light’s speed as \(3 \times 10^8\) m/s, how long does the fall take? Answer in microseconds. (Type just the number; the unit is shown.)

Hint

The muon’s speed is \(0.995 \times 3 \times 10^8\) m/s. Time = distance ÷ speed.

Hint

\(10\,000 \div (2.985 \times 10^8) \approx 3.35 \times 10^{-5}\) s.

Solution

\(t = 10\,000 / (0.995 \times 3 \times 10^8) = 3.35 \times 10^{-5}\) s \(= 33.5\) μs. That is about 15 average lifetimes, the number you read off the lab.

Light covers about 0.3 m every nanosecond (a billionth of a second). About how many nanoseconds does light take to cross a 3 m room? (Type just the number.)

Hint

How many 0.3 m steps fit into 3 m?

Solution

\(3 \div 0.3 = 10\) nanoseconds. Light is fast, but not instant: a nanosecond is about 30 cm of light-travel. Later you’ll measure time in meters this way.

In the Galileo universe the 10 km fall takes 33.5 μs. How many average muon lifetimes (2.2 μs each) fit into it?

Hint

Divide the fall time by one lifetime.

Solution

\(33.5 \div 2.2 \approx 15.2\) lifetimes (15.3 with the more precise lifetime, 2.197 μs, that the lab’s table uses). Surviving one lifetime is already a matter of luck; surviving fifteen in a row almost never happens. That’s the 1 in 4.2 million.

Suppose your hypotenuse passes all its tests. Which of these are then true? Tick every one.

  • Your code is saved in this browser.
  • The Pythagoras workbench can run on your code.
  • Your code is uploaded to the course’s server.
  • A new tool appears on your Toolbox shelf.
Hint

Reread “Where your work is kept” and “The Toolbox”.

Solution

All except the upload. Your code stays in this browser, powers the workbench, and joins the shelf.

A box is 3 m wide, 4 m deep and 12 m tall. How long is the longest straight stick that fits inside, from one bottom corner to the opposite top corner?

Hint

Use Pythagoras twice. First find the diagonal across the floor.

Hint

The floor diagonal is 5. The stick is the long side of a triangle with legs 5 and 12.

Solution

Floor diagonal: \(\sqrt{3^2 + 4^2} = 5\). Then \(\sqrt{5^2 + 12^2} = \sqrt{169} = 13\) m. In one go: \(\sqrt{3^2 + 4^2 + 12^2} = 13\). Pythagoras works in three dimensions too, one right angle at a time.

Want more? Every piece of math in this course has a page of short practice in the Math Toolkit.

Build it

Time to make your first tool: the set square. It’s a function that takes the two legs of a right triangle and gives back the long side. If you’ve never written code before, good. Start with the box below.

Code you need

A function is a small machine with a name. You hand it inputs, and it hands back one answer:

function double(x) {
  return 2 * x;
}

The word function starts it, and double is its name. The x in brackets is its input, called a parameter. The word return sends the answer back. So double(21) gives 42.

  • Arithmetic uses + - * /. Powers use **: 3 ** 2 is 9.
  • Square roots use Math.sqrt: Math.sqrt(49) is 7.
  • Big and small numbers: 3e8 means \(3 \times 10^8\), and 2.2e-6 means \(2.2 \times 10^{-6}\).
  • Once your own version passes, compare it with Math.hypot(3, 4), JavaScript’s built-in Pythagoras: it gives 5. (Going further explains why it exists.)

Warm-up: one line

Press Run to see what this line computes. Then change it so it computes how far light goes in 2.2 μs. Use 3e8 for light’s speed in meters per second.

60 * 60 * 24

Reading the test table

When you run a task, the page tries your function on several inputs and shows a table. Each row is one test: a sentence saying what should happen, the Input it tried, the answer it Expected, what your function actually returned (Got), and a Result, pass or fail. Read the first failing row first: its sentence usually tells you what to fix. Need a refresher?

Build it: hypotenuse(a, b)

Return the long side of a right triangle with legs a and b. The tests try six triangles, including the friendly 3-4-5, 5-12-13 and 8-15-17, a triangle with no legs at all, and one with a leg of −3. Lengths are never negative, so that one should still give 5.

When every test passes, scroll back up: the Pythagoras workbench now computes its long side with your function, and the set square lights up on your shelf.

Your Toolbox starts empty. Pass the tests above to earn the set square.

Checkpoint

Five quick items. Feedback waits until you submit. If you miss one, the page points you back to the right section.

A right triangle has legs 8 and 15. How long is its hypotenuse?

Solution

\(\sqrt{64 + 225} = \sqrt{289} = 17\).

Put these numbers in order, from smallest to largest.

  1. \(\sqrt{10}\)
  2. \(3.5\)
  3. \(\sqrt{16}\)
  4. \(4.2\)
  5. \(\sqrt{20}\)
Solution

\(\sqrt{10} \approx 3.16\), then \(3.5\), then \(\sqrt{16} = 4\), then \(4.2\), then \(\sqrt{20} \approx 4.47\). A quick test without a calculator: square everything. \(3.5^2 = 12.25\) and \(4.2^2 = 17.64\), so the order of the squares is 10, 12.25, 16, 17.64, 20.

A muon’s average lifetime is 2.2 μs. In seconds, that’s…

  • \(2.2 \times 10^{-3}\) s
  • \(2.2 \times 10^{-6}\) s
  • \(2.2 \times 10^{-9}\) s
  • \(2.2 \times 10^{6}\) s
Solution

Micro means a millionth, \(10^{-6}\). (Milli is \(10^{-3}\) and nano is \(10^{-9}\).)

Rae’s rocket moves at \(v = 0.6\). Which statement is right?

  • It moves 0.6 meters every second.
  • In any stretch of time, it covers 60% of the distance light covers.
  • It moves at 0.6 times the speed of sound.
  • It covers 0.6 km every second.
Solution

Speeds are fractions of light’s speed: \(v = 0.6\) means 60% of light’s speed, so in any time it covers 60% of the distance light would.

In one or two sentences, state the muon puzzle in your own words. (Not the answer: the puzzle.)

Model answer

Muons are made about 15 km up. Measured sitting still, they live only about 2.2 μs on average. By the rules everyone trusted in 1900, that allows about 660 m of travel even at light’s speed, so almost none should reach the ground. Yet lots of them do.

  • Mentions how high up the muons are made
  • Mentions their short lifetime, or that light covers only about 660 m in that time
  • Says that many reach the ground although the old rules say almost none should

Explain it to Sagredo

Sagredo has watched the whole chapter from the margin, and he isn’t letting the muons go.

“Muons live 2.2 μs,” says Sagredo, “and nothing beats light. So how can so many reach the ground?” In one sentence, give him your best guess. Any testable guess counts. Start from the simulator’s rulebook.

Model answer

Maybe rule 3 is wrong: between its birth and its arrival, a fast muon’s own clock runs off much less time than the 33.5 μs that the Earth’s clocks record.

  • Compares the muon’s own clock with the Earth’s clocks
  • Connects it to the muon’s speed
  • Makes a guess that an experiment could test

What’s invariant here?

  • The length of a right triangle’s long side. Turn the triangle on the grid and the east–west and north–south pieces change, but \(\inv{c} = \sqrt{a^2 + b^2}\) stays put. That teal number is the seed of the whole course: Chapter 1 grows it into the surveyors’ invariant, distance, and Chapter 6 into spacetime’s own, the interval, with a minus sign where Pythagoras has a plus.

Also in your field notes

  • The loop: predict, play, reason, ask Nature, practice, build, and explain it to Sagredo.
  • Speeds are fractions of light’s speed: \(v = 0.6\) means 60% of it.
  • The muon puzzle: a simulator built on the rules of 1900 lets about 1 in 4.2 million of our 10 km batch reach the ground. The rule real muon counts follow lets about 1 in 5 through. One of the 1900 rules is wrong; Chapter 8 finds out which, and by how much.

Still strange?

It should be. The muons have no business reaching the ground, and they do; hold on to that discomfort, because by Chapter 8 it turns into one of the best-tested facts in physics.

Going further

Optional extras, for when you’re curious.

Deep dive: why does Math.hypot exist?

If Math.sqrt(a*a + b*b) works, why did the people who designed JavaScript bother with Math.hypot? Because computers store numbers with a size limit, about \(1.8 \times 10^{308}\). Try legs of \(3 \times 10^{200}\) and \(4 \times 10^{200}\). The answer, \(5 \times 10^{200}\), fits easily. But on the way there, a*a is \(9 \times 10^{400}\), which doesn’t fit, so the computer gives up and writes Infinity. Math.hypot is written more carefully: it shrinks the legs first, does the arithmetic, then scales back up. It returns 4.9999999999999995e+200: that’s \(5 \times 10^{200}\), up to rounding in the very last digit.

Our numbers never get that big, so either version earns the set square. But it’s a nice lesson: a formula that’s right on paper can still fail inside a machine, and the fix is often to rearrange it.

Deep dive: every friendly speed hides a right triangle

Later chapters keep using a short list of “friendly” speeds: 3/5, 4/5, 5/13, 12/13, 15/17. Look at them again. Each one is a leg divided by the long side of a whole-number right triangle: 3-4-5, 5-12-13, 8-15-17. That is no accident, and in Chapter 5 you’ll see why: a moving clock hides a right triangle, and whole-number triangles give tidy fractions instead of endless decimals.

A recipe for whole-number right triangles: pick two whole numbers \(m > n\). The sides \(m^2 - n^2\), \(2mn\) and \(m^2 + n^2\) always make a right triangle. With \(m = 2, n = 1\) you get 3, 4, 5. With \(m = 5, n = 2\), how long is the long side? (Then check that it really is a right triangle.)

Hint

The long side is \(m^2 + n^2\).

Solution

Sides \(25 - 4 = 21\), \(2 \cdot 5 \cdot 2 = 20\) and \(25 + 4 = 29\). Check: \(21^2 + 20^2 = 441 + 400 = 841 = 29^2\). The long side is 29.

Reading, if you’d like to go deeper: the course leans on Taylor and Wheeler’s Spacetime Physics, free from eftaylor.com, and on The Feynman Lectures on Physics, Volume I, chapters 15 to 17, free at feynmanlectures.caltech.edu. For algebra and roots, the Math Toolkit is always one click away.