Physics A path through The Default Library ======================================== What the universe is made of, how it moves, and how we know: from the pendulum to the Big Bang. Step 1. Calculus I: Slopes, Totals and the Bridge Between Them -------------------------------------------------------------- Why: Physics is written in calculus. Your car's speedometer is a derivative. Its odometer is an integral. Everything a first calculus course teaches is a way of moving between the two. Look at a dashboard. The odometer says how far you have gone in total. The speedometer says how fast the total is changing right now. Press the accelerator and the speedometer moves first; the odometer follows, a little behind, like a patient accountant adding up what the speedometer reported. Nobody gave the speedometer a ruler or a clock to look at the whole trip. It reads one instant. Yet it reports a rate, which is a statement about change, from a single moment. How can a single moment say anything about change? That puzzle is what the course exists to answer, and the answer turned out to run most of modern engineering and computing. This is the second time the library has met calculus. Calculus: Derivatives, Integrals, and the Language of Motion (12/11) is the easier first read, with the tangent line and the rectangle sum. Here we go a step further: what the course trains you to see, how a computer gets it wrong, and where the idea is used afterwards. The course in one box Who takes it: first-year students in Mechanical & Aerospace Engineering and in Computer Science, and almost every other science or engineering degree. What it is for: turning "how much?" into "how fast?" and back, so that change can be calculated instead of guessed. Comes after: nothing in this series. Algebra and a little trigonometry are all it assumes. Leads to: Multivariable Calculus (34/02), Differential Equations (34/03), Probability & Statistics (34/05), Physics I: Mechanics (34/06), Thermodynamics (34/14), and from them nearly everything else on both majors. Honest line: you will not be able to differentiate a hard formula by hand after this. You will see why a flat spot on a curve is where the best answer hides, and why the area under a rate is a total. A limit is where a calculation settles The speedometer puzzle is this. Speed is distance divided by time, but in an instant no time passes and no distance is covered, so you seem to be dividing zero by zero. The way out is to stop asking what happens at zero and ask what a sequence of better and better answers is settling towards. Measure over one second, then a tenth, then a hundredth, and watch the average speed home in on a number. That number is the limit. speed now = limit of (distance change ÷ time change) as the time change shrinks to 0 A graduate does not carry the formal definition around, but carries the habit: if a quantity looks like 0 ÷ 0, ask what it is approaching. Take sin(x) ÷ x as x goes to zero, with x in radians. At x = 0.1 it is 0.99833; at 0.01, 0.99998; at 0.001, 0.9999998. It never "is" 1 at zero, since it is undefined there, but it settles on 1. That one limit is why the derivative of sine turns out to be cosine. Interactive · Shrink the gap until the computer gives up We estimate the slope of ex at x = 1 by (e1+h − e) ÷ h. The true slope is e = 2.718281828459045. Make the gap h smaller. Gap h = 10−k The error falls as the gap shrinks, as the limit promises, until about h = 10−8, where it bottoms out near 7 × 10−9. Shrink further and it gets worse: the two values being subtracted agree in almost all of their roughly 16 stored digits, so the subtraction wipes out the information. At 10−16 the answer is exactly 0. This is a computer-science lesson hiding in a calculus course: the limit is a mathematical idea, and a machine can only approach it so far. The derivative is a slope, and a slope is a rate Zoom in on any smooth curve and it straightens out. The steepness of that straight piece is the derivative. In plain words: how much the output moves per unit nudge of the input. If the curve is distance against time, the derivative is speed. If it is temperature against position, it is how sharply it warms as you walk. Rate and slope are one thing seen two ways. f′(x) = limit of [f(x+h) − f(x)] ÷ h as h → 0 The graduate's real asset is not computing derivatives but reading them. Where the curve is rising, the derivative is positive. Where it is flat, the derivative is zero. Where the curve is steepest, the derivative is at its peak. Try it: the lower graph is the derivative of the upper one, drawn point by point. Interactive · A curve and its slope, side by side x³ − 3x sin x bell: e^(−x²) Position x Check the three curves. Every time the top curve peaks or dips, the bottom one crosses zero. Every time the top is climbing, the bottom is above the axis. For x³ − 3x the slope is 3x² − 3, which is zero at x = −1 and x = 1: the hill top and the valley floor. The chain rule: rates multiply down a chain Rates often come in chains. A bicycle's pedals turn the chainring, the chain turns the rear wheel, the wheel moves the bike. If the wheel turns 3 times per pedal turn, and the bike moves 2 metres per wheel turn, the bike moves 6 metres per pedal turn. You multiply the ratios. That is the chain rule, and it is the most used rule in the course. d(outer)/d(input) = d(outer)/d(middle) × d(middle)/d(input) The classic worked case is a balloon. Its volume depends on its radius, and the radius depends on time. At radius r the surface has area 4πr², so one extra centimetre of radius adds a shell of volume about 4πr² cm³: that is dV/dr. Multiply by how fast the radius is growing and you have how fast the volume is growing. At r = 10 cm, growing 2 cm each second, volume grows at 4π × 100 × 2 ≈ 2,513 cm³ per second. Pull the sliders and confirm it. Interactive · Inflate a balloon Radius now Radius is growing at The picture shows why it works: the shaded shell is what one second adds, a skin of area 4πr² and thickness equal to the radius growth. The same rule runs inside every neural network, where the "chain" is dozens of layers long and the multiplication is called backpropagation (Machine Learning, 34/32; Multivariable Calculus, 34/02). Where the slope is zero, something is best At the top of a hill you stop going up and have not yet started going down. The slope is zero. So to find the biggest or smallest value of anything smooth (strongest, cheapest, lightest, fastest) look for where its derivative is zero. That is optimisation, and it is why engineers love the derivative. Take a 30 cm by 20 cm sheet of card. Cut a square of side x from each corner and fold up the sides to make an open box. Its volume is V = x(30 − 2x)(20 − 2x). Cut too little and the box is shallow. Cut too much and it is narrow. In between there is a best x, and the slope tells you where: at x ≈ 3.92 cm the volume peaks at about 1,056 cm³. Interactive · The best box Corner cut x Jump to the flat spot Notice what the slope does as you drag. To the left of the peak the slope is positive, so a bigger cut helps. To the right it is negative, so a smaller cut helps. At the peak it is zero and nothing nearby is better. Gradient descent, the algorithm that trains machine-learning models, is exactly this reasoning repeated: look at the slope, step downhill, repeat. The integral adds up a rate into a total The odometer is the speedometer added up over time. Draw speed against time; the area between the curve and the time axis is distance. That is the integral. Anywhere a rate is known and a total is wanted (litres per minute into a tank, watts into a battery, newtons over a distance) the answer is an area. Try it before you read on. A car accelerates steadily from 0 to 20 m/s in 10 seconds, cruises at 20 m/s for 30 seconds, then brakes steadily to a stop in 10 seconds. How far has it gone? Interactive · Predict, then reveal 600 m 800 m 1,000 m 1,200 m Choose an answer. The shape is two triangles and a rectangle: ½ × 10 × 20 + 30 × 20 + ½ × 10 × 20 = 100 + 600 + 100 = 800 m. The common wrong guess, 1,000 m, uses the top speed for all 50 seconds and forgets that the car spends time slower than that. The Fundamental Theorem: two jobs, one idea Here is the surprise that makes the course a single subject. Build a running total from a rate: the amount in the tank after time T. Then ask how fast that total is growing at T. The answer is just the rate at T. Accumulating and differentiating undo each other, the way the odometer and speedometer do. Newton and Leibniz, working separately in the late 1600s, each saw this. if A(T) = area under the rate up to T, then A′(T) = the rate at T Its practical power is that you can find a total without adding anything: find a function whose slope is your rate and subtract its values at the two ends. Below, water flows into a tank at a rate that wobbles: 4 + 3 sin(t/2) litres per minute. Drag the time and watch the right-hand graph, the tank's total, steepen exactly when the rate on the left is high. Interactive · The tank and its rate Time T The readout checks the theorem two ways: area by adding 600 thin slices, and the exact formula 4T + 6(1 − cos(T/2)). At T = 12 minutes both give 48.24 litres. The slope of the total at that moment is 4 + 3 sin 6 ≈ 3.16 litres per minute, the rate at that moment. Every smooth thing is nearly a straight line The last habit is the most useful in daily engineering. Close to any point, a smooth curve is almost its tangent line, so you can replace it with a straight line and be nearly right. The small-angle rule sin x ≈ x is why a pendulum swings at a steady rhythm. The rule √(1 + x) ≈ 1 + x/2 gives mental square roots: √1.1 ≈ 1.05, true value 1.0488. f(a + x) ≈ f(a) + f′(a) · x   (good when x is small) How small is small? The error shrinks faster than the step. Halve the step and the error falls about four times for √(1 + x) and ex, and about eight times for sine. Interactive · How good is the straight line? sin x ≈ x √(1+x) ≈ 1 + x/2 eˣ ≈ 1 + x Step x from the point What a graduate just sees A rate and a slope are the same thing, and "how fast?" always means a derivative. A total is an area under a rate, and adding up thin slices is a calculation, not a mystery. Rates multiply along a chain: gear ratios, units, layers of a network. The best value of a smooth quantity sits where its slope is zero. Differentiating and accumulating are inverse jobs, so a total can often be found without adding. Up close, everything smooth is a straight line, and engineers exploit that constantly. Subtracting two nearly equal numbers on a computer destroys precision, so a naive slope estimate gets worse when the gap gets too small. Where it shows up next Physics I (34/06) and Dynamics (34/12): velocity is the derivative of position, acceleration of velocity, and Newton's law ties force to the second one. Differential Equations (34/03): when a law is written as a rate, solving it means integrating, which is the whole next course. Thermodynamics (34/14) and Heat Transfer (34/16): heat added is an integral of power; temperature profiles are read from slopes. Probability & Statistics (34/05): the chance of a range of outcomes is the area under a density curve. Algorithms (34/24) and Machine Learning (34/32): growth rates of running time are compared with limits, and models are trained by following slopes downhill. If you want to go deeper 📘 Textbook: James Stewart, Daniel Clegg and Saleem Watson, Calculus: Early Transcendentals (9th ed., Cengage). The most-assigned text; best for worked examples and a huge problem bank. 📘 Textbook: Hass, Heil, Bogacki and Weir, Thomas' Calculus (15th ed., Pearson). Strong on applications, popular in engineering departments. ▶️ Gentler: Grant Sanderson's Essence of Calculus series on 3Blue1Brown, a visual tour of the same ideas. Also Steven Strogatz, Infinite Powers, for the story. 🌐 Free course: MIT OpenCourseWare 18.01SC Single Variable Calculus, with video lectures, notes and problems. Khan Academy also covers it. The takeaway Calculus I teaches two moves and one bridge. The derivative turns a total into a rate (a slope); the integral turns a rate into a total (an area); and the Fundamental Theorem says they undo each other. From that come the habits of mind: chain rates together, look for zero slope to find the best, and treat smooth things as lines up close. Our slope estimate for ex was best near a gap of 10−8 and useless at 10−16, a reminder that the ideas are exact and the machines are not. Try this: next time you are in a car or on a bike, watch the speedometer and ask what the area under its history means. Then on a hill, find the spot where the road is flat. That is a derivative equal to zero. Sources & Further Reading Sources. Every number in the interactives was computed in node: the forward-difference error of ex at x = 1 for h = 10−1 to 10−16 (best 6.6 × 10−9 at 10−8, exactly 0 at 10−16, in IEEE double precision); sin(x)/x at 0.1, 0.01, 0.001; the box V(x) = 4x³ − 100x² + 600x, zero slope at x = (50 − √700)/6 = 3.9237, V = 1,056.3 cm³; the balloon 4π × 10² × 2 = 2,513.27 cm³/s; the car, 800 m; the tank, A(12) = 48.239 L; small-step errors of the three approximations. Book editions checked against the publishers' pages (Cengage, Pearson) and the course numbers against MIT OpenCourseWare. 🌐 MIT OpenCourseWare 18.01SC Single Variable Calculus ▶️ 3Blue1Brown: Essence of Calculus 🌐 Khan Academy: Calculus 1 📘 Stewart, Clegg and Watson, Calculus: Early Transcendentals, 9th ed. (Cengage) 📘 Hass, Heil, Bogacki and Weir, Thomas' Calculus, 15th ed. (Pearson) 📘 Steven Strogatz, Infinite Powers, a popular history of calculus Step 2. Physics I: Mechanics — Three Ways to Keep the Books ----------------------------------------------------------- Why: Newton's mechanics: forces, energy and momentum. Why doubling your speed quadruples your stopping distance, why a skater spins up when she pulls her arms in, and the three questions an engineer asks before touching a calculator. A car doing 50 km/h stops in about 14 metres on a dry road. Most people guess that at 100 km/h it takes about 28. It takes about 56. The extra speed doesn't just cost twice the distance, it costs four times, and the same fact is why a crash at 100 km/h is not "twice as bad" as one at 50. Nobody needs a formula to be afraid of that, but a person who has done a first mechanics course sees it: the brakes have to get rid of the car's energy, energy grows with the square of speed, and the road can only take it away at a steady rate per metre. That one chain of thought is most of the course. Physics I is less a list of topics than a way of keeping accounts. There are three ledgers, force, energy and momentum, and a good physicist picks the one in which the problem is easiest. If you want an easier first read, the library has The Four Forces (13/01), Energy: The One Currency (13/02) and Orbits (13/11). This piece goes further: it makes you use the ledgers. The course in one box Who takes it: first-year students of Mechanical & Aerospace Engineering, and in many programmes Computer Science too, as the science requirement. What it's for: turning "what will this object do?" into something you can calculate. Comes after: Calculus I (34/01). Leads to: Physics II: Electricity & Magnetism (34/07), Statics (34/10), Dynamics (34/12), Materials Science & Manufacturing (34/13), Thermodynamics (34/14). Honest line: you won't be able to design a suspension after this. You will see why a car's tyres, not its engine, decide how fast it can take a corner. Newton's laws are one accounting system Isaac Newton set out his three laws in the Principia in 1687. Read as a bookkeeper would, they say: momentum (mass times velocity) is the thing being tracked; a force is a deposit or withdrawal; and every deposit has a matching withdrawal somewhere else. The first law says that with no net force the account doesn't change: things keep their velocity. The second says that a net force changes momentum at a steady rate, which for a fixed mass is the famous rule below. The third says forces come in pairs between two bodies: if you push a wall, the wall pushes you, and the pair never acts on the same body, which is why they don't cancel. Fnet = m · athe net force on a body is its mass times its acceleration Worked number: a 1,500 kg car getting from 0 to 100 km/h (27.8 m/s) in 8 seconds accelerates at 3.47 m/s², so the road must push it forward with about 5.2 kN. Two ice skaters of 50 kg and 70 kg who push apart from rest leave with equal and opposite momentum: if the heavier moves at 1.0 m/s the lighter goes at 1.4 m/s the other way. Total momentum stays at zero. Try the classic: you on a scale in an elevator. The scale doesn't read your weight, it reads the force pushing up on you. Interactive · The elevator scale (a 70 kg rider) Speeding up, going up Cruising Speeding up, going down Cable cut Elevator acceleration (up is positive) Accelerating upward at 2 m/s² the scale reads about 827 N, like 84 kg. At constant speed it reads your true weight, whether the elevator is moving or still. In free fall it reads zero. That is exactly the "weightless" astronaut of Orbits. Free-body diagrams, and friction as a force that only pushes as hard as it must The graduate's first reflex on any problem is to draw one object, alone, and every push on it: weight, the surface pushing back, friction, tension. Nothing else. That is a free-body diagram. Add the forces as vectors, split them along the directions that matter, and F = ma does the rest. Friction is the force beginners get wrong. Static friction is not a fixed number: it pushes exactly as hard as needed to stop sliding, up to a ceiling of μs times the normal force (how hard the surface pushes back). Only once the ceiling is passed does the block slide, and then friction drops to μk × normal force. f ≤ μs · Nfriction is at most a coefficient times how hard the surfaces press together On a ramp the weight splits into a part along the slope, mg sin θ, and a part pressing into it, mg cos θ. Sliding begins when the first beats μs times the second, which gives tan θ = μs. The mass cancels. Check that in the tool: change the mass and nothing about when it slips changes. (The coefficients are round textbook values; real surfaces vary a lot.) Interactive · A block on a ramp Wood on wood Rubber on concrete Steel on ice Ramp angle Mass Arrows are drawn as fractions of the weight. With μs = 0.5 the block holds until 26.6° and then slides. At 40° it accelerates down at about 4.05 m/s² (with μk = 0.3). This is why a pile of sand has a steepest slope, and why designers of ramps, screws and wedges care so much about one number. Energy: the balance that doesn't care about the path Force problems get painful when the path is complicated. Energy is the escape. The work a force does is force times distance moved along it, and the work–energy theorem says the net work on a body equals its change in kinetic energy. When only gravity or springs are involved, the total of kinetic plus potential energy is simply conserved, whatever the route. KE = ½ · m · v²speed counts squared; this is why speed is so costly A bobsled dropping 30 m ends at √(2 × 9.81 × 30) = 24.3 m/s (87 km/h) with no friction, however many bends the track has. Now back to the opening: the brakes do work μ × m × g × d against the car's ½mv², so the stopping distance is v² ÷ (2μg). Double v, quadruple d. Interactive · Brake, or hit Dry (μ 0.7) Wet (0.5) Snow (0.2) Ice (0.1) Speed when you brake Obstacle ahead Braking only, no reaction time. μ values are round, typical figures for tyres. The sharpest result: brake from 100 km/h with an obstacle 14 m away, the distance that stops a 50 km/h car on a dry road. You still hit it at about 87 km/h, with 75% of the energy you started with: 14 metres of hard braking has removed only a quarter of it. Momentum: what survives every crash Energy has a weakness: in a collision much of it turns to heat, sound and bent metal, so the energy ledger is no use. Momentum, though, is conserved in any collision, because the two forces are equal and opposite for the same short time (the third law again). The total before equals the total after, with direction as a sign. How bouncy the collision is gets one number, the restitution e: 1 for perfectly bouncy, 0 for stuck together. Momentum doesn't care about e. Kinetic energy does. Interactive · Two carts collide Equal masses, bouncy Stick together Light hits heavy Blue mass Blue velocity Gold mass Gold velocity Bounciness e Velocity to the right is positive; arrows show velocity. With equal masses and e = 1, the moving cart stops dead and the other leaves with its speed: the toy known as Newton's cradle. Stuck together, two 1,000 kg cars (one at 10 m/s, one parked) leave at 5 m/s and half the kinetic energy, 25 kJ, becomes damage. That lost half is the reason cars have crumple zones: they spend the energy deforming metal instead of people. Rotation: the same laws with new names Everything above has a spinning twin. Force becomes torque, force times the perpendicular distance from the pivot: 80 N on a 0.25 m wrench is 20 N·m, and a longer wrench gives more for the same push. Mass becomes moment of inertia I, which counts not just how much mass there is but how far from the axis it sits. Momentum becomes angular momentum L = I × ω. τ = I · α   ·   L = I · ωwith no outside torque, L is conserved Mass far from the axis counts for much more, because I grows with the square of distance. That's why a solid disc beats a hoop of the same mass and radius down a ramp: the hoop keeps all its mass at the rim, so it spends more of its energy on spinning (the disc's acceleration is two thirds of g sin θ, the hoop's one half, whatever the size or mass). And it's why a skater spins faster when she pulls her arms in. Interactive · The skater's weights Arms out Halfway Tucked in Weights' distance from the axis A model: body I = 0.9 kg·m², plus two 2 kg weights; start at one turn per second with arms out. From arms out to tucked in, I falls from 3.15 to 0.99 kg·m², so the spin rises from 1 to about 3.2 turns per second. The energy also rises, from 62 J to 198 J, and the difference is the work her muscles do pulling the weights inward. Circular motion and gravity: a force that points at the middle Going round a bend at constant speed is still accelerating, because the velocity keeps changing direction. The acceleration points to the centre and equals v²/r, so something must push sideways with force mv²/r. On a flat road that something is friction. No more friction, no more turn: the car continues in a straight line, which feels, from inside, like being thrown outward. vmax = √(μ · g · r)fastest speed a flat bend of radius r allows Notice the engine's power isn't in the formula. On a 50 m bend with μ = 0.5 (wet) the limit is 56 km/h; dry (0.7), 67 km/h; ice (0.1), 25 km/h. Interactive · Take the bend Dry (0.7) Wet (0.5) Ice (0.1) Speed Radius of the bend Replace friction with gravity and you get orbits. Set v²/r equal to GM/r² and the period T satisfies T² ∝ r³, Kepler's third law. Check it: the Space Station's lap of 92.6 minutes at 6,779 km from Earth's centre predicts, for the Moon at 384,400 km, a period of 27.5 days. The real month is 27.3. One law, from a bend in a road to the Moon. Which ledger? Choosing force, energy or momentum This is the real skill. A hard problem in one ledger is a one-liner in another. Three rough rules: if the question asks for a force or a time, use F = ma; if it asks for a speed between two positions, and the path is messy, use energy; if there's a collision or explosion, use momentum. If something spins, use angular momentum. Try five. Interactive · Pick the first tool Force Energy Momentum Angular momentum Next question What a graduate just sees Stopping distance goes with speed squared: double the speed, four times the distance. A scale reads the push on you, not your mass: it changes in an accelerating elevator. Static friction is only as large as it has to be, up to a limit that depends on μ and the pressing force. Energy ignores the path; use it when the route is complicated. Momentum survives every collision; kinetic energy rarely does. Mass far from the axis counts for much more in rotation, because distance is squared. A turn needs a sideways force; remove the grip and you go straight. Weightless means falling together, not "no gravity". Where it shows up next Statics (34/10) is F = ma with a = 0: the free-body diagram becomes the bridge or crane that stays put. Dynamics (34/12) and Vibrations (34/17) take rotation and the second law into machines and springs, usually as differential equations (Differential Equations, 34/03). Thermodynamics (34/14) is the energy ledger with heat added: the lost half of that crash is where it starts. Physics II (34/07) redoes the same accounting for charges, with Coulomb's force and voltage as energy per charge. In Programming Fundamentals (34/09), you'll turn F = ma into a simulation loop; in Computer Science game engines and robotics code, it's the physics step. If you want to go deeper 📘 Standard textbooks. Halliday, Resnick & Walker, Fundamentals of Physics (12th ed., Wiley, 2021), or Young & Freedman, University Physics (16th ed., Pearson); the usual first-year choices, with worked examples and thousands of problems. For a sharper, more mathematical route, Kleppner & Kolenkow, An Introduction to Mechanics (2nd ed., Cambridge). 📘 Gentler, free. The Feynman Lectures on Physics, Volume I, free online at feynmanlectures.caltech.edu; chapters 4 (energy) and 10 (momentum) are a good start. 🌐 Free course. MIT OpenCourseWare 8.01SC Classical Mechanics (Fall 2016): lectures, problem sets and solutions. The takeaway Mechanics is three ledgers kept over the same world. Force tells you what changes motion and when; energy lets you skip the path; momentum survives collisions; and each has a spinning twin. Doubling speed quadruples stopping distance because energy goes with v². The graduate's skill is choosing which ledger makes this problem easy. Try this: next time you're a passenger, estimate how far the car needs to stop at the speed you're doing, using "14 m at 50 km/h, four times that at 100". Then notice how far ahead the next car really is. Sources & Further Reading Sources. Newton's laws first published in Philosophiae Naturalis Principia Mathematica (1687). Textbook physics throughout. Friction coefficients are rounded from published tables, which vary widely between sources (for example Engineering Toolbox's "Friction coefficients for common materials", which gives rubber on dry concrete 0.6–0.85, on wet concrete 0.45–0.75). Every number in the interactives was computed in node and checked by hand: 14.05 m and 56.2 m braking distances at 50 and 100 km/h (μ = 0.7); 86.6 km/h residual speed; 5.21 kN; 24.3 m/s; skater I = 3.15 and 0.99 kg·m², 3.18 turns per second, 62 J and 198 J; 56.4, 66.7 and 25.2 km/h bend limits; Kepler scaling from the Space Station (92.6 min at 6,779 km) to the Moon (27.46 days from 384,400 km). 🌐 MIT OpenCourseWare: 8.01SC Classical Mechanics 📘 The Feynman Lectures on Physics, Vol. I (free online, feynmanlectures.caltech.edu) 📘 Kleppner & Kolenkow, An Introduction to Mechanics, 2nd ed. (Cambridge University Press) 🌐 Engineering Toolbox: friction coefficients Step 3. Physics II: Electricity & Magnetism — Charge, Fields and Light ---------------------------------------------------------------------- Why: Charge, fields and light: the second great theory. A rubbed balloon beats the whole Earth's gravity, electrons crawl through your wiring slower than a snail, and light turns out to be a field vibrating. The one course that explains your phone, your motor and your Wi-Fi. Rub a balloon on your hair and stick it to the wall. It hangs there. Gravity, the pull of an entire planet, is trying to drop it, and a few billion stray electrons on its surface are winning. Between a proton and an electron the electric attraction is about 2.3 × 10³⁹ times stronger than their gravitational attraction. Gravity only seems strong because the Earth is enormous and its charge is balanced out. The second surprise is quieter. When you flip a switch, the light comes on at once, yet the electrons in the copper behind the wall drift at a fraction of a millimetre per second. What travels at nearly light speed is not the electrons. It is a field. Physics II is the course where those two sentences stop being puzzling. The library has an easier first read, How Electricity Reaches Your Wall (13/04), about the grid and Ohm's law. This piece goes further: into fields, capacitors, induction, and Maxwell's discovery that light is made of the same stuff. The course in one box Who takes it: second-term first-year or second-year students of Mechanical & Aerospace Engineering and, in many programmes, Computer Science. What it's for: predicting what charges and currents do, from a battery to a radio wave. Comes after: Physics I: Mechanics (34/06) and Multivariable Calculus (34/02). Leads to: the motors, sensors and actuators of Mechanical & Aerospace Engineering, then Control Systems (34/20); for Computer Science, Computer Architecture (34/25) and Computer Networks (34/27), which are electricity at tiny and large scales. Honest line: you won't design a power supply after this. You will know why a thin wire gets hot and a thick one doesn't, and why a transformer hums. Charge and the electric field Matter carries electric charge, positive or negative. Like charges push apart and opposite charges pull together, with a force that falls with the square of the distance, the same shape as gravity. A charge doesn't need to "reach" another: it fills the space around it with a field, and any other charge placed there feels it. E = F / q = k · Q / r²the field is the force a small test charge would feel, per unit of its charge (k ≈ 8.99 × 10⁹ N·m²/C²) Worked number: 1 nC (a billionth of a coulomb) makes a field of 900 V/m at 10 cm. Drag the gold probe below. Put a positive and a negative charge side by side and the field curves from one to the other. Interactive · Drag the probe through the field A positive and a negative Two positives One alone Left charge Right charge Charges are 30 cm apart; the grid shows field direction. Equal and opposite charges: the voltage along the midline between them is exactly 0. Voltage: energy per charge Lift a book and it gains energy; the same book on a higher shelf has more. Voltage is the electrical version of height: the energy a charge gains per coulomb moved. A 1.5 V battery gives every coulomb that crosses it 1.5 joules, whatever the battery's size. V = energy ÷ charge  ·  1 volt = 1 joule per coulomban electron falling through V volts gains eV of energy That makes electrons easy to launch. Accelerate one through 100 V and it leaves at about 5.9 × 10⁶ m/s, two per cent of the speed of light. At 10,000 V its speed is 0.195 c, and the ordinary formula (½mv²) overestimates it by about 1.5%. The old cathode-ray TV worked this way, aiming such electrons at a screen. Interactive · An electron falls through a battery Voltage it falls through Computed with the relativistic energy formula, and compared with the ordinary one. Current and resistance: the slow river Current is charge flowing past a point each second (1 ampere = 1 coulomb per second). Push a voltage across a wire and a current flows; the ratio is the resistance. For most metals it's constant, which is Ohm's law, and a wire's resistance grows with its length and shrinks with its thickness. Resistance turns electrical energy into heat at a rate P = I²R. V = I · R  ·  R = ρ · L / A  ·  P = I²Rρ is the material's resistivity: for copper about 1.68 × 10⁻⁸ Ω·m Now the surprise. The electrons' average drift speed is I ÷ (n·A·e), with n about 8.5 × 10²⁸ free electrons per cubic metre of copper. Ten amps through a 2.5 mm² house wire gives a drift of 0.29 mm/s. An electron takes nearly an hour to cover one metre. The lamp lights at once because the wire is already full of electrons and the field pushes them all together, like water in a pipe that is already full. Interactive · A copper wire under load Current Wire cross-section Wire length With those defaults the wire wastes 13 W as heat. Halve the thickness and the heat doubles. That is why extension cords are rated by thickness, and why power lines run at very high voltage: a given power needs a smaller current, and heat goes as current squared. Circuits: two rules Every circuit, however tangled, obeys two bookkeeping rules from Gustav Kirchhoff. The junction rule: current flowing into a junction equals current flowing out, because charge doesn't pile up. The loop rule: going around any closed loop, the voltage rises and drops add to zero, because energy is conserved. They are conservation of charge and of energy, again. From them follow the two shapes. Resistors in series share one current, so their resistances add. Resistors in parallel share one voltage, so their currents add, and the total resistance gets smaller as you add branches. That's why plugging more appliances into one socket pulls more current from the wall, not less. Interactive · Three resistors, a 12 V battery All in series All in parallel R1, then R2 ∥ R3 Battery R1 R2 R3 With 100, 200 and 300 Ω: in series the battery supplies 20 mA; in parallel the total resistance falls to 54.5 Ω and the current rises to 220 mA, eleven times as much. Capacitors and the RC clock A capacitor is two plates close together that store charge, and with it energy in the field between them. Its capacity C is how much charge it holds per volt. Connect one through a resistor to a battery and the plates fill, but ever more slowly, because the more it holds the less voltage is left to push more in. V(t) = V₀ (1 − e−t/RC)  ·  τ = R · Cthe time constant τ sets the pace; the exponential is the solution of Differential Equations (34/03) After one τ the capacitor is 63% full, after three τ 95%, after five 99%. A 10 kΩ resistor with a 100 µF capacitor makes τ = 1 second. Camera flashes, phone touch screens, power-supply smoothing and the blink of a turn signal all use this clock. Interactive · Charge it, discharge it Charging Discharging Resistor Capacitor Time elapsed A 5 V supply. Magnetic fields: the push on moving charge A current makes a magnetic field that circles the wire. Ten amps at 5 cm makes about 40 µT, the same size as Earth's own field (about 25 to 65 µT at the surface). A magnetic field pushes only on moving charge, and sideways: perpendicular to both the motion and the field. A sideways push with constant speed is the circular motion of Physics I. F = q · v · B  ⇒  r = m · v / (q · B)the radius is bigger for faster or heavier particles, smaller for stronger fields A wire carrying current in a field gets the same push: that is a motor. And a particle's lap time, 2πm/(qB), doesn't depend on its speed, which is how cyclotron accelerators work. Interactive · A charge in a magnetic field Electron Proton Speed Field Induction: change a field, get a voltage In 1831 Michael Faraday showed that a changing magnetic field through a loop of wire drives a voltage around it. A steady field does nothing; only change counts. Faster change, more loops, and a stronger field all give a bigger voltage. ε = − N · dΦ/dtvoltage = number of turns × how fast the magnetic flux changes; the minus sign says the induced current opposes the change This one rule explains three machines. Spin a coil in a field and you have a generator: the voltage rises and falls as a sine wave, peak N·B·A·ω. Run the same machine backwards and you have a motor. Wind two coils on one iron core and an alternating current in the first induces an alternating voltage in the second, with output voltage in the ratio of the turns: a transformer. It works only with alternating current, since only change induces, and it is why the grid uses AC and why a charger hums. Interactive · Generator, then transformer Turns in the coil Magnet field Spin speed Transformer input Output coil (input has 1,000) Coil area 10 cm × 10 cm. Ideal transformer, no losses. At the defaults the generator gives 31.4 V peak at 10 Hz, and the transformer steps 240 V down to 12 V: 20 times fewer turns, 20 times the current. Maxwell: four rules and the speed of light In the 1860s James Clerk Maxwell gathered everything known into four equations. In words: (1) electric charges make electric fields that spread outward; (2) there are no isolated magnetic charges, so magnetic field lines never end; (3) a changing magnetic field makes a circulating electric field (Faraday); (4) an electric current, and, Maxwell's own addition, a changing electric field, make a circulating magnetic field. Put (3) and (4) together and something remarkable happens: a changing electric field makes a changing magnetic field, which makes a changing electric field, and the disturbance can sustain itself and travel. Maxwell calculated its speed from two measured constants of electricity and magnetism, 1/√(μ₀ε₀), and got the measured speed of light, 299,792,458 m/s. In his 1865 paper he concluded that light is such a wave. Heinrich Hertz produced and detected radio waves in the late 1880s, and the rest of the spectrum followed. c = 1 / √(μ₀ ε₀) = 299,792,458 m/sthe speed of every electromagnetic wave in empty space Radio, microwaves, infrared, visible light and X-rays differ only in frequency, and the wavelength is c ÷ f. A 100 MHz FM station has a wavelength of 3 m; Wi-Fi at 2.4 GHz, 12.5 cm; red light at 700 nm, 430 THz. This also explains antenna sizes: a quarter wavelength works well, so an FM antenna is about 75 cm. Interactive · Slide along the spectrum Mains 60 Hz AM radio FM radio Wi‑Fi Red light Frequency (log scale) What a graduate just sees Electric force is absurdly strong; things look neutral because charges balance. A voltage is energy per charge; a current is charge per second; power is their product. A thin wire heats up because P = I²R, and that's why the grid uses high voltage. Electrons drift slowly; the signal is the field, and it moves near light speed. Series adds resistance, parallel adds current. Any capacitor and resistor make a clock, and 63% in one τ is the number to remember. Magnetism acts only on moving charge, and always sideways. Only change induces: no change in the field, no voltage. So transformers need AC. Light, radio and X-rays are the same wave at different frequencies. Where it shows up next Motors, generators and sensors in Mechanical & Aerospace Engineering are the F = qvB and induction sections above; Control Systems (34/20) then closes the loop around them. Vibrations (34/17) and Differential Equations (34/03): the RC curve is the same equation as a cooling cup of coffee, and an inductor with a capacitor oscillates like a mass on a spring. Computer Architecture (34/25): a logic gate is a switch, and the delay of a wire is an RC time constant, which sets how fast a chip can be clocked. Computer Networks (34/27): Wi-Fi and cellular are Maxwell's waves with data on them; the wavelength rule sets antenna size. Thermodynamics (34/14) picks up the I²R heat; a chip's heat is why laptops have fans. If you want to go deeper 📘 Standard textbooks. Halliday, Resnick & Walker, Fundamentals of Physics (12th ed.) or Young & Freedman, University Physics (16th ed.), the usual engineering-year texts. Purcell & Morin, Electricity and Magnetism (3rd ed., Cambridge, SI units) is the elegant one for stronger students. 📘 Gentler, free. The Feynman Lectures on Physics, Volume II, free at feynmanlectures.caltech.edu. 🌐 Free course. MIT OpenCourseWare 8.02 Physics II: Electricity and Magnetism (Spring 2007), with lecture notes and problem sets. The takeaway Charges make fields; a voltage is energy per charge; a current is charge per second, resisted into heat. Two rules, conservation of charge and of energy, solve any circuit. A changing magnetic field makes a voltage, which gives generators, motors and transformers, and Maxwell showed that a changing electric field and a changing magnetic field can sustain each other as a wave travelling at the speed of light. That wave is light. Try this: look at the charger of a laptop or phone. Find the voltage and amperes printed on it, multiply them, and you have the power it can deliver. Then feel how warm the cable and the brick get, and work out which part is I²R. Sources & Further Reading Sources. Constants from the NIST CODATA 2022 listing (elementary charge 1.602 176 634 × 10⁻¹⁹ C and speed of light 299 792 458 m/s are exact; electron and proton masses; G; μ₀; ε₀). Copper's resistivity (1.68 × 10⁻⁸ Ω·m at 20 °C) from the tabulation in Wikipedia's "Electrical resistivity and conductivity"; free-electron density 8.5 × 10²⁸ m⁻³ and the drift-velocity worked example from Wikipedia's "Drift velocity". Earth's field 25–65 µT: Wikipedia's "Earth's magnetic field". Faraday's 1831 demonstration: Wikipedia's "Faraday's law of induction" (Joseph Henry independently, 1832). Maxwell's paper read to the Royal Society 8 December 1864 and published 1865: Wikipedia's "A Dynamical Theory of the Electromagnetic Field". Hertz produced and detected radio waves in 1886 and published his evidence in 1887–88: Wikipedia's "Heinrich Hertz". Computed in node and checked: electric to gravitational force ratio 2.27 × 10³⁹; drift speed 0.294 mm/s and 13.4 W; electron speeds (5.93 × 10⁶ m/s at 100 V; 0.195 c at 10 kV); 54.5 Ω and 220 mA; 63.2%, 95.0%, 99.3% RC fractions; electron orbit radius 5.7 cm and period 35.7 ns at 10⁷ m/s and 1 mT; 31.4 V peak; 1/√(μ₀ε₀) = 299,792,458 m/s to 8 digits. 🌐 MIT OpenCourseWare: 8.02 Physics II, Spring 2007 📘 Purcell & Morin, Electricity and Magnetism, 3rd ed. (Cambridge University Press, 2013) 📘 The Feynman Lectures on Physics, Vol. II (free online, feynmanlectures.caltech.edu) 🌐 NIST: fundamental physical constants (CODATA 2022) Step 4. Linear Algebra: Machines That Move Space ------------------------------------------------ Why: States, rotations and quantum mechanics itself are linear algebra. A grid of numbers is really a machine that moves all of space at once. Learn to see it, and circuits, bridges, search engines and AI all start to look alike. You pinch two fingers on a photo and it rotates and zooms smoothly under them. A game character turns to face you and every corner of its face swings round together. A search for "best pizza near me" ranks millions of pages in a fraction of a second. A bridge designer presses "solve" and a screen of colour shows how every beam is being squeezed. Underneath all four is the same object: a grid of numbers, and one habit of thought about what a grid of numbers does. A graduate of a linear algebra course no longer sees a table of numbers. They see a machine that grabs the whole plane, or the whole of space, and moves it. This piece builds that picture with seven things you can drag. You will not come out able to compute a determinant of a 5×5 by hand (nobody does that on purpose). You will come out seeing why a system of equations sometimes has no answer, why a bridge hums at particular pitches, and why the chips that run AI are built for one operation only. The course in one box Who takes it: nearly every engineering and computer science student, usually in the first or second year. It is the single most reused maths course in both majors. What it's for: handling many unknowns and many dimensions at once, with one set of tools. Comes after: only school algebra and a little geometry. (Calculus helps but is not required.) Leads to: Statics (34/10), Control Systems (34/20) and Machine Learning (34/32) list it as a prerequisite; Vibrations (34/17), Computer Architecture (34/25) and Multivariable Calculus (34/02) lean on it constantly. Honest line: you won't be able to run a finite element program after this piece. You will see why it spends nearly all its time solving one equation, Ax = b. If you want an easier first read, try the library's Vectors, Matrices and Linear Transformation (12/14); this one goes further into solving, eigenvectors, fitting and why hardware cares. A matrix moves all of space at once Start with the picture a graduate keeps. A 2×2 matrix is not four numbers. It is two arrows. The first column says where the arrow pointing one step right (call it i) ends up. The second column says where the arrow pointing one step up (j) ends up. Once you know where those two land, you know where everything lands, because every point is some amount of i plus some amount of j, and the machine is straight and even: grid lines stay straight, and evenly spaced lines stay evenly spaced. Ax = x1(column 1) + x2(column 2) Read that in words: the matrix times a point is "that many of the first column, plus that many of the second". Try it. The grey grid is the original plane; the blue grid is where the matrix sends it. Interactive · Move the plane Do nothing Rotate 30° Stretch Shear Mirror Column 1, right part (a) Column 2, right part (b) Column 1, up part (c) Column 2, up part (d) Without JavaScript: the rotate-30° matrix sends the arrow (1, 0) to (0.87, 0.5) and (0, 1) to (−0.5, 0.87). Every grid line turns 30° and the unit square keeps area 1. Notice what the shaded unit square does. In "Rotate" it keeps its size. In "Stretch" it doubles. In "Shear" it leans over but keeps its area. That area change is the next idea. The determinant is how much area gets scaled The determinant is one number that says how much the machine scales area. If the unit square becomes a shape with area 5, the determinant is 5. If it becomes a mirror image, the determinant is negative: area is kept (or scaled) but orientation is flipped. For a 2×2 matrix with columns (a, c) and (b, d) the rule is short: det = ad − bc Worked number: the matrix with columns (2, 1) and (1, 3) has det = 2×3 − 1×1 = 5, so it stretches every area in the plane by a factor of five. In three dimensions the determinant scales volume. The interesting case is zero. A determinant of zero means the machine flattens space: the plane is squashed onto a line (or a point), and the area becomes nothing. Squashing cannot be undone, because many different starting points land on the same spot. Drag the slider until the determinant reaches zero. Interactive · Squash the plane flat Tilt the second arrow: s Without JavaScript: the matrix with columns (1, 0.5) and (s, 1) has determinant 1 − 0.5s. At s = 2 the determinant is 0, the whole plane lands on one line, and the points (0, 0) and (2, −1) both land on the origin. The orange dot is a probe at (2, −1). At s = 2 it lands exactly on the origin, the same place as the point (0, 0). Two different inputs, one output: no machine could tell you which one you started from. That is the whole meaning of "this matrix has no inverse", and it is why a zero determinant is the alarm bell in every solver you will ever meet. Solving many equations at once: Ax = b Now use the machine backwards. Given the output b, which input x did the machine start from? That is the equation Ax = b, and it is the most common problem in applied mathematics. Every time you have several unknowns that are tied together by several straight-line relationships, you have one. A circuit is the cleanest example. Two loops share a resistor. Kirchhoff's voltage law says the voltage gained around each loop equals the voltage lost, which gives one equation per loop. With a 10 V battery, R1 = 2 Ω, R2 = 3 Ω (shared) and R3 = 4 Ω: 5I1 − 3I2 = 10−3I1 + 7I2 = 0 The determinant is 5×7 − 3×3 = 26, so there is exactly one answer: I1 = 2.69 A and I2 = 1.15 A. Change the resistors below and watch the matrix and the answer change together. Interactive · Solve a circuit with a matrix Battery V R1 (loop 1 only) R2 (shared) R3 (loop 2 only) Without JavaScript: with 10 V, 2 Ω, 3 Ω and 4 Ω the equations are 5I1 − 3I2 = 10 and −3I1 + 7I2 = 0, its determinant is 26, and the loop currents are 2.69 A and 1.15 A. The reason an engineer cares: nothing about this method knows it is a circuit. A truss is the same. At each joint of a bridge, the horizontal forces must add to zero and so must the vertical ones: two equations per joint. A simple triangle truss has three joints and so six equations, for three member forces and three support reactions, and the answer is one solve of Ax = b. A real structure has thousands of joints. Finite element programs routinely solve systems of many thousands of equations, and research codes have reported solving over a million unknowns at once. The method is the same one you just used; only the size has changed. (Statics, 34/10, is this idea applied to forces.) A zero determinant in a structure's equations is a warning: the structure may be able to move without any member pushing back. Eigenvectors: the directions a transformation only stretches Most arrows are turned by a matrix as well as stretched. But for many matrices there are special directions where the arrow comes out pointing the same way (or exactly backwards), only longer or shorter. Those are the eigenvectors, and the stretch factor along each is its eigenvalue. (Eigen is German for "own": the matrix's own directions.) Av = λv In words: feed the matrix the special arrow v and it hands back the same arrow multiplied by a plain number λ. For the matrix with columns (2, 1) and (1, 2) the special directions are 45° (stretched by 3) and 135° (stretched by 1). Every other arrow gets bent towards the stretchy one. Turn the dial and look for the moments the two arrows line up. Interactive · Find the directions that only stretch Stretch & mix Shear Rotation Two springs Direction of the input arrow Without JavaScript: for the matrix with columns (2, 1) and (1, 2), an arrow at 45° comes out at 45° three times longer, and an arrow at 135° comes out at 135° unchanged. A pure rotation has no such direction at all. Three things to notice. The shear has only one special direction (along the x-axis, where nothing happens at all). The rotation has none, because every arrow turns. And "Two springs" has two special directions with different stretch factors, 1 and 3; hold that thought. Eigenvectors at work: bridges that hum, pages that rank Vibration. Picture two equal masses on springs between two walls. Push them any way you like and the motion looks messy. But there are exactly two clean patterns: both swing together, or they swing in opposite directions. These are the modes, and they are the eigenvectors of the "two springs" matrix above, (1, 1) and (1, −1). The eigenvalues 1 and 3 fix how fast each mode vibrates: the squared frequency is the eigenvalue times k/m, so the opposite-motion mode vibrates √3 ≈ 1.73 times faster. Any messy motion is just a mix of the modes. That is how engineers find which pitches will shake a wing, a bridge deck or a drive shaft (Vibrations, 34/17). Ranking pages. Google's founders modelled a web surfer who follows a random link from each page, and now and then jumps to a random page instead. The long-run share of time spent on each page is its PageRank, and it is the eigenvector (with eigenvalue 1) of the matrix describing one step of that surfer. In their 1998 paper Brin and Page used a "damping" probability of 0.85 for following links. You can find the eigenvector without solving anything fancy: start with equal scores and apply the machine over and over. Press Step. Interactive · A four-page web finds its eigenvector Step onceRun 20 stepsReset Without JavaScript: A links to B and C, B links to C, C links to A, D links to C. After many steps with damping 0.85 the ranks settle to A 0.373, B 0.196, C 0.394, D 0.038. D, which nobody links to, keeps only the base share. After about twenty steps the numbers stop changing: the vector has become an eigenvector, because applying the machine again returns the same vector. Page C wins because two pages point at it and one of them (A) is itself well-ranked. Least squares: the best answer when there is no exact one Real data is never perfect. Six measurements that "should" lie on a straight line will not, so the equations Ax = b have more equations than unknowns and no exact solution. Do you give up? No. You choose the line whose total mistake is smallest. Measure each miss vertically, square it, and add up the squares. The least squares line makes that total as small as possible. In pictures: each squared miss is literally a square. Drag the line and watch the squares shrink and grow. Interactive · Make the squares as small as possible Slope Height at x = 0 Snap to the least-squares line Without JavaScript: for the six points (1, 1.2), (2, 2.9), (3, 3.1), (4, 4.8), (5, 5.2), (6, 7.1) the best line is y = 1.089x + 0.24, with total squared miss 0.798. The guess y = x gives 2.75. The graduate's picture is geometric: the right-hand side b is a point outside the flat sheet of everything the matrix can reach, and the best answer is the point on the sheet closest to it, found by dropping a perpendicular. That perpendicular condition gives the one equation to remember: ATA x̂ = ATb In words: multiply both sides by the matrix flipped on its side and you get a square system you can solve. The history is a priority fight: Legendre published the method in 1805, Gauss said he had used it since 1795 and published in 1809, and Gauss's use of it to predict where the asteroid Ceres would reappear in 1801 made it famous. Today it sits under every trend line, every calibration of a sensor, and the first model most machine-learning students ever train. Why GPUs and AI are matrix multiplication Multiplying two matrices is just many dot products: every cell of the answer is one row of the first matrix paired with one column of the second, multiplied and added. Click a cell below and see the row and column that make it. Interactive · Build a product cell by cell Tap a cell of C = A × B. Matrix size n (n × n times n × n) 1 billion multiplies per second 100 billion per second 10 trillion per second The speeds are round illustrative numbers, not any particular chip. Without JavaScript: multiplying two n×n matrices takes n×n×n multiplications. For n = 1,000 that is 1,000,000,000, and the 1,000,000 cells of the answer can all be computed independently. Two facts follow. First, the work is huge: n×n matrices need n³ multiplications, so 1,000×1,000 is a billion. Second, the cells are independent, so a thousand workers (or a million) can each take cells at the same time. That is exactly the shape of work a graphics chip was built for, because drawing a 3D scene means pushing every corner of every triangle through a matrix that rotates, moves and projects it. Modern neural networks turned out to be the same shape. A layer of a network is a matrix of learned numbers times a vector (or a matrix) of inputs. In their scaling-law paper, Kaplan and colleagues estimate that a transformer language model with N parameters needs roughly 2N arithmetic operations to process one token. GPT-3, with 175 billion parameters, therefore needs about 3.5×1011 operations for each token, nearly all of them inside matrix products. NVIDIA's Volta GPUs (2017) put dedicated "tensor core" circuits on the chip that do nothing but a small matrix multiply-and-add (4×4) per clock tick. When people say AI runs on GPUs, they mean it runs on hardware shaped like linear algebra. (Computer Architecture, 34/25, and Machine Learning, 34/32.) What a graduate just sees A matrix is a machine that moves all of space; its columns say where the basis arrows go. The determinant is the area (or volume) scale factor, and zero means the machine flattens space and cannot be undone. "Solve Ax = b" is the same question for a circuit, a truss, a fitted line and a game physics step. If there are as many independent equations as unknowns there is one answer; fewer, many answers; contradictory, none. Eigenvectors are the directions a machine only stretches; they simplify any problem the machine drives. A vibrating structure is a mix of modes, one per eigenvector; the eigenvalues are the pitches. When there is no exact answer, take the closest one: project onto what you can reach. Matrix multiplication is many independent dot products, which is why it parallelises and why hardware is built around it. Where it shows up next Statics (34/10) and Mechanics of Materials (34/11): joint and member forces are a linear system; stiffness matrices tie loads to deflections. Vibrations (34/17) and Dynamics (34/12): mode shapes and natural frequencies are eigenvectors and eigenvalues of mass and stiffness matrices. Control Systems (34/20): the eigenvalues of a system's matrix say whether a drone's wobble dies away or grows. Machine Learning (34/32): data is a matrix, a layer is a matrix, and training adjusts matrices; least squares is the model you meet first. Computer Architecture (34/25) and graphics: GPUs and tensor cores exist to multiply matrices fast. If you want to go deeper 📘 Gilbert Strang, Introduction to Linear Algebra (Wellesley-Cambridge Press; 6th edition, 2023). The standard first course for engineers; best for the four fundamental subspaces and for application. 📘 David C. Lay, Steven R. Lay and Judi J. McDonald, Linear Algebra and Its Applications (Pearson; 6th edition, 2021). Gentle, example-heavy, widely assigned. For proofs, Sheldon Axler's Linear Algebra Done Right (Springer; 4th edition, free to read online at linear.axler.net) is the elegant theoretical route. ▶️ 3Blue1Brown, Essence of Linear Algebra: the best visual series for learning alone; it builds exactly the "matrix as moving space" picture used here. 🌐 MIT OpenCourseWare 18.06, Linear Algebra (Gilbert Strang): full video lectures, free. The takeaway Linear algebra is the study of machines that move all of space at once. Read a matrix by its columns, read its determinant as the area scale, solve Ax = b when you need to run the machine backwards, look for the eigenvector directions when you want it to be simple, and project onto what you can reach when there is no exact answer. Try this: next time an app zooms, rotates or recolours a photo, picture the two column arrows moving. And for the fun of it, in the circuit widget raise R2 to 10: the shared resistor starts to decide what both loops do. Sources & Further Reading Sources. Strang, Introduction to Linear Algebra (6th ed., 2023) and MIT 18.06 for the standard course content. Kirchhoff loop equations and the spring-mass modes are textbook derivations; every number above was recomputed in code. Legendre's 1805 publication and Gauss's priority claim and Ceres prediction: Wikipedia, "Least squares"; MacTutor biography of Legendre. PageRank and the 0.85 damping factor: Brin and Page, "The Anatomy of a Large-Scale Hypertextual Web Search Engine" (1998). Volta tensor cores (4×4 matrix multiply-accumulate): Markidis et al., "NVIDIA Tensor Core Programmability, Performance & Precision" (2018). About 2N operations per token: Kaplan et al., "Scaling Laws for Neural Language Models" (2020); GPT-3 at 175 billion parameters: Brown et al. (2020). Million-unknown structural solves: NASA Technical Reports Server and OSTI conference papers on parallel sparse solvers. Go deeper. The books and courses above. Step 5. Multivariable Calculus: Calculus on a Landscape ------------------------------------------------------- Why: Fields fill space; their calculus is multivariable. A raindrop on a hillside picks the steepest way down without thinking. The arrow it follows is the same one that trains every neural network and drives heat through a metal plate. Stand on a hillside with a map. Height depends on two things at once: how far east you are and how far north. Single-variable calculus handles one input at a time. The hillside needs a new question: of all the directions I could step, which one rises fastest? Almost nothing real depends on one number. Temperature in an engine block depends on position in three dimensions. The error of a language model depends on billions of adjustable weights. Air pressure depends on place and time. This course takes the slope-and-area ideas of Calculus I (34/01) and lets them live in more than one dimension. Surprisingly little new is needed: one new arrow, the gradient, and one new accounting rule, the idea that what flows out of a region is what is made inside it. The course in one box Who takes it: second-year Mechanical & Aerospace Engineering students; Computer Science students meet it in year 4 when machine learning needs it. What it is for: calculating change and totals when many things vary at once. Comes after: Calculus I (34/01). Leads to: Physics II: Electricity & Magnetism (34/07), Fluid Mechanics (34/15), Machine Learning (34/32), and through them Heat Transfer (34/16) and Propulsion (34/21). Honest line: you will not be able to grind through a surface integral after this. You will see why a gradient points uphill, why training an AI is "just" rolling downhill, and what the big theorems say in plain words. Two inputs make a landscape, and a partial derivative is one slope A function of two inputs is a surface: height above each point of a map. Engineers draw it the way hikers do, with contour lines: closely spaced lines mean steep ground, widely spaced lines mean gentle ground. To ask "how steep?" you must say in which direction. Walk due east and note the slope: that is the partial derivative with respect to x, written ∂f/∂x. Hold east still and walk north: that is ∂f/∂y. The recipe is simple: treat every other variable as frozen and differentiate as before. ∂f/∂x = slope of f as only x changes, with y held still The landscape below has a tall hill near (1, 1) and a lower one near (−1.2, −0.8). Drag the point on the map (or use the sliders). The cyan arrow shows the slope eastward and the green arrow the slope northward; a leftward or downward arrow means the ground falls in that direction. Interactive · Walk the map East–west position x North–south position y At the starting point (−0.2, 0.3) the height is 0.684, the eastward slope +0.621 and the northward slope +0.226: the ground rises both ways, more steeply towards the east. The gradient points straight uphill Put the two partial slopes together as one arrow, east component first: that is the gradient, written ∇f. It has a beautiful property: it points in the direction of steepest ascent, and its length is how steep that is. Step in any other direction and the slope is the gradient's length times the cosine of the angle between your step and the arrow. Straight along it, cosine is 1: the most you can get. Sideways to it, cosine is 0: you walk along a contour and stay level. slope in direction u = ∇f · u = |∇f| cos(angle) Two consequences follow. The gradient is always perpendicular to the contour line through that point, which is why water runs across contours, not along them. And the same arrow governs heat: in Fourier's law, heat flows down the temperature gradient, from hot to cold, at a rate proportional to its steepness. Many diffusion laws have this shape: flow follows the negative gradient. Interactive · Which way is uphill? Direction you step (0° = east, 90° = north) Turn to the gradient Turn the pink direction until the slope is largest: it lines up with the orange arrow. Turn it 90° from the arrow and the slope is zero. At the very top of a hill the gradient shrinks to nothing, which is the multivariable version of "zero slope means a peak" from Calculus I. Rolling downhill is how a network learns Now flip the sign. A machine-learning model has adjustable numbers (weights), and a loss measures how wrong it is on the training data. The loss is a landscape over the weights, with one dimension per weight. To learn, take a small step against the gradient, so downhill, then recompute and repeat. This is gradient descent, which Augustin-Louis Cauchy proposed in 1847 for solving equations, long before computers. The chain rule from Calculus I is what lets the gradient be computed layer by layer, in the method called backpropagation, published by Rumelhart, Hinton and Williams in Nature in 1986. A model like GPT-3 (2020) has 175 billion weights, so its landscape has 175 billion dimensions, yet the rule is the same arrow. new position = old position − (step size) × ∇(loss) The step size matters, and you can feel why. In the bowl below, one direction is twelve times steeper than the other. Too small a step crawls; just right is fast; too large and each step overshoots the valley floor by more than it started and the loss explodes. For this bowl, steps above 1/6 (about 0.167) diverge. Interactive · Learning rate Too small Good Zig-zag Too big Step size (learning rate) Steps taken Real training uses refinements (momentum, adaptive step sizes, random mini-batches), but all of them are ways of coping with exactly this picture: a long narrow valley where the steepest direction is not the direction of the destination. Double and triple integrals add up a landscape's worth Integrals extend the same way. A single integral adds thin slices along a line. A double integral adds tiny patches over an area: if each patch has a density (kilograms per square metre), the sum is the plate's mass. A triple integral does the same over a solid, with density in kilograms per cubic metre. The recipe is slice, multiply, add, repeated once per dimension. mass = sum over all pieces of (density × piece size)  =  ∬ ρ dA The same sums also give the centroid, the balance point: weight each position by its piece's mass and divide by the total. Engineers use it constantly: the centre of mass of a rocket, a car or an aircraft decides whether it is stable. Try a plate 2 m long and 1 m wide whose density rises along the length. Interactive · Where does the plate balance? Density rises along the length: a (kg per m² per m) Density rises across the width: b The density here is 1 + ax + by kg/m². With a = 3 and b = 0, the plate's mass is 2 + 2×3 = 8 kg and it balances at x = 1.25 m, shifted from the middle (1 m) towards the heavy end. A vector field puts an arrow on every point Wind on a weather map, water in a pipe, the pull of a magnet: each attaches an arrow (a direction and strength) to every point in space. That is a vector field. Two numbers computed from the field's partial derivatives tell you most of what it is doing locally. Divergence: is the field spreading out from here, or converging? A tap under water is a source; a drain is a sink. A positive divergence means a small blob of fluid is expanding. Curl: is the field spinning? Put a tiny paddle wheel in the flow. If it turns, the curl is not zero, and the sign tells you which way. divergence = ∂vx/∂x + ∂vy/∂y    curl = ∂vy/∂x − ∂vx/∂y Pick a field and let a round blob of fluid (grey dashes show where it started) be carried along. You will see that a source inflates the blob without turning it, a whirlpool turns it without changing its area, and a saddle stretches it one way and squeezes it the other while keeping its area. Interactive · Drift a blob through a field Source Whirlpool Shear Saddle Time elapsed Divergence and curl are the two words in Maxwell's equations of electromagnetism (Physics II, 34/07) and in the equations of fluid flow (Fluid Mechanics, 34/15). Spreading and spinning are the two things a field can do locally, besides moving along as a whole. What flows out of a region is what is made inside Here is the idea behind the three big theorems, in the language of a bathtub. If water pours out through the boundary of a region, then some taps inside must be producing it (or the level inside must be falling). Add up every tiny source and sink inside and you get the net flow out through the boundary. Nothing more is needed. net flow out through the boundary = total divergence inside That is the divergence theorem, the three-dimensional version of the statement. Green's theorem is the flat version (the name honours George Green, whose Essay of 1828 contained the related surface-to-volume formula), and Stokes's theorem relates the spinning of a field inside a surface to the flow around its edge. All three say the same kind of thing: a sum over a boundary equals a sum of local changes inside. It is why one can measure a rotating machine from outside and why conservation laws can be written either as "this region's total changes by what crosses its walls" (integral form) or as an equation about each point (differential form). Interactive · Count the flow two ways Source Cubic Source in, sink out Steady wind Circle radius Circle centre, left or right The first number adds up the field's push through the circle itself. The second never looks at the circle's edge: it adds the divergence in every patch inside. They agree for every field, radius and position. For the plain source (x, y), the divergence is 2 everywhere, so a unit circle encloses 2 × π = 6.283 units of production, and exactly 6.283 flows out through its rim. What a graduate just sees A slope needs a direction; a partial derivative is the slope with every other input held still. The gradient points straight uphill, its length is the steepness, and it is perpendicular to the contour. "Downhill" is the whole idea behind training a model: step against the gradient, and mind the step size. Heat, and many other things, flow down a gradient from high to low. A double or triple integral is slice, multiply, add, once per dimension; mass and balance point come from it. A field can only spread (divergence) or spin (curl), locally. What leaves a region through its wall is exactly what its insides produce. Where it shows up next Physics II: Electricity & Magnetism (34/07): Maxwell's equations are statements about the divergence and curl of the electric and magnetic fields. Fluid Mechanics (34/15): conservation of mass is a divergence equation, and the divergence theorem turns "what crosses the walls of this control volume" into "what happens inside it". Heat Transfer (34/16): conduction is heat flowing down the temperature gradient; the heat equation is the gradient and divergence together. Machine Learning (34/32): training is gradient descent on a loss landscape with millions or billions of dimensions. Mechanics of Materials (34/11) and Dynamics (34/12): centroids and moments of inertia are integrals of exactly the kind you added up above. If you want to go deeper 📘 Textbook: Stewart, Clegg and Watson, Calculus: Early Transcendentals (9th ed.), chapters 14 to 16: the standard multivariable text, rich in examples. 📘 Textbook: Jerrold Marsden and Anthony Tromba, Vector Calculus (6th ed., W. H. Freeman): the classic for the geometry of divergence, curl and the big theorems. ▶️ Gentler: Khan Academy's Multivariable Calculus course, which has videos with a strong visual feel, and Grant Sanderson's multivariable lessons. 🌐 Free course: MIT OpenCourseWare 18.02SC Multivariable Calculus, with lectures, notes and exercises. The takeaway With many inputs, a slope needs a direction. The partial derivatives are the slopes along the axes; the gradient joins them into one arrow that points uphill and measures how steep it is. Walk against it and you are doing gradient descent, which trains models with billions of weights and also describes how heat flows. Integrals extend to areas and volumes, giving mass and balance points, and for flows the whole subject rests on one bookkeeping rule: what leaves a region through its boundary is what its interior produces. Try this: on any hill, a park slope or a street, find the line along which a ball would roll: that is the negative gradient. Then notice that the ball's path crosses the contours at right angles. Sources & Further Reading Sources. Gradient descent: A.-L. Cauchy, "Méthode générale pour la résolution des systèmes d'équations simultanées", Comptes rendus 25 (1847), pp. 536–538; Claude Lemaréchal, "Cauchy and the gradient method", Documenta Mathematica, Extra Volume ISMP (2012). Backpropagation: Rumelhart, Hinton and Williams, Nature 323 (1986), pp. 533–536. GPT-3's 175 billion parameters: Brown et al., "Language Models are Few-Shot Learners" (2020, arXiv 2005.14165). Green's Essay of 1828 containing the theorem named after him: MacTutor biography and the essay itself. Computed in node: the landscape f = 2e−((x−1)²+(y−1)²)/1.5 + 1.2e−((x+1.2)²+(y+0.8)²)/1.0 and its analytic gradient (checked against finite differences, agreement to 3 × 10−10); gradient descent on ½(x² + 12y²), stable for step sizes below 2/12; plate mass and centroid by 3,200-cell sums against the exact formulas; blob area against ediv·t; circle flux against the divergence integral for four fields (agreement to 4 decimals). 🌐 MIT OpenCourseWare 18.02SC Multivariable Calculus 🌐 Khan Academy: Multivariable calculus 🌐 Documenta Mathematica, ISMP volume, which contains Lemaréchal's short history of gradient descent 📘 Stewart, Clegg and Watson, Calculus: Early Transcendentals, 9th ed. (Cengage) 📘 Marsden and Tromba, Vector Calculus, 6th ed. Step 6. Differential Equations: Laws Written as Rates ----------------------------------------------------- Why: Every law of motion is a differential equation. A cup of coffee cools, a capacitor charges, a car bounces over a bump, a fish stock collapses. Each follows a rule that says how fast things change, not where they will be. Solving it is the whole course. Pour coffee and watch it cool. It loses heat fast at first, when it is far hotter than the room, and ever more slowly as it approaches room temperature. Nobody wrote down the temperature at every minute in advance. All you need is a rule: the hotter the cup is above the room, the faster it cools. That sentence, turned into an equation, is a differential equation, and it predicts the whole curve. This is the secret structure of physics. Nature rarely says "the position will be this". It says "the rate of change is that, given the state right now". Newton's second law is such a rule. So are the equations of electrical circuits, chemical reactions, populations, heat, and the flow of air over a wing. A differential equations course teaches how to read these rules and how to turn them into predictions, either exactly or step by step on a computer. The course in one box Who takes it: second-year Mechanical & Aerospace Engineering students. It is not on the Computer Science route in this series, but CS students meet the same ideas whenever they simulate, animate or train anything that evolves in time. What it is for: predicting how a system evolves when you only know the rule for its rate of change. Comes after: Calculus I (34/01). Leads to: Dynamics (34/12), Fluid Mechanics (34/15), Heat Transfer (34/16), Vibrations (34/17), Control Systems (34/20). Honest line: you will not learn the solution tricks that fill the textbook. You will see the three behaviours that recur everywhere (settling, oscillating, tipping) and why a simulation can lie to you. An equation about a rate hands you a direction at every point An ordinary differential equation, an ODE, is an equation that mentions a quantity and how fast it is changing. The simplest useful kind says the rate depends on how far the quantity is from a target: dy/dt = k (target − y) Read it aloud: the further I am from the target, the faster I move towards it. Coffee towards the room's temperature, a capacitor towards the supply voltage, a medicine level towards zero. The picture is a slope field: at every point of the plane the equation fixes the direction a solution must go through, drawn as a tiny segment. A solution is any curve that follows those segments the whole way, like a leaf carried along a stream. Different starting points give different curves, all flowing toward the target. Interactive · Follow the arrows Pull strength k Target value Starting value Notice that the segments get flatter as you approach the dashed line: the rate shrinks with the distance. That is why the curve approaches the target but never quite arrives. The exact solution is the target plus the starting gap times a decaying exponential, e−kt. The time constant: how fast a first-order system forgets The rule dy/dt = k(target − y) has one number that sums it up: the time constant, τ = 1/k. In one τ the system covers about 63.2% of the remaining gap; after about 4.6 τ it has covered 99%. Engineers read response speed from that single number. fraction of the gap covered after time t = 1 − e−t/τ In an electrical circuit, a resistor R in series with a capacitor C charges towards the supply with τ = R × C. A 10 kΩ resistor and a 100 µF capacitor give τ = 10,000 Ω × 0.0001 F = 1 second: after 1 s the capacitor holds 63.2% of the supply (3.16 V of 5 V), after 4.6 s, 99%. A cooling coffee follows the same curve; only the story and the units change. Interactive · Charge a capacitor Resistance R Capacitance C Notice what the sliders do: double either one and the curve stretches twice as wide, but keeps exactly the same shape. The same shape is why a thermometer takes a while to read a fever, and why a control engineer (Control Systems, 34/20) asks first: "what is the time constant?" Solving it step by step: Euler's method Most differential equations have no neat formula. The fall-back is to walk along the slope field in small steps. At the current point read the slope, move a short time h in that direction, and repeat. This is Euler's method, set out by Leonhard Euler in his Institutionum calculi integralis (1768), and it is the ancestor of every physics engine, weather model and circuit simulator. ynext = y + h × (the rate at y) Test it on a rule we can also solve exactly, dy/dt = −y, starting from 1. Each Euler step multiplies the value by (1 − h). Small steps follow the true curve e−t closely. But raise h and something stranger happens. Interactive · Euler versus the exact answer Step size h At h = 1 the first step lands exactly on zero. Beyond 1 the steps overshoot, and past h = 2 each step makes the number bigger in size, so the "answer" explodes even though the real one decays. That is numerical instability: a stepping rule has its own stability limit, and a simulation that ignores it will happily print nonsense. At h = 0.5 Euler gets 0.000244 at t = 6, where the true value is 0.00248: right shape, ten times too small. Smaller steps, or smarter methods (the Runge–Kutta family), fix that. Second order: the spring, the mass and the damper Newton's second law says force equals mass times acceleration, and acceleration is the rate of change of the rate of change of position. So a mass on a spring obeys a second-order equation: the second derivative of position x depends on position and velocity. m x″ + c x′ + k x = 0 The three terms are inertia (mass m), a damper that resists velocity (c) and a spring that pulls back with force proportional to displacement (k). Two numbers decide everything: the natural frequency, ω = √(k/m), and the damping ratio, ζ = c ÷ (2√(km)). ζ below 1, underdamped: it rings, swinging past rest and fading. ζ = 1, critically damped: the fastest return without overshoot. ζ above 1, overdamped: no swing, but a sluggish crawl home. Engineers tune for it. A door closer is aimed near critical damping so the door shuts without banging or bouncing. A shock absorber is a compromise: enough damping to stop the bouncing, not so much that the wheel can't follow the road. Interactive · Tune the damper No damping Light Critical Heavy Mass m Spring stiffness k Damping c With m = 1 kg and k = 25 N/m the natural frequency is 5 rad/s, or about 0.8 Hz. Setting c = 10 N·s/m gives ζ = 1, critical. With c = 2, ζ = 0.2 and the first swing past rest reaches 52.7% of the starting displacement on the other side. This same equation, with different symbols, describes the RLC circuit, a building in an earthquake and a robot arm: that is the next courses (Vibrations, 34/17, and Control Systems, 34/20). Equilibria: where things settle, and where they tip Often you do not need the whole curve, only the places where change stops: the equilibria, where the rate equals zero. Two questions follow. Where are they? And is each one stable (nudge it and it comes back) or unstable (nudge it and it runs away)? The answer is the slope of the rate curve at that point, from Calculus I: negative slope means stable, positive means unstable. A toy model shows why this matters. Fish regrow according to dy/dt = y(1 − y/100) per year (a standard logistic model), and a fleet takes a fixed catch H every year. For H = 20 there are two equilibria, at about 27.6 and 72.4 fish: the upper is stable, the lower unstable. Start just above 27.6 and the stock recovers to 72.4. Start just below it and the stock collapses to zero in a few years. Raise the catch above 25, the most the stock can regrow, and no equilibrium remains at all. Interactive · A fishery on the edge Catch 20, start 30 Catch 20, start 25 Catch 26 Fixed catch H per year Starting population The lesson generalises: a system can look healthy while it sits near an unstable tipping point, and a slow change in a parameter (here the catch) can make the stable state vanish suddenly. Bridges, power grids, aircraft and ecosystems are all analysed this way. The model is a classroom toy, not a description of any real fishery. Why physics is written in differential equations Why do laws come as rates? Because change is local. What a system does next depends only on what is happening here, now: the forces, the gradients, the current state. Newton's second law (second order in position), Maxwell's equations for electric and magnetic fields, the equations of heat flow and the equations of fluid motion all have this shape. Give the rule and the starting conditions and the future follows. Two kinds appear. An ordinary equation (ODE) has one changing variable, usually time: a pendulum, a circuit, a rocket's trajectory. A partial differential equation (PDE) has several, such as time and position: the temperature along a rod, the pressure in the air around a wing. The Navier–Stokes equations of fluid flow (Fluid Mechanics, 34/15) are PDEs so hard that the Clay Mathematics Institute named a question about them one of its seven Millennium Prize problems in 2000. Most real ones are solved on computers using the stepping idea above. A glimpse of PDEs: the heat equation Joseph Fourier wrote the heat equation in his Théorie analytique de la chaleur (1822). It says: the temperature at a point changes at a rate proportional to how much its surroundings, on average, are hotter or cooler than it is, which is the curvature of the temperature curve. ∂u/∂t = α ∂²u/∂x² A peak has negative curvature, so it cools; a dip has positive curvature, so it warms. Heat flows from hot to cold and the profile smooths out. The rod below is insulated at both ends, so the average temperature, the total heat, never changes, only its distribution. Fourier's great discovery (see the library's piece on the Fourier transform, 12/12) is that smooth wiggles of different sharpness die away at different rates: a wiggle five times sharper dies 25 times faster, because it decays like e−(n²π²)t. Interactive · Heat spreading along a rod Hot spot Half hot Gentle wave Sharp wave Time Time step, as a fraction of the stability limit Try the two waves at the same time. The gentle wave 1 + 0.8 cos(πx) has faded to 0.298 high at t = 0.1, matching the exact 0.8e−π²t. The sharp wave 1 + 0.8 cos(5πx) is gone almost at once, 25 times faster in the exponent. Then drag the time-step slider above 0.5 and watch the simulation explode: Euler's lesson again, now in a PDE. Real heat solvers (Heat Transfer, 34/16) must respect the same limit or use methods built to avoid it. What a graduate just sees A law about a rate is a direction at every point; a solution is a curve that follows those directions. First-order systems approach their target by a time constant: 63% in one τ, 99% in about 4.6 τ. Cooling, charging and decay are the same curve with different labels. A step-by-step simulation has a stability limit: too big a step creates growth that is not in the physics. Mass, spring and damper give three behaviours: ring, crawl, or the sweet spot at ζ = 1. Equilibria matter, and slope tells stable from unstable. Systems tip. Sharp features smooth out first in diffusion, and total heat is conserved. Where it shows up next Dynamics (34/12): every motion problem becomes an equation of the form above. Vibrations (34/17): the damped spring is the building block of everything that shakes, from engines to aircraft wings. Control Systems (34/20): a thermostat, cruise control or autopilot is a differential equation you shape with feedback; time constants and damping ratios are its vocabulary. Heat Transfer (34/16) and Fluid Mechanics (34/15): the heat equation and Navier–Stokes are PDEs; the stepping and stability ideas carry straight over. Computer science: physics engines in games, climate and weather models, and circuit simulators are loops of Euler-like steps; neural ODEs even treat a network as a flow. If you want to go deeper 📘 Textbook: William Boyce, Richard DiPrima and Douglas Meade, Elementary Differential Equations and Boundary Value Problems (12th ed., Wiley): the classic course text. 📘 Textbook: Steven Strogatz, Nonlinear Dynamics and Chaos (3rd ed., CRC Press): an unusually readable treatment of equilibria, stability and tipping. ▶️ Gentler: 3Blue1Brown's differential equations series, and Strogatz's Infinite Powers for the story of why calculus describes nature. 🌐 Free course: MIT OpenCourseWare 18.03SC Differential Equations, with video lectures, notes and problem sets. The takeaway Physics speaks in rates. A differential equation gives a direction at every point and a solution follows it. First-order systems approach a target with a time constant (63% in one τ). Second-order systems, from springs and masses, ring, crawl or sit at the sweet spot of critical damping. Equilibria are where change stops and slope tells stable from unstable. When no formula exists, you step along on a computer, but only small enough steps tell the truth: past a limit, a simulation blows up even though nature does not. Try this: take a hot drink and a thermometer (or just your hand) and note how long it takes to lose half its excess heat over the room. It will take about the same time again to lose half of what is left. That constant "half-life" is the time constant in disguise. Sources & Further Reading Sources. Euler's method: Institutionum calculi integralis, vol. 1 (1768); Encyclopedia of Mathematics, "Euler method". Newton's law of cooling originates in Newton's anonymous 1701 paper "Scala graduum caloris"; the modern differential form is not in the original (Wikipedia, "Newton's law of cooling", and history-of-science references). Fourier's Théorie analytique de la chaleur (1822). Millennium Prize problems announced by the Clay Mathematics Institute in 2000, Navier–Stokes among them. Computed in node: RC charging (τ = RC = 1 s for 10 kΩ and 100 µF, 63.2% at τ, 99.0% at 4.605τ); Euler at h = 0.5 gives 2.44 × 10−4 at t = 6 against the exact 2.48 × 10−3; spring closed-form solutions for the three regimes checked against a step-by-step integration (agreement to 5 decimals) and the first-swing overshoot e−πζ/√(1−ζ²) = 52.7% for ζ = 0.2; harvested logistic equilibria 50(1 ± √(1 − H/25)) = 27.64 and 72.36 for H = 20, with collapse after 4.3 years from a start of 25; the explicit heat scheme (100 cells, stable below 0.5) against the exact decay 0.8e−π²t = 0.2982 (numerical 0.2981) at t = 0.1. 🌐 MIT OpenCourseWare 18.03SC Differential Equations ▶️ 3Blue1Brown: differential equations 📘 Boyce, DiPrima and Meade, Elementary Differential Equations and Boundary Value Problems, 12th ed. (Wiley) 📘 Steven Strogatz, Nonlinear Dynamics and Chaos, 3rd ed. (CRC Press) 🌐 Newton's law of cooling (with the history of the law) Step 7. Waves and Optics: When Waves Add, Light Can Make Darkness ----------------------------------------------------------------- Why: Waves, interference and light: the bridge to quantum mechanics. Why noise-cancelling headphones work, why a lens can never see everything, why your sunglasses black out a phone screen, and why one photon at a time still draws a wave pattern. Tilt your head while looking at a phone through polarised sunglasses and the screen fades to black, then returns. Nothing was switched off. The light is still coming out of the glass; your lenses are simply refusing to let that particular kind of light through. A soap bubble does something stranger: it has no pigment at all, yet it shows swirling colours that change as the film thins. Noise-cancelling headphones are stranger still. They make silence by adding sound: a microphone listens to the noise, and the speaker plays the same wave upside down. Two sounds, added together, give nothing. All three are one idea. A physics graduate looks at them and sees the same thing: waves add up, crest on crest or crest on trough, and almost everything light and sound do follows from that. It is also the doorway to quantum mechanics, where particles turn out to obey the very same arithmetic. The course in one box Who takes it: physics majors, usually in year 2 (MIT teaches it as 8.03 Vibrations and Waves; Cambridge's Natural Sciences physics route covers the same ground). Engineers meet the maths again as electromagnetics and signals; some programmes add a separate optics course for photonics or optometry. What it's for: understanding anything that oscillates and travels: sound, light, radio, water, and, later, the wavefunction itself. Comes after: Physics I: Mechanics (34/06) and Differential Equations (34/03). Leads to: Quantum Mechanics (34/83), which is wave mechanics with a new meaning for the wave; Electromagnetics & Waves (34/38); Signals & Systems (34/37); Partial Differential Equations (34/79), where the wave equation is a headline act; and, from the series, Vibrations (34/17), which is the one-spring cousin of this subject. Honest line: you won't be able to design a lens system after this. You will see why interference makes dark bands, why a telescope's size sets what it can resolve, and why a single photon is already a wave problem. A wave is a pattern that travels Throw a stone in a pond and the ripple moves outward, but the water mostly just bobs up and down. What travels is the pattern. A wave is a disturbance handed from neighbour to neighbour; each bit of the medium moves a little and returns. Three numbers describe a steady wave: the wavelength λ (crest to crest), the frequency f (crests passing a point each second) and the speed v (how fast the pattern moves). They are tied by one line of arithmetic: in one second, f crests go by, each λ long. v = f · λspeed = frequency × wavelength The medium sets the speed; the source sets the frequency; the wavelength is whatever is left. Sound in air at 20 °C runs at about 343 m/s, so middle A (440 Hz) has a wavelength of 0.78 m. An FM station at 98 MHz rides on radio waves 3.06 m long. Wi-Fi at 2.4 GHz is 12.5 cm. Green light at 550 nm is about 545 trillion cycles per second. Here is the subtlety a graduate never forgets. When a wave crosses into a new medium, its frequency stays put (the source and the boundary insist on it, crest for crest) and its speed changes, so its wavelength changes. Light in glass of refractive index n = 1.5 travels at c/1.5 and its wavelength shrinks by the same factor: 550 nm green becomes 367 nm inside the glass, with no change of colour. Colour belongs to the frequency. Interactive · Frequency, wavelength, medium Sound in airLight in glassLight in water Frequency Sound: 20 Hz to 20 kHz at 343 m/s; the strip is 2 m wide. Light: the visible range, 400 to 790 THz, with c = 299 792 458 m/s (exact) and n = 1.5 for glass, 1.333 for water. The drawing is slowed enormously. For light, the top wave is the same light in vacuum: same frequency, longer wavelength. Waves add, so they can cancel Two waves in the same place don't collide; they superpose. At every point you add the two displacements. Where a crest meets a crest the total is double; where a crest meets a trough it is zero. This is the single most useful fact in the subject, and it is a statement about sums, which is why the maths (and later, quantum mechanics) leans on linearity. Take two sources side by side, each sending out circular ripples. A point is bright if its distances to the two sources differ by a whole number of wavelengths (the waves arrive in step), and dark if they differ by a half-integer number. That is the whole rule: path difference = m · λ → bright; (m + ½) · λ → darkm = 0, ±1, ±2, … Far from the sources, the bright directions satisfy d sin θ = mλ, where d is the spacing. Thomas Young showed in 1801 that light itself forms such bands from two slits, which was the decisive evidence that light is a wave. In the lab, light of 550 nm through slits 0.5 mm apart gives bands 2.2 mm apart on a screen 2 m away (λL/d), spacing you can measure with a ruler. A useful consequence: you can only get a bright direction if mλ/d is less than 1. If the sources are closer than one wavelength apart, there is only a single bright direction, straight ahead, and the pattern is just a ball of waves. Noise cancelling is the same arithmetic in time: add a wave to its inverted copy and the sum is zero. It works best for low, steady hums, where the wavelength is long enough that the speaker and your ear are in the same phase of the wave. Interactive · Two sources, seen from above Source spacing d Wavelength λ Pause Each pixel adds the two waves using its true distances to the sources. Orange and blue are positive and negative displacement; the dark lines that don't move are where the waves always cancel. The graph below shows the average brightness far away, cos²(π d sin θ / λ). Try d smaller than λ. Light bends because it is quickest: Snell and Fermat Light slows down in glass, water and diamond. The ratio of its speed in vacuum to its speed in the material is the refractive index n: about 1.0003 for air, 1.33 for water, 1.5 for common glass, 2.42 for diamond. When a ray crosses from one to another at a slant, it bends. Snell's law gives the angles (measured from the line perpendicular to the surface): n1 sin θ1 = n2 sin θ2Snell's law Why does it bend? Pierre de Fermat's answer (1662) is the one that lasts: of all possible paths from A to B, light takes the one that needs the least time. (Strictly, a path of stationary time: usually a minimum.) Picture a lifeguard who can run fast on sand and swim slowly. The quickest route to a swimmer isn't the straight line; it bends at the shoreline to spend less time in the slow water. That bend is Snell's law. Fermat's idea is also a first glimpse of the principle that organises Classical Mechanics (34/82): nature finds a path that is stationary. Fermat explains lenses with no extra rules. A lens is shaped so that every path from a point to its image takes exactly the same time. For a thin lens with focal length f, an object at distance u makes an image at distance v where 1/f = 1/u + 1/v. Worked number: a 50 mm lens focused on something 2 m away puts the image 51.3 mm behind the lens, and the image is 0.026 times the object's size, upside down. Focusing a camera is moving the lens 1.3 mm. Going the other way matters too. From glass to air, Snell's law runs out of angle: when n1 sin θ1 would exceed n2, there is no refracted ray. This total internal reflection sets in beyond a critical angle of 41.8° for glass to air and 48.6° for water to air. It is how optical fibres trap light, and why a diamond sparkles. Interactive · Find the quickest path Air → glassAir → waterGlass → airAir → diamond Where the ray crosses the surface Target's sideways distance Snap to the quickest path Source 1 m above the surface, target 1 m below. Times are exact sums of distance ÷ speed, with c = 0.29979 m/ns. At the minimum, n₁ sin θ₁ = n₂ sin θ₂ to within the slider's step. Every opening blurs: diffraction and the limit of resolution Waves bend around corners and spread through gaps. Make the opening about as small as the wavelength and a wave leaves it as a spreading ripple. Make it large and the wave mostly carries straight on, but the edges still blur it. That spreading is diffraction, and it is the same adding-up of waves, now from every point across the opening. For a round opening (a telescope mirror, a camera lens, the pupil of your eye) a point of light does not make a point on the image. It makes a bright disc surrounded by faint rings: the Airy pattern. The first dark ring sits at an angle that depends only on the ratio of wavelength to opening: θmin ≈ 1.22 · λ / Dsmallest angle you can tell apart (Rayleigh criterion), in radians Two points closer together than that blur into one. Lord Rayleigh's rule of thumb says two equal points are "just resolved" when the centre of one falls on the first dark ring of the other; between the two peaks the combined brightness then dips to 73.5% of the peak, a 26% dip. Worked numbers for green light, computed live below: a pupil 3 mm wide cannot separate things less than 46 arcseconds apart, so two car headlights 1.5 m apart merge at about 6.7 km (real eyes do worse, because the retina and the eye's flaws add their own blur). The Hubble Space Telescope's 2.4 m mirror reaches about 0.058 arcseconds. A phone camera's few-millimetre lens is limited to about 28 arcseconds by diffraction alone. The lesson is that resolution is bought with width, not magnification. Enlarging a blurred image only enlarges the blur. That is why astronomers want 10 m mirrors, why radio telescopes are linked across continents, and why a microscope can never see an atom with visible light (atoms are far smaller than the wavelength). Interactive · Can the lens tell them apart? Eye, headlights 3.4 kmEye, headlights 11 kmHubble, Rayleigh limitPhone camera Opening width D Separation of the two points Green light, 550 nm. Brightness is the exact Airy pattern (2J₁(x)/x)² for each point, added (the two points are separate lamps, so their intensities add). The slider is in units of the Rayleigh angle; the readout converts it into arcseconds and into 1.5 m headlights at a distance. Light is a transverse wave: polarisation Sound waves push and pull along their direction of travel. Light's wave is a sideways wobble of the electric field, perpendicular to the direction it travels, and the wobble can lie along any direction in that sideways plane. Light with the wobble mostly along one line is polarised. Reflected glare off water and roads is partly polarised, which is why polarising sunglasses cut it, and why your phone (an LCD that sends polarised light) goes dark at the wrong angle. A polarising filter lets through only the component of the wobble along its axis. If the light is already polarised at angle θ to the filter's axis, the fraction of intensity that gets through is cos²θ: Malus's law, from 1809. Unpolarised light (every angle at once) loses half on its first filter and comes out polarised along that filter's axis. I = I0 cos² θMalus's law Now the surprise. Cross two filters (axes 90° apart) and no light gets through: cos²90° = 0. Slide a third filter between them, at 45°, and light appears: after the first filter the intensity is ½, after the 45° one it is ½ × cos²45° = ¼, and after the last, ¼ × cos²45° = ⅛, which is 12.5% of the original beam. Adding an obstacle let more light through, because the middle filter re-aims the wobble. This is the classical twin of a famous quantum result about spin measured in different directions, which is the reason it is in this course. Interactive · Three filters Crossed, with a 45° filterCrossed pair onlyNearly aligned First filter angle Middle filter angle Last filter angle Middle filter inMiddle filter out Ideal filters. The first filter turns unpolarised light into polarised light (losing half); each later filter multiplies by cos² of the angle between neighbouring axes. The bridge to quantum mechanics: one photon at a time Light is a wave: that was settled by interference in the early 1800s and by Maxwell's equations in the 1860s. But light is also detected in lumps. A sensitive enough camera records single dots, one photon each. So what happens if you turn the lamp down until only one photon is in the apparatus at a time? Each photon lands as a single dot, in a place that looks random. But dot by dot, the pattern builds up, and it is the interference pattern: bright bands where the wave's intensity is high, nothing where it cancels. Each photon, alone, behaves as if it went through both slits. Close one slit and the bands vanish, leaving the broad smear of a single slit. The wave doesn't say where the photon lands; it says how likely each place is. The same thing happens with electrons: Akira Tonomura's team at Hitachi published a film of the pattern building up electron by electron in 1989 (the Merli–Missiroli–Pozzi group in Bologna had done a single-electron experiment earlier, in 1974). It happens with atoms, and with large molecules. Quantum mechanics (34/83) says this is not a puzzle to be explained away but the rule: a particle comes with a wave, and the wave's squared size is the probability of finding it. What the wave is is still argued about; Quantum Mechanics and 13/06 take that up. Interactive · Fire photons one at a time Both slits openOne slit open +1+10+100+1000Reset Helium-neon laser light (633 nm), slits 0.25 mm apart and 0.06 mm wide, screen 1 m away: bands 2.5 mm apart under a broad envelope with its first zero at ±10.6 mm. Each dot is drawn at random from the exact wave intensity; the line is the prediction. Illustrative parameters, real physics. What a graduate just sees A wave is a travelling pattern; speed = frequency × wavelength, and in a new medium the frequency stays and the wavelength changes. Waves add. Equal path lengths (or whole wavelengths) mean bright; half a wavelength off means dark. Interference needs sources closer together than the pattern you want to see: d sin θ = mλ, so small spacing spreads the pattern wide. Light goes the quickest way, so it bends toward the normal when it slows down; a lens is a shape that makes all paths equally quick. Past the critical angle, light cannot leave the denser material at all. Resolution is set by wavelength divided by opening: bigger apertures, not more zoom, show finer detail. Light is a transverse wave, and a filter in the middle can create light that two filters would have blocked. One photon at a time still builds the interference pattern, which is where classical waves end and quantum mechanics begins. Where it shows up next Quantum Mechanics (34/83): the Schrödinger equation is a wave equation; standing waves in a box give discrete energies, just as a guitar string gives discrete notes. Electromagnetics & Waves (34/38) and Signals & Systems (34/37): the same wave equation for Wi-Fi, fibres and antennas; superposition is the reason Fourier analysis (see 12/12) works. Partial Differential Equations (34/79): the wave equation is one of the three classic PDEs, with the heat and Laplace equations. Technologies: lenses and cameras, fibre-optic internet, LCD and OLED screens (see 29/10), lasers, holography, anti-reflection coatings (built from thin-film interference), ultrasound scanners, radar, and gravitational-wave detectors like LIGO, which are interferometers. Astrophysics (34/88): everything we know about stars is a spectrum or a resolved image. If you want to go deeper 📘 Textbook: A. P. French, Vibrations and Waves (MIT Introductory Physics Series): short, clear, and the old standard for the second-year wave course. For optics, Eugene Hecht, Optics (Pearson, 5th edition), the most widely assigned undergraduate optics text. 📘 Gentler: The Feynman Lectures on Physics, Vol. I, chapters 28–33 (waves, interference, diffraction, refraction) and Vol. III, chapter 1 (quantum behaviour, the double slit), free online. Or this library's Waves and Sound (13/13) and Light and Color (13/09). ▶️ Free course: MIT OpenCourseWare 8.03SC Physics III: Vibrations and Waves (Fall 2016), with lecture videos and problem sets. 🌐 Easier first reads in this library: Waves and Sound (13/13), Light and Color (13/09), Quantum Mechanics: The Weirdness at the Bottom (13/06), and in this series Vibrations (34/17) and Electromagnetics & Waves (34/38). The takeaway Waves are patterns that travel, with v = fλ, and waves add: that one rule makes bright and dark bands, noise cancelling, and every blurry edge. Light takes the quickest path, which bends it and makes lenses; the width of an opening, measured in wavelengths, sets the finest detail it can show; and light is a transverse wave that filters can sort. Send photons one at a time and the same pattern emerges dot by dot, which is where waves hand over to quantum mechanics. Try this: hold two pencils close together and look at a bright lamp through the narrow gap between them, squeezing the gap until it nearly closes. You will see dark bands appear inside the gap: that is diffraction, and the bands spread out as the gap narrows. Then take polarised sunglasses (or a pair of lenses) and look at a phone screen while you turn them. Sources & Further Reading Sources. Wave arithmetic, Snell's law, Fermat's principle, Rayleigh's criterion (1.21967 λ/D, from the first zero of J₁ at 3.8317) and Malus's law are standard textbook material (French; Hecht; Feynman Lectures I). Constants: c = 299 792 458 m/s is exact by definition of the metre (since 1983). Young's two-slit experiment: 1801, reported to the Royal Society in 1802–1803. Single-electron build-up: A. Tonomura, J. Endo, T. Matsuda, T. Kawasaki and H. Ezawa, "Demonstration of single-electron buildup of an interference pattern", American Journal of Physics 57, 117 (1989); Merli, Missiroli and Pozzi's earlier single-electron work (1974) is credited in Physics World, "The double-slit experiment". Textbook editions: Pearson's page for Hecht's Optics, 5th edition. Computed in node: the Airy dip at Rayleigh separation (73.5% of peak), all resolution distances, the thin-lens image distance, critical angles, and the Fermat minimum (checked against Snell's law). 🌐 MIT OpenCourseWare 8.03SC Physics III: Vibrations and Waves 🌐 Physics World: The double-slit experiment 📘 French, Vibrations and Waves · Hecht, Optics · The Feynman Lectures on Physics Step 8. Special Relativity: Everyone Gets the Same Speed of Light ----------------------------------------------------------------- Why: Space and time are one thing, and light's speed is the same for everyone. Why your phone's map needs Einstein, why cosmic-ray muons reach the ground, and how a single odd fact about light stretches clocks, shrinks rulers and turns mass into energy. The satellites that tell your phone where it is carry atomic clocks, and those clocks run at the wrong rate. Seen from the ground, they tick about 38 microseconds per day too fast: roughly 7 microseconds slower because they are moving, and roughly 46 faster because they sit higher in Earth's gravity. Left uncorrected, your position would drift by around ten kilometres a day. The engineers fix it by building the correction into the clocks' design and software. Here is a quieter proof. High in the atmosphere, cosmic rays crash into air molecules and make muons, particles that fall apart in about 2.2 millionths of a second on average. Even at nearly the speed of light, that should let a muon travel only about 660 metres. Yet muons made 15 kilometres up reach sea level in huge numbers. Their short lives are stretched because they are moving. Special relativity is the theory behind both. It starts from one fact that sounds harmless, and follows it with mathematics that never once breaks. A physics graduate comes out of this course able to feel the consequences in their bones: time, length and simultaneity are not what they seemed, and the thing everybody does agree on is a different quantity altogether. The course in one box Who takes it: physics majors, usually in year 2 or 3 (MIT's 8.033 Relativity sits after Vibrations and Waves; Cambridge Natural Sciences covers it in its physics course). Every first-year Physics sequence also teaches a short version; engineers meet its results in particle accelerators, GPS and radiation. What it's for: working out what happens when speeds approach that of light, and understanding why the laws of electromagnetism are what they are. Comes after: Physics I: Mechanics (34/06) and Linear Algebra (34/04), because the Lorentz transformation is a matrix. Leads to: General Relativity (34/85), where gravity bends spacetime, using Differential Geometry (34/77); Particle & Nuclear Physics (34/86), where E = mc² is daily bread; and the relativistic side of Electromagnetics & Waves (34/38). Quantum Mechanics (34/83) meets it again in the Dirac equation. Honest line: you won't be able to solve a general-relativity problem after this, or design a collider. You will be able to say how much slower a clock runs at 0.9 c, why two events can be in a different order for two observers, and what E = mc² does and doesn't say. Two rules and a flashlight on a train Special relativity rests on two postulates. First: the laws of physics are the same for everyone moving at a steady speed. (Drop a ball on a smooth-flying aeroplane and it falls just as it does on the ground; nothing inside tells you that you are moving.) Galileo understood that in 1632. Second, the new one: light travels at the same speed, c, for every observer, no matter how the source or the observer moves. The speed is 299 792 458 m/s, exactly, because since 1983 the metre has been defined from it. The second rule collides with common sense. If you throw a ball forward at 20 m/s from a train going 30 m/s, the ground sees 50. But flash a torch forward on a train going nearly at c, and the ground still sees light at c, not 2c. The old rule of adding speeds must be only a good approximation. The exact rule, from the new postulates, is: w = (u + v) / (1 + uv/c²)speed seen from the ground = (speed on the train + speed of the train) ÷ (1 + their product ÷ c²) At everyday speeds uv/c² is vanishingly small and you get u + v back. At high speeds the denominator holds the total below c. Two spaceships each going 0.9 c towards the ground, one launching from the other, do not reach 1.8 c; the result is 0.9945 c. And if u is c, then w = c, whatever v is. The postulate was not pulled from nowhere. In 1887 in Cleveland, Albert Michelson and Edward Morley compared light travelling along two perpendicular arms of an interferometer, hoping to detect Earth's motion through the supposed ether that carried light. They found essentially nothing. Whether Einstein had that result in mind in 1905 is disputed by historians; he gave different accounts later. What is not disputed is that Hendrik Lorentz and Henri Poincaré had much of the mathematics before him, and that Einstein's contribution was to see it as a fact about space and time themselves, with no ether needed. Interactive · Adding velocities 0.5 c + 0.5 c0.9 c + 0.9 cTorch beam on a 0.9 c train Speed on the train (u) Speed of the train (v) Exact relativistic velocity addition, computed live. The line marks c. The old sum (grey) crosses it; the correct one never does. Moving clocks run slow Take the simplest clock imaginable: a pulse of light bouncing between two mirrors, one tick per round trip. Now watch it fly past you sideways. In its own frame the light goes straight up and down. In your frame, because the clock moves while the light is in flight, the light zig-zags along a longer, diagonal path. But it must still go at c. A longer path at the same speed takes more time, so each tick lasts longer for you than for the people riding with the clock. Moving clocks run slow. The size of the effect follows from Pythagoras applied to that triangle. It is captured by a single factor, which appears in nearly every formula in the subject: γ = 1 / √(1 − v²/c²)the Lorentz factor; a moving clock ticks γ times more slowly than yours Some values: at 0.1 c, γ = 1.005; at 0.5 c, 1.155; at 0.9 c, 2.29; at 0.99 c, 7.09; at 0.999 c, 22.4. It is close to 1 for anything in daily life, which is why we never see it. Aeroplanes cross oceans with their clocks off by nanoseconds. And the muons: take a typical cosmic muon at 0.995 c, so γ = 10.0, created 15 km up (an illustrative height). It needs 50 microseconds in our frame to reach the ground, which is 22.9 of its average lifetimes of 2.197 µs. The chance of surviving that without time dilation is e−22.9, about one in nine billion. With dilation, only 2.29 lifetimes pass in the muon's own time, and about 10% survive. The 1941 experiment by Bruno Rossi and David Hall on Mount Washington counted the extra muons, and it is the famous one, though the authors presented it in qualitative terms; Frisch and Smith's 1963 measurement is usually credited with the clean confirmation. It is not a trick of the muon. Atomic clocks flown around the world on airliners (Hafele and Keating, 1971) and the clocks in every GPS satellite show the same thing. Everything about the moving thing runs slow, including its biology, if it had any. Interactive · The light clock 0.5 c0.9 c0.995 c (muon) Speed of the clock Two light pulses leave together; the straight one is the clock's own tick, the slanted one is what you see. Vertical gap drawn smaller at high speed so the triangle fits; the proportions are exact. Simultaneity depends on who is looking The next consequence is stranger. Two events that happen at the same moment for you may happen one after the other for someone moving relative to you. Picture lightning striking both ends of a moving train at once, as judged from the platform. A passenger in the middle, moving towards one flash and away from the other, sees the light from the front flash first: it has less distance to cover and she is running into it. Since light has the same speed for her, she concludes that the front strike happened first. Neither is wrong. The arithmetic is the Lorentz transformation. For two events separated by a distance Δx and a time Δt, an observer moving at v finds a time separation Δt′ = γ(Δt − vΔx/c²) and a distance Δx′ = γ(Δx − vΔt). Worked: two flashes 3 light-seconds apart, simultaneous for you; for an observer moving at 0.6 c (γ = 1.25), they are 2.25 seconds apart, with the order reversed if she runs the other way. The same transformation shrinks lengths. A rod measured while it moves along its length is shorter than when at rest, by the same factor γ: a 100 m spaceship at 0.8 c measures 60 m for you, and at 0.99 c only 14 m. It is not that the ship is squashed on its own terms; it is that "its length" requires marking both ends at the same instant, and simultaneity is what moved. You cannot rescue common sense by clever tricks, but there is a limit on how bad things get. Events that could be linked by a signal at c or slower, such as one causing the other, keep their order for everyone. Events too far apart for light to connect (a "spacelike" separation) can swap order for some observers, but they can never influence each other. The speed of light is not an engineering limit; it is the thing that keeps cause ahead of effect. Interactive · A spacetime diagram Two flashes, same momentCause and effectLight signal Distance between events (Δx) Time between events (Δt) Observer's speed (v) Axes: distance in light-seconds across, time in seconds up, so light rays are the 45° lines. Orange: the moving observer's axes; dashed lines are her "same moment" lines through each event. Event A is at the origin. Proper time: the clock you carry If time and distance both change with viewpoint, what is real? There is a combination that all observers agree on. For two events, the squared interval is c²Δt² − Δx² (the time part minus the space part). It is the same number whichever frame you compute it in, which the diagram above shows in its readout. For a clock moving along a path, the sum of intervals along its route is the time it actually records: its proper time. Δτ = Δt / γproper time on a moving clock = time in your frame ÷ the Lorentz factor This is the cure for the famous twin "paradox". One twin stays; the other rockets to a star and returns. Each sees the other's clock run slow, so who is younger? The answer is the traveller, because only the traveller accelerated: she turned around, changing frames, so the situation is not symmetric. Compare paths, and the one that stays in a single frame covers the longest proper time. The numbers can be dramatic: to a star 4.25 light-years away at 0.99 c, one leg takes 4.29 years on Earth's clocks and 0.61 years on the ship's. Go fast enough (γ = 1000) and you reach the centre of the galaxy in 26 years of ship time, while about 26,000 years pass at home. Do not read this as a way to cheat death for free. The ship's journey needs energy, which is the next section's subject. Interactive · One-way trip planner Nearest star, 0.99 cGalactic centre, γ = 1000Andromeda, γ = 10 000 Distance Lorentz factor γ Constant speed, acceleration ignored. Earth time = D/v, ship time = D/(γv). Distances are rounded: nearest star about 4.25 ly, galactic centre about 26 000 ly, Andromeda about 2.5 million ly. Energy per kilogram is the kinetic energy (γ − 1)c². Energy, momentum and E = mc² Push on something and it speeds up, but never past c. Where does the extra effort go? Into energy, and the theory's accounting says energy has weight. Momentum is p = γmv and the total energy of a moving object is E = γmc². Stand still (γ = 1) and an object still has E = mc²: rest energy. The kinetic energy is the rest of it, (γ − 1)mc². The tidy relation tying them is: E² = (pc)² + (mc²)²total energy squared = (momentum × c) squared + (rest energy) squared For small speeds it reduces to Newton's ½mv² plus the constant mc². For light itself, which has no mass, E = pc. Rest energy is huge: 1 kg corresponds to c² = 9.0 × 10¹⁶ joules, about 21 megatons of TNT. That is why a nuclear reaction that converts even a tenth of a percent of mass releases so much energy. The Sun converts about 4.26 million tonnes of mass into light every second (its luminosity 3.828 × 10²⁶ W, divided by c²). The slider below pushes an electron or proton with a given amount of kinetic energy. Newton says that a 1 MeV electron should travel at nearly twice the speed of light; in fact it reaches 0.941 c. To get to 0.999 c needs about 10 MeV; 1 GeV gives 0.99999987 c. In the Large Hadron Collider, each proton carries 6.8 TeV (since 2022) and has γ = 7247. It travels only about 3 metres per second slower than light. Almost all the extra energy goes into γ, not into speed. Interactive · Pushing a particle ElectronProton TV tube, 25 keV1 MeV electronProton at the LHC, 6.8 TeV Kinetic energy Electron rest energy 0.51099895 MeV, proton 938.27209 MeV (CODATA 2018). Solid line: relativistic speed; dashed: Newton's ½mv². The orange dots mark your setting on each. What a graduate just sees Light has the same speed for every observer, so speeds don't add the old way: w = (u+v)/(1+uv/c²). A moving clock ticks γ times slower; γ is 1.005 at 0.1 c, 2.3 at 0.9 c, and 22 at 0.999 c. Two events that are simultaneous for you needn't be for someone moving; the order of unrelated events is a matter of viewpoint. Cause always precedes effect for everyone, because nothing carries a signal faster than light. What everybody agrees on is the interval c²Δt² − Δx², and a clock's own (proper) time. The twin who turns around is the younger one: acceleration breaks the symmetry. E = mc² says rest mass is a store of energy; as speed climbs, the energy goes into γ, not into going faster. At everyday speeds all of this vanishes into Newton, which is why Newton was right for 200 years. Where it shows up next General Relativity (34/85): drop the restriction to steady motion and gravity becomes the curvature of the spacetime you have just met; the muon and GPS stories both carry a gravity half. Particle & Nuclear Physics (34/86): collisions are computed with four-vectors, mass is the invariant, and every particle-decay lifetime in the tables is a proper time. Electromagnetics & Waves (34/38): magnetism is what electricity looks like from a moving frame; Maxwell's equations were already relativistic before relativity. Quantum Mechanics (34/83) and the Standard Model (13/07): Dirac combined the two in 1928 and predicted antimatter. The real world: GPS and other satellite navigation, PET scanners (matter-antimatter annihilation), synchrotrons, and electron microscopes, whose beams need relativistic corrections at 100 kV and more. If you want to go deeper 📘 Textbook: Edwin Taylor and John Archibald Wheeler, Spacetime Physics (2nd edition, W. H. Freeman, 1992): built around the invariant interval, and free to download from the authors' site. David Morin's Special Relativity for the Enthusiastic Beginner is a friendly, problem-rich alternative. 📘 Gentler: The Feynman Lectures on Physics, Vol. I, chapters 15–17 (relativity, space-time, and relativistic dynamics), free online. Or this library's Why Time Is Weirder Than You Think (13/03). ▶️ Free course: MIT OpenCourseWare 8.033 Relativity (Fall 2006). 🌐 Easier first reads in this library: Why Time Is Weirder Than You Think (13/03) and The Big Bang and Our Expanding Universe (13/08); in this series Electromagnetics & Waves (34/38). The takeaway Make the speed of light the same for everyone, and everything else bends to fit: moving clocks run slow by γ, moving rods shrink by γ, simultaneity depends on the observer, and energy and mass are two faces of one thing. What stays fixed is the interval, the clock you carry, and the order of cause and effect. At daily speeds γ is so close to 1 that Newton was enough; near c, nothing works without it. Try this: next time your phone shows your blue dot on a map, remember there are clocks overhead being corrected by 38 microseconds a day, and that without the correction the dot would wander off by kilometres. Then compute γ for a jet at 250 m/s: it is 1 + 3.5 × 10⁻¹³, which is why nobody ever noticed. Sources & Further Reading Sources. Lorentz transformation, velocity addition, E² = (pc)² + (mc²)² and the twin analysis are standard textbook material (Taylor and Wheeler; Feynman Lectures I). c = 299 792 458 m/s: exact since the 1983 definition of the metre. Michelson and Morley, "On the relative motion of the Earth and the luminiferous ether", American Journal of Science (1887); historians disagree on how much it influenced Einstein, whose paper "Zur Elektrodynamik bewegter Körper" appeared in Annalen der Physik in 1905. Muon experiments: Rossi and Hall, Physical Review 59 (1941); Frisch and Smith, American Journal of Physics 31 (1963) (see Wikipedia, "Experimental testing of time dilation"). Muon mean lifetime 2.197 µs (Particle Data Group). GPS: N. Ashby, "Relativity in the Global Positioning System", Living Reviews in Relativity 6 (2003), 1; we recomputed the orbit effects in node: about −7.2 µs/day for orbital speed and +45.7 µs/day from gravity, a net of about +38 µs/day, in line with the usual figure. Proton energy at the LHC: CERN, Run 3 (6.8 TeV per beam, since 2022). Solar luminosity: IAU 2015 nominal value. CODATA 2018 for particle masses. Computed in node: every γ, the muon survival fractions, trip times, the 2.25 s simultaneity shift, and all slider values. 🌐 Taylor and Wheeler, Spacetime Physics, 2nd edition (authors' site) 🌐 MIT OpenCourseWare 8.033 Relativity 🌐 Experimental testing of time dilation (overview of the muon and clock tests) Step 9. Classical Mechanics: Let Energy Write the Equations ----------------------------------------------------------- Why: Mechanics rebuilt from energy: Lagrange, Hamilton, symmetry and chaos. Why the path a ball takes is the one that makes a certain number stationary, why every symmetry hides a conserved quantity, and why a pendulum with one extra joint can never be predicted. A pendulum clock can keep time for years. Add a second joint to the pendulum, which is all a desk-toy "double pendulum" is, and it never repeats itself. Start it twice from positions that differ by the width of an atom and, within seconds, the two swings look nothing alike. The laws are the same Newton wrote down in 1687. Nothing is random in the toy. And yet you cannot predict it. That strange gap between "fully determined" and "impossible to forecast" is one of the things a classical mechanics course leaves you seeing everywhere. The other is a different way of writing Newton's laws, in which you don't track forces at all. You write down one quantity, kinetic energy minus potential energy, and the motion falls out. It is the same physics, but it works for a bead on a spinning hoop, for a robot arm, for a planet, and for the equations of quantum mechanics. This is the second time around for mechanics: Physics I (34/06) taught you forces and vectors; this course rebuilds the subject from energy and symmetry, which is the form physicists actually use afterwards. The course in one box Who takes it: physics majors, usually in year 2 or 3; mathematics and some aerospace and robotics students take it too. Programmes differ: MIT teaches a short version as 8.223 Classical Mechanics II and a graduate course as 8.09; Cambridge's physics route covers the same ideas in its mechanics papers. What it's for: setting up and understanding the motion of any system with a few parts, in the language that carries over to quantum mechanics and field theory. Comes after: Physics I: Mechanics (34/06), Multivariable Calculus (34/02) and Differential Equations (34/03). Leads to: Quantum Mechanics (34/83), where the Hamiltonian becomes an operator; Statistical Mechanics (34/84), which counts states in phase space; General Relativity (34/85), where free fall is again a stationary path; and Astrophysics & Cosmology (34/88). The engineering cousins are Dynamics (34/12) and Vibrations (34/17). Honest line: you won't be able to derive the equations of a six-jointed robot arm after this. You will see why a conserved quantity appears whenever there is a symmetry, why trajectories are curves in a phase-space picture, and what chaos is and isn't. Pick the coordinates that fit, then write T − V Newton's method says: find every force on every piece, add them as vectors, write F = ma for each. For a bead sliding on a wire, or a pendulum held by a rod, that is wasteful. The rod's tension is a force you don't care about; it only exists to keep the bob on a circle. The new method skips constraint forces. First pick the fewest numbers that describe the system's configuration: its generalised coordinates. A pendulum bob has two ordinary coordinates (x and y) but only one that can change, the angle θ. Then write one function, the Lagrangian: kinetic energy minus potential energy, in those coordinates. L = T − Vthe Lagrangian = kinetic energy − potential energy d/dt (∂L/∂q̇) = ∂L/∂qEuler–Lagrange equation: one for each coordinate q The second line is a recipe. It says "the rate of change of the momentum belonging to q equals the force along q". For a pendulum of length l: T = ½ml²θ̇², V = −mgl cos θ, so L = ½ml²θ̇² + mgl cos θ, and the recipe gives θ̈ = −(g/l) sin θ. No tension, no vectors. For small angles sin θ ≈ θ and you get the swing of period 2π√(l/g): 2.006 s for a 1 m pendulum. The method was built over about a century: Euler and Lagrange (whose Mécanique analytique appeared in 1788) made it precise, and William Rowan Hamilton recast it in the 1830s. Its power is that nothing in it depends on Cartesian axes. A graduate picks the coordinates that make the problem easy, whether angles, distances along a wire or the amplitudes of a vibrating plate. Nature takes the path of stationary action Where does the Euler–Lagrange recipe come from? Consider every path a particle could take between two points in a fixed time. For each one, add up L along the way. The total is the action, S = ∫L dt. The real path is the one for which S is stationary: change the path a little and S changes only at second order, the way the bottom of a bowl is flat. δS = 0the true path leaves the action unchanged to first order This is the same idea as Fermat's principle for light (see Waves & Optics, 34/80): the real path is picked out from all possible ones by a single global rule. Mechanics got there first; the older name, "least action", is a little too strong because in general the path is only stationary, and over long times it can be a saddle rather than a minimum. Try it with a ball of mass 1 kg thrown up and caught after 2 seconds. The true path is the parabola reaching 4.9 m. Its action is −32.08 J·s. Add a smooth 1 m bump to that path (still starting and ending at the same points) and the action rises by π²/8 = 1.23 J·s. Add the same bump but with a full wiggle, a second harmonic, and it rises by π²/2 = 4.93 J·s. Bumps up or down both raise it: the parabola sits at the bottom of the bowl. It is no accident that this ties back to waves. In Richard Feynman's formulation of quantum mechanics (1948), a particle tries all paths, each with a phase set by S/ħ. Away from the stationary path the phases scramble and cancel; near it they add. The classical path is where the quantum waves agree. Interactive · Bend the path, watch the action Smooth bump Extra wiggle Back to the true path A 1 kg ball, g = 9.81 m/s², thrown from the ground and caught after 2 s. The action ∫(½mv² − mgx) dt is integrated numerically along the bent path (Simpson's rule, 2000 steps) and agrees with the exact result π²ε₁²/8 + π²ε₂²/2 above the true value. Every symmetry hides a conserved quantity Some quantities never change in an isolated system: energy, momentum, angular momentum. In Newton's physics these look like three lucky accidents. In 1918 Emmy Noether (at Göttingen, in work done for Hilbert and Klein's questions about general relativity) proved that they are not accidents. Each is the shadow of a symmetry of the Lagrangian: If the physics doesn't change when you……this is conserved shift the clock (time symmetry)energy slide everything along an axismomentum along it rotate everything about an axisangular momentum about it Planets illustrate the third row. The Sun's pull depends only on distance, so the problem looks the same from every direction: rotation symmetry, so angular momentum is conserved, and that is Kepler's second law (a planet sweeps equal areas in equal times). Throw a ball near the ground and gravity points one way: the horizontal sliding symmetry survives, so horizontal momentum is conserved, but not vertical momentum and not angular momentum about any point. Break a symmetry and the quantity is lost. The theorem extends. Gauge symmetry in electromagnetism gives conservation of electric charge; in particle physics, the Standard Model is built by demanding symmetries and reading off the forces. Interactive · Which quantities survive? Central pullUniform gravityPull that pulsesSquashed bowl A unit mass starting at (1, 0) with velocity (0, 0.8), integrated for 14 time units with a fourth-order Runge–Kutta step of 0.002. Central pull: V = −1/r. Gravity: V = 0.4 y. Pulsing pull: V = −(1 + 0.4 sin 2t)/r, so time symmetry is broken. Squashed bowl: V = ½x² + y², stiffer one way, which breaks rotation symmetry. "Changes" means a range above one millionth. Phase space: the whole future in one picture Newton's second law needs a position and a velocity to start. The two together fix the future. Hamilton's version makes this a picture: draw position q on one axis and momentum p on the other. Every state of the system is one point, and the motion is a curve through phase space which never crosses itself. Two systems can never be in the same state and go different ways. For a pendulum of mass m and length l, in units where g/l = 1 and ml² = 1, the total energy is H = ½p² + (1 − cos θ). Hamilton's equations say θ̇ = ∂H/∂p and ṗ = −∂H/∂θ. Each curve of constant energy is a possible motion: Low energy (H below 2): closed loops, the pendulum swings back and forth. Energy exactly 2: the knife-edge curve (the separatrix), which just reaches the upright position in infinite time. High energy (above 2): the pendulum goes right over the top and keeps spinning. Phase space also explains why a "simple" pendulum isn't quite simple. Its swing time depends on how far it swings. Compared with the small-angle period 2π√(l/g): 1.002 at 10°, 1.017 at 30°, 1.073 at 60°, 1.180 at 90°, 1.373 at 120°, 1.762 at 150° and 2.439 at 170°. A pendulum clock is accurate only because its swing is kept small. A theorem of Liouville says the flow in phase space preserves area; counting states by phase-space area is how Statistical Mechanics (34/84) begins. Interactive · Phase-space portrait of a pendulum Small swingBig swingAlmost uprightSpinning Starting angle Starting momentum Exact pendulum equation θ̈ = −sin θ, integrated by RK4 (step 0.01); time unit is √(l/g), so one small swing takes 2π units (2.006 s for l = 1 m). Grey loops: contours of constant energy. Orange line (dashed): the separatrix. Chaos: deterministic does not mean predictable For the single pendulum, phase space is two-dimensional and the motion is orderly. The double pendulum has four dimensions (two angles, two momenta) and almost no tidy loops. Nearby starting points do not stay nearby: the gap between two trajectories grows roughly like eλt for some rate λ, the Lyapunov exponent. That is the meaning of chaos in this subject: sensitive dependence on initial conditions. The consequence is a clean fact about prediction. If your measurement is wrong by δ, the forecast is useful until the error has grown to the size you care about, which takes about (1/λ) ln(size/δ). Make the measurement a thousand times better and you gain only (1/λ) ln 1000 more seconds. In the simulator below, starting two copies of the same pendulum 0.001 rad apart gives a visible split after about 6 seconds; a million times closer buys only about 7 more seconds. Predictions don't fail from bad arithmetic, but from the gap between the world and any finite number of digits. Chaos was found in celestial mechanics first. Henri Poincaré, studying the three-body problem in the late 1880s, saw that its trajectories could be hopelessly tangled. Edward Lorenz found the same sensitivity in a weather model in 1963. The inner solar system is itself weakly chaotic: its Lyapunov time is about 5 million years (Laskar, 1989), which is why detailed predictions of the planets' positions fade out beyond some tens of millions of years, even though the system stays statistically stable far longer. Small angles stay orderly: the 10° preset below never splits. Interactive · Two pendulums, almost the same Small angles (10°, 10°)Big swing (120°, −10°)Same, a million times closer Upper arm, start angle Lower arm, start angle Difference between the two copies Two equal masses on two 1 m rods, g = 9.81 m/s², at rest at the start, integrated for 20 s by RK4 with a 2 ms step; the total energy typically stays constant to better than a part in a million (the readout reports it). Blue and orange differ only in the upper angle by the amount shown. The graph is the distance between the lower bobs, from 10⁻¹⁰ m to 10 m. Every valley is a spring One more trick, and it is the one engineers lean on every day. Near the bottom of any smooth potential-energy valley, the curve looks like a parabola, V ≈ V₀ + ½k(x − x₀)², where k is the curvature at the bottom. A parabola is a spring. So any system disturbed slightly from a stable equilibrium oscillates at ω = √(k/m), the same equation as in Vibrations (34/17). A chain of atoms, a bridge, a molecule and a skyscraper all become coupled springs. The standard model of the force between two neutral atoms is the Lennard-Jones potential, V = 4ε[(σ/r)¹² − (σ/r)⁶], first written by John Lennard-Jones in 1924. It has its minimum at r₀ = 21/6σ = 1.1225σ and there the effective spring constant is 57.1 ε/σ². But a valley is not exactly a parabola: it is steeper on the near side and softer on the far side. The simulator shows what that does. Give the pair more energy and the swing gets longer than the spring would predict, and the midpoint of the vibration drifts outward. That drift is the origin of thermal expansion: hot solids expand because their atoms vibrate in lopsided wells. Interactive · A lopsided valley Vibration energy above the bottom Lennard-Jones potential in reduced units (ε = σ = 1, mass 1). The turning points come from exact root-finding, and the period from a numerical integral. Dashed: the parabola with the same curvature at the minimum. What a graduate just sees Pick generalised coordinates to fit the problem; the Lagrangian T − V gives the equations without constraint forces. The real path is the one that makes the action stationary: a single global rule behind F = ma, and the same trick as Fermat's for light. Every continuous symmetry gives a conserved quantity (Noether): time → energy, position → momentum, rotation → angular momentum. If a quantity isn't conserved, ask which symmetry has been broken. A state is a point in phase space; the motion is a non-crossing curve, and constant-energy curves tell you the kinds of motion before you solve anything. Even a simple pendulum is only isochronous for small swings; a bigger swing is slower. Deterministic and predictable are different things: with chaos, extra digits buy only a fixed extra time. Near any stable minimum, a system is a spring; the lopsidedness of the valley explains thermal expansion. Where it shows up next Quantum Mechanics (34/83): the Hamiltonian becomes the energy operator, and Poisson brackets become commutators; Feynman's sum over paths uses the action directly. Statistical Mechanics (34/84): a gas of N particles is a point in a 6N-dimensional phase space, and entropy counts the volume. General Relativity (34/85): free-falling objects follow paths that make a spacetime interval stationary, and Noether's theorem is why energy is subtle in GR. Dynamics (34/12) and Control Systems (34/20): robot arms and spacecraft are modelled with Lagrangians; stability of an equilibrium is the spring picture. The real world: spacecraft trajectories designed in the three-body regime, molecular dynamics simulation (34/09, 34/78), chaotic mixing in fluids and the limits of weather forecasting (see Chaos Theory and the Butterfly Effect, 12/07). If you want to go deeper 📘 Textbook: John R. Taylor, Classical Mechanics (University Science Books, 2005): the clearest undergraduate treatment of Lagrange, Hamilton and chaos. For a more advanced level, Goldstein, Poole and Safko, Classical Mechanics (3rd edition, Pearson/Addison-Wesley, 2002), the long-standing graduate reference. David Morin's Introduction to Classical Mechanics (Cambridge University Press) is rich in worked problems. 📘 Gentler: Leonard Susskind and George Hrabovsky, The Theoretical Minimum: What You Need to Know to Start Doing Physics (Basic Books, 2013), or Richard Feynman's chapter "The Principle of Least Action" in The Feynman Lectures on Physics, Vol. II, ch. 19, free online. ▶️ Free course: MIT OpenCourseWare 8.223 Classical Mechanics II (IAP 2017); for the graduate level, 8.09 Classical Mechanics III (Fall 2014). 🌐 Easier first reads in this library: Energy: The One Currency (13/02), Orbits: Why the Moon Keeps Falling (13/11), Chaos Theory and the Butterfly Effect (12/07), and in this series Physics I (34/06) and Vibrations (34/17). The takeaway Newton's laws can be rebuilt from one function, L = T − V, and one rule: the real path makes the action stationary. In that form, conservation laws are the shadows of symmetries (Noether), motion is a curve in phase space, and even simple systems like a double pendulum can be impossible to forecast far ahead. And near any stable minimum, everything is a spring. Try this: hang a key on a string and swing it a little and then a lot, counting 10 swings each time with your phone's stopwatch. The big swing is measurably slower (about 18% at 90°). Then, if you have one, let a toy double pendulum go twice from "the same" place and watch the two runs part ways. Sources & Further Reading Sources. The Euler–Lagrange equations, Hamilton's equations, Liouville's theorem and the pendulum period (via the arithmetic–geometric mean) are standard textbook material (Taylor; Goldstein, Poole and Safko 3rd ed., 2002). Noether's theorem: E. Noether, "Invariante Variationsprobleme", Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen (1918), 235–257, presented 26 July 1918. Lagrange, Mécanique analytique (1788); Hamilton's papers of 1834–35; Feynman's path integral, Reviews of Modern Physics 20 (1948); Lennard-Jones (1924). Poincaré on the three-body problem and Lorenz, "Deterministic nonperiodic flow", Journal of the Atmospheric Sciences 20 (1963): standard citations, not re-checked against the originals in this session. The inner solar system's Lyapunov time of about 5 million years: J. Laskar, "A numerical experiment on the chaotic behaviour of the Solar System", Nature 338, 237 (1989), reconfirmed by Mogavero, Hoang and Laskar, Physical Review X (2023); a round figure. Computed in node: the action values for the thrown ball (checked against π²/8 and π²/2), all pendulum period ratios, the double-pendulum horizons and energy drift, the Noether runs, and the Lennard-Jones turning points and periods. 🌐 MIT OpenCourseWare 8.223 Classical Mechanics II 🌐 Noether, "Invariant Variation Problems" (English translation) 📘 Taylor, Classical Mechanics · Goldstein, Poole and Safko, Classical Mechanics · The Feynman Lectures on Physics Step 10. Thermodynamics: Why Every Engine Pays a Heat Tax --------------------------------------------------------- Why: Heat, work and entropy. Energy is never lost, but it always degrades. Every engine, fridge and jet lives between those two laws, and two temperatures are enough to say how well it could ever do. Pump up a bicycle tyre and the barrel of the pump gets warm. Nobody heated it. You only pushed. Leave a phone charging under a pillow and it gets hot, because every bit of electrical energy that is not stored in the battery has to go somewhere, and "somewhere" is heat. Stand next to a power station and you will see a cooling tower pouring white steam into the sky: a machine built to make electricity that spends most of its effort throwing heat away on purpose. A mechanical or aerospace engineer looks at all three and sees the same two rules. Energy is never lost, only moved around. And when it is moved, some of it always ends up in a form that is hard to use again. Those two rules, written carefully, are thermodynamics. Every engine, every refrigerator and every jet is a way of living inside them. The course in one box Who takes itMechanical, aerospace, chemical and nuclear engineers, usually in year 3. Physicists and chemists meet a different version of it. What it is forPredicting how much work you can get out of heat, or how much work it takes to move heat, before you build anything. Comes afterCalculus I (34/01) and Physics I: Mechanics (34/06). Leads toFluid Mechanics (34/15), Heat Transfer (34/16) and Propulsion (34/21). What this piece gives youYou will not be able to size a power plant. You will see why no engine can ever be fully efficient, and you will be able to estimate the best any engine could do from two temperatures. Easier first reads in the library: Energy: The One Currency of the Universe (13/02) and Entropy: Why You Can't Unstir Your Coffee (13/12). This one goes further and puts numbers on the engines. Draw the box first: systems, properties and the ideal gas Every thermodynamics problem starts with a drawing: a dashed line around the thing you care about. That is the system. Everything outside is the surroundings. If nothing crosses the line, it is a closed system, like gas sealed in a cylinder. If matter flows through, it is a control volume, like a jet engine: air in at the front, hot gas out at the back. Most of the later subjects, from fluids to propulsion, are control-volume thinking. Draw the box, then count what crosses it. Inside the box we describe the stuff by properties: pressure, temperature, volume, internal energy. A property depends only on the state the stuff is in, not on how it got there. For air at ordinary conditions, the properties are tied together by the ideal gas law: p V = n R Tpressure × volume = amount of gas × 8.314 × absolute temperature (kelvin) A worked number: one litre of air at 100 kPa and 300 K is about 0.040 mole, roughly 1.2 grams. Now squeeze it to a tenth of the volume. What happens depends on how fast. Squeeze slowly and the walls carry the heat away, so the temperature stays 300 K and the pressure rises tenfold. Squeeze fast and the heat has nowhere to go, so the work you put in becomes temperature. Try both. Interactive · Squeeze a litre of air Slowly (heat escapes) Fast (no time for heat to escape) Compression ratio Air as an ideal gas with γ = 1.4, starting at 100 kPa, 300 K, 1 L. Slow: p₂ = p₁r, T₂ = T₁. Fast: p₂ = p₁r1.4, T₂ = T₁r0.4. At 10 to 1 and fast, the air reaches about 754 K, near 480 °C, and about 2.5 MPa. No spark, just squeezing. That is the whole idea of a diesel engine: compress air so hard that it is hot enough to light fuel sprayed into it. Real diesels typically compress about 15 to 20 to 1. The zeroth and third laws: the bookends The laws are numbered in the order people needed them, not the order they make sense in. The zeroth law was named last, after the first two already held their numbers. It says: if A is in thermal equilibrium with C, and B is in thermal equilibrium with C, then A and B are in equilibrium with each other. It sounds trivial. It is what makes a thermometer legitimate. C is the thermometer: it can compare two things that never touch. At the other end, the third law says you cannot cool anything all the way to absolute zero (0 K, −273.15 °C) in a finite number of steps. Each step removes less heat than the one before. It also says a perfect crystal at 0 K has zero entropy, which gives entropy a true zero to measure from. You will rarely compute with it. Cryogenic engineers live with it. The first law: energy is a bank balance Think of the energy inside your box as a bank balance. Two things can change it. Heat (Q) is energy that crosses the line because of a temperature difference. Work (W) is energy that crosses the line because of a force moving something, like a piston. There is no other way in or out of a closed system. So: ΔU = Q − Wchange in stored energy = heat added − work done by the gas Sign conventions differ between textbooks, so watch the first page of yours. Here, heat in is positive and work done by the gas is positive. The bank-balance picture also explains why "heat" and "work" are not things you hold. You cannot own heat; you can only watch it cross the line. Only the balance, the internal energy, is a property of the gas. Worked number: air has a specific heat at constant volume of about 0.718 kJ per kilogram per kelvin, so putting 50 kJ of heat into 1 kg in a sealed rigid can (no work) raises it by 50 ÷ 0.718 ≈ 70 K. Now let the same heat do something else. Interactive · The energy ledger Pump it, no heat escapes Heat a sealed can Heat it and let it push a piston Expand fast, no heat in Heat added to 1 kg of air Work done by the air ΔU = Q − W and ΔU = m·cv·ΔT with cv = 0.718 kJ/kg·K, starting at 300 K. Negative work means the surroundings did work on the gas. Notice what the third preset shows: 50 kJ of heat goes in, 50 kJ of work comes out, and the temperature does not change. That is the dream of an engine, and it only works for one expansion. An engine has to come back to its start and repeat. That is where the next law bites. The second law: heat only rolls downhill, and entropy counts the cost The first law allows a cup of coffee to cool by pushing its heat into the room, and it equally allows the room to push heat back into the coffee and warm it. Both conserve energy. Only one ever happens. The second law is the rule that picks the direction. Clausius's version: heat does not flow by itself from a colder body to a hotter one. Kelvin's version: no cyclic machine can turn heat from a single temperature entirely into work. They are the same law in different clothes. Engineers make this countable with entropy. When heat Q enters a body at absolute temperature T, its entropy changes by Q ÷ T. The same joule of heat adds more entropy when it enters something cold than when it leaves something hot, because dividing by a smaller T gives a bigger number. So heat that falls from hot to cold creates entropy overall, and heat that climbs from cold to hot would destroy it. The second law says total entropy never decreases. ΔS = Q ÷ Tentropy change of a body = heat in ÷ its absolute temperature · total ΔS ≥ 0 Interactive · Which way can the heat go? Hot → cold Cold → hot (try it) Hot body Cold body Heat moved At 400 K and 300 K, moving 1,000 J from hot to cold gives −2.5 J/K for the hot body and +3.33 J/K for the cold one: a net +0.83 J/K. Run it backwards and the total is −0.83 J/K, which never happens by itself. A refrigerator does move heat uphill, but only by being paid in work, and its exhaust heat creates more entropy than it removed. Energy is conserved. Entropy is not: it is made every time anything happens, and it can never be un-made. Carnot: the ceiling over every engine Now combine the two laws. A heat engine takes heat from a hot source, turns some into work, and must dump the rest into a cold sink. It has to dump some: if it took all its heat from the hot source and rejected none, the entropy of the world would fall. The least heat it can reject is the amount that keeps total entropy from decreasing. Working that out gives the highest efficiency any engine can have, discovered by the French engineer Sadi Carnot in 1824 (before the first law was even clear): ηmax = 1 − Tcold ÷ Thottemperatures in kelvin. This is the ceiling, not what real engines achieve. It depends only on the two temperatures, not on the fluid, the pistons or the cleverness. Two consequences stay with every engineer. To get more out, run hotter or reject colder; that is why turbine blades are cast to survive white-hot gas. And no engine reaches 100%, because the cold sink is never at absolute zero. Interactive · The Carnot ceiling Steam plant: 540 °C, river at 20 °C Geothermal: 150 °C Ocean thermal: warm 25 °C, deep 5 °C Hot side Cold side The steam plant's ceiling is 63.9%. Real steam plants fall well short of it, commonly around a third to 40% of the fuel's heat becoming electricity. The best gas-and-steam combined-cycle plants now reach about 64%: Siemens Energy reported 64.18% for the Keadby 2 plant in the UK, verified in May 2024. The ocean-thermal case shows the other side. A warm-water-over-cold-water engine in the tropics has a ceiling under 7%, which is why it is hard to make economical, even before friction. Cycles that run the world An engine must return to where it started, so that it can go round again. That loop of states is a cycle, and the four you will meet in every course have simple names for what the gas does. Otto (petrol engine): compress air and fuel, spark, expand, exhaust. Diesel: compress air alone until hot, inject fuel which ignites by itself, expand, exhaust. Brayton (gas turbines and jets): compress air continuously, burn fuel in a flowing stream, expand through a turbine. Rankine (steam and most of the world's electricity): pump water to high pressure, boil it, expand the steam through a turbine, condense it. For the ideal, air-standard versions of the first three, the efficiency depends on one ratio. For Otto it is 1 − r−0.4, where r is the compression ratio. At 10 to 1 that is 60%, well above what a real engine delivers, because real engines have friction, heat loss and incomplete combustion. The shape is the lesson: a higher ratio gives a higher efficiency, with diminishing returns. Petrol engines are limited by "knock" (fuel igniting early), which is part of why diesels, which compress only air, can use higher ratios. Interactive · Ideal cycle efficiency Piston engines: compression ratio Diesel: cutoff ratio (how long fuel burns) Gas turbine: pressure ratio Ideal air-standard cycles with γ = 1.4. Real engines come out lower. The Brayton cycle is the one to remember for later: a jet engine is a Brayton cycle laid out in a tube, with a compressor, a combustor and a turbine in a line. At a pressure ratio of 30 the ideal efficiency is 62%; at 10 it is 48%. That is why modern engines push their pressure ratios so high, and it is exactly the story told in Propulsion (34/21). Run it backwards: refrigerators, heat pumps and COP Run an engine in reverse, put work in, and it pumps heat from cold to hot. That is a refrigerator (the useful part is the heat taken from the cold side) or a heat pump (the useful part is the heat delivered to the hot side). Nothing breaks the second law, because you are paying work to climb the hill. For these machines "efficiency" is the wrong word, since the answer can be more than 1. Engineers use the coefficient of performance, COP: useful heat moved per unit of work paid. COPheating, ideal = Thot ÷ (Thot − Tcold)temperatures in kelvin. The smaller the lift, the bigger the COP. A resistance heater turns 1 kWh of electricity into 1 kWh of heat. A heat pump delivering heat at 35 °C from a 5 °C outdoors has an ideal COP of 10.3: it moves ten times more heat than the work it uses, because it is mostly moving heat, not making it. Real machines fall short of the ideal. The slider's 45% is an assumption for illustration, not a measurement; set your own. Interactive · A heat pump in winter Outdoor temperature Temperature of the delivered heat Fraction of the ideal that the machine achieves Two things to see. A colder day lowers the COP. And so does asking for hotter delivery: a heat pump feeding low-temperature floor heating at 35 °C beats one feeding old radiators at 55 °C, for the same weather. Everything is about the lift between the two temperatures. What a graduate just sees A system is a dashed line: first decide what is inside and count what crosses it. Compressing a gas fast heats it; expanding it fast cools it. Work and heat are two ways of moving the same energy. "Heat" is energy in transit. Things have internal energy, not heat. Energy is always conserved, so the question is never "where did it go" but "what form is it in now, and is it still useful". Efficiency has a ceiling set by two temperatures: 1 − Tcold/Thot. Running hotter is how engines improve. Every real process makes entropy. Friction, mixing and heat falling down a gradient all spend usable energy. A power plant's cooling tower is not waste by sloppiness. It is the second law's bill. A heat pump or a fridge looks like it breaks the rules, but it is moving heat, not creating it, and it is paying for it. Where it shows up next Fluid Mechanics (34/15): the control volume and the steady-flow energy equation become the frame for every pipe, pump and nozzle. Heat Transfer (34/16): thermodynamics says heat can flow from hot to cold; heat transfer says how fast through a wall, a fin or a vacuum. Propulsion (34/21): a jet is a Brayton cycle in a tube, and a rocket is a heat engine whose "work" is kinetic energy in the exhaust. In the world: power stations (Rankine), cars and aircraft (Otto, Diesel, Brayton), air conditioners, freezers, heat pumps in homes, and the energy accounting for any battery or fuel debate. If you want to go deeper 📘 Textbook. Yunus Çengel, Michael Boles and Mehmet Kanoğlu, Thermodynamics: An Engineering Approach (McGraw Hill, 10th edition). Widely assigned and full of worked examples and property tables. 📘 Textbook. Moran, Shapiro, Boettner and Bailey, Fundamentals of Engineering Thermodynamics (Wiley). The other standard choice, more careful on the first-principles setup. 📘 Gentler. Peter Atkins, Four Laws That Drive the Universe (Oxford, 2007; reissued in 2010 as The Laws of Thermodynamics: A Very Short Introduction). Almost no maths. 🌐 Free course. MIT OpenCourseWare 16.050 Thermal Energy (Fall 2002): basic concepts, the second law, propulsion and power cycles, and heat transfer in one aerospace course. Also the thermodynamics half of 16.01 Unified Engineering. The takeaway Draw a box around what you care about and count what crosses it. The first law says the energy balances; the second says some of it must always end up as low-grade heat, and entropy is how that is counted. The result is a ceiling, 1 − Tcold/Thot, that no engine can beat, and a trick, the heat pump, that beats 100% only because it moves heat rather than makes it. Try this: this week, feel for heat as the bill. Touch the back of a fridge, a phone charger, a laptop. Each one is a machine paying the second law, and the warmth is what it cost. Sources & Further Reading Sources. The laws, the ideal gas, air-standard cycles (Otto, Diesel, Brayton) and heat pump COP are standard textbook thermodynamics (Çengel & Boles; Moran & Shapiro). Air cv = 0.718 kJ/kg·K and γ = 1.4 are standard room-temperature values from the textbook property tables. Carnot's 1824 Reflections on the Motive Power of Fire is the standard origin of the ceiling. Combined-cycle record: Siemens Energy, Keadby 2 plant, 64.18% verified May 2024 (as reported by Guinness World Records and trade press; gross, net and ISO-corrected figures are not strictly comparable). Course contents: MIT OCW 16.050 and 16.01 pages. Every number an interactive shows was computed in node: 1 L at 100 kPa, 300 K = 0.0401 mol; 10:1 adiabatic gives 2,512 kPa and 753.6 K; 10:1 isothermal work = p₁V₁ ln 10 = 230 J, adiabatic work = 378 J; Carnot 540/20 °C = 63.9%, 150/20 °C = 30.7%, 25/5 °C = 6.7%; Otto at 10 = 60.2%; Brayton at pressure ratio 30 = 62.2%, at 10 = 48.2%; heat pump 35 °C from 5 °C = 10.27 ideal. 🌐 MIT OCW 16.050 Thermal Energy 🌐 MIT OCW 16.01 Unified Engineering: Thermodynamics and Propulsion 📘 Çengel, Boles & Kanoğlu, Thermodynamics: An Engineering Approach 📘 Atkins, Four Laws That Drive the Universe Step 11. Programming Fundamentals: Instructions, State and Taking Things Apart ------------------------------------------------------------------------------ Why: Physicists simulate as much as they calculate. A computer can't guess what you meant. Everything in a first programming course is a way of saying it exactly enough, and of working out why you didn't. Tap "sort by price" and a list of a thousand items rearranges before you've lifted your finger. Somewhere, a person wrote down steps so exact that a machine with no judgment, no memory of yesterday and no idea what a "price" is could do it perfectly, a thousand times over. That is the whole trade. A programmer isn't someone who knows a language, they're someone who can state a task so precisely that nothing is left to guess. And since people are bad at being precise on the first try, the other half of the skill is finding out what you actually said, as opposed to what you meant. Mechanical and aerospace engineers use the same habits to simulate a wing before it's built; computer scientists use them to build every other subject on the degree. Python and MATLAB are the common first languages for engineers, and this piece uses Python-style code. The ideas carry to every language. The course in one box Who takes it: first-year students of Computer Science (usually their very first course) and Mechanical & Aerospace Engineering (often in MATLAB or Python). What it's for: telling a machine what to do exactly, and finding out when you didn't. Comes after: nothing; it has no prerequisites. Leads to: Data Structures (34/23), Computer Architecture (34/25) and Software Engineering (34/31) on the computing side; Differential Equations (34/03), Dynamics (34/12) and Control Systems (34/20) on the engineering side, all of which are solved on a computer in practice. Honest line: you won't be able to ship an app after this. You will be able to read ten lines of code, predict what they do, and make a physics model in a loop. A program is instructions plus state Strip away the syntax and a program is two things: a list of instructions, and the state, the current values of all its named boxes. Each instruction reads the state and changes it a little. Running the program is just that, one step after another, and the answer is whatever state is left (or printed) at the end. The graduate habit is to run the program in their head: keep a small table of variable values and update it line by line. Below is a tiny interpreter that does it visibly. Press Step. Then edit the program: change the 6 in the Collatz example, or write your own with =, +=, if/else, while, for … in range(…) and print. Interactive · Step through a program Add 1 to 5 Collatz steps Count down by 3 The program (edit me) StepRun to the endStart again A real mini-interpreter, written for this page. It stops after 400 steps, in case you write a loop that never ends. The first program adds 1 + 2 + 3 + 4 + 5 and prints 15. The Collatz one halves even numbers and triples-plus-one odd ones until it reaches 1: starting from 6 it takes 8 steps. Nobody knows if every starting number reaches 1, and yet the program is five lines long. That's what "simple instructions, deep behaviour" feels like. Variables and types: what a number is made of A variable is a name for a box in memory. A type says what kind of thing is in the box, and therefore what you may do with it: you can add two numbers, join two pieces of text, but adding "3" and 4 is an error or a surprise. Types exist because the machine stores everything as patterns of bits, and the pattern means nothing without the type. The box has a size too. A signed 16-bit integer holds −32,768 to 32,767, and nothing more. Decimals are stored as floating point, binary fractions of limited precision, so 0.1 can't be stored exactly and 0.1 + 0.2 gives 0.30000000000000004. On 4 June 1996 the first Ariane 5 rocket veered off course and broke up about 37 seconds after lift-off, a loss of more than US$370 million. The investigation traced it to the guidance software, reused from Ariane 4: a 64-bit floating-point value (the horizontal bias) was converted to a 16-bit signed integer, and on the faster rocket it didn't fit. The failure shut down both inertial units. A number too big for its box was enough. Interactive · Does it fit? 8 bits 16 bits 32 bits Number to store Ariane's code reportedly raised an error on overflow; some systems wrap silently instead, which is shown here. Conditionals and loops: choosing and repeating With state and instructions, only two more ideas are needed to compute anything: choose (if something is true, do this, else that) and repeat (while something is true, or for each value in a range). Together they let ten lines do work that would take ten million lines written out. The classic trap is in the edges. In Python's range(1, 10) the loop starts at 1 and stops before 10, so it runs 9 times, not 10. Off-by-one errors are the "fencepost" mistake: a fence of 10 sections needs 11 posts. Try the bounds yourself. Interactive · Edit the loop Add up i Add up i² Just count Start Stop (never reached) Step With the defaults, range(1, 11) runs 10 times and adds up to 55. Make the step negative and the start bigger than the stop to count down. Set the start above the stop with a positive step and the body never runs at all, which is perfectly legal and a common source of silent bugs. Functions and recursion: naming a piece, then calling it again A function packages some instructions under a name, takes inputs, and gives back an output. That is decomposition, the central skill of engineering of any kind: break a big problem into pieces small enough to understand and test alone, give each a name, then build on the names. The tracer above could be one function; so could braking distance. Recursion is a function that calls itself on a smaller version of its problem, until it reaches a case it can answer directly. The Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, …, each the sum of the previous two) have a one-line recursive definition. Run it naively and the machine re-solves the same sub-problems again and again. Interactive · Count the calls Naive Remember answers (memo) Compute fib(n), n = Time it on this device Naively, fib(5) makes 15 calls, fib(20) makes 21,891, and fib(30), whose answer is just 832,040, makes 2,692,537. Remembering answers brings fib(30) down to 59 calls. Same answer, a different algorithm, and the course after this one (Algorithms, 34/24) is the study of exactly that difference. Data: lists and dictionaries Most programs aren't about single numbers but collections. A list is an ordered row of values, found by position (the third item). A dictionary maps a key to a value (a word to its count, a student ID to a name) and finds an entry by key without scanning. Choosing the right container is the first lesson of Data Structures (34/23). The difference is speed. To find a word in a list of n you may have to look at all n. A dictionary (usually built as a hash table) jumps almost straight to it, in roughly constant time on average, however large it is. Paste some text below and look a word up. Interactive · Count the words Textthe cat sat on the mat and the dog sat on the cat Look up a word Debugging is the scientific method Programs don't do what you meant; they do what you wrote. Finding the gap is science: look at the result, form a hypothesis ("the loop is skipping the last item"), make a prediction ("if I print the count here it will be one short"), run the experiment (print it), and revise. Guessing and changing things at random is the opposite, and it's how you add new bugs. The strongest move is bisection. If the code is a chain of steps and the result is wrong, check the value halfway along. If it's right, the fault is in the second half; if wrong, the first. Each check halves the suspects. In 1947 operators of Harvard's Mark II computer taped a moth found stuck in a relay into the logbook with the note "First actual case of bug being found" — a joke that only works because engineers already called faults "bugs". Interactive · Find the bug in as few probes as you can Start with x = 5. Slide to a step and probe the value there against what you'd get by hand. Look at x Probe hereBlame this stepNew bug Twelve suspect lines need at most four probes when you halve each time, because 2⁴ = 16 is at least 12. Checking from the top, one line at a time, can take twelve. Modelling: a physics simulation in a dozen lines Engineers model long before they build. Most physical laws give a rate of change (acceleration from forces, as in Physics I), and a computer can follow a rate forward in small steps: update the position using the velocity, update the velocity using the acceleration, repeat. That is the Euler method, and the loop is the whole simulation. x, y = 0.0, 0.0 vx, vy = 21.2, 21.2 # 30 m/s at 45 degrees dt = 0.1 # time step in seconds while y >= 0: x = x + vx * dt y = y + vy * dt vy = vy - 9.81 * dt # gravity changes vy only print(x) # about 93.9 metres Smaller time steps are more accurate and cost more. For the cannonball at 30 m/s and 45°, the exact range without air is 91.7 m. With a step of 0.5 s the simulation says 102.1 m, 0.1 s gives 93.9 m, and 0.001 s gives 91.8. Now add air drag, for which no tidy formula exists: the same loop still works, which is why engineers simulate. Interactive · A cannonball in code No air With air drag Launch speed Launch angle Time step Drag is modelled as a quadratic term with a baseball-like coefficient (0.007 per metre); a model, not a measurement. Readable code is a letter to a person A program is run by a machine once and read by people many times: the next engineer, the reviewer, you in six months. The well-known line from the preface of Structure and Interpretation of Computer Programs is: "Programs must be written for people to read, and only incidentally for machines to execute." The machine will accept either version below. Only one of them can be checked by a human. def f(a, b): return (a / 3.6) ** 2 / (2 * b * 9.81) def braking_distance(speed_kmh, friction): speed = speed_kmh / 3.6 # convert to metres per second return speed ** 2 / (2 * friction * 9.81) Both give 14.05 m for 50 km/h and a friction of 0.7, the braking distance of Physics I. Only the second tells you what it means, and so lets a reader spot a wrong constant. Good names, small functions and comments that say why are the cheapest debugging tools there are. People disagree on how much structure is enough: some teams favour heavy up-front design, others short cycles of build, test and revise; Software Engineering (34/31) covers both camps. What a graduate just sees A program is instructions plus state; to understand it, track the variables line by line. Every value has a type and a size, and a number too large for its box is a real way to lose a rocket. Loops run until their stop value, not through it: watch the edges. Break a problem into named functions you can test one at a time. A function that calls itself can be elegant and wildly wasteful; counting calls shows which. The right container (list or dictionary) can be the difference between instant and never. Debugging means hypotheses and experiments; halve the suspects each time. Simulation is a rate of change plus a loop, and smaller steps cost more for less error. Code is read far more often than it is written. Where it shows up next Data Structures (34/23) and Algorithms (34/24): the list-versus-dictionary and naive-versus-memo contrasts above, measured properly. Computer Architecture (34/25): the fixed-size boxes and overflow are the hardware's registers; instructions plus state is literally how a processor works. Software Engineering (34/31): decomposition, testing and readable code, scaled to teams and years. Differential Equations (34/03), Dynamics (34/12), Control Systems (34/20): the Euler loop is the starting point of numerical solvers, vehicle simulators and the code that runs a controller. Machine Learning (34/32): training is a loop that nudges numbers until the error falls. If you want to go deeper 📘 Standard textbook. John Guttag, Introduction to Computation and Programming Using Python (3rd ed., MIT Press, 2021), the text behind MIT's introductory course, written for engineers and scientists, with modelling and data. 📘 Gentler, free. Allen Downey, Think Python (3rd ed., Green Tea Press / O'Reilly), free to read online at greenteapress.com. For the deeper "why", Structure and Interpretation of Computer Programs by Abelson and Sussman is free online from MIT Press. 🌐 Free course. MIT OpenCourseWare 6.0001 Introduction to Computer Science and Programming in Python (Fall 2016), or Harvard's CS50x (starts in C, then Python and SQL) and CS50P (Python only), free on OpenCourseWare. The takeaway A program is instructions acting on state. Variables, types, choices, loops and functions are how you say it exactly; lists and dictionaries are how you hold data; debugging is hypothesis and experiment; and a simulation is a rate of change inside a loop. The graduate's real skill is reading code, predicting it, and taking a big problem apart. Try this: take any small thing you do by hand, like splitting a bill or converting recipe units, and write it as exact steps for a friend to follow without any judgment. Then watch where they get stuck: those are your bugs. Sources & Further Reading Sources. Ariane 5 flight 501 (4 June 1996; 64-bit floating-point to 16-bit signed integer conversion overflow; about 37 seconds; more than US$370 million): Wikipedia, "Ariane flight V88", which summarises the Inquiry Board's report. The Mark II moth (9 September 1947, logbook note "First actual case of bug being found", now at the Smithsonian) from the Computer History Museum and JSTOR Daily, "The bug in the computer bug story", which notes the term was already in use. The SICP quotation from the preface of Abelson & Sussman, Structure and Interpretation of Computer Programs (MIT Press, 1985). CS50x language order from cs50.harvard.edu/x; Think Python 3rd ed. from greenteapress.com. Computed and checked in node, including by running the page's own interpreter on its example programs: 15; 8 Collatz steps; −2; 40,000 wraps to −25,536 in 16 bits; fib call counts 15, 177, 21,891 and 2,692,537 (and 2n−1 with a memo); projectile ranges 91.74 m exact and 102.1, 93.9, 91.8 m for steps of 0.5, 0.1 and 0.001 s; 14.05 m braking distance. 🌐 MIT OpenCourseWare: 6.0001 🌐 Harvard CS50x and CS50P 📘 Think Python, 3rd edition (free online) 📘 Guttag, Introduction to Computation and Programming Using Python, 3rd ed. (MIT Press) 🌐 JSTOR Daily: the bug in the computer bug story Step 12. Quantum Mechanics: Waves of Probability and the Limits of Knowing -------------------------------------------------------------------------- Why: Wavefunctions, uncertainty, spin and entanglement. Everything small is described by a wave that you can only ask questions of, one at a time. That single move explains why atoms have colours, why you cannot know everything at once, and why two particles can share a fate. Quantum Mechanics: Waves of Probability and the Limits of Knowing :root{ --bg:#faf7f2; --card:#ffffff; --ink:#1c1a17; --muted:#6b645b; --accent:#2a3f8f; --accent2:#b5842a; --line:#e7e0d6; --hi:#e9ebf7; --panel:#eef0f8; --hot:#c4452d; --cold:#2f6fb0; --good:#3f7f63; --onacc:#ffffff; --shadow:0 8px 30px rgba(0,0,0,.06); } @media (prefers-color-scheme:dark){ :root{ --bg:#0e0f16; --card:#181a24; --ink:#eef0f8; --muted:#a3a8bd; --accent:#8fa0f0; --accent2:#e6b969; --line:#282b3a; --hi:#171a2b; --panel:#10132a; --hot:#ee7b62; --cold:#6fa6e0; --good:#5fb08b; --onacc:#0e0f16; --shadow:0 8px 30px rgba(0,0,0,.45); } } *{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Georgia,serif; line-height:1.65;-webkit-font-smoothing:antialiased} .wrap{max-width:680px;margin:0 auto;padding:48px 16px 80px} .kicker{color:var(--accent);font-weight:700;letter-spacing:.08em;text-transform:uppercase;font-size:.72rem;font-family:-apple-system,sans-serif} h1{font-size:2.1rem;line-height:1.12;margin:.3em 0 .2em;letter-spacing:-.02em} .dek{font-size:1.15rem;color:var(--muted);margin-bottom:.6em} .meta{font-size:.8rem;color:var(--muted);font-family:-apple-system,sans-serif;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:26px} p{font-size:1.06rem;margin:1em 0} h2{font-size:1.45rem;line-height:1.2;margin:1.9em 0 .3em;letter-spacing:-.01em} .pull{font-size:1.4rem;line-height:1.28;font-weight:600;color:var(--accent);border-left:4px solid var(--accent);padding-left:20px;margin:1.4em 0} .card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px 16px;margin:26px 0;box-shadow:var(--shadow)} .lab{font-family:-apple-system,sans-serif;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent2);margin-bottom:.6em} .course{border-left:5px solid var(--accent2)} .course dl{margin:0;font-family:-apple-system,sans-serif;font-size:.95rem} .course dt{font-weight:700;color:var(--accent);margin-top:.7em} .course dd{margin:.1em 0 0 0} .eq{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:1.25rem;text-align:center;background:var(--hi);border-radius:12px;padding:12px 8px;margin:14px 0;overflow-x:auto} .eq small{font-style:normal;font-family:-apple-system,sans-serif;font-size:.8rem;color:var(--muted);display:block;margin-top:2px} .chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px} button{font-family:-apple-system,sans-serif;font-weight:600;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:.88rem;background:var(--hi);color:var(--ink);min-height:44px} button[aria-pressed=true]{background:var(--accent);color:var(--onacc);border-color:var(--accent)} .ctl{font-family:-apple-system,sans-serif;font-size:.9rem;margin-top:8px} .ctl .top{display:flex;justify-content:space-between;gap:8px} input[type=range]{width:100%;accent-color:var(--accent);min-height:44px;margin:0} svg{width:100%;height:auto;display:block;margin:10px 0;border-radius:12px;background:var(--panel)} svg text{font-family:-apple-system,sans-serif;font-size:11px;fill:var(--muted)} .read{font-family:-apple-system,sans-serif;font-size:.92rem;background:var(--hi);border-radius:10px;padding:10px 12px;font-variant-numeric:tabular-nums} .read p{font-size:.92rem;margin:.3em 0} table.t{width:100%;border-collapse:collapse;font-family:-apple-system,sans-serif;font-size:.9rem;margin:12px 0;font-variant-numeric:tabular-nums} table.t th,table.t td{border-bottom:1px solid var(--line);padding:6px 4px;text-align:left;vertical-align:top} table.t th{color:var(--muted);font-weight:600} .note{font-size:.85rem;color:var(--muted);font-family:-apple-system,sans-serif} .take{background:var(--hi);border-radius:16px;padding:22px 18px;margin-top:34px} .take .lab{color:var(--accent)} .do{font-family:-apple-system,sans-serif;font-weight:700;font-size:1.02rem;margin-top:.4em} ul.deep,ul.see{font-family:-apple-system,sans-serif;font-size:.96rem;line-height:1.6;padding-left:1.2em} ul.see li{margin:.35em 0} a{color:var(--accent2)} button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent2);outline-offset:2px} @media (max-width:640px){table.t{display:block;overflow-x:auto;max-width:100%}} Look at a sodium street lamp and you see a colour that is not a blend of anything: a narrow, almost pure yellow-orange. Heat a pinch of table salt in a gas flame and the flame turns the same yellow. Nothing in Newton's mechanics says why a hot atom should give out only certain colours, or why every sodium atom in the universe gives out the same ones. Quantum mechanics says why, and the answer is stranger than the question. A small thing such as an electron is not a tiny ball on a path. It is described by a wave, and the wave is not a ripple in anything. It is a list of how likely each outcome would be if you looked. Confine that wave and, like a guitar string, it can only vibrate in certain patterns. Each pattern has its own energy. Those energies are the colours. A physics graduate carries a handful of pictures from this course for life. This piece builds six of them with sliders you can play with. If you want the gentlest possible start, read Quantum Mechanics: The Weirdness at the Bottom (13/06) first. This one goes further: it computes. The course in one box Who takes itPhysics majors, usually in year 2 or 3 (at MIT it is 8.04, then 8.05). Chemists, materials scientists and electrical engineers meet a shorter version. Programmes in the style of MIT Course 8 and the Cambridge Natural Sciences physics route teach it before statistical physics and particle physics. What it is forPredicting what a small system can do (its energies, its spins, its odds) from a wavefunction and the equation that moves it. Comes afterLinear Algebra (34/04), Waves & Optics (34/80) and Partial Differential Equations (34/79). Leads toStatistical Mechanics (34/84), Particle & Nuclear Physics (34/86) and Condensed Matter Physics (34/87). What this piece gives youYou will not be able to solve the hydrogen atom. You will see why it has the colours it has, why uncertainty is a property of waves, and what a Bell test actually tested. Easier first reads: Quantum Mechanics (13/06) and The Standard Model (13/07). The state is a wave, and its square is a probability In classical mechanics the state of a ball is two lists: where it is and how fast it moves. In quantum mechanics the state of an electron is a function ψ(x), the wavefunction, a number (in general a complex one) for every place. You cannot see ψ. What you can get from it is the odds of finding the electron near x. Max Born proposed this reading in 1926, and it is called the Born rule. P(x) = |ψ(x)|²the chance of finding the particle near x is the square of the wave's size there The wave is fixed; each look gives one random place. Collect many looks and the pile follows the square of the wave. Here is the simplest wave worth knowing: a particle trapped on a line of length L, with walls it cannot pass. The allowed waves are standing waves, ψn = √(2/L) sin(nπx/L), with n = 1, 2, 3 … Interactive · Look at the particle Wave pattern n Look onceLook 50 timesLook 1,000 timesClear The curve is |ψn|² computed from the formula. The bars are positions drawn at random from that curve, in 20 bins. The middle third of the box is where n = 1 is most likely to be found and where n = 2 is least likely to be. With n = 1 you find the particle in the middle third of the box 61% of the time. With n = 2 only 20%. A classical bead rattling between walls would be found there 33% of the time, wherever you look. The wave has nodes, places where it is exactly zero, and the particle is never found at a node, even though it passes from one side to the other. Squeeze a wave and its energy comes in steps A standing wave that fits the box has a whole number of half-wavelengths: L = nλ/2. A short wavelength means a large momentum (de Broglie, 1924: p = h/λ), and momentum means energy. So the allowed energies are not a continuum. They are a ladder. En = n² h² ÷ (8 m L²)energy grows as the square of n, and grows as the box shrinks or the particle gets lighter Worked number: an electron in a box 1 nm wide (a few atoms across) has E1 = 0.376 eV. The step from n = 2 to n = 1 is 3 × 0.376 = 1.13 eV, which is a photon of wavelength 1,099 nm, in the near infrared. Shrink the box to 0.1 nm, the size of an atom, and the same step is 113 eV, in the ultraviolet. Squeezing a wave raises its energy, which is why atoms do not collapse: the electron's lowest wave is never at zero energy. Interactive · The energy ladder ElectronProton1-milligram grain Box width L En = n²h²/(8mL²) with CODATA h and masses. The slider runs from 0.01 nm to 1 cm. For the grain the ladder is drawn, but its real steps are far below anything measurable. The grain row is the point. Quantization is not absent for large things; it is unmeasurably fine. The same formula that gives an electron a 1 eV step gives a milligram grain in a 1 cm box a step of about 10−38 eV. Hydrogen is the real-world version. Its levels are En = −13.6 eV ÷ n², and a jump from n = 3 to n = 2 releases a photon at 656.5 nm in vacuum (656.3 nm in air), the red line astronomers call H-alpha. Sodium's yellow doublet near 589 nm comes from the same logic with a more complicated atom. Superposition: a wave can be a mix, and the mix sloshes Waves add. If ψ1 and ψ2 are both allowed, so is any blend a·ψ1 + b·ψ2. That is a superposition, and it is the same fact as adding two guitar notes, not a mystical one. What is odd is the reading: the particle is not "secretly in one of the two states". The blend is the state. The square of a sum contains a cross term, and the cross term is where interference lives. Each pattern's energy sets how fast its phase turns, so the two parts drift in and out of step and the probability sloshes back and forth at the beat frequency (E2 − E1) ÷ h. For the 1 nm electron box that is one slosh every 3.67 femtoseconds. This is how an excited atom radiates: its charge cloud oscillates, and an oscillating charge makes light. Interactive · Mix two states and let time pass Share of n = 2 in the mix Time (fraction of one slosh) |ψ|² = (1−a)ψ₁² + aψ₂² + 2√(a(1−a)) ψ₁ψ₂ cos(2πt). The average position is integrated numerically. At a = 0 or 1 nothing sloshes: a single energy has a frozen density. At 50:50 the average position swings by about 18% of the box width either way, and then back. At 0% or 100% nothing moves at all: a state with one energy is a stationary state. That is why atoms are stable in their lowest level. Uncertainty: not clumsiness, but what waves are A short wave packet, a pulse, is a sum of many wavelengths. A pure single wavelength is spread over all space. You cannot have a wave that is both narrow in place and sharp in wavelength, and this is true of sound, of water and of a radio signal long before quantum mechanics. Quantum mechanics adds one thing: for a particle, wavelength is momentum (p = h/λ). So the same trade-off becomes Heisenberg's relation (1927). Δx · Δp ≥ ħ ÷ 2ħ = h/2π = 1.0546 × 10⁻³⁴ J·s · the spread in position times the spread in momentum has a floor It is not about the disturbance of measuring. It says the quantity "exact position and exact momentum at once" does not exist for the wave. Worked number: pin an electron into an atom-sized region, Δx = 0.1 nm, and the smallest possible momentum spread gives a velocity spread of 580 km/s. That is a quarter of the electron's speed in hydrogen's lowest orbit (2.19 × 10⁶ m/s). This is why an atom has its size: squeeze the electron closer and its motion grows faster than the squeeze can pay back. Interactive · Pin a particle down ElectronProtonBaseball Position spread Δx Δp = ħ/(2Δx), the minimum for a Gaussian packet; Δv = Δp/m. The two curves are schematic: their widths are drawn so that the product stays fixed. Now slide to a baseball and 1 mm. The velocity spread is about 10−30 m/s, which is why nobody ever noticed uncertainty in daily life. Spin and measurement: asking changes the answer An electron has an inner two-valued property called spin. Send a beam through a magnet whose field changes with position and each electron comes out on one of exactly two paths, "up" or "down" relative to the magnet's axis. That is the Stern–Gerlach experiment (Frankfurt, 1922, with silver atoms). Rotate the magnet and it is still two paths, never a smear. The state of a spin is a two-component arrow, and measuring along another axis gives "up" with probability cos²(θ/2), where θ is the angle between the two axes. Measuring also changes the state: after you filter for up along z, the electron really is z-up, and an x measurement then gives 50:50 and erases the z information. Put three filters in a row and the odd result follows: z-up, then x-up, then z again lets some z-down electrons through, even though the first filter removed all of them. A pair of crossed polarising sunglasses with a third lens slid between them does exactly this to light. Interactive · Three filters in a row Angle of the middle filter from z Send 1,000 electrons Start with a beam that is already z-up. Middle filter passes "up along angle θ" with probability cos²(θ/2). The last filter asks z again. Final z-down fraction = cos²(θ/2) · sin²(θ/2) = sin²(θ)/4. Runs use the browser's random numbers, so they differ each time. At 90 degrees, a quarter of the beam ends up z-down. With no middle filter, none do. At 0 or 180 degrees the middle filter either does nothing or flips the beam cleanly, and the final count is 0 or 100%. Entanglement: correlations no pre-agreed script can fake Prepare two spins in the combined state with total spin zero (the "singlet"), and fly them apart. Each one alone looks random. But when both are measured along the same axis they always disagree, and for axes at angle Δ the correlation is E = −cos Δ (+1 means always agree, −1 always disagree). Is this like two sealed envelopes, one with a red card and one with a blue? Einstein, Podolsky and Rosen argued in 1935 that quantum mechanics must then be incomplete: hidden "instruction sets" travelling with the particles. In 1964 John Bell showed that any such local scheme must obey a bound. Using the CHSH form (Clauser, Horne, Shimony and Holt, 1969), pick two settings a, a′ on one side and b, b′ on the other: S = E(a,b) − E(a,b′) + E(a′,b) + E(a′,b′)any local hidden-variable script: |S| ≤ 2 · quantum mechanics can reach 2√2 ≈ 2.83 Interactive · Beat the bound Best quantum settingsAll the samePerpendicular Alice, first setting a Alice, second setting a′ Bob, first setting b Bob, second setting b′ Run 2,000 pairs E(α, β) = −cos(α − β) for the singlet. The run draws each pair's two ±1 results with the matching probabilities; it estimates S with a statistical error of about ±0.1. Experiments sided with quantum mechanics: Clauser and Freedman (1972), then Aspect (1982), then "loophole-free" tests that closed the remaining gaps in 2015 (Delft, NIST and Vienna). The 2022 Nobel Prize in Physics went to Alain Aspect, John Clauser and Anton Zeilinger for this line of work. Bell's result does not say you can send a message faster than light: each side's results alone are random. It says the world cannot be explained by local pre-agreed instructions alone. Four stories about what it means Everyone who uses the maths gets the same numbers. What the maths is about is still argued. The main readings, in their holders' own terms: Copenhagen (Bohr, Heisenberg and descendants): the wavefunction is a tool for predicting results of measurements; asking what the electron "really did" between measurements has no answer. Many-worlds (Everett, 1957; later DeWitt, Deutsch, Wallace): the wave never collapses. Every outcome happens, in branches that no longer interact. Pilot-wave (de Broglie 1927; Bohm 1952): particles always have positions, guided by the wave. It reproduces the same predictions, at the price of non-local guidance, which Bell's theorem says any such theory needs. QBism (Fuchs, Mermin and others): the wavefunction is an agent's personal degrees of belief about what they will experience. No experiment so far separates these as they are usually stated, and physicists are split. Treat any claim that physics has settled the question with caution. What a graduate just sees The state is a wave; the square of the wave is the odds. Nodes are places the particle is never found. Confine a wave and its energy comes in steps; the smaller the box, the larger the steps and the higher the lowest energy. Spectra of atoms are the fingerprints of their energy ladders. Superposition is addition of waves, and interference lives in the cross term. Uncertainty is the narrow-versus-sharp trade-off of any wave, with ħ setting the exchange rate. Measuring along one axis resets the state; a third filter can restore what a second one hid. Entangled outcomes are correlated more strongly than any pre-agreed script allows (|S| up to 2.83 against a bound of 2), yet no message travels. The maths is agreed; the meaning is not. Where it shows up next Statistical Mechanics (34/84): counting quantum levels is how temperature and entropy are defined for real matter. Particle & Nuclear Physics (34/86): fields are quantum waves; spin and superposition run the Standard Model. Condensed Matter Physics (34/87): billions of boxes coupled together make the energy bands of a chip. In the world: LEDs and lasers (levels and photons), MRI (spin), atomic clocks (the hydrogen-like levels again), flash memory (tunnelling), quantum cryptography (Bell tests), and the first small quantum computers. If you want to go deeper 📘 Textbook. David Griffiths and Darrell Schroeter, Introduction to Quantum Mechanics (Cambridge, 3rd edition, 2018). The most widely assigned first course, with worked problems and a clear style. 📘 Textbook. J. J. Sakurai and Jim Napolitano, Modern Quantum Mechanics (Cambridge, 3rd edition). Starts from spin and states, closer to the linear-algebra view; a standard for the next course. 📘 Gentler. Leonard Susskind and Art Friedman, Quantum Mechanics: The Theoretical Minimum (Basic Books, 2014). Real maths, written for self-study, with no university needed. 🌐 Free course. MIT OpenCourseWare 8.04 Quantum Physics I (Spring 2016), followed by 8.05 Quantum Physics II. The takeaway A quantum system is a wave whose square gives the odds. Confine it and its energies become a ladder, which is why atoms have fixed colours and sizes. Mix waves and they interfere; ask a question and the answer rewrites the state; entangle two systems and their answers correlate beyond any script. The equations are agreed; what they mean is still open. Try this: this week, take three polarising lenses (old polarised sunglasses can be cut or popped out, or use a pair of passive 3D cinema glasses) and cross two of them until the light goes dark, then slip the third between them at 45 degrees. Light comes back. That is the three-filter result, in photons instead of electrons. Sources & Further Reading Sources. The box, hydrogen, uncertainty and spin results are standard textbook quantum mechanics (Griffiths & Schroeter; Sakurai). Constants are CODATA 2018 values: h = 6.62607015 × 10⁻³⁴ J·s, electron mass 9.1093837015 × 10⁻³¹ kg, proton mass 1.67262192369 × 10⁻²⁷ kg, 1 eV = 1.602176634 × 10⁻¹⁹ J. Hydrogen H-alpha from the Rydberg formula with the reduced-mass correction (656.47 nm vacuum). Born 1926, Heisenberg 1927, Stern–Gerlach 1922, Bell 1964, CHSH 1969, Clauser–Freedman 1972, Aspect 1982, and the 2022 Nobel Prize in Physics (Aspect, Clauser, Zeilinger): Nobel Prize press release. The loophole-free tests of 2015 (Hensen et al., Delft; Shalm et al., NIST; Giustina et al., Vienna) are cited from the literature, not re-checked for this piece. Interpretation summaries follow the Stanford Encyclopedia of Philosophy entries on Copenhagen, many-worlds and Bohmian mechanics. Every number an interactive shows was computed in node: for example E1 = 0.376 eV at 1 nm, beat period 3.67 fs, 61% and 20% in the middle third for n = 1 and 2, Δv = 579 km/s at 0.1 nm, final z-down fraction 25% at 90 degrees, and S = 2.828 at the best settings. 🌐 Nobel Prize in Physics 2022: press release 🌐 Stanford Encyclopedia of Philosophy: Copenhagen Interpretation 🌐 MIT OCW 8.04 Quantum Physics I 📘 Griffiths & Schroeter, Introduction to Quantum Mechanics Step 13. Statistical Mechanics: Temperature Is What Counting Looks Like ----------------------------------------------------------------------- Why: How the behaviour of trillions of atoms becomes temperature and pressure. Nothing in a single atom is hot. Temperature, pressure and the arrow of time appear when you count the ways trillions of atoms can arrange themselves, and the biggest count wins by a margin so large it looks like a law. Statistical Mechanics: Temperature Is What Counting Looks Like :root{ --bg:#faf7f2; --card:#ffffff; --ink:#1c1a17; --muted:#6b645b; --accent:#2a3f8f; --accent2:#b5842a; --line:#e7e0d6; --hi:#e9ebf7; --panel:#eef0f8; --hot:#c4452d; --cold:#2f6fb0; --good:#3f7f63; --onacc:#ffffff; --shadow:0 8px 30px rgba(0,0,0,.06); } @media (prefers-color-scheme:dark){ :root{ --bg:#0e0f16; --card:#181a24; --ink:#eef0f8; --muted:#a3a8bd; --accent:#8fa0f0; --accent2:#e6b969; --line:#282b3a; --hi:#171a2b; --panel:#10132a; --hot:#ee7b62; --cold:#6fa6e0; --good:#5fb08b; --onacc:#0e0f16; --shadow:0 8px 30px rgba(0,0,0,.45); } } *{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Georgia,serif; line-height:1.65;-webkit-font-smoothing:antialiased} .wrap{max-width:680px;margin:0 auto;padding:48px 16px 80px} .kicker{color:var(--accent);font-weight:700;letter-spacing:.08em;text-transform:uppercase;font-size:.72rem;font-family:-apple-system,sans-serif} h1{font-size:2.1rem;line-height:1.12;margin:.3em 0 .2em;letter-spacing:-.02em} .dek{font-size:1.15rem;color:var(--muted);margin-bottom:.6em} .meta{font-size:.8rem;color:var(--muted);font-family:-apple-system,sans-serif;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:26px} p{font-size:1.06rem;margin:1em 0} h2{font-size:1.45rem;line-height:1.2;margin:1.9em 0 .3em;letter-spacing:-.01em} .pull{font-size:1.4rem;line-height:1.28;font-weight:600;color:var(--accent);border-left:4px solid var(--accent);padding-left:20px;margin:1.4em 0} .card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px 16px;margin:26px 0;box-shadow:var(--shadow)} .lab{font-family:-apple-system,sans-serif;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent2);margin-bottom:.6em} .course{border-left:5px solid var(--accent2)} .course dl{margin:0;font-family:-apple-system,sans-serif;font-size:.95rem} .course dt{font-weight:700;color:var(--accent);margin-top:.7em} .course dd{margin:.1em 0 0 0} .eq{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:1.25rem;text-align:center;background:var(--hi);border-radius:12px;padding:12px 8px;margin:14px 0;overflow-x:auto} .eq small{font-style:normal;font-family:-apple-system,sans-serif;font-size:.8rem;color:var(--muted);display:block;margin-top:2px} .chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px} button{font-family:-apple-system,sans-serif;font-weight:600;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:.88rem;background:var(--hi);color:var(--ink);min-height:44px} button[aria-pressed=true]{background:var(--accent);color:var(--onacc);border-color:var(--accent)} .ctl{font-family:-apple-system,sans-serif;font-size:.9rem;margin-top:8px} .ctl .top{display:flex;justify-content:space-between;gap:8px} input[type=range]{width:100%;accent-color:var(--accent);min-height:44px;margin:0} svg{width:100%;height:auto;display:block;margin:10px 0;border-radius:12px;background:var(--panel)} svg text{font-family:-apple-system,sans-serif;font-size:11px;fill:var(--muted)} .read{font-family:-apple-system,sans-serif;font-size:.92rem;background:var(--hi);border-radius:10px;padding:10px 12px;font-variant-numeric:tabular-nums} .read p{font-size:.92rem;margin:.3em 0} table.t{width:100%;border-collapse:collapse;font-family:-apple-system,sans-serif;font-size:.9rem;margin:12px 0;font-variant-numeric:tabular-nums} table.t th,table.t td{border-bottom:1px solid var(--line);padding:6px 4px;text-align:left;vertical-align:top} table.t th{color:var(--muted);font-weight:600} .note{font-size:.85rem;color:var(--muted);font-family:-apple-system,sans-serif} .take{background:var(--hi);border-radius:16px;padding:22px 18px;margin-top:34px} .take .lab{color:var(--accent)} .do{font-family:-apple-system,sans-serif;font-weight:700;font-size:1.02rem;margin-top:.4em} ul.deep,ul.see{font-family:-apple-system,sans-serif;font-size:.96rem;line-height:1.6;padding-left:1.2em} ul.see li{margin:.35em 0} a{color:var(--accent2)} button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent2);outline-offset:2px} @media (max-width:640px){table.t{display:block;overflow-x:auto;max-width:100%}} Shake a box of coins and they land about half heads. Shake a box of a hundred coins and you will rarely get exactly fifty, but you will almost never get ninety. Shake a mole of coins and the fraction of heads will be one half to twelve decimal places, every single time, and nobody calls that a coincidence. They call it a law. The air in your room works the same way. Its 1026 or so molecules each wander at random, yet the pressure on your eardrum is steady and the temperature is a single number. Nothing in one molecule is "warm". Statistical mechanics is the course that shows temperature, pressure, heat flow and the second law all emerging from one move: count the ways. If you read Entropy: Why You Can't Unstir Your Coffee (13/12) and Thermodynamics (34/14), you have met the results. This piece shows where they come from, and lets you watch the numbers do it. The course in one box Who takes itPhysics majors, usually in year 3 (MIT's 8.044 Statistical Physics I), and chemists and materials scientists in their own versions. Programmes in the style of MIT Course 8 and the Cambridge Natural Sciences physics route teach it after a first quantum course. What it is forDeriving the laws of heat, and the properties of gases, solids and radiation, from the rules governing the particles inside them. Comes afterProbability & Statistics (34/05), Thermodynamics (34/14) and Quantum Mechanics (34/83). Leads toCondensed Matter Physics (34/87) and Astrophysics & Cosmology (34/88). What this piece gives youYou will not be able to compute a partition function for a real material. You will see why temperature is a slope, why large numbers make the second law near-certain, and what the Boltzmann factor is doing in everything from chemistry to stars. Count the ways: macrostates and microstates Split the job in two. A microstate is the full detail: which coin shows heads, which molecule is on the left. A macrostate is what you can measure: how many heads, how many molecules on the left. Many microstates make the same macrostate, and the number of them, W, is the multiplicity. For N coins, the number of ways to get exactly r heads is "N choose r". There is one way to get all heads and an astronomical number of ways to get half. If every microstate is equally likely (the founding assumption), the macrostate with the most microstates wins. As N grows the peak does not just rise: it narrows. The relative width of the heads fraction is 1/(2√N). Interactive · How sharp does the peak get? Number of coins (or gas molecules) N Exact sums of "N choose r" (log-gamma function), shaded band 45% to 55%. The curve is the bell shape of width 1/(2√N), drawn at equal height to show its width. For a mole of molecules the same width is 6.4 × 10−13. With 100 coins the chance of landing between 45 and 55 heads is about 73%, and exactly 50 only 8%. With 1,000 coins the band holds 99.86%. With 10,000 it holds all but about 2 in 10 billion. Now take N = 6 × 1023: the width is 6.4 × 10−13. This is why "average" and "actual" are the same thing for a gas. Entropy is a count, and the second law is a bet that wins Boltzmann's definition (formalised by Planck) is the one formula a graduate remembers, and it is carved on Boltzmann's grave in Vienna: S = k ln Wentropy = Boltzmann's constant × the logarithm of the number of microstates · k = 1.380649 × 10⁻²³ J/K, exact by definition since 2019 The logarithm is there for a reason: two separate systems multiply their counts, and logs turn products into sums, so entropy adds. Notice what the second law has become. It is not a force. A system drifts to the macrostate with the most microstates because there are overwhelmingly more of them, the way a shuffled deck is not found sorted. Try it with a small model: N molecules in a box with two halves, all starting on the left. At each step one molecule picked at random hops to the other side (the Ehrenfest urn model of 1907). Nothing in the rule prefers equal halves. Interactive · Release the gas Number of molecules Step10 steps100 stepsReset Each step picks one molecule uniformly at random (browser random numbers) and moves it across. S/k = ln(N choose left count). The mean time to return to "all on the left" is 2N steps. With 10 molecules the count wanders and does return to all-left now and then: on average once in 1,024 steps. With 100 molecules, 2100 is about 1.3 × 1030 steps, which at a million steps a second is about 4 × 1016 years, millions of times the age of the universe. The "law" that gas never gathers on one side is not a prohibition. It is a bet at odds that no one will ever see paid out. In the opposite direction, a 100-molecule system really can fluctuate, which is why small machines (molecular motors, nanoscale devices) behave differently from large ones. Temperature is how fast entropy grows with energy Temperature has just been a reading on a thermometer. Here it gets a definition. Put energy into a system and its count of microstates grows. The steepness of that growth is the thing that tells you whether it will give up or accept energy: 1/T = dS/dEtemperature is the inverse of the slope of entropy against energy The classic model is an Einstein solid: N oscillators sharing q quanta of energy. The number of ways to distribute them is Ω = (q + N − 1)! ÷ (q! (N − 1)!). Check: 3 oscillators sharing 3 quanta can do it 10 ways. Now put two such solids in contact and let quanta move. The combined count is ΩA × ΩB, and the split with the largest product is where the system sits. At that point the two slopes are equal, so the two temperatures are equal. Heat flows from hot to cold because that is the direction that raises the total count. Interactive · Two blocks trade energy Oscillators in A Oscillators in B Total quanta Quanta currently in A ln Ω from the log-gamma function. Temperature in units of ε/k: kT/ε = 1/ln((q+N)/(q+1)), the energy needed per unit entropy gain, found from adding one quantum. Move the quanta slider and watch heat want to flow toward the peak. Setting A to 100 oscillators and B to 200 with 300 quanta, the peak sits at about 99 quanta in A, one third of the total, matching A's one third of the oscillators. The two temperatures read about 1.45 and 1.46 there (in units of ε/k). Off the peak the hotter block has the lower slope and is the one that loses quanta. The Boltzmann factor: why cold things are boring Now stop looking at the whole box and look at one small system (an atom, a molecule) touching a big reservoir at temperature T. The reservoir can lend the small system energy, but lending a lot costs the reservoir many microstates, and each extra bit of energy taken multiplies its count by a fixed factor. The result is the most reused formula in physics. P(E) ∝ e−E / kTthe odds of finding a state fall off exponentially with its energy, measured in units of kT kT at 300 K (room temperature) is 25.85 meV (0.0259 eV): the natural thermal energy of a molecule. A state one kT above the ground state is about 37% as likely as the ground state; a state 10 kT up is 0.005% as likely. A molecular vibration (nitrogen's is about 0.29 eV) sits more than 11 kT up, so at room temperature only about 1 molecule in 75,000 is vibrating. That is why room-temperature air heat capacity barely feels vibrations. Interactive · Warm up a ladder Spacing = kT at 300 KN₂ vibration at 300 KN₂ vibration at 2000 K Temperature Level spacing Six equally spaced, non-degenerate levels; population ∝ exp(−nΔE/kT), normalised by the partition function Z. k = 8.617 × 10⁻⁵ eV/K. The same factor drives chemistry: reaction rates grow like e−Ea/kT (the Arrhenius law), so a reaction with a barrier of 50 kJ/mol goes about 1.9 times faster when 25 °C becomes 35 °C, which is where the rule of thumb "rates double for each 10 degrees" comes from. It drives stars too. Cecilia Payne's 1925 thesis used the Boltzmann factor, together with the matching rule for ionisation, to show that stars are mostly hydrogen: the 10.2 eV needed to lift hydrogen's electron to the level that gives the visible Balmer lines means that at a sun-like 5,772 K only about 5 in a billion neutral hydrogen atoms are in that level at any instant, yet it is enough to produce the lines. A gas is a distribution, not a speed Apply the Boltzmann factor to kinetic energy ½mv² and you get Maxwell's 1860 distribution of molecular speeds: a hump that starts at zero, peaks, then has an exponential tail. Two results are worth a lifetime. First, equipartition: every independent way a molecule can store energy as a square (each direction of motion, each rotation) holds on average ½kT. So the average translational energy is 3/2 kT = 38.8 meV at 300 K, for every gas, and heavier molecules simply move slower. Second, the tail: the fraction beyond some speed is controlled by e−mv²/2kT, so it is violently sensitive to mass and temperature. Worked number: nitrogen at 300 K has a root-mean-square speed of 517 m/s and the most likely speed is 422 m/s. Hydrogen molecules at the same temperature average 1,927 m/s. Interactive · Tune a gas H₂HeN₂O₂CO₂ Temperature f(v) = 4π (m/2πkT)3/2 v² e−mv²/2kT. Curve drawn at equal height to show its shape; axis 0 to 12,000 m/s with Earth's escape speed 11,186 m/s marked. The tail fraction is an upper-end measure only: real atmospheres lose gas from the thin top layer, so treat it as a trend, not a loss rate. At 1,000 K (roughly the temperature of the thin outer atmosphere, which swings with the sun), the fraction of hydrogen molecules above Earth's escape speed is about 10−6, helium about 10−12, and nitrogen about 10−90. That gap is why Earth keeps its nitrogen and oxygen and has lost almost all its free hydrogen and helium. Information has a heat price: demons and bits In 1867 James Clerk Maxwell imagined a tiny doorkeeper who watches molecules and opens a gate only for fast ones going one way and slow ones going the other. Without doing any work, it would sort a gas into hot and cold and defeat the second law. The paradox was famous for a century. The resolution came from information: the demon must remember what it saw, and memory is finite, so eventually it must erase. Rolf Landauer (1961) showed that erasing one bit must release at least kT ln 2 of heat, and Charles Bennett (1982) used that to close the case. Eerase ≥ k T ln 2= 2.87 × 10⁻²¹ J (0.018 eV) per bit at 300 K That is far below what any chip dissipates, but it is real. In 2012 a team in Lyon trapped a single glass bead in a double well to act as a one-bit memory and measured the heat from erasing it, approaching the limit as they erased slowly (Bérut et al., Nature 483, 187). The idea that information is physical is now a working principle, and it ties statistical mechanics to Computer Architecture (34/25) and Theory of Computation (34/29). What a graduate just sees Macrostates are piles of microstates; the biggest pile wins, and it wins by more the bigger N gets. Fluctuations scale like 1/√N, so a mole of anything obeys sharp laws. Entropy is ln of a count, and the second law is probability at astronomical odds. Temperature is the slope of entropy against energy; equal slopes mean equilibrium. Every thermally accessible state has weight e−E/kT; compare any energy to kT (about 26 meV at room temperature). Each quadratic way of storing energy holds ½kT, and mass sets speed, not energy. Tails of distributions decide rare events: reactions, escape, failure. Information is physical: erasing a bit costs at least kT ln 2. Where it shows up next Condensed Matter Physics (34/87): electrons in solids obey quantum versions of these counts (Fermi–Dirac), which decide conductors, insulators and semiconductors. Astrophysics & Cosmology (34/88): stellar spectra, the cosmic microwave background and the entropy of black holes are all statistical mechanics. Thermodynamics (34/14) and Heat Transfer (34/16): their laws are the averaged form of what you just counted. In the world: why batteries and chips are temperature-sensitive, how fridges and heat pumps are limited, the Arrhenius ageing tests used on electronics, and the sampling methods in machine learning that borrow the Boltzmann distribution. If you want to go deeper 📘 Textbook. Daniel Schroeder, An Introduction to Thermal Physics (Addison-Wesley, 1999). The standard first course, built on exactly the counting approach used here. 📘 Textbook. Charles Kittel and Herbert Kroemer, Thermal Physics (2nd edition, W. H. Freeman, 1980). Compact, and a common second book. 📘 Gentler. The Feynman Lectures on Physics, Volume I, chapters 39 to 46 (kinetic theory and statistical mechanics), free at feynmanlectures.caltech.edu. 🌐 Free course. MIT OpenCourseWare 8.044 Statistical Physics I (Spring 2013). The takeaway Count microstates. Entropy is the logarithm of the count; temperature is how steeply it climbs with energy; the Boltzmann factor e−E/kT weights every state; and for 1023 particles the most likely macrostate is the only one you will ever see. Heat flowing downhill is not a decree but an overwhelming majority. Try this: this week, ask of anything you meet, "how big is this energy compared with kT?" A 1.5 V battery, a chemical bond, a photon of red light are all hundreds of kT. A hot cup or a warm room is a few. The answer tells you whether heat can wreck it. Sources & Further Reading Sources. The counting, Einstein solid, Boltzmann factor, equipartition and Maxwell–Boltzmann results are standard (Schroeder; Kittel & Kroemer). k = 1.380649 × 10⁻²³ J/K exact since the 2019 SI redefinition; other constants CODATA 2018. Planck evaluated k in 1900–1901 and S = k ln W is on Boltzmann's grave in Vienna (Zentralfriedhof). The Ehrenfest urn is from 1907, Maxwell's speed distribution from 1860, and Cecilia Payne's thesis from 1925. Landauer 1961 and Bennett 1982 are cited from the literature. Experiment: Bérut et al., "Experimental verification of Landauer's principle linking information and thermodynamics," Nature 483, 187–190 (8 March 2012). Course contents: MIT OCW 8.044. Every number an interactive shows was computed in node and checked: P(45–55%) = 72.9% for N = 100, 99.86% for N = 1,000; relative width 6.4 × 10⁻¹³ for a mole; 2¹⁰⁰ = 1.27 × 10³⁰; Ω(3,3) = 10; kT = 25.85 meV at 300 K; N₂ at 300 K vrms = 517 m/s; tail fractions 10−5.9 (H₂), 10−12.3 (He), 10−90 (N₂) at 1,000 K; Landauer 2.87 × 10⁻²¹ J at 300 K; Arrhenius ratio 1.92 for 50 kJ/mol between 25 and 35 °C. 🌐 MIT OCW 8.044 Statistical Physics I 📘 Schroeder, An Introduction to Thermal Physics 📘 Feynman, Lectures on Physics, vol. I (free online) Step 14. Partial Differential Equations: One Law for Every Point of a Field --------------------------------------------------------------------------- Why: The equations of fields, heat and waves. A guitar string, a cooling pizza, an electric field, an electron in an atom and the air over a wing all obey one kind of statement: how a quantity changes at a point depends on how it is shaped around that point. Three families of equation cover most of physics. Pluck a guitar string and it sings a note and a tangle of fainter overtones. Pull a hot pizza from the oven and the crust cools long before the middle. Hang a wire between two hot and cold ends and, after a while, the temperature settles into a smooth ramp that never changes again. Three everyday scenes, three very different behaviours: something that rings and travels, something that smooths out and forgets, something that has settled and stays. The remarkable thing is that one idea writes all three down. Where an ordinary differential equation follows one quantity through time, a partial differential equation (PDE) follows a whole field: temperature at every point of the pizza, displacement at every point of the string. And the key quantity in all of them is the same: how the field curves in space. A peak with sharply curved top, a gentle ramp with none. As of the Clay Mathematics Institute's list, announced in 2000, whether the Navier–Stokes equations of fluid flow always have smooth solutions in three dimensions is still one of the seven Millennium Prize problems, worth one million dollars. A PDE course will not solve it, but it will show why even a one-line equation can be this hard. The course in one box Who takes it: Mathematics and Physics majors, typically in the third year, after multivariable calculus and ordinary differential equations. MIT teaches an undergraduate course on linear PDEs, analysis and numerics (18.303), and Cambridge's Tripos covers the classical equations in its methods courses. Engineers meet a lighter version earlier. What it is for: predicting how a field evolves or settles from a local rule plus its starting values and boundaries. Comes after: Multivariable Calculus (34/02) and Differential Equations (34/03). Leads to: Quantum Mechanics (34/83), where the Schrödinger equation is a PDE. It also underlies Electromagnetics and Waves (34/38), Heat Transfer (34/16) and Fluid Mechanics (34/15). Honest line: you will not solve a PDE on a strange shape. You will see how heat, waves and equilibrium differ, why sums of simple modes solve them, and why simulating them is a craft. Easier first reads: Differential Equations (34/03, a first glimpse of the heat equation), The Fourier Transform (12/12), Waves and Sound (13/13). Heat spreads, waves travel, and three kinds of equation Take a lump of heat on a long rod, or a lump of displacement on a long string, and ask what each equation does to it. heat: ∂u/∂t = α ∂²u/∂x²    wave: ∂²u/∂t² = c² ∂²u/∂x² The heat equation is first order in time: its curvature tells the temperature how fast to change, so a peak sinks and a dip fills. The wave equation is second order in time: curvature tells the field how fast its velocity changes, like a spring, so a bump does not sink but sets off a ripple. Add a third, Laplace's equation ∂²u/∂x² + ∂²u/∂y² = 0, in which time is absent altogether: it describes what is left when everything has settled. These are called parabolic, hyperbolic and elliptic, after the shapes of the curves Ax² + Bxy + Cy² = 1 whose coefficients A, B, C appear in the equation. For second-order equations, the sign of B² − 4AC sorts them: positive hyperbolic (wave), zero parabolic (heat), negative elliptic (Laplace). Interactive · The same lump, two laws Time Proof sketch: d'Alembert's solution of the wave equation. Change to coordinates that ride with the waves: ξ = x − ct and η = x + ct. In those coordinates the equation becomes ∂²u/∂ξ∂η = 0. Nothing depends on ξ after differentiating by η, so the solution is a function of ξ plus a function of η, u = F(x − ct) + G(x + ct): a shape moving right plus a shape moving left. The real trick is the change of variables. Jean le Rond d'Alembert found it for the vibrating string in 1747. For a lump starting at rest, the two shapes are half-size copies, exactly what the gold curve shows. No such pair of copies exists for heat: the lump sinks and widens, and its area stays the same. A plucked string is a chorus of standing waves A guitar string is pinned at both ends, so not every shape can ring steadily. Only some can: one hump, two humps with a still point in the middle, three humps, and so on. These standing waves or modes have frequencies in the ratio 1 : 2 : 3 : …, the harmonic series of music. Any starting shape, however jagged, can be built from them. u(x, t) = Σ bn sin(nπx/L) cos(nπct/L) Proof sketch: separation of variables. Guess a solution that is a product, u = X(x)T(t). Put it into the wave equation and divide by XT: the left side, X″/X, depends on x alone, and the right side, T″/(c²T), on t alone. A function of x alone can equal a function of t alone only if both are the same constant, say −k². Then X″ = −k²X, so X is a sine. Pinned ends force sin(kL) = 0, so k = nπ/L: only whole-number humps survive. The real trick is that last step: the boundary conditions pick out a discrete list of modes. A sum of solutions is again a solution, because the equation is linear, so you add the modes up with weights bn to match the starting pluck. Interactive · Build the pluck from its harmonics Where you pluck Harmonics included Time Add harmonics one at a time and the rounded blob sharpens into the triangle of the pluck; one is not enough, and six already look close. Pluck at the exact middle and every even harmonic vanishes, because the string is held at a node of each; pluck near the end and many overtones appear, which is why a guitar sounds brighter, thinner and more nasal near the bridge. Move the time slider and each harmonic advances at its own speed, so after half a period the whole shape has flipped upside down. This was not obvious to the people who first met it. D'Alembert and Euler, in the late 1740s, argued over which starting shapes the equation allowed, and Daniel Bernoulli proposed around 1750 that every motion was a sum of sines. The dispute ran for decades. Joseph Fourier's treatise on heat (1822) put sums of sines on firm ground as a general tool. Diffusion forgets: you cannot run heat backwards Put the same sine-mode recipe into the heat equation and a new thing happens. Each mode decays instead of oscillating, and mode n decays by a factor e−n²π²t (for a rod of unit length and unit diffusivity). The factor involves n squared, so wiggles die far faster than broad shapes. After a short time only the smooth parts of the starting temperature remain; the sharp detail is gone. mode n after time t = (its starting strength) × e−n²π²t Now try to go backwards: given the temperature today, what was it earlier? You must divide each mode by that decay factor, which means multiplying by en²π²t. For t = 0.01, mode 5 is boosted about 12 times, mode 10 about 19,000 times and mode 20 by about 1017. Any measurement error in the high modes is blown up by that factor. Proof sketch: there is nothing more than that exponential. The real trick is seeing that forward evolution is a smoothing operation that destroys information, and inverting it must therefore create enormous amplification of noise. Jacques Hadamard called a problem well-posed (1902) if a solution exists, is unique and depends continuously on the data; the backward heat problem fails the third test. Interactive · Try to un-cool a rod Time elapsed Measurement noise The starting temperature here is a hot rod with cold ends. With barely any noise and a short time, the recovery is close; wait longer or add a speck of noise, and the blue curve becomes a violent zigzag that bears no relation to the truth. This is the mathematical face of the arrow of time (see Entropy, 13/12): the forward direction is stable, and the backward is hopeless. It matters in practice, too: deblurring a photograph, or finding where a pollutant came from, are inverse problems with the same disease, which is why they need regularisation, a method of damping the highest modes on purpose. At equilibrium every point is the average of its neighbours Let the heat equation run for a long time with the edges of a plate held at fixed temperatures. The temperature stops changing, and at that point its time derivative is zero: what is left obeys Laplace's equation. Its meaning in plain words is that each point equals the average of the points around it. A point hotter than its neighbours would cool; a colder one would warm; at rest, none is out of line. The same equation rules the electrostatic potential in empty space, the flow of an ideal fluid and the shape of a soap film over a wire frame, when it is nearly flat. ∂²u/∂x² + ∂²u/∂y² = 0   ⟺   u(centre) = average of u on any circle round it Proof sketch: no hot spots inside. Suppose the largest value of u sat strictly inside the plate. That value is the average of its neighbours, none of which can exceed it, so all of them must equal it. Repeat for each neighbour and the maximum spreads out until it reaches the boundary. So the maximum (and likewise the minimum) lives on the edge: this is the maximum principle. The real trick is to use the averaging property twice. It also gives a second payoff: a square plate with four edges at four different temperatures has a centre that is exactly the average of the four, because rotating the plate by 90 degrees swaps the edges, and the solutions simply add. Interactive · Relax a hot plate to equilibrium Top edge Bottom edge Left edge Right edge Averaging sweeps The simulation does exactly what the equation says: it repeatedly replaces each interior cell by the average of its four neighbours, starting from a cold plate. Heat creeps in from the edges, slowly at first, and takes a few hundred sweeps to settle on this small grid; on a finer grid it takes many more, which is a hint of why large simulations need cleverer solvers. A simulation must let information cross each cell Put these equations on a computer and you replace the smooth field by values on a grid, stepping through time. 34/78 (Numerical Analysis) showed that stepping can explode; for PDEs it has a neat geometric explanation. Take the simplest wave: a shape sliding right at speed 1, ∂u/∂t + ∂u/∂x = 0. The upwind scheme updates each cell using its left neighbour: uinew = ui − ν (ui − ui−1),   ν = speed × time step ÷ cell width The number ν is the Courant number: the fraction of a cell the real wave travels in one step. Proof sketch. The true value at a point at the next time depends on the value one wave-travel upstream, which is ν cells to the left. If ν > 1 the true source lies more than one cell away, but the scheme only ever looks one cell to the left: it ignores the very information it needs, and the result cannot converge. The real trick is the idea of a domain of dependence. Richard Courant, Kurt Friedrichs and Hans Lewy published this necessary condition in 1928, in Mathematische Annalen; it is now the CFL condition. Interactive · March a pulse across a grid Square pulse Smooth bump Courant number ν At ν = 1 the scheme is exact, each step moving the pulse one cell. Below 1 it is stable but the pulse smears: the scheme secretly solves the exact equation plus a little diffusion, with a coefficient of about ½(1 − ν) times the cell width. Above 1 the shortest wavelengths are multiplied by |1 − 2ν| each step, which exceeds 1, and the numbers grow without bound; by ν = 1.2 the highest value is above 105 after 42 steps. The same kind of limit applied to the explicit heat equation in 34/03, where the time step had to stay below half the cell width squared. The same trick quantises the electron in a box Erwin Schrödinger's equation of 1926 looks different from the wave equation, with an i in it and only one time derivative: iħ ∂ψ/∂t = −(ħ²/2m) ∂²ψ/∂x²   (free particle in a box) But the method is identical. Separate variables, ψ = X(x)T(t), and the space part must again be a sine that vanishes at the walls, so only whole numbers of humps fit. Now the boundary condition does something stunning: it allows only a discrete ladder of energies, En = n²h²/8mL². This is quantisation, and it has the same proof as the guitar string's harmonics. The time part is just a spinning phase, so a single mode has a probability density |ψ|² that never changes: nothing visibly moves until you mix two modes, and then the density sloshes back and forth at the beat frequency set by their energy gap. Interactive · Two energy levels in a box Width of box Mix of level 1 and 2 Time For an electron in a box 1 nm wide (about the size of a few atoms), the lowest energy is 0.376 eV, the next 1.504 eV, the third 3.384 eV: each is n² times the first, using CODATA values for Planck's constant and the electron mass. Mixing the first two makes the electron slosh from one side to the other every 3.67 femtoseconds, some 270 trillion times a second. Narrow the box and the energies, and so the sloshing speed, rise sharply: confinement costs energy, a first taste of why chips shrink into the quantum regime (Quantum Mechanics, 34/83). What ψ means is a matter of real disagreement between interpretations (Copenhagen, many-worlds, pilot-wave), but all of them use these same numbers. What a graduate just sees A PDE says how a field changes at a point from how it is curved around the point. Heat smooths and forgets, waves carry shape without losing it, Laplace describes what is left at rest: the three families behave differently. Separation of variables turns a PDE into simpler pieces, and boundaries pick out discrete modes: harmonics of a string, energy levels of an atom. Linear problems add up: any shape is a sum of modes, and each evolves on its own. Diffusion destroys detail exponentially fast, so running it backwards amplifies noise: some problems are ill-posed. At equilibrium each point is the average of its neighbours, so extremes live on the boundary. A numerical scheme must look where the information comes from: step size and cell size are linked by CFL. Boundary and initial conditions matter as much as the equation; an equation alone has many solutions. Where it shows up next Quantum Mechanics (34/83): the Schrödinger equation is a PDE and the particle in a box is the first example. Hydrogen's orbitals come from separating variables in three dimensions. Electromagnetics and Waves (34/38): Maxwell's equations imply the wave equation for light and Laplace's equation for static fields. Heat Transfer (34/16) and Fluid Mechanics (34/15): the heat equation and the Navier–Stokes equations are PDEs; wind tunnels and weather models are numerical PDE solvers. Finance: the Black–Scholes option-pricing equation is a heat equation in disguise. Computing and imaging: image blurring, medical-scanner reconstruction and the physics in animated films are all PDE solvers, with the stability caution above. If you want to go deeper 📘 Textbook: Walter Strauss, Partial Differential Equations: An Introduction (2nd ed., Wiley, 2008): the standard first course, clear on waves, heat and Laplace together. 📘 Textbook: Lawrence C. Evans, Partial Differential Equations (2nd ed., American Mathematical Society, 2010): the rigorous graduate-level text for mathematicians. 📘 Gentler: Ian Stewart, In Pursuit of the Unknown: 17 Equations That Changed the World (Basic Books, 2012), which tells the stories of the wave, heat, Navier–Stokes and Schrödinger equations. 🌐 Free course: MIT OpenCourseWare 18.303 Linear Partial Differential Equations: Analysis and Numerics (Fall 2014, Steven G. Johnson), with notes and problem sets. The takeaway A PDE writes a law for a whole field from its local shape. Heat equations smooth and forget, wave equations travel and keep their shape, Laplace's equation describes rest. Boundaries select a ladder of modes, solving the string and the quantum box with one method. Forgetting makes backward problems ill-posed, and simulation must obey the speed at which information moves. Try this: this week, watch something cool down or settle (a cup of tea, a candle's warm glass) and notice whether the hot spot sinks, spreads or sloshes. Then pluck a stretched rubber band at its middle and at its end and listen: you are hearing which harmonics each pluck contains. Sources & Further Reading Sources. D'Alembert's 1747 memoir on the vibrating string and the d'Alembert formula; the Euler–d'Alembert–Bernoulli controversy and Fourier's role in resolving it (Wikipedia, "Wave equation"; arXiv 1803.05287, "Resolution of the 300-Year-Old Vibrating String Controversy"; Bernoulli's sine-series claim is dated "around 1750" in secondary sources). Fourier, Théorie analytique de la chaleur (1822). Hadamard's well-posed problems (1902) and the backward heat equation as an ill-posed example (Wikipedia, "Well-posed problem"). Courant, Friedrichs and Lewy, "Über die partiellen Differenzengleichungen der mathematischen Physik", Mathematische Annalen 100 (1928), 32–74. Schrödinger's equation, 1926. Navier–Stokes as a Clay Millennium Prize problem (announced 2000; listed as unsolved at the time of writing; check the Clay Mathematics Institute for the current status). Constants: CODATA 2018 values of the Planck constant (6.62607015 × 10−34 J s, exact), electron mass 9.1093837015 × 10−31 kg and elementary charge. Computed in node: Fourier sine series of the triangular pluck matches the triangle (maximum error 10−3 with 400 modes), and the fundamental carries 81.1% of the energy for a mid-point pluck (8/π² = 81.06%); heat and wave areas conserved (1.418); mode amplification en²π²t at t = 0.01: 11.8 (n = 5), 1.9 × 104 (n = 10), 1.4 × 1017 (n = 20); relaxation of a 21 × 21 grid converges to the mean of the four edges (25 for edges 100, 0, 0, 0 after 2,000 sweeps); upwind scheme at ν = 1.2 reaches 1.2 × 105 after 42 steps; box energies 0.37603, 1.50412 and 3.38427 eV for 1 nm and beat period 3.666 fs; mean position 0.3199 and 0.6801 of the box width at the extremes of the beat. All interactives use illustrative fields chosen for the lesson. 🌐 MIT OpenCourseWare 18.303 Linear Partial Differential Equations 📘 Walter Strauss, Partial Differential Equations: An Introduction, 2nd ed. (Wiley) 📘 Lawrence C. Evans, Partial Differential Equations, 2nd ed. (AMS) 📘 Ian Stewart, In Pursuit of the Unknown: 17 Equations That Changed the World (Basic Books) 🌐 Resolution of the 300-Year-Old Vibrating String Controversy (arXiv) Step 15. Electromagnetics & Waves: Why Fast Signals Stop Acting Like Wires -------------------------------------------------------------------------- Why: Maxwell's equations at full strength: radiation and waves. Why the cable to your aerial has to be a particular kind of cable, why a pulse can bounce back from the end of a wire, why antennas are the size they are, and why your microwave door has a mesh: four equations, and a speed. In an introductory circuit, a wire is a perfect line: whatever voltage you put in at one end appears at the other end at the same instant. That is a lie, and a useful one. Electrical signals travel at a large fraction of the speed of light, which sounds fast until you notice that light covers 30 cm in a billionth of a second. A modern processor's signals change in less than that. On the circuit board, a wire a few centimetres long is already a long journey. Then things go odd. A signal can bounce back from the far end of a cable as an echo. A TV aerial needs a cable of a particular "impedance". A radio aerial is a rod of a particular length. One subject explains all of it: a wire is not a wire, it is a guide for a wave. The course in one box Who takes it: electrical and computer engineers, usually in year 3; physicists take a theory-heavy cousin of it. What it's for: predicting how electric and magnetic fields move through space and along wires: waves, reflections, antennas and shielding. Comes after: Physics II: Electricity & Magnetism (34/07) and Multivariable Calculus (34/02), because fields are functions of position and the equations use divergence and curl. Leads to: Communication Systems (34/40), since every radio link begins with an antenna and a wave. It also feeds Power Systems & Electric Machines (34/39), where long transmission lines are the same maths at 50 or 60 Hz, and Embedded Systems (34/41), where board layout decides whether the chip works. Honest line: you won't be able to design an antenna or a high-speed board after this. You will see why a cable has an impedance, why an antenna has a length, and why fast edges, not fast clocks, are what make a circuit board hard. For a gentler first read, see Physics II (34/07). Maxwell's four equations, one picture each In the 1860s James Clerk Maxwell gathered what was known about electricity and magnetism into a small set of equations and added one missing piece. Oliver Heaviside later rewrote them into the four compact vector equations in textbooks today. In words, each one is a statement about how fields behave around a point in space. 1. Charge starts E lines 2. B lines never end S N 3. Changing B curls E B grows 4. Current curls B current Gauss's law: electric field lines start on positive charge and end on negative charge. ∇·E = ρ/ε₀ No magnetic charges: magnetic field lines have no beginning and no end; they form closed loops. ∇·B = 0 Faraday's law: a magnetic field that changes in time makes an electric field that circles around it. This is how a generator, a transformer and a wireless charger work. ∇×E = −∂B/∂t Ampère's law, with Maxwell's addition: a current makes a magnetic field that circles it, and so does an electric field that changes in time. ∇×B = μ₀J + μ₀ε₀ ∂E/∂t The last term is Maxwell's own, and it is the one that matters for this subject. Faraday says a changing B makes an E. Maxwell's term says a changing E makes a B. Each makes the other, so once you shake the fields they can keep each other going without any wire or charge, and leave the source behind as a travelling wave. Hertz showed in experiments in 1887 and 1888 that such waves exist, can be reflected and refracted, and travel at the speed of light. Waves, the speed of light, and the spectrum Put numbers into Maxwell's equations and a wave solution drops out with a speed you can calculate from two constants that you can measure with capacitors and coils on a bench. The speed is c = 1 / √(μ₀ε₀) = 299,792,458 m/s. Maxwell noticed that this was the speed of light, and concluded that light is an electromagnetic wave. Since 1983 the number is exact, because the metre is now defined from it: a metre is the distance light travels in 1/299,792,458 of a second. c = f · λspeed = frequency × wavelength, for any wave; for these, c ≈ 3 × 10⁸ m/s in vacuum One relation, and the entire spectrum follows. Slow waves are long and fast ones are short: at 50 Hz the wavelength is 6,000 km, at 100 MHz (FM radio) it is 3 m, at 2.45 GHz (Wi-Fi and microwave ovens) 12 cm, and for green light about 555 nanometres. Radio, microwaves, infrared, light, ultraviolet and X-rays are the same thing at different frequencies. What changes is how they interact with matter, and that decides what each band is used for. Inside a material the wave is slower: a coax cable with a plastic insulator carries it at about two-thirds of c, a glass fibre about 0.68 c, and a signal in a buried layer of a typical circuit board about half c (these depend on the insulator's permittivity, as 1/√εr). Interactive · The spectrum and its wavelengths Mains 50 HzFM 100 MHzWi-Fi 2.45 GHz5G mmWave 28 GHzGreen light Vacuum / airCoaxGlass fibreCircuit board Frequency λ = (speed in the medium) ÷ f. Band edges follow the usual ITU naming; the uses are examples, and allocations differ between countries. When a wire stops being a wire Now take a two-wire cable and connect a battery with a switch to one end. When you close the switch, the far end does not know yet. The wave has to travel down the cable, and at each instant the part of the line the wave has reached carries a voltage and a current in a fixed ratio: its characteristic impedance Z₀, set only by the geometry and the insulator, not by the length. Common ones: 50 Ω (lab, radio), 75 Ω (TV, video), about 100 Ω (Ethernet twisted pair). The wave then reaches the far end and meets whatever is connected there. If the load resistance is exactly Z₀, the wave sees what looks like more line, and all of it is absorbed. If it is anything else, the load cannot take that voltage and current ratio, and the difference goes back as a reflected wave: Γ = (RL − Z₀) / (RL + Z₀)reflection coefficient: +1 for an open end, −1 for a short, 0 when matched The reflection runs back to the source, and if the source impedance does not match the line either, it reflects again. The result is a staircase of voltage with ringing that settles only after several round trips. Worked example, in the interactive below: a driver of 20 Ω pushing a 1 V step down a 50 Ω line into an open end (a chip input draws almost no current). The first wave is 1 × 50/(20+50) = 0.714 V. At the open end the voltage doubles to 1.43 V, an overshoot of 43% above the 1 V it will finally settle at. It then rings down: 0.82, 1.08, 0.97, 1.01 V. When does this matter? A common rule of thumb is that a connection needs treating as a transmission line once it is longer than about a tenth of the wavelength of the highest frequency present. A signal edge that rises in 1 ns has significant content up to about 0.35/(1 ns) = 350 MHz. On a circuit board, where waves travel at about 0.48 c, that wavelength is about 41 cm, and a tenth of it is about 4 cm. So a signal trace longer than that, carrying a 1 ns edge, can ring. The clock speed does not matter. The edge speed does, which is why a slow clock on a fast chip is still a signal-integrity problem. Interactive · A pulse bouncing on a mismatched line Open endMatched far endShorted endLoad too smallMatched source Load resistance (far end) Source resistance (near end) A 1 V step on a lossless 50 Ω line, computed with the standard bounce (lattice) method. T is the one-way travel time: 5 ns for a 1 m coax cable, about 7 ps per millimetre in a typical circuit board. "Matched source" is 50 Ω at the source and an open far end: one reflection, then silence. Matching: absorbing the wave instead of bouncing it Every reflection is power that was not delivered. Engineers measure a mismatch in a few equivalent ways: the reflection coefficient Γ, the fraction of power reflected |Γ|², the standing-wave ratio (VSWR, which is what the little meter on an amateur radio shows), or the return loss in decibels. A 75 Ω TV cable plugged into a 50 Ω instrument has Γ = 25/125 = 0.2: that is 4% of the power reflected, a VSWR of 1.5, and 14 dB of return loss. For an antenna that is a small price; for a pulse train in a computer it can be fatal, because the echo arrives at the receiver just as the next bit does. The cures are all ways to give the wave something that looks like more line: a termination resistor equal to Z₀ at the end, a matching network, a transformer, or lines cut to exact fractions of a wavelength. Interactive · Power lost to a mismatch Matched 50 ΩTV cable 75 ΩTwisted pair 100 ΩPoor 10 Ω Load A real line with a real (resistive) load. The dashed green line marks the matched value, where nothing is reflected. Skin effect: current hugs the outside At steady DC, current spreads through the whole cross-section of a wire. As the frequency rises, the changing magnetic field inside the wire induces eddy currents that push the current out toward the surface. The current crowds into a thin layer, the skin depth: δ = √( ρ / (π f μ₀) )skin depth: grows with resistivity ρ, falls with frequency f (for non-magnetic metals) For copper at 60 Hz this is 8.4 mm, so the middle of a thick cable carries little: this is why high-voltage lines use steel-cored aluminium with the current in the outside strands, and why large conductors for 50 or 60 Hz are made of insulated strands or hollow tubes. At 1 MHz the skin is 65 µm, as thick as a hair. At 1 GHz it is 2 µm, so the inside of the conductor is irrelevant and only its surface finish matters, which is why microwave hardware is silver- or gold-plated. A 2 mm radius copper wire at 1 MHz has an AC resistance about 16 times its DC value in the thin-skin approximation. Interactive · How deep does the current go? CopperAluminiumSilver 60 Hz mains1 MHz (AM radio)1 GHz Frequency Wire size Resistivities at about 20 °C: copper 1.68×10⁻⁸, aluminium 2.65×10⁻⁸, silver 1.59×10⁻⁸ Ω·m. Skin depths ignore temperature and magnetism. The resistance ratio is the thin-skin approximation; it is accurate when the skin is much thinner than the wire. Antennas: why a quarter or a half wavelength A wire carrying a steady current does not radiate. One carrying a current that changes fast enough does: the changing magnetic field makes an electric field, which makes a magnetic field, and the disturbance leaves for good. The trouble is efficiency. A rod much shorter than a wavelength has the charge slosh back and forth across so small a distance that it radiates little and mostly heats up the wire. The special lengths come from the fact that current has to go to zero at the open end of a rod: there is nowhere for it to go. A rod that is half a wavelength long (a half-wave dipole) carries a standing wave with its current largest in the middle and zero at both ends, like a guitar string vibrating at its lowest note. At that length the rod resonates, its input looks like a pure resistance of about 73 Ω (so you can drive it without a matching coil) and both halves radiate in step. A quarter-wave rod above a metal plane does the same job, because the plane makes a mirror image of the missing half: a car's radio whip for 100 MHz is about 75 cm, a quarter of 3 m. Practical rods are cut a few per cent shorter than the free-space number because of end effects. Worked example: for Wi-Fi at 2.45 GHz, a wavelength is 12.2 cm, so a half-wave rod is 6.1 cm and a quarter-wave stub is 3.1 cm. That is why a router antenna is a stubby rod and an FM aerial is a long one. A dipole radiates nothing along its own axis and most at right angles to it, which is why you tilt a TV aerial. Interactive · Cut an antenna to length FM 98 MHz433 MHz900 MHzWi-Fi 2.45 GHz5.8 GHz Rod length Ideal thin rod, centre-fed, sine-shaped current (the textbook model). The pattern is from the standard formula [cos(kL/2·cosθ) − cos(kL/2)] / sinθ; directivity and feed resistance are integrated numerically (half-wave: 1.64 and 73.1 Ω). Shielding and EMC Every circuit is also an antenna, and every antenna is also a receiver. Electromagnetic compatibility (EMC) is the discipline of making sure a device neither radiates enough to disturb others nor is easily upset by them. The law follows the physics: the EU's EMC Directive (2014/30/EU) requires equipment to neither generate nor be disturbed by electromagnetic disturbances beyond set levels, and in the US the FCC's Part 15 limits what unintentional radiators may emit. The main tool is a conducting shield. Charges in a closed metal box move until the fields inside cancel, so a closed box shields its contents, and a mesh does nearly as well as long as the holes are much smaller than the wavelength. The microwave oven is the classic case: its door window has a metal mesh with holes a millimetre or two wide, far below the 12 cm wavelength at 2.45 GHz, so the microwaves reflect off it while visible light, whose wavelength is a few hundred thousand times smaller, passes through. Loops are the enemy: by Faraday's law a loop picks up noise in proportion to its area, and a twisted pair (Ethernet) has loops that alternate in direction and cancel. What a graduate just sees Any wave has c = f·λ; a "long" wire is long compared with the wavelength, not with a ruler. A signal's trouble is in its edges: a fast edge contains high frequencies even if the clock is slow. A cable has an impedance that doesn't depend on its length; anything that isn't that impedance reflects part of the wave. An open end doubles the voltage, a short flips it: reflections explain ringing, overshoot and glitches. Current flows on the surface at high frequency, so the inside of a conductor is wasted metal. An antenna is a resonator: its length is about half or a quarter of the wavelength, and a small one is always a compromise. A shield works if its holes are small against the wavelength; a loop collects noise in proportion to its area. Where it shows up next Communication Systems (34/40): an antenna and a channel are the first and last parts of every radio link, and the band you pick decides the antenna size and how far the signal goes. Power Systems & Electric Machines (34/39): long high-voltage lines are transmission lines too, and skin effect decides conductor design. Embedded Systems (34/41) and Computer Architecture (34/25): memory buses and chip-to-chip links are carefully matched lines; a layout rule like "keep the clock trace short" is a wavelength rule. Signals & Systems (34/37): the spectrum of an edge is why edges are the problem. The real world: Wi-Fi routers, GPS, radar, MRI, fibre-optic cables, noise in audio gear, and a phone passing its radiated-emissions test. If you want to go deeper 📘 Textbook: Fawwaz T. Ulaby and Umberto Ravaioli, Fundamentals of Applied Electromagnetics (Pearson): the usual engineering text, strong on transmission lines, waves and antennas. 📘 Textbook: David J. Griffiths, Introduction to Electrodynamics (Cambridge University Press): the physicist's favourite, brilliant on the equations; for the microwave and board side, David M. Pozar's Microwave Engineering (Wiley). 📘 Gentler: The Feynman Lectures on Physics, Vol. II, free online, for the physical picture of the fields and of light as a wave. ▶️ Free course: MIT OpenCourseWare 6.013 Electromagnetics and Applications (Spring 2009). 🌐 Easier first reads in this library: Physics II (34/07), Waves and Sound (13/13) and The Fourier Transform (12/12). The takeaway Maxwell's equations say that changing electric and magnetic fields make each other, so they can travel as a wave at c = fλ. A wire is a wave guide with an impedance: any mismatch reflects part of the wave, and fast edges, not fast clocks, make a board behave like a transmission line. At high frequency current stays near the surface, antennas are sized by the wavelength (half or a quarter), and shields work when their holes are small against it. Try this: look at the back of your Wi-Fi router, then at the car aerial or the FM radio's wire. The router's rod is a few centimetres long and the FM wire is about a metre: one is a half or quarter of 12 cm, the other of 3 m. Then check your microwave: shine a torch at the door and see the mesh. Sources & Further Reading Sources. Maxwell's equations, transmission-line theory, skin effect and dipole antenna theory are standard textbook material (Ulaby; Griffiths; Pozar; Balanis, Antenna Theory). Maxwell's field theory dates from 1861 to 1865 (see Wikipedia, "Maxwell's equations", which credits Heaviside with the modern vector form); Hertz's experiments 1886 to 1889 (Wikipedia, "Heinrich Hertz"). The speed of light exactly 299,792,458 m/s since the 1983 redefinition of the metre (17th CGPM, Resolution 1; BIPM and NIST). Copper skin depth of 8.4 mm at 60 Hz, 65 µm at 1 MHz, 2 µm at 1 GHz: Wikipedia, "Skin effect"; resistivities from standard tables (CRC Handbook). FM 87.5 to 108 MHz (88 to 108 in the Americas) and AM medium wave 531 to 1602 kHz (530 to 1700 in the Americas): ITU and Wikipedia, "FM broadcast band" and "Medium wave". EU EMC Directive 2014/30/EU and FCC 47 CFR Part 15: the regulations themselves (eCFR; EUR-Lex). The "tenth of a wavelength" and 0.35/rise-time rules are rules of thumb. Computed in node: every number in the interactives, including the bounce voltages, the 73.1 Ω and 1.64 dipole values, skin depths and the 16-fold AC resistance. 🌐 MIT OpenCourseWare 6.013 🌐 The Feynman Lectures on Physics, Vol. II (free) 📘 Ulaby and Ravaioli, Fundamentals of Applied Electromagnetics · Griffiths, Introduction to Electrodynamics · Pozar, Microwave Engineering Step 16. Numerical Analysis: Answers You Can Trust, and How Wrong They Are -------------------------------------------------------------------------- Why: Most real problems are solved numerically. Type 0.1 + 0.2 into almost any programming language and it will not say 0.3. That is not a bug. It is the first lesson in the art of getting good answers out of a machine that cannot hold a single exact number. In the Gulf War, on 25 February 1991, a Patriot missile battery at Dhahran failed to engage an incoming Scud, which struck a barracks and killed 28 American soldiers. The US General Accounting Office traced the failure to a software problem: the system counted time in tenths of a second, and a tenth is not a number a binary computer can store exactly. Each tick carried a tiny error. After about 100 hours of continuous running the clock was off by roughly a third of a second, which for a missile moving at the speed of a Scud is more than half a kilometre. Nothing about that error was large. What mattered was that nobody had asked how a small error would grow over time. That question is the whole of numerical analysis: how to compute answers with finite digits, how big the error is, and which methods keep it small and which let it explode. Almost every number you see from a weather forecast, a bridge simulation, a flight path, a game physics engine or an AI model came out of a numerical method. Mathematics gives the equation; numerical analysis gives you an answer you can trust, with an honest estimate of how wrong it is. The course in one box Who takes it: Mathematics, Computer Science, Physics and engineering students, usually in the second or third year, once they know calculus, linear algebra and differential equations. Mathematics programmes (MIT's Course 18, Cambridge) treat it as a rigorous subject with proofs; engineering programmes teach it as a toolkit. What it is for: turning continuous mathematics into finite computation, and knowing when to believe the result. Comes after: Differential Equations (34/03), Linear Algebra (34/04) and Programming Fundamentals (34/09). Leads to: Partial Differential Equations (34/79), where every real simulation is numerical; also Machine Learning (34/32), which is numerical optimisation at scale. Honest line: you will not learn to write a production solver. You will see the six ideas every solver is built around: floating point, the two-error trade-off, fast root-finding, conditioning, order of accuracy and stability. Easier first reads: Differential Equations (34/03), which first met Euler's method breaking down, and Calculus (12/11). Computers keep about sixteen digits, and 0.1 is not one of them A computer stores a real number as a sign, an exponent and a fixed-length string of binary digits, in the standard first published as IEEE 754 in 1985 (revised in 2008 and 2019). The common "double" format has 53 significant bits, so neighbouring numbers near 1 differ by 2−52, about 2.2 × 10−16. That gap is called machine epsilon. Between any two stored numbers there is a hole, and every answer is rounded into the nearest one. relative rounding error of one operation ≤ ε / 2 ≈ 1.1 × 10−16 Proof sketch: why 0.1 is not stored exactly. A fraction has a finite binary expansion only when its denominator, in lowest terms, is a power of 2. One tenth is 1/(2 × 5), and the 5 is the problem: its binary expansion repeats forever, 0.000110011001100…. The real trick is the denominator test. The computer cuts the repetition after 53 significant bits and keeps the nearest value, which is 0.1000000000000000055511151231257827…, slightly too big. The same happens to 0.2 and 0.3, and the three errors do not line up, which is why 0.1 + 0.2 is 0.30000000000000004 rather than 0.3. Interactive · What the machine really stored 0.1 0.5 1/3 0.1 + 0.2 2⁵³ + 1 Add 0.1 to itself Notice that 0.5, which is 2−1, is stored perfectly, and so is any whole number up to 253 = 9,007,199,254,740,992. One more than that cannot be stored: the last button shows it silently rounding back down. The Patriot clock did what the slider does, but with only 24 bits and 3.6 million additions: the tiny drift per tick added up to the third of a second. Rounding errors are small; accumulated or amplified, they are not. The fix is rarely "use more digits". It is to design the computation so that errors cannot pile up, which the next five ideas show. Every method has two errors that fight Suppose you want the slope of a curve at a point and can only evaluate the function. The textbook recipe is the forward difference: (f(x+h) − f(x)) / h. The calculus says the smaller h is, the better. The computer disagrees. total error ≈ truncation (grows with h) + rounding (grows as h shrinks) Proof sketch. A Taylor series gives f(x+h) = f(x) + h f′ + ½h²f″ + …, so the recipe is off by about ½h f″: truncation error, from throwing away the rest of the series. But the two function values agree in nearly every digit when h is tiny, so their difference keeps only a few meaningful digits and carries an absolute noise of about εf. Dividing by h magnifies that noise to ε/h. The real trick is to balance the two: ½h ≈ ε/h gives h ≈ √ε ≈ 10−8. Subtracting two nearly equal numbers is called cancellation, and it is the root of most numerical disasters: for example, (1 − cos x)/x² at x = 10−8 returns 0 on a computer, though the true answer is 0.5. Interactive · The V-shaped error Step size h Slide left from large steps. The error falls along a straight line (truncation), reaches a floor, then climbs again as rounding takes over. The forward formula bottoms out near 10−8 with an error of about 3 × 10−9; the central difference, (f(x+h) − f(x−h))/2h, has a smaller truncation error (proportional to h²) and so reaches about 10−11 near h = 10−5. A better formula buys accuracy, but neither can beat the floor. Newton's method: the number of correct digits doubles To solve f(x) = 0, draw the tangent to the curve at your current guess, and jump to where the tangent crosses zero. Repeat. xnext = x − f(x) / f′(x) Newton described the idea for polynomials in 1669 (published 1711), Joseph Raphson gave a simpler form in 1690, and Thomas Simpson extended it to general equations with calculus in 1740. For square roots the idea is far older: a Babylonian clay tablet from about 1800–1600 BC, YBC 7289, records √2 as 1;24,51,10 in base 60, about 1.41421296, accurate to six decimals. Historians infer that scribes used an averaging rule equivalent to Newton's, though the tablet shows the answer and not the method. Proof sketch for √2. Newton's step for x² − 2 is xnext = (x + 2/x)/2, the average of a guess and 2 divided by the guess. A little algebra gives xnext − √2 = (x − √2)² / (2x). The real trick is the square: if the error is 10−3, the next error is about 10−6, and then 10−12. The number of correct digits roughly doubles each step, called quadratic convergence. Starting at 1 the errors are 0.41, 0.086, 0.0025, 0.0000021, 1.6 × 10−12, then rounding level. Bisection, which halves an interval known to bracket the root, gains only one binary digit per step: after the same five steps its error is still about 0.008. Interactive · Newton against bisection x² − 2 cos x − x x³ − 2x + 2 Starting guess Now try the third equation from a start of 0 or 1. Newton jumps from 0 to 1, back to 0, and never settles: it cycles forever. Try x² − 2 from 0: the slope is zero, so the tangent never crosses the axis. Newton is fast and fragile; bisection is slow and certain. Real solvers use both, bracketing with one and accelerating with the other. A numerical analyst always asks of a method: how fast, and when does it fail? Some problems amplify errors, whatever method you use Take two lines that are almost parallel. Their crossing point sits somewhere, but nudge one line by a hair and the crossing slides a long way. That is not the fault of the method used to find the point. It is a property of the problem, measured by its condition number. relative change in the answer ≤ cond(A) × relative change in the data Proof sketch. To solve Ax = b, suppose b is off by a small δb. The answer moves by δx = A−1δb. The size of A−1 bounds the output wobble, and the size of A bounds how small b can be relative to x. Putting both together: relative wobble in x ≤ ‖A‖ ‖A−1‖ × relative wobble in b. The real trick is to notice that the inverse of a nearly singular matrix is huge, so tiny input noise (a rounding error is noise of size ε) is blown up by cond(A). A condition number of 10k means you lose about k of your 16 digits, however clever the algorithm. The famous test case is the Hilbert matrix, with entries 1/(i + j − 1). It looks harmless. Below, the page builds one, sets the true answer to a vector of ones, and solves it in ordinary double precision. Interactive · Losing digits to conditioning Matrix size At 5 × 5 the condition number is about 106 and the answer is good to 12 digits. At 10 × 10 it is about 3.5 × 1013 and only three or four digits survive. At 13 × 13 (condition 1018) the "solution" is wrong in its first digit and the program raised no error. That silence is the lesson: a numerical answer does not announce its own accuracy, so you check the condition number, or a residual, or a second method. The order of a method says what a smaller step buys To find the area under a curve, cut it into n strips. The trapezoid rule replaces the curve by a straight chord in each strip; Simpson's rule uses a parabola through three points. Both converge as n grows, but at very different speeds. error ≈ C × hp   so halving h divides the error by 2p The exponent p is the method's order. The trapezoid rule has order 2 (halve the strip, error ÷ 4); Simpson's has order 4 (error ÷ 16). On a log–log plot every method is a straight line whose slope is −p, which is how analysts read off the order from an experiment. Proof sketch. A chord under a smooth curve misses by an amount proportional to the curvature f″ times the strip width squared, and there are 1/h strips, giving a total of order h². The real trick behind Simpson is that the leading h² error terms of two trapezoid estimates can be cancelled: Simpson's rule with 2n strips equals (4T2n − Tn)/3, where T is the trapezoid estimate. Combining two rough answers to cancel their main error is called Richardson extrapolation, and it is how a great deal of accuracy is bought cheaply. Interactive · Two methods, two slopes Strips With 8 strips the trapezoid rule is off by about 2 × 10−3 on ∫01 ex dx, and Simpson's by 2 × 10−6. At 1,024 strips Simpson's error hits roundoff and the slope bends flat: the V-shape of the second idea again. An engineer who cares about cost asks, "how many function evaluations does the order buy me?" A method can be accurate in theory and explode in practice The 34/03 piece showed Euler's method blowing up when the step is too large. The deeper fact is that the limit on the step often comes from a fast part of the problem you do not even care about. Take y′ = −50(y − cos t) − sin t, started at 1.2. The exact answer is cos t plus a fast transient 0.2e−50t that is gone within 0.1 seconds. After that the solution is a gentle cosine. A problem with a fast, uninteresting scale next to a slow, interesting one is called stiff. Proof sketch. Explicit Euler multiplies the transient by (1 − 50h) each step, which is smaller than 1 in size only for h < 0.04, even after the transient is gone. Implicit (backward) Euler evaluates the rate at the new time, which gives a multiplier of 1/(1 + 50h), always below 1 for any h. The real trick is to look at what each method does to the pure decaying mode and ask for what steps its multiplier stays below 1. The price: each implicit step means solving an equation, which brings back Newton's method and linear systems from the earlier ideas. Interactive · Stiff problem, two methods Step size Below h = 0.04 both methods follow the cosine. Push the slider past it and the explicit method flips sign each step, with growing swings: at h = 0.05 it ends at over two million, at 0.1 at over 1011, while the exact answer is about −0.416. The implicit method gets it right to three decimals at the same big steps. The general slogan of the field: a consistent method that is stable converges; without stability, accurate-looking formulas produce garbage. Where analysts disagree is on how much accuracy is worth buying. Scientific computing usually insists on 64-bit doubles, while the machine-learning world deliberately trains with 16-bit formats that keep only two or three decimal digits, trading precision for speed. Which is right depends on whether the problem is well conditioned and stable, which is exactly what this course teaches you to check. What a graduate just sees A computer keeps about 16 significant digits, and most decimal fractions, like 0.1, are not stored exactly. Subtracting two nearly equal numbers throws away digits: avoid cancellation, or rewrite the formula. Every method has a truncation error and a rounding error that pull in opposite directions; the best step size is a balance, not "as small as possible". Quadratic convergence means correct digits double; linear means one at a time. Always ask how fast and when it fails. Some problems are ill-conditioned: the answer is sensitive to the data no matter how good the algorithm is. Order p means halving the step divides the error by 2p; a log–log plot shows it as a straight line. Stability limits the step; stiff problems force you towards implicit methods. A number from a computer does not announce its own error. Check residuals, vary the step, try a second method. Where it shows up next Partial Differential Equations (34/79): every weather, aircraft and reactor simulation is a numerical PDE solver, and the stability limit of the last idea becomes the CFL condition. Machine Learning (34/32): training a model is numerical optimisation, and low-precision arithmetic trades the rounding of idea one for speed. Linear algebra in practice: libraries such as LAPACK solve linear systems with pivoting precisely because of conditioning. Finance and engineering: option pricing, circuit simulators (SPICE) and finite-element structural analysis are all numerical methods with error control. Safety-critical software: the Patriot clock is the textbook case of an accumulated rounding error with real consequences. If you want to go deeper 📘 Textbook: Richard Burden, J. Douglas Faires and Annette Burden, Numerical Analysis (10th ed., Cengage, 2015): a widely used first course, algorithm by algorithm. 📘 Textbook: Lloyd N. Trefethen and David Bau, Numerical Linear Algebra (SIAM, 1997): a short, elegant treatment of conditioning and stability. 📘 Gentler: David Goldberg, "What Every Computer Scientist Should Know About Floating-Point Arithmetic" (ACM Computing Surveys, 1991), free online, and Lloyd Trefethen's short essay "The Definition of Numerical Analysis". 🌐 Free course: MIT OpenCourseWare 18.330 Introduction to Numerical Analysis (Spring 2012, Laurent Demanet), with lecture notes. The takeaway Computers hold finite digits, so every answer is a rounded approximation. Good numerical work balances truncation and rounding, uses methods that converge fast, notices when the problem itself amplifies errors (conditioning), reads the order of a method from how its error shrinks, and respects stability. The result is an answer plus an honest idea of how wrong it is. Try this: open a calculator or any programming prompt and compute 1 − (1 − 10−16), and then (1 + 10−16) − 1. Then try 0.1 × 3 and compare it with 0.3. You will see for yourself that arithmetic on a computer is not the arithmetic you learned at school. Sources & Further Reading Sources. Patriot failure at Dhahran, 25 February 1991: US General Accounting Office, report GAO/IMTEC-92-26 (1992), and the summary by Douglas Arnold (University of Minnesota); the roughly 0.34 s drift after about 100 hours and the figure for the displaced range gate come from secondary write-ups of that report, and are given as approximate. IEEE 754 first published 1985, revised 2008 and 2019. YBC 7289 (about 1800–1600 BC; √2 = 1;24,51,10 ≈ 1.41421296). Newton 1669 (published 1711), Raphson 1690, Simpson 1740: history of Newton's method. Computed in node: stored value of 0.1 = 0.1000000000000000055511…; 0.1 + 0.2 = 0.3000000000000000444; forward-difference and central-difference errors of sin at 1 against step size (minimum 3 × 10−9 near 10−8, and 1.1 × 10−11 near 10−5); (1 − cos x)/x² at x = 10−8 gives 0 against 0.5; Newton errors for √2 from 1; Hilbert matrix 1-norm condition numbers computed from the exact integer inverse formula (27 for n = 2, 9.4 × 105 for n = 5, 3.5 × 1013 for n = 10, 1.3 × 1018 for n = 13) and double-precision solution errors; trapezoid and Simpson errors for ∫01 ex dx; explicit and implicit Euler on the stiff example at several steps. Interactive datasets are illustrative problems chosen for the lesson. 🌐 MIT OpenCourseWare 18.330 Introduction to Numerical Analysis 📘 Burden, Faires and Burden, Numerical Analysis, 10th ed. (Cengage) 📘 Trefethen and Bau, Numerical Linear Algebra (SIAM) 🌐 The Patriot Missile Failure (Douglas Arnold) 🌐 GAO report IMTEC-92-26 Step 17. Probability & Statistics: Reasoning with Uncertainty ------------------------------------------------------------- Why: Every measurement has an error bar; data analysis is statistics. Nothing you measure is exact, and no part comes out the same twice. Statistics is the discipline of knowing how much to trust a number. A machinist turns a hundred steel shafts to "10 millimetres". Measure them with a good micrometer and no two are the same: 9.981, 10.012, 10.004. Nothing is wrong. That scatter is a fact of every process, every material and every sensor. Now stack five of those parts end to end in a gearbox. Will the stack still fit the housing? A pollster calls a thousand people and says 52% will vote yes, give or take three. A drug trial says "significant". A forecast says 30% chance of rain. Every one of these is the same question: given scatter, how much should I trust this number? A graduate of probability and statistics doesn't see a single number any more. They see the shape of the scatter behind it. This piece builds that sight with eight things you can run: dice, tolerances, polls, a drug-trial trap, a belief that updates, and a gearbox stack. The course in one box Who takes it: almost every engineering and science student, usually in the second year; computer scientists meet it again before machine learning. What it's for: deciding what to believe, and how far to trust a measurement, when outcomes are uncertain. Comes after: Calculus I (34/01), which helps with continuous distributions, though the ideas here need little more than arithmetic. Leads to: Machine Learning (34/32) needs it directly. It also shows up in Materials Science & Manufacturing (34/13: process control and defects), Systems Engineering (34/22: reliability) and Computer Security (34/33: randomness and guessing). Honest line: you won't be able to design a clinical trial after this. You will see why "significant" doesn't mean "important", why a bigger sample beats a cleverer guess, and why most real quantities look like a bell curve. For easier first reads, see the library's Probability: How to Not Fool Yourself (12/03), Statistics for Reading the World (12/05) and Bayes' Theorem (12/17); this piece goes further into the engineering side. Random variables: a shape with a centre and a spread A random variable is a number that comes out of a process you can't predict one run at a time. The key move is to stop asking "what will it be?" and ask "what is the shape of what it could be?" Roll two dice and add them: 7 is six times as likely as 2 or 12, so the shape is a tent. Roll many times and the tent appears. Interactive · Roll dice, grow a shape Dice added together Roll 10 timesRoll 1,000 timesClear Without JavaScript: two dice add to 7 with probability 6/36 and to 2 or 12 with probability 1/36 each. The mean total is 7 and the standard deviation is about 2.42. Two numbers summarise a shape. The mean is its balance point: 7 for two dice. The standard deviation (the "spread") says how far values typically stray from the mean: about 2.4 for two dice, which means totals usually land between roughly 5 and 9. The variance is the standard deviation squared, and it is the one that adds up neatly when you combine independent things. standard deviation = √( average of (value − mean)² ) Now the shape that matters most. Measured quantities (shaft diameters, heights, sensor noise) tend to form the normal curve, the bell. Its great convenience is a fixed rule: about 68.3% of values fall within one standard deviation of the mean, 95.4% within two, and 99.7% within three. Engineers use it every day. Say the shaft's spec is 10.00 mm ± 0.05 mm. Slide the process around and see what share of parts get thrown away. Interactive · How many parts fail the spec? Average diameter Spread (standard deviation) Without JavaScript: a centred process with standard deviation 0.025 mm (the spec limits are exactly ±2 standard deviations) scraps about 4.55% of parts. Cut the spread to 0.01 mm and about 0.00006% are scrapped. Shift the average 0.02 mm off-centre with spread 0.02 mm and about 6.7% are scrapped. Two lessons graduates keep. First, spread, not average, decides quality: a process centred perfectly but wide still scraps parts. Second, being off-centre costs a lot even when the spread is fine. That is why factories track both. The central limit theorem: why the bell keeps appearing Why should so many things be bell-shaped? The answer is one of the most useful theorems in mathematics. Take almost any random process, however lopsided, and average a few dozen independent draws. The averages pile up in a bell, centred on the true mean, with spread shrinking like 1/√n. Early forms are due to de Moivre in 1733 (for coin flips) and Laplace, whose general version dates from about 1810. Pick a lopsided source and drag the sample size. Interactive · Average anything, get a bell Flat (0 to 1) Very lopsided Coin (0 or 1) Draws averaged together: n Without JavaScript: for the lopsided source (mean 1, standard deviation 1) the average of n = 30 draws has standard deviation 1/√30 = 0.183, and the 3,000 averages form a close-to-normal bell around 1. At n = 1 you see the raw source. By n = 30 even the lopsided one is a near-bell. The prediction (the curve) uses only two numbers from the source, its mean and its standard deviation. The shape of the source is forgotten. That is why a measurement made of many small independent errors is normal, and why so much of statistics can pretend things are bell-shaped. standard error of an average = σ / √n In words: the average of n draws wobbles less than one draw, by the square root of n. To halve the wobble you need four times the data, not twice. It is the quietest expensive fact in all of experimental science. Sampling and confidence intervals: how sure is a poll? You can't ask everyone, so you ask n people and treat the share saying yes as an estimate. How far off might it be? The standard error from the last section gives the answer. For a share p the wobble is √(p(1−p)/n), and a 95% confidence interval is the estimate plus and minus about two of those. For n = 1,000 and a share near half, that is ±3.1 percentage points: the familiar "margin of error". The wording is subtle, and the interactive makes it concrete. "95% confidence" is a statement about the method, not about one interval: if you ran the procedure again and again, about 95 intervals in 100 would capture the true value. Here the truth is secretly 52%. Run 100 polls. Interactive · 100 polls, one truth People asked in each poll Run 100 polls Without JavaScript: with 1,000 people per poll the margin of error is about 3.1 points; run 100 polls and about 95 of the intervals cover the true value. With 4,000 people the margin halves to about 1.5 points. Watch two things. Roughly five in a hundred intervals miss the truth even when everything is done correctly. And quadrupling the sample from 1,000 to 4,000 only halves the interval. A poll of a country and a poll of a town need the same sample size for the same precision, as long as the sample is random. The real danger is not the margin of error; it is a sample that isn't random at all, which no formula fixes. P-values and Bayes: two ways to weigh evidence A hypothesis test asks whether data are surprising if nothing is going on. The p-value is the probability, assuming nothing is going on, of seeing a result at least as extreme as yours. Flip a coin 100 times and get 60 heads: for a fair coin the chance of a split at least that lopsided in either direction is about 5.7%. It is not the probability that the coin is fair, and it is not the probability that the result was "due to chance". The American Statistical Association issued a rare formal statement on this in 2016, with six principles. Two of them: p-values do not measure the probability that a hypothesis is true, and a p-value does not measure the size or importance of an effect. The classic trap is testing many things. At the usual cut-off of 0.05, a test of a true "nothing" comes out "significant" one time in 20 by luck. Test twenty unrelated things and the chance that at least one lights up is 1 − 0.9520, about 64%. Try it: each press tests twenty effects that are, by construction, nothing. Interactive · Test twenty things that do nothing Run 20 testsReset the tally Without JavaScript: twenty tests of pure noise at the 0.05 level give at least one false "discovery" about 64% of the time, and one in 20 tests on average. If you report only the one that lit up, you have a headline and no finding. This is part of why many published results fail to repeat: in the Open Science Collaboration's 2015 attempt to replicate 100 psychology studies, 97% of the originals had statistically significant results but only 36% of the replications did. Bayes' rule answers a different question: given the data, how should my belief move? Start with a prior belief, multiply by how well each possibility explains the data, and renormalise. Say you test parts and want the defect rate. Know nothing at first (any rate from 0% to 100% equally likely) and add parts one at a time. Interactive · Learn a defect rate from parts Add a good partAdd 10 good partsAdd a defective partReset Without JavaScript: after 20 good parts and no defects, a flat starting belief gives a most-plausible defect rate near 0%, an average of 4.5%, and a 90% credible range of roughly a quarter of a percent to 13%. Twenty clean parts cannot rule out a defect rate near one in eight. Frequentists and Bayesians disagree about the philosophy: one treats probability as long-run frequency and never assigns it to a hypothesis, the other as degrees of belief that data update. In practice both are used, often on the same project, and on big data sets they usually agree. The Bayesian version has one practical advantage here: after twenty clean parts it honestly says "we still can't rule out one in eight". Correlation, regression and the trap of causation Correlation (called r) measures how tightly two quantities move together along a straight line, from −1 to +1. Regression fits the best line through the cloud (by least squares, as in Linear Algebra, 34/04). Both are summaries, and any summary can hide the story. In 1973 the statistician Francis Anscombe made four data sets with, to two decimals, the same mean, the same spread, the same r (0.82) and the same line (y = 3 + 0.5x). Look at each. Interactive · Four data sets, one set of numbers Set 1Set 2Set 3Set 4 Without JavaScript: all four Anscombe sets have mean x = 9, mean y = 7.50, correlation 0.816 and line y = 3.00 + 0.50x. Set 1 is a noisy line, set 2 a curve, set 3 a line with one outlier, and set 4 a single far point that creates the whole slope. The numbers agree and the stories do not: one noisy line, one curve, one line with a rogue point, one vertical stack held up by a single point. Always plot first. The other trap is the famous one. Ice-cream sales and drownings rise together, because summer heat drives both. A confounder (a hidden third factor) makes two things move together without either causing the other. The remedy graduates know is randomised assignment: if a coin decides who gets the treatment, nothing else can be systematically linked to it. Where you can't randomise, causal claims need much more than a line through a cloud. Engineering: tolerance stacks, reliability and Monte Carlo Five parts, each 10 mm ± 0.1 mm, line up in an assembly. What is the worst the total can be out? Worst-case stacking adds the tolerances: ±0.5 mm. It is safe and expensive, because it assumes every part is at its extreme in the same direction at once. If the parts vary independently, variances add, so the standard deviations add in quadrature: root-sum-square, √5 × 0.1 = ±0.224 mm. For five parts that is under half the worst-case figure. When the formulas get hard, engineers use Monte Carlo: let the computer build the assembly ten thousand times with random parts and count how often it fails. Here each part's tolerance is treated as three standard deviations. Choose how many parts are stacked. Interactive · Monte Carlo tolerance stack Parts in the stack Build 10,000 assemblies again Without JavaScript: five parts at ±0.1 mm (three standard deviations) give a worst-case limit of ±0.5 mm, a root-sum-square limit of ±0.224 mm, and in simulation only about 0.3% of assemblies exceed the root-sum-square limit; none come close to 0.5 mm. The honest caveat is that root-sum-square assumes the parts vary independently and are centred. A tool wearing in the same direction on every part breaks that assumption, and so does one supplier's batch. Engineers disagree about when to trust statistical stacking over worst-case; safety-critical designs often insist on worst-case. Reliability follows the same arithmetic. A system that needs all of its parts is a series system, and probabilities multiply: ten components that each work 99% of the time give 0.9910 ≈ 90.4% for the whole. Add a backup in parallel and failure needs both to fail: two units that each work 90% of the time give 1 − 0.1² = 99%. The two rules drive why aircraft duplicate systems and why complicated machines need very reliable components. What a graduate just sees Every number has a spread behind it; the first question is "how scattered?", not "what is it?". Spread, not the average, decides how many parts are scrapped, and centring matters too. Averages of many independent things are bell-shaped, whatever the source looked like. Halving the uncertainty costs four times the data. A 95% interval is a claim about a method: it misses one time in twenty by design. A p-value is "how surprising is this if nothing is going on", not "how likely is it true". Test twenty things and one will look significant; ask how many were tried. Plot the data; correlation is not causation, and only randomising breaks a confounder. Independent errors add in quadrature; series reliabilities multiply. Where it shows up next Machine Learning (34/32): training is fitting a model to noisy data; ideas of overfitting, error bars and Bayes are this course made bigger. Materials Science & Manufacturing (34/13): process capability and scrap rates are the normal curve against a spec limit. Mechanics of Materials (34/11) and Machine Design (34/19): safety factors exist because loads and strengths are distributions, not numbers. Systems Engineering (34/22): reliability budgets multiply series probabilities and add redundancy to push them back up. Computer Security (34/33) and Algorithms (34/24): good random numbers, randomised algorithms, and the odds of guessing a secret. If you want to go deeper 📘 Douglas Montgomery and George Runger, Applied Statistics and Probability for Engineers (Wiley; 7th edition). The standard engineering course text, with plenty of tolerance, quality and reliability problems. 📘 Joseph Blitzstein and Jessica Hwang, Introduction to Probability (CRC Press; 2nd edition, 2019). Best for deep intuition about probability itself, from Harvard's Stat 110. 📖 David Spiegelhalter, The Art of Statistics (2019): the most readable route for learning alone, built around real cases and honest about uncertainty. 🌐 MIT OpenCourseWare 18.05, Introduction to Probability and Statistics (Spring 2022): free notes and problem sets, with Bayesian and classical statistics side by side. The takeaway Nothing you measure is exact, so every number is a shape. Summarise a shape by its centre and its spread, trust averages more as the square root of the sample, read a confidence interval as a promise about a method, treat a p-value as a measure of surprise, and plot before you believe a correlation. Try this: next time you see a poll or a "significant" headline, find the sample size and ask how many things were tested. Then, in the dice widget above, add four dice and watch the tent turn into a bell. Sources & Further Reading Sources. The normal-curve rule (68.3%, 95.4%, 99.7%), the central limit theorem, confidence intervals, the binomial test, the Beta posterior, root-sum-square stacking and series/parallel reliability are standard textbook results (Montgomery and Runger; MIT 18.05); every number shown was recomputed in code. Wasserstein and Lazar, "The ASA's Statement on p-Values: Context, Process, and Purpose", The American Statistician (2016). Open Science Collaboration, "Estimating the reproducibility of psychological science", Science (2015): 97% of originals significant against 36% of replications. Anscombe, "Graphs in Statistical Analysis", The American Statistician (1973). Early forms of the central limit theorem: de Moivre (1733) and Laplace (c. 1810), as surveyed in recent histories such as Ulyanov, "From classical to modern central limit theorems" (arXiv 2405.19828). Go deeper. The books and course above; Wasserstein and Lazar's statement is free and short (doi.org/10.1080/00031305.2016.1154108). Step 18. General Relativity: Gravity Is the Shape of Spacetime -------------------------------------------------------------- Why: Gravity as the curvature of spacetime. Newton said masses pull on each other. Einstein said masses bend the stage, and everything simply goes straight on a bent stage. The difference shows up in the clocks in your phone, in the light of distant galaxies, and in ripples that crossed a billion years of space. General Relativity: Gravity Is the Shape of Spacetime :root{ --bg:#faf7f2; --card:#ffffff; --ink:#1c1a17; --muted:#6b645b; --accent:#2a3f8f; --accent2:#b5842a; --line:#e7e0d6; --hi:#e9ebf7; --panel:#eef0f8; --hot:#c4452d; --cold:#2f6fb0; --good:#3f7f63; --onacc:#ffffff; --shadow:0 8px 30px rgba(0,0,0,.06); } @media (prefers-color-scheme:dark){ :root{ --bg:#0e0f16; --card:#181a24; --ink:#eef0f8; --muted:#a3a8bd; --accent:#8fa0f0; --accent2:#e6b969; --line:#282b3a; --hi:#171a2b; --panel:#10132a; --hot:#ee7b62; --cold:#6fa6e0; --good:#5fb08b; --onacc:#0e0f16; --shadow:0 8px 30px rgba(0,0,0,.45); } } *{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Georgia,serif; line-height:1.65;-webkit-font-smoothing:antialiased} .wrap{max-width:680px;margin:0 auto;padding:48px 16px 80px} .kicker{color:var(--accent);font-weight:700;letter-spacing:.08em;text-transform:uppercase;font-size:.72rem;font-family:-apple-system,sans-serif} h1{font-size:2.1rem;line-height:1.12;margin:.3em 0 .2em;letter-spacing:-.02em} .dek{font-size:1.15rem;color:var(--muted);margin-bottom:.6em} .meta{font-size:.8rem;color:var(--muted);font-family:-apple-system,sans-serif;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:26px} p{font-size:1.06rem;margin:1em 0} h2{font-size:1.45rem;line-height:1.2;margin:1.9em 0 .3em;letter-spacing:-.01em} .pull{font-size:1.4rem;line-height:1.28;font-weight:600;color:var(--accent);border-left:4px solid var(--accent);padding-left:20px;margin:1.4em 0} .card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px 16px;margin:26px 0;box-shadow:var(--shadow)} .lab{font-family:-apple-system,sans-serif;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent2);margin-bottom:.6em} .course{border-left:5px solid var(--accent2)} .course dl{margin:0;font-family:-apple-system,sans-serif;font-size:.95rem} .course dt{font-weight:700;color:var(--accent);margin-top:.7em} .course dd{margin:.1em 0 0 0} .eq{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:1.25rem;text-align:center;background:var(--hi);border-radius:12px;padding:12px 8px;margin:14px 0;overflow-x:auto} .eq small{font-style:normal;font-family:-apple-system,sans-serif;font-size:.8rem;color:var(--muted);display:block;margin-top:2px} .chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px} button{font-family:-apple-system,sans-serif;font-weight:600;cursor:pointer;border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:.88rem;background:var(--hi);color:var(--ink);min-height:44px} button[aria-pressed=true]{background:var(--accent);color:var(--onacc);border-color:var(--accent)} .ctl{font-family:-apple-system,sans-serif;font-size:.9rem;margin-top:8px} .ctl .top{display:flex;justify-content:space-between;gap:8px} input[type=range]{width:100%;accent-color:var(--accent);min-height:44px;margin:0} svg{width:100%;height:auto;display:block;margin:10px 0;border-radius:12px;background:var(--panel)} svg text{font-family:-apple-system,sans-serif;font-size:11px;fill:var(--muted)} .read{font-family:-apple-system,sans-serif;font-size:.92rem;background:var(--hi);border-radius:10px;padding:10px 12px;font-variant-numeric:tabular-nums} .read p{font-size:.92rem;margin:.3em 0} table.t{width:100%;border-collapse:collapse;font-family:-apple-system,sans-serif;font-size:.9rem;margin:12px 0;font-variant-numeric:tabular-nums} table.t th,table.t td{border-bottom:1px solid var(--line);padding:6px 4px;text-align:left;vertical-align:top} table.t th{color:var(--muted);font-weight:600} .note{font-size:.85rem;color:var(--muted);font-family:-apple-system,sans-serif} .take{background:var(--hi);border-radius:16px;padding:22px 18px;margin-top:34px} .take .lab{color:var(--accent)} .do{font-family:-apple-system,sans-serif;font-weight:700;font-size:1.02rem;margin-top:.4em} ul.deep,ul.see{font-family:-apple-system,sans-serif;font-size:.96rem;line-height:1.6;padding-left:1.2em} ul.see li{margin:.35em 0} a{color:var(--accent2)} button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent2);outline-offset:2px} @media (max-width:640px){table.t{display:block;overflow-x:auto;max-width:100%}} The satellites that tell your phone where you are carry atomic clocks. Left alone, those clocks would run about 38 microseconds a day ahead of clocks on the ground. That is 0.000038 of a second, and it would be fatal: a navigation system measures distance as light-travel time, and light covers 11 kilometres in 38 microseconds. Within a day, the blue dot on your map would be a long way from the road. The clocks are not broken. Gravity is a little weaker 20,000 km up, and a clock in weaker gravity ticks faster. Engineers build that correction into the satellites before launch. This is general relativity, working quietly as engineering. If you want the friendlier overview first, read Why Time Is Weirder Than You Think (13/03), Orbits: Why the Moon Keeps Falling (13/11) and The Big Bang and Our Expanding Universe (13/08). This piece goes further: it computes. The course in one box Who takes itPhysics majors, usually in year 4 as an option, or as a first graduate course (MIT's 8.962 General Relativity is a typical example). Programmes in the style of MIT Course 8 and the Cambridge Natural Sciences physics route often teach a short introduction in the final year. What it is forWorking out how matter and energy shape spacetime, and how clocks, light and bodies move through it: planets, black holes, gravitational waves and the whole universe. Comes afterSpecial Relativity (34/81) and Differential Geometry (34/77). Leads toAstrophysics & Cosmology (34/88). What this piece gives youYou will not be able to solve Einstein's equations. You will see why free fall is the natural state, how to estimate clock shifts, light bending, black-hole sizes and gravitational-wave chirps, and what the equation says in words. Free fall is the natural state Stand in a lift whose cable has snapped (in thought only). You and a dropped coin fall together; the coin floats beside you, and no experiment inside the lift can tell you whether you are falling near a planet or drifting in empty space. Einstein called this the happiest thought of his life, in 1907. It is the equivalence principle: a small enough freely falling room feels no gravity at all. Why is this so surprising? Because every object falls at the same rate, whatever its mass or material. In Newton's theory that is a coincidence: the mass that resists a push and the mass that gets pulled by gravity just happen to be equal. Einstein turned the coincidence into the foundation. If everything falls the same way, then falling is not a property of things. It is a property of the place. The reverse picture helps too. In a rocket accelerating at 9.8 m/s² in empty space you feel your normal weight, and a ray of light crossing the cabin bends downward, because the floor rises to meet it. Equivalence says gravity must bend light as well. Clocks run at different rates Light climbing out of a gravity well loses energy, so its frequency drops (a redshift). Read the other way: clocks lower in a gravitational field run slow. To first order the fractional rate difference is the difference in gravitational potential divided by c². Near Earth it is a tiny number, but atomic clocks read it. Pound and Rebka measured the shift between the bottom and top of a 22.5 m tower at Harvard in 1959, and optical clocks today can see the difference for a height change of a few centimetres. Δτ/τ ≈ Δ(GM/r) ÷ c² − v² ÷ 2c²the first term: weaker gravity speeds a clock up · the second: motion slows it down (special relativity) A GPS satellite gets both. Its altitude (about 20,200 km) speeds the clock up by about 45.8 µs a day; its speed of 3.9 km/s slows it by about 7.2 µs. The net is about +38.6 µs a day. A satellite in a low orbit like the International Space Station is dominated by the second term, so its clocks run slow. Somewhere in between the two effects cancel. Interactive · Clock in orbit Ground (circular orbit at the surface)ISSGPSGeostationary Orbit altitude Circular orbit; Earth's geoid potential 6.2636856 × 10⁷ m²/s², GM = 3.986004418 × 10¹⁴ m³/s², c = 299,792,458 m/s. Weak-field formula; the satellite is compared with a clock at rest on the geoid. The "ground" preset is a hypothetical satellite just above the surface. Slide the altitude: the clock is slowest overall at the surface, breaks even near 3,170 km, and runs steadily faster beyond. For GPS the uncorrected error would build up at 11.6 km a day. Notice what this means for everyday gravity: you age slightly faster at the top of a skyscraper than at its foot, by about one part in 1014 for every 100 m of height. Nobody notices, but precision clock networks have to account for it. Straight lines on a curved stage So what is gravity? Einstein's answer: spacetime has a shape, and freely falling things follow the straightest possible paths in it, called geodesics. The Moon is not pulled off a straight line; it is going straight, on a stage bent by the Earth. Think of two airliners flying due north from the equator. They start parallel and end up meeting at the pole. Neither turned, and no force pulled them together. The curvature of the surface did it. That picture makes two predictions that differ from Newton's, and both have been measured. 1. Orbits do not close. In Newton's theory a single planet traces the same ellipse forever. In general relativity the ellipse slowly turns, so the closest point creeps forward each orbit. The weak-field result is a turn of Δφ = 6πGM ÷ (c²a(1 − e²)) per orbit. For Mercury it is 5.0 × 10−7 radians per orbit, which adds up to 43 arcseconds a century. Astronomers had measured an extra turn of that size since the 1850s; Newtonian tugs from other planets explained the rest, and general relativity explained the leftover without any adjustment, which Einstein found in 1915. Interactive · An orbit that will not close EinsteinNewton Size of orbit (a, in units of GM/c²) Eccentricity (how stretched) Computed live by integrating the Schwarzschild orbit equation u″ + u = 1/L² + 3u² (units G = M = c = 1) with a fourth-order Runge–Kutta step, over four orbits. The Newtonian case drops the 3u² term. Mercury's own orbit is about 650,000 times wider than the smallest shown here, so its turn is far too small to see. Compare the simulated turn with the weak-field formula. For wide orbits they agree to a few per cent; for tight ones the formula underestimates, because the curvature is no longer weak. 2. Light bends twice as much as Newton would say. Light follows geodesics too, and a ray passing a mass of M at distance b is deflected by an angle α = 4GM ÷ (c²b). That is twice the value you would get by treating light as fast Newtonian particles. For rays grazing the Sun the angle is 1.75 arcseconds. Arthur Eddington's expeditions photographed stars near the Sun during the total eclipse of 29 May 1919, at Príncipe (off West Africa) and Sobral (Brazil), and reported shifts close to Einstein's number (roughly 1.6 and 2.0 arcseconds, with uncertainties of a few tenths; historians still debate how the plates were chosen and reduced). Modern radio measurements agree with Einstein to a small fraction of a percent. Interactive · Bend the light SunJupiterEarthGalaxy cluster Passing distance α = 4GM/(c²b), valid when b is much larger than 2GM/c². The cluster is 1014 solar masses with distance in kiloparsecs. The bend in the drawing is exaggerated and not to scale. The cluster preset is why the effect matters to astronomers. A cluster of galaxies bends background light by tens of arcseconds, enough to smear distant galaxies into arcs and to weigh the cluster, including the mass we cannot see. Black holes: where curvature wins Squeeze a mass into a small enough space and no path leads outward. The critical radius is the Schwarzschild radius, found in 1916 within months of Einstein's equations: rs = 2GM ÷ c²about 2.95 km for each solar mass · the boundary (horizon) of a non-spinning black hole The Sun would have to be squeezed to 3 km and the Earth to under 9 mm. The strange part is that the horizon of a heavy hole is not a place of extreme conditions. The average density inside rs falls as 1/M², so the hole in M87, at about 6.5 billion Suns, is less dense than air. And the tidal force, the difference in pull between your head and feet, at the horizon falls as 1/M². A stellar black hole stretches you violently long before you reach it; a supermassive one lets you cross in comfort. Interactive · Weigh a black hole 1 Sun10 SunsSgr A* (about 4 million)M87* (about 6.5 billion) Mass rs = 2GM/c²; density = M/(4/3 π rs³); tidal stretch across 2 m at rs = 2GM·(2 m)/rs³ (Newtonian estimate, indicative only). The bar marks rs on a log scale from 1 km to 100 AU. The Event Horizon Telescope imaged the shadow of the black hole in the galaxy M87 in 2019, with a mass of about 6.5 billion Suns, and of the one at the centre of our own galaxy, Sagittarius A*, in 2022, near 4 million Suns. Both ring sizes matched general relativity's prediction within the uncertainties. Ripples: gravitational waves If mass shapes spacetime, moving mass makes the shape change, and the change spreads at the speed of light. Two black holes in orbit stir spacetime like two spoons in a pond. The waves carry energy away, so the orbit shrinks, the pair spins faster and the wave frequency climbs: a chirp. At leading order the climb depends only on one combination of the masses, the chirp mass Mc = (m₁m₂)3/5 ÷ (m₁+m₂)1/5, and the time left before merger is τ = (5/256) · (GMc/c³)−5/3 · (πf)−8/3time to merger from the moment the wave frequency is f On 14 September 2015 the two LIGO detectors recorded the first such signal, GW150914 (announced 11 February 2016): black holes of about 36 and 29 Suns merging into one of about 62, with roughly 3 solar masses of energy radiated in gravitational waves. Chirp mass: about 28 Suns. From 35 Hz the formula gives 0.19 seconds to merger, matching the roughly 0.2 s the signal lasted in the band. The distortion of space at Earth was about 10−21: a 4 km arm changes length by far less than a proton's width. The 2017 Nobel Prize in Physics went to Rainer Weiss, Barry Barish and Kip Thorne for the detector. Interactive · Make a chirp GW150914Two neutron stars10 + 10 Suns First mass Second mass Leading-order (Newtonian-quadrupole) inspiral, valid until the innermost stable orbit at f = 4,400 Hz ÷ (total mass in Suns). The plot shows the last 0.1 s of that stage, amplitude ∝ f2/3. The real merger and ringdown, up to about 250 Hz for GW150914, need numerical relativity. Gravitational waves were predicted by Einstein in 1916, and indirectly confirmed earlier by the Hulse–Taylor binary pulsar, discovered in 1974, whose orbit shrinks as general relativity says (Nobel Prize 1993). LIGO and its partners turned that into an astronomy, and in 2017 they heard two neutron stars merge at the same time as light was seen from the same event. The equation, and where it stops Everything above comes from one tensor equation, in words: matter and energy tell spacetime how to curve; curved spacetime tells matter how to move (John Wheeler's summary). Gμν + Λgμν = (8πG ÷ c⁴) Tμνcurvature (left) = energy, momentum and pressure (right) · Λ is the cosmological constant It is ten coupled equations, hard to solve in general, which is why exact solutions (Schwarzschild 1916, Kerr 1963, the expanding universe of Friedmann and Lemaître in the 1920s) are famous. Its record is remarkable: Mercury, starlight, the tower, GPS, binary pulsars, black hole images and gravitational waves. TestWhenResult Mercury's perihelion turn191543″/century explained Starlight bending1919about 1.75″ at the limb Clock rates (Pound–Rebka)1959shift seen, as predicted Binary pulsar1974 onorbit shrinks as predicted Gravitational waves2015GW150914 seen Black hole shadows2019, 2022M87*, Sgr A* match Where it stops: general relativity is a classical theory, and at a black hole's centre or at the Big Bang it predicts infinite curvature, which is a signal that something else takes over. Nobody yet has a tested theory of quantum gravity. On the largest scales it works only if most of the universe is something we have not identified (dark matter and dark energy), and its models disagree at present about how fast the universe expands (the Hubble tension). Both are the business of Astrophysics & Cosmology (34/88). What a graduate just sees Free fall is the natural state; weight is the floor pushing back. Gravity is geometry: bodies follow straightest paths on a curved stage. A clock higher in a gravity well runs faster, and a moving clock runs slow; satellites feel both. Orbits are not closed ellipses; they precess, and light bends by 4GM/(c²b), twice the Newtonian guess. rs = 2GM/c² is 3 km per solar mass, and a horizon is gentle if the hole is big. Accelerating masses radiate ripples that carry energy away and make binaries chirp. The equation says "matter curves space, space steers matter"; it fails at singularities and awaits quantum gravity. Where it shows up next Astrophysics & Cosmology (34/88): neutron stars, black holes, lensing and the expansion of the universe are all solved with these tools. Differential Geometry (34/77) and Special Relativity (34/81): the language and the local rules it was built from. Particle & Nuclear Physics (34/86): the open problem is making this theory and quantum fields agree. In the world: satellite navigation and time distribution, gravitational-lens surveys, the LIGO–Virgo–KAGRA network and the space-based LISA mission being planned. If you want to go deeper 📘 Textbook. James Hartle, Gravity: An Introduction to Einstein's General Relativity (Addison-Wesley, 2003). Physics first, with the maths introduced as needed; the usual advanced-undergraduate choice. 📘 Textbook. Sean Carroll, Spacetime and Geometry: An Introduction to General Relativity (Addison-Wesley, 2004; Cambridge University Press, 2019). A fuller, more mathematical course. 📘 Gentler. Kip Thorne, Black Holes and Time Warps (W. W. Norton, 1994). History and ideas, with almost no maths. 🌐 Free course. MIT OpenCourseWare 8.962 General Relativity (Spring 2020). The takeaway Gravity is not a pull but the shape of spacetime. Free fall is the straight path; clocks, light and orbits all follow from the geometry, and it is precise enough to correct a satellite's clock by 38 microseconds a day. The same geometry gives black holes with a size of 3 km per Sun and ripples that shake detectors by a thousandth of a proton. Try this: this week, when you check a maps app, remember that its blue dot needs two relativity corrections, one for speed and one for gravity, and that without them it would drift by about 11 km a day. Sources & Further Reading Sources. Equivalence principle, geodesics, the perihelion formula, light deflection, Schwarzschild radius and the leading-order chirp are standard (Hartle; Carroll). Constants from CODATA 2018 and IAU nominal values (GMsun = 1.32712440018 × 10²⁰ m³/s²). GPS: about 45 µs a day from gravity, about 7 µs a day from speed, net about 38 µs a day (Ashby, Living Reviews in Relativity, as reported in GPS World). GW150914: LIGO–Virgo, 36 and 29 solar masses to about 62, about 3 solar masses radiated (Phys. Rev. Lett. 116, 061102, 2016, and the follow-up properties paper). Eddington's 1919 results: Dyson, Eddington and Davidson, 1920; values of about 1.98″ (Sobral) and 1.61″ (Príncipe), with uncertainties of a few tenths of an arcsecond reported differently in secondary sources. EHT: M87* mass (6.5 ± 0.7) × 10⁹ solar masses (2019), Sgr A* about 4 × 10⁶ solar masses (2022). Pound–Rebka 1959, Hulse–Taylor 1974 and Nobel 1993, Mercury 1915, Schwarzschild 1916 and the 2017 Nobel Prize are cited from the literature and not re-checked for this piece. Every number an interactive shows was computed in node: for example net clock shift +38.59 µs/day at 20,200 km, break-even at 3,167 km, 43.0″ a century for Mercury, 1.751″ at the solar limb, 0.016″ for Jupiter, 39″ for a 1014 solar mass cluster at 100 kpc, rs = 2.95 km for the Sun, and 0.19 s from 35 Hz for GW150914. 🌐 MIT OCW 8.962 General Relativity 🌐 Nobel Prize in Physics 2017: press release 📘 Hartle, Gravity 📘 Thorne, Black Holes and Time Warps Step 19. Differential Geometry: Curvature You Can Feel From the Inside ---------------------------------------------------------------------- Why: The geometry general relativity is written in. A pizza slice droops until you fold it, an airline flight path bends toward the pole, and a pendulum in Paris slowly turns. All of them are one idea: you can measure how a space curves without ever stepping outside it. Pick up a slice of pizza. Held flat, the tip flops down. Fold the crust into a shallow trough and the whole slice stiffens, tip and all. You did not plan that. You exploited a theorem that Carl Friedrich Gauss proved in the 1820s: a sheet can be bent in one direction freely, but the moment it curves one way it cannot also curve the other without stretching. The fold buys the slice a stiffness it did not have. Look at a flight map and the shortest route from Madrid to Tokyo is a curve that arcs far north, over Siberia. The flat map lies. Stand a Foucault pendulum in Paris and its swing plane turns through about 270 degrees a day, with nothing pushing it sideways. The floor of the building is curving under it. Differential geometry is the mathematics of curvature: what it is, how to measure it with nothing but a ruler laid along the surface, and what it does to straight lines, triangles and arrows. It is the language Einstein needed in 1915, and in this piece you will play with its six central ideas. The course in one box Who takes it: Mathematics majors, usually in the third or fourth year as an elective after analysis (MIT offers it as Course 18.950; Cambridge teaches it within the Tripos Part II geometry courses), and Physics majors who are heading for general relativity. What it is for: making calculus work on curved spaces, so that curvature becomes a number you can compute and a quantity you can reason about. Comes after: Multivariable Calculus (34/02) and Linear Algebra (34/04). Leads to: General Relativity (34/85); it also sits beside Topology (34/76), which asks what survives when you stretch a shape. Honest line: you will not compute a Christoffel symbol or a Riemann tensor here. You will see what curvature is, why it can be felt from inside, and why the total on a closed surface is a whole number of 2π that no amount of denting can change. Easier first reads: Topology: The Shape of Space (12/10), Vectors, Matrices and Linear Transformation (12/14). A curve's curvature is how fast its direction turns Start with a line, which has no curvature. Now a circle. Walk around one and your direction turns steadily; a small circle makes you turn sharply, a huge one barely at all. So define the curvature of a curve at a point as the rate at which the direction turns per unit distance walked, and the radius of curvature as its reciprocal. For a circle of radius R that gives κ = 1/R. For any other curve, the osculating circle (from the Latin for "kissing") is the circle that hugs it most closely at that point, and its radius is the radius of curvature there. κ = rate the direction turns per metre walked = 1 / R Drag the point round an ellipse below. The curve is gentlest along the flat sides and sharpest at the ends of the long axis, where the kissing circle shrinks. Interactive · The kissing circle Half-width a Half-height b Position round the curve The proof sketch that stays with you. Add up all the turning along a closed loop that never crosses itself and you always get exactly one full turn, 360 degrees. Squash the loop, dent it, make it a potato: the total is unchanged (this is the turning tangents theorem of Heinz Hopf, 1935). The real trick is to slide the loop towards a circle without letting it cross itself. The turning total can only change in whole turns, and the only whole number it could be is the one the circle gives. The readout adds up the turning of your ellipse numerically, and it is 360 degrees for every shape you choose. A surface bends two ways at once On a surface there is no single curvature at a point, because the answer depends on which direction you slice. Cut a saddle along the line from the pommel to the cantle and the cut curves up; cut it across and the cut curves down. The two extreme slices, at right angles to one another, give the principal curvatures κ1 and κ2. Leonhard Euler showed that every other slice is a blend of the two. curvature of the slice at angle θ = κ1 cos²θ + κ2 sin²θ Gauss's one number multiplies the two: K = κ1 × κ2. A bowl or a ball curves the same way both ways, so K is positive. A saddle curves opposite ways, so K is negative. A cylinder, such as a rolled sheet, curves one way and is straight the other, so K = 0. The product is the point: flat in one direction is enough to make K zero. Interactive · Slice a surface κ₁ (one direction) κ₂ (at right angles) Slice angle θ Proof sketch of Euler's formula. Near a point, a smooth surface looks like z = ½(κ1x² + κ2y²). Slice along direction θ by putting x = s cos θ and y = s sin θ. You get z = ½(κ1 cos²θ + κ2 sin²θ)s², a parabola whose curvature is exactly the bracket. The real trick is the first step: choosing axes along the extreme directions makes the cross term vanish. Curvature can be measured from the inside Here is the surprise. K was defined using how the surface sits in three-dimensional space, which an ant on it cannot see. Yet in 1827 Gauss proved (in his Disquisitiones generales circa superficies curvas, published 1828) that K depends only on distances measured along the surface. He called it the Theorema Egregium, the "remarkable theorem". Bending without stretching, as you do with paper, never changes K. That is why a flat sheet can roll into a cylinder or a cone (K stays 0) but never into a ball (K = 1/R²): the pizza fold in the first paragraph, and the reason every flat world map distorts something. How would an ant find K? Draw a circle of radius r on the surface, measuring r along the surface from the centre, and then measure its circumference. On a flat plane it is 2πr. On a sphere of radius R it is 2πR sin(r/R), which is smaller. On a saddle it is larger, because there is extra room. C ≈ 2πr (1 − Kr²/6)   so   K ≈ 3 (2πr − C) / (πr³) On the Earth, a circle of radius 1,000 km measured over the surface has a circumference of 6,257 km, not 6,283 km: 26 km short, enough for a surveyor to notice and for the circle to know the planet is round. Interactive · The ant's circle Curvature K Circle radius r Proof sketch. The full proof of the Theorema Egregium is a calculation, but its idea is the circle test. Everything in the circle test is a distance measured along the surface, so K, which the formula extracts, is built from the surface's own distances. The real trick is the identity K = κ1κ2: two numbers that each need the outside view combine into one that does not. For a surface whose circles have circumference 2π f(r), the same idea gives the neat formula K = −f″/f. Straight lines and triangles on a curved surface A "straight line" on a surface is a geodesic: the path you follow if you walk without turning left or right. On a sphere these are great circles, which is why the Madrid-to-Tokyo flight arcs north. On any curved surface, geodesics do the odd things that straight lines do not. Two nearby ones on a ball meet again (all meridians meet at the pole); on a saddle they diverge faster than in a plane. Triangles built from geodesics have angles that no longer add to 180 degrees. angle sum of a triangle = 180° + K × (area) (in radians: π + K·area) Proof sketch on a sphere, which really is a proof. A lune, the slice of a sphere between two meridians that meet at angle α, covers a fraction α/2π of the area 4πR², so its area is 2αR². Extend the three sides of a triangle into full great circles: they cut the sphere into pieces, and adding up the lune areas and matching antipodal copies gives area = (α + β + γ − π)R². The real trick is counting each lune's area by its angle alone. The excess over 180 degrees equals the area divided by R². Gauss knew this. In his geodetic survey of the kingdom of Hanover he measured a large triangle between the peaks Hohehagen, Brocken and Inselsberg, with sides of about 69, 85 and 107 km. The excess works out to roughly 15 arcseconds, buried inside the survey's measurement error. The common story that Gauss was testing whether physical space is Euclidean is, according to his biographer Buhler and others, a myth; historians still argue about his motives, and what is clear is that he had the mathematics ready. Interactive · Equilateral triangle on three worlds Sphere, K > 0 Flat, K = 0 Saddle, K < 0 Side length (in units of the curvature radius) Carry an arrow round a loop and it comes back turned Take an arrow lying in a surface and slide it along a path, keeping it as parallel as the surface allows (no turning relative to the path's straight-ahead direction). That is parallel transport. In a plane it comes back unchanged however you wander. On a curved surface, it comes back rotated. The rotation, called holonomy, equals the total curvature enclosed by the loop. turn of the arrow = ∫ K dA over the region the loop encloses The cleanest picture is a circle of latitude φ on the Earth. Cut a cone that touches the sphere along that circle and unroll it flat: it becomes a pie slice whose angle is only 360° × sin φ, not a full circle. Carry an arrow along the edge and keep it fixed in the flat picture. When the two cut edges of the slice are glued back, the arrow no longer lines up with the local "north", and the gap is the missing angle, 360° × (1 − sin φ). This is exactly the Foucault pendulum: a pendulum keeps its swing plane parallel-transported, so relative to the ground it turns by 360° × sin φ a day. At Paris (48.85° N) that is about 271° a day. Foucault's public demonstration under the dome of the Panthéon was in 1851. Interactive · Unroll the cone Latitude of the loop The real trick. Unrolling the cone is free of stretching, so the arrow can be moved in the flat picture, where "parallel" has its ordinary meaning. All of the mismatch comes from the glued seam. Check against the formula: the area of the polar cap above latitude φ is 2πR²(1 − sin φ), and K = 1/R², so ∫K dA = 2π(1 − sin φ), the same missing angle. Total curvature is a whole number of turns Add up K over an entire closed surface and something astonishing happens. A sphere gives 4π. A dented, stretched or lumpy sphere also gives exactly 4π: the dents have negative curvature that precisely cancels the extra positive curvature around them. A doughnut gives 0, because its outer rim is bowl-like (positive curvature) and its inner ring is saddle-like (negative), and the two totals, +4π and −4π, cancel. This is the Gauss–Bonnet theorem: ∫ K dA = 2π χ   (χ = 2 for a sphere, 0 for a doughnut, −2 for a two-holed doughnut) The number χ is the Euler characteristic, which counts vertices − edges + faces on any triangulation of the surface and is the topologist's way of counting holes (Topology, 34/76). The theorem says that an average of a local, calculus quantity equals a global, hole-counting one. It is one of the first and most beautiful bridges between analysis and topology. Interactive · Add up all the curvature Ellipsoid Doughnut Axis a Axis b Axis c Proof sketch. Cut the surface into small geodesic triangles. Each has angle sum = π + ∫K dA over it, so adding all of them, ∫K dA over the whole surface equals (sum of every angle) − π × (number of triangles). The angles around each vertex add to 2π, so the sum of every angle is 2π × V, and the 'π per triangle' terms add to π × F. Each triangle has 3 sides and each edge is shared by 2 triangles, so 3F = 2E, which lets you rewrite πF as 2πE − 2πF. The total becomes 2π(V − E + F). The real trick is to use the triangle formula once per triangle and let the counting do the rest. Gauss–Bonnet has an unexpected afterlife. Richard Hamilton's Ricci flow, which smooths the curvature of a space like heat spreading, was the engine of Grigori Perelman's 2002–03 proof of the Poincaré conjecture, the one Millennium Prize problem solved so far. What a graduate just sees Curvature is how fast direction turns; its reciprocal is the radius of the circle that kisses the curve. On a surface, curvature is two numbers, and their product K tells you bowl (K > 0), saddle (K < 0) or can-be-rolled-flat (K = 0). If a sheet is bent one way it resists being bent the other: that is why a folded pizza slice and a corrugated roof are stiff. K is intrinsic: a creature on the surface can detect it by measuring circles and triangles, with no view from outside. Every flat map of a sphere must distort something, because the sphere cannot be flattened without stretching. "Straight" means no turning, which makes a geodesic a great circle on a sphere. Carry an arrow round a loop and it comes back turned by the curvature inside: a Foucault pendulum and a Paris-sized triangle are the same fact. Total curvature of a closed surface counts holes: 4π for any sphere, 0 for any doughnut, however dented. Where it shows up next General Relativity (34/85): Einstein's 1915 theory says matter tells spacetime how to curve and spacetime tells matter how to move. The curved geometry is that of Bernhard Riemann's 1854 lecture, the generalisation of Gauss to any number of dimensions; free-falling objects follow geodesics. Classical Mechanics (34/82): the state space of a mechanical system is a curved manifold, and a rigid body's rotation lives on one. Topology (34/76): Gauss–Bonnet is where local geometry meets global shape. Computer graphics and robotics: smoothing a 3D scan, flattening a mesh for a texture map, and planning a robot arm's motion on its configuration space all use discrete curvature and geodesics. Keenan Crane's course notes on discrete differential geometry are a good example. Navigation: GPS software computes distances on a curved Earth with geodesics on an ellipsoid, because the sphere is not exact enough. If you want to go deeper 📘 Textbook: Manfredo do Carmo, Differential Geometry of Curves and Surfaces (2nd ed., Dover, 2016): the standard first course on curves and surfaces, with Gauss–Bonnet as the climax. 📘 Textbook: Andrew Pressley, Elementary Differential Geometry (2nd ed., Springer, 2010): a clearer route for readers who want more worked examples. 📘 Gentler: Tristan Needham, Visual Differential Geometry and Forms (Princeton University Press, 2021): geometric pictures instead of index gymnastics. 🌐 Free course: MIT OpenCourseWare 18.950 Differential Geometry (Fall 2008, Paul Seidel), with lecture notes and problem sets. The takeaway Curvature is how fast direction turns. A surface has two principal curvatures, and their product K can be measured by an inhabitant from distances alone. K shows up in the circumference of circles, the angle sum of triangles and the turn of a transported arrow, and when summed over a closed surface it counts holes. That is the geometry of general relativity, and the reason a folded pizza slice stays up. Try this: this week, fold a slice of pizza (or a sheet of stiff paper) along its length and try to flop the tip. Then try to wrap a sheet of paper smoothly round a ball. The first works, the second creases, and you have just felt K = 0 against K > 0. Sources & Further Reading Sources. Gauss, Disquisitiones generales circa superficies curvas (presented 1827, published 1828), with the Theorema Egregium. The Hanover triangle and its roughly 14.85 arcsecond excess, and the view that the "test of Euclidean space" story is a myth: Buhler's biography of Gauss as summarised in Physics Today correspondence (“Gauss on the mountaintops”) and mathpages.com 8.6, “On Gauss's Mountains”; the debate over his motives is still open. Hopf's turning tangents theorem (1935). Riemann's habilitation lecture (1854). Perelman's proof of the Poincaré conjecture (2002–03) and the Clay Millennium list (2000). Foucault's Panthéon pendulum (1851); the rate 360° × sin φ per day is standard. MIT OpenCourseWare 18.950 page checked November 2026. Computed in node: circle of radius 1,000 km on Earth (6,371 km radius) has circumference 6,257.4 km against 6,283.2 km flat; the survey triangle (sides 69, 85, 107 km, area 2,929 km², on an Earth of radius 6,371 km) has excess 14.9 arcseconds; Paris holonomy and pendulum rate at 48.85° N (88.9° and 271.1° a day); ellipsoid and doughnut ∫K dA by numerical integration (4π; torus +4π and −4π). Numbers in the interactives are illustrative geometry, not measurements. 🌐 MIT OpenCourseWare 18.950 Differential Geometry 📘 Manfredo do Carmo, Differential Geometry of Curves and Surfaces, 2nd ed. (Dover) 📘 Andrew Pressley, Elementary Differential Geometry, 2nd ed. (Springer) 📘 Tristan Needham, Visual Differential Geometry and Forms (Princeton) 🌐 On Gauss's Mountains (mathpages) Step 20. Particle & Nuclear Physics: What Stuff Is Made Of, and What Can Happen to It ------------------------------------------------------------------------------------- Why: Quarks, leptons, forces and the Standard Model. Everything you can touch is built from a short list of particles, and a short list of rules says which collisions and decays may happen. Almost nothing else is allowed, and that is why the world is stable. A banana is slightly radioactive. It holds potassium, and about one atom in 8,500 of that potassium is the isotope potassium-40, which decays on its own, now and then, with a half-life of about 1.25 billion years. Every day, somewhere in your body, a few thousand of those atoms do it. Nothing pushed them. Nothing about the atom changed. One of its neutrons simply turned into a proton, an electron and an almost undetectable neutrino, and flew apart. Now ask a stranger question. Why does your banana not do other things? Why does a proton in it sit still for longer than any experiment has been able to measure, when the proton is heavy and could, as far as raw energy goes, fall apart into lighter pieces? A graduate in particle and nuclear physics sees the banana, the proton and the sun as one subject: a short list of ingredients, and a short list of bookkeeping rules about what can turn into what. The course in one box Who takes itPhysics majors, usually in year 3 or 4, often as a choice after the quantum core. Programmes in the style of MIT's Course 8 (the course 8.701 Introduction to Nuclear and Particle Physics) and the Cambridge physics route teach it late, because it needs quantum mechanics and relativity. Nuclear engineers meet the nuclear half in a more applied form. What it is forKnowing what the smallest things are, how they interact, and how to tell from a collision or a decay what is going on. Comes afterQuantum Mechanics (34/83) and Special Relativity (34/81). Leads toAstrophysics & Cosmology (34/88): stars burn on nuclear reactions, and the early universe was a particle collider. What this piece gives youYou will not be able to compute a cross-section or a Feynman diagram. You will see what the Standard Model's table contains, how to check whether a decay is allowed with three lines of arithmetic, and why the nuclear energy per kilogram is millions of times that of any chemical fuel. Easier first reads in the library: Quantum Mechanics: The Weirdness at the Bottom (13/06), The Standard Model: What Everything Is Made Of (13/07) and How a Nuclear Reactor Works (13/14). This one goes further and lets you test the rules. Energy is mass, so collisions can make new things Einstein's best-known equation is usually read as a statement about bombs. Particle physicists read it as a price list. Mass and energy are the same currency, and the exchange rate is the speed of light squared. If you hit two things together hard enough, some of their motion can be spent on a brand-new particle, which then exists until it decays. E = m c²energy = mass × (speed of light)². So masses are quoted in energy units: an electron is 0.511 MeV, a proton 938.3 MeV, about 0.94 GeV The catch is that not all your energy is spendable. Momentum must still balance after the collision, so a particle fired at a stationary target keeps most of its energy as leftover motion. Fire two protons at each other head-on and the whole lot is spendable, because the total momentum is zero. The usable energy is the centre-of-mass energy, written √s. For two beams of energy E head-on it is just 2E. For one beam of energy E on a stationary proton it is only √(2m² + 2mE), in units where c = 1. A worked number. To make a proton–antiproton pair in a proton–proton collision you need √s of at least four proton masses, 3.75 GeV. With a stationary target that takes a beam kinetic energy of 5.63 GeV, which is why the Bevatron in Berkeley, built to about 6 GeV, found the antiproton in 1955. At a collider you need only about 1.9 GeV in each beam. Try heavier targets below. Producing a Higgs boson of mass about 125 GeV needs roughly 63.5 GeV per beam in a collider, but about 8,600 GeV (8.6 TeV) in a fixed-target beam. That gap is why the biggest accelerators are colliders. Interactive · Collider or fixed target? Antiproton pair W boson Higgs Top pair Mass of the new stuff to make Two protons in, the new stuff must have mass M, so √s ≥ 2mp + M (mp = 0.938272 GeV). Collider: each beam needs √s/2. Fixed target: E = (s − 2mp²)/(2mp). This is a threshold: real production at the LHC also depends on how the proton's quarks and gluons share the energy, so real machines run well above it. For scale, the Large Hadron Collider has run at 13.6 TeV collision energy since July 2022. Reaching that with a stationary target would need a beam of roughly 98,600 TeV. No ring could hold it. Quarks and leptons: the short list of what stuff is made of The Standard Model's list is shorter than the periodic table. Matter particles come in two families. Quarks (up, down, charm, strange, top, bottom) feel the strong force and are never seen alone. Leptons (the electron, muon and tau, each with its own neutrino) do not feel the strong force. Each family comes in three "generations" with the same charges and growing mass; ordinary matter uses only the first: up and down quarks, the electron and its neutrino. Every particle has an antiparticle with opposite charges. Quark charges are odd: up-type quarks carry +2/3 and down-type −1/3 of a proton's charge. But you never see a third of a charge, because quarks are confined. They only appear glued into bundles with total strong "colour charge" zero: three quarks (baryons), three antiquarks, or a quark with an antiquark (mesons). A proton is two up and one down: 2/3 + 2/3 − 1/3 = +1. A neutron is up, down, down: 0. Build some yourself. Interactive · Build a hadron udscb ūd̄s̄c̄b̄ Clear Charges: u, c +2/3; d, s, b −1/3; antiquarks opposite. Baryon number ±1/3 per quark. Strangeness −1 per s quark. The top quark is left out because it decays before it can bind. The list of named hadrons is a small sample. The quarks' bound pairs and triples are by far the biggest source of everyday mass. The up and down quarks together are only about 1% of a proton's mass; the rest is the energy of the strong force binding them, via E = mc². Most of you is binding energy. Conservation laws decide what can happen A reaction is allowed if three things hold. Add up the electric charge before and after: it must match. Add up baryon number (quarks count +1/3, antiquarks −1/3) and lepton number, counting each lepton family separately: they must match. And the total energy in the rest masses must be at least that of the products. If a rule is not forbidden by one of these, it happens, at some rate. If it is forbidden, it has never been seen. Those rules are why the proton, the lightest baryon, is stable. It has nothing lighter with the same baryon number to decay into. Experiments such as Super-Kamiokande in Japan have searched for it to fall apart and found nothing, setting a lifetime limit above 1034 years, many orders of magnitude longer than the universe has existed. In the same spirit, the muon should be able to decay into an electron and a photon on energy grounds alone, but flavour-specific lepton number forbids it, and searches find none at the level of about 1 in a trillion. Predict first, then check. Pick a reaction, say whether you think it happens, and the page runs the arithmetic. Interactive · Allowed or forbidden? I think it happens I think it never does Rest masses in MeV from the Particle Data Group (neutrinos treated as massless; their real masses are tiny). Charge, baryon number and electron/muon lepton numbers are summed on each side. Heavy messengers have short reach In quantum field theory, forces are carried by particles. Two electrons repel by swapping photons. The strong force binds quarks by swapping gluons. The weak force, behind the neutron's decay, is carried by the W and Z bosons. And here is the part a graduate remembers: the heavier the carrier, the shorter the force's reach. Borrowing a heavy particle from the vacuum is expensive in energy, so the loan must be repaid quickly, and it cannot travel far. The range is about ħc divided by the carrier's rest energy. range ≈ ħc / (m c²)ħc = 197.327 MeV·fm. One femtometre (fm) is 10⁻¹⁵ m, about the width of a proton (radius ≈ 0.84 fm) The photon is massless, so electric forces reach across the galaxy. The pion, the lightest meson at 139.6 MeV, gives 1.41 fm, which is why the nuclear force binds neighbours in a nucleus and fades beyond. The W boson (80.4 GeV) gives 0.0025 fm, about 300 times smaller than a proton. That is why the weak force is "weak" at ordinary distances: it hardly reaches. Interactive · How far does a force reach? Pion Kaon W boson Photon Carrier rest energy Yukawa estimate, range = ħc/mc². The strong force between quarks (gluons) is a different case: gluons are massless but the force is still confined, so this is the classic picture for pions between nucleons and for the weak force, not for gluons. Binding energy: why the sun shines and reactors run A nucleus weighs a little less than its separate protons and neutrons. The missing mass, multiplied by c², is the binding energy, the work needed to pull it apart. Divide by the number of nucleons A and you get a curve with a shape every nuclear scientist knows: it rises steeply for light nuclei, peaks around iron and nickel (about 8.8 MeV per nucleon), then falls slowly to uranium. Anything that moves a nucleus up the curve releases energy. Light nuclei going up by fusing; heavy ones going up by splitting. Worked numbers from measured masses: helium-4 has 7.07 MeV per nucleon, iron-56 8.79, uranium-235 7.59. Deuterium plus tritium fusing into helium-4 and a neutron frees 17.6 MeV, about 3.4 × 10¹⁴ joules per kilogram of fuel. Fission of uranium-235 frees roughly 200 MeV per atom, about 8 × 10¹³ J/kg. TNT is 4.2 × 10⁶ J/kg: fusion fuel carries about 80 million times as much. Interactive · The curve of binding energy Mass number A Line: the semi-empirical mass formula (volume, surface, Coulomb and asymmetry terms; pairing left out for a smooth curve), with stable Z. Dots: measured values computed from atomic masses (He-4, C-12, O-16, Fe-56, Ni-62, U-235, U-238). The formula is poor below A ≈ 20 (it gives 5.7 for helium-4 where the real value is 7.07), a reminder that it is a model. The same curve explains the sun, which fuses hydrogen into helium, and why stars much heavier than the sun make iron and stop: past iron, fusion costs energy instead of paying it. That is the hinge to Astrophysics & Cosmology (34/88). Decay is random, yet the curve is exact An unstable nucleus has no clock. A carbon-14 atom that has survived 5,730 years is exactly as likely to decay in the next minute as one made a second ago. So nothing in any single atom tells you when it will go. Yet a sample of trillions behaves with high precision: after one half-life, half remain; after two, a quarter. N(t) = N₀ × (½)t / t½survivors = starting number × one half, raised to the number of half-lives elapsed Carbon dating uses it: living things hold carbon-14 at the atmosphere's level and stop taking more when they die. A bone with a quarter of the level has lived two half-lives, about 11,460 years. After 20,000 years only about 8.9% remain, which is why the method runs out near 50,000 years. The half-lives span an enormous range: below, from microseconds to billions of years. Watch the randomness shrink as the sample grows. Interactive · Atoms that cannot be predicted, in a crowd that can Po-214I-131Cs-137C-14U-238 10 atoms1001,000Roll again Time passed (half-lives) Each atom draws its own random lifetime (exponential), so no atom's fate is known in advance. Half-lives: Po-214 164 µs, I-131 8.02 days, Cs-137 30.04 years, C-14 5,730 years, U-238 4.468 billion years (standard tables). With 10 atoms, the survivors after one half-life can easily be 3 or 7. With 1,000, they are close to 500 every time. That is the whole content of "the law of large numbers", and the reason a particle detector needs many events before it says anything. Where the Standard Model runs out The Standard Model is the most precisely tested theory in science, and every physicist expects it to be incomplete. The decisive experiments: neutrinos oscillating between flavours, which means they have mass (Super-Kamiokande and SNO, Nobel Prize 2015); the Higgs boson, announced on 4 July 2012 by ATLAS and CMS at about 125 GeV; and the muon's magnetic moment, where Fermilab's final 2025 result is 127 parts per billion precise and where theory predictions were revised, shrinking a famous disagreement. What is left? Neutrinos have mass but tiny: the KATRIN experiment's 2025 limit is under 0.45 eV, at 90% confidence, at least a million times lighter than the electron, and the Standard Model does not say why. Dark matter makes up about five times as much as ordinary matter, and no Standard Model particle fits. The universe has far more matter than antimatter, and the model's known effects are too small to explain it. Gravity is not in the model at all. These are open, and physicists disagree on which gap will give first. What a graduate just sees Mass is a form of energy, and a collision can turn motion into new particles, if the centre-of-mass energy is enough. Colliders beat fixed targets because head-on collisions waste no energy on leftover motion. Quarks only come in colourless bundles. A proton's mass is mostly binding energy, not quark mass. Before asking if a reaction happens, check charge, baryon number, lepton number and energy. The heavier the force carrier, the shorter the force's range: ħc over mass. Energy per nucleon peaks at iron: fusion pays below it, fission pays above it. Each atom's decay is random with no memory; a crowd's decay is exponential and exact. A very large number of events is the only way to see rare processes. Where it shows up next Astrophysics & Cosmology (34/88): the binding-energy curve decides which stars make which elements, and the first minutes of the universe were particles interacting at colliders' energies and above. Condensed Matter Physics (34/87): the same quantum field ideas return as "quasi-particles" inside solids. Medicine: PET scanners detect the photons from positron annihilation, proton therapy aims beams at tumours, and technetium-99m (half-life 6 hours) is the commonest imaging isotope. Energy: fission reactors, fusion projects such as ITER, and radiocarbon dating all lean on the same curve and the same decay law. Computing: the web was invented at CERN, and detectors produce so much data that the trigger systems discard most events in microseconds. If you want to go deeper 📘 Textbook. David Griffiths, Introduction to Elementary Particles (Wiley-VCH, 2nd revised edition, 2008). Clear and short; the usual first particle-physics book after quantum mechanics. 📘 Textbook. Mark Thomson, Modern Particle Physics (Cambridge, 2013). More modern and more demanding, and the course text at Cambridge. 📘 Nuclear. Kenneth Krane, Introductory Nuclear Physics (Wiley, 1988). The standard undergraduate nuclear text. 📘 Gentler. Frank Close, Particle Physics: A Very Short Introduction (Oxford, 2004). No equations, one afternoon. 🌐 Free course. MIT OpenCourseWare 8.701 Introduction to Nuclear and Particle Physics (Fall 2020): notes, videos, problem sets and solutions. 🌐 Reference. The Particle Data Group's Review of Particle Physics: every measured mass and lifetime, free. The takeaway Matter is a short list of quarks and leptons, held together by forces whose reach is set by the mass of their carriers. A small set of conservation laws says what may happen; energy conversion by E = mc² says what it costs. The binding-energy curve explains why both the sun and a reactor work, and random decay with an exact crowd behaviour explains why radioactivity is unpredictable and measurable at once. Try this: next time you see a smoke detector, a banana or a bag of potassium-based salt substitute, say aloud that some atoms in it are decaying right now, each one at a random moment, and that the count per second is nevertheless steady. That is the exponential law at work. Sources & Further Reading Sources. Constants are CODATA values (ħc = 197.3269804 MeV·fm; atomic mass unit 931.49410242 MeV/c²). Masses and half-lives are standard tables (Particle Data Group; NNDC). Higgs: ATLAS and CMS announced a boson of about 125 GeV on 4 July 2012 at CERN. KATRIN: Science 388, 180 (2025), upper limit 0.45 eV (90% CL). Muon g-2: Fermilab final result, 3 June 2025, precision 127 ppb; the Standard Model prediction was revised by newer lattice calculations. Super-Kamiokande proton-decay searches give lifetimes above 10³⁴ years for the channels searched. The LHC began Run 3 at 13.6 TeV in July 2022. Antiproton found at the Bevatron in 1955 (Chamberlain, Segrè, Wiegand, Ypsilantis), threshold kinetic energy 6 mp = 5.63 GeV. Every number an interactive shows was computed in node: threshold beams for the Higgs 63.5 GeV (collider) and 8,604 GeV (fixed target); 13.6 TeV collider equals 9.86 × 10⁷ GeV fixed target; Yukawa ranges 1.41 fm (pion), 0.399 fm (kaon), 0.00245 fm (W); binding energies per nucleon He-4 7.074, C-12 7.680, O-16 7.976, Fe-56 8.790, Ni-62 8.795, U-235 7.591, U-238 7.570 MeV; D-T release 17.59 MeV, 3.37 × 10¹⁴ J/kg; C-14 after 20,000 years = 8.9%. 🌐 MIT OCW 8.701 🌐 Particle Data Group 📘 Griffiths, Introduction to Elementary Particles 📘 Close, Particle Physics: A Very Short Introduction Step 21. Condensed Matter Physics: Why Solids Conduct, Insulate and Compute --------------------------------------------------------------------------- Why: Why solids conduct, insulate, superconduct and make chips possible. A cube of copper and a cube of diamond are made of the same kinds of particles. One carries current and the other does not. The difference is a gap in an energy ladder, and it is the idea behind every chip. Pick up a copper coin and a piece of window glass. Both are lumps of atoms, with electrons around nuclei, held by the same electric force. Connect either to a battery. Copper carries amps. Glass carries essentially nothing. The ratio of their resistivities is of order 1022 or more, a bigger spread than any other everyday property of matter. Where does a number that large come from? The answer is not in any single atom. It appears only when something like 1023 atoms sit together in a lattice. Add a trace of phosphorus to silicon, a few atoms in every ten million, and its conductivity changes by a factor of thousands. Cool lead or niobium close to absolute zero and its resistance drops to exactly nothing. A physicist trained in condensed matter sees all of these as the same subject: what happens to electrons when a huge crowd of atoms cooperates. The course in one box Who takes itPhysics majors, usually in year 4 (MIT's 8.231 Physics of Solids I is the classic version; Cambridge teaches it in the later physics options), and electrical and materials engineers meet the semiconductor half in their own courses. What it is forExplaining and predicting the properties of solids and liquids from the quantum behaviour of their atoms and electrons. Comes afterQuantum Mechanics (34/83) and Statistical Mechanics (34/84). Leads toResearch in materials, devices and quantum technology. It builds on Electronics (34/35) and feeds Astrophysics & Cosmology (34/88) through white dwarfs and neutron stars, which are held up by electron and neutron degeneracy. What this piece gives youYou will not be able to compute a band structure. You will see why a crystal turns levels into bands, how the position of the electrons relative to the gap sorts materials into conductors and insulators, and how X-rays show where atoms sit. Easier first reads in the library: Quantum Mechanics: The Weirdness at the Bottom (13/06), Screens (29/10), Processors (29/11) and Electronics (34/35). This one goes further and lets you move the gap. Many atoms, one band A single atom has sharp energy levels. Put two atoms close together and each level splits in two: electrons can sit in a combination that is lower in energy than before, or one that is higher. Put N atoms in a row, and each level splits into N. The levels spread across a range set by how strongly neighbouring atoms overlap, and with 1023 atoms they are so closely spaced they form a continuous band. Atoms close together, strong overlap, wide band. Ej = E₀ − 2t cos( jπ / (N+1) ), j = 1 … Nthe energy levels of a row of N atoms with overlap (hopping) energy t. The band spans from E₀ − 2t to E₀ + 2t: a width of 4t Electrons fill levels from the bottom, two per level (spin up and spin down), because of the Pauli exclusion principle. Now the whole of electrical behaviour is a question of filling. If one electron per atom fills the band halfway, the next empty level sits a hair above the last full one, and a tiny push will move electrons: that is a metal. If two electrons per atom fill it to the top, there is no empty level to move into. Try it. Interactive · Build a band from atoms 1 electron per atom 2 per atom Atoms in the row Overlap t (atoms closer = larger) Nearest-neighbour tight-binding chain, E₀ = 0, exact eigenvalues. Dark lines are filled levels, light are empty, half-tone is half-filled. Two electrons fit in each level. Notice what the readout says as you add atoms: the gap to the next empty level shrinks like 1/N. For a real wire with 1023 atoms it is smaller than any thermal wobble, so electrons are effectively free to move. Metal, insulator or semiconductor: where the gap sits A band is a range of allowed energies. Between bands there can be a band gap where no electron state exists. Whether a material conducts depends on two things: how many electrons it has, and whether the highest filled band is full. Copper has one outer electron per atom, so its band is half full and it is a metal. Diamond and glass have completely full bands with a large gap above: an insulator. Silicon has the same full-band structure but a gap of only 1.12 eV. That is small enough that, at room temperature, a few electrons are knocked up by heat: a semiconductor. The metal's electrons are a strange crowd. Copper has 8.49 × 10²⁸ conduction electrons per cubic metre, packed so tightly that the Pauli principle forces them up to a Fermi energy of about 7.0 eV and a speed near 1.6 × 10⁶ m/s, even at absolute zero. Yet when 1 amp runs through a 1 mm² copper wire, the electrons' average drift is only about 0.07 mm per second. The signal moves at the speed of the field, but the carriers barely crawl. The number of heat-freed carriers in a semiconductor depends on the gap with a ferocious exponential: it goes as e−Eg/2kT. Drag the gap. Interactive · How many electrons can heat lift across the gap? GeSiGaAsGaNDiamond Band gap Temperature ni = 1.7 × 10¹⁹ cm⁻³ × (T/300)3/2 × e−Eg/2kT, with the prefactor fixed at silicon's value for every material (illustrative). For silicon at 300 K it gives 6.6 × 10⁹ cm⁻³; the textbook value is about 1 × 10¹⁰. Copper's conduction electrons: 8.49 × 10²² cm⁻³. Between silicon and diamond the gap differs by a factor of about five, but the carrier count differs by a factor of 1037. That is why one is the basis of electronics and the other is a jewel. And note the temperature slider: semiconductors improve when hot (more carriers), the opposite of metals. Silicon chips are limited to roughly 150 °C for this reason, and one reason wide-gap materials such as GaN and silicon carbide are used in hot, high-voltage power electronics. Doping and the one-way valve Pure silicon has about 10¹⁰ free carriers per cubic centimetre, out of 5 × 10²² atoms. Replace one atom in five million with phosphorus (one extra outer electron) and you add 10¹⁶ electrons per cubic centimetre: a million times more. This is doping. A law of mass action holds the product of electron and hole densities fixed at room temperature, n·p = ni². So adding electrons removes holes, in step: n-type silicon has electrons as its majority carriers, p-type (boron) has holes. Put p-type and n-type side by side and you get a p–n junction, the diode. Electrons and holes diffuse across and annihilate, leaving a barrier. Pushing the voltage one way lowers the barrier and current rises exponentially; the other way it raises the barrier and almost nothing flows. The Shockley formula is the single equation to keep. I = Is ( eV / VT − 1 )current = saturation current × (exponential of voltage ÷ thermal voltage, minus 1). VT = kT/q ≈ 25.85 mV at 300 K Interactive · Dope it, then bias it Donor atoms (phosphorus) Voltage across a diode Doping: n = Nd (fully ionised), p = ni²/Nd with ni = 10¹⁰ cm⁻³ for silicon at 300 K, 5 × 10²² Si atoms/cm³. Diode: ideal Shockley equation with Is = 1 pA (illustrative) at 300 K; real diodes add series resistance and an ideality factor between 1 and 2. On the log plot the forward branch is a straight line: every 60 mV more gives about ten times the current. A transistor is two such junctions, or a gate that moves a barrier, so one signal controls a much larger current, and billions of them form a processor. Condensed matter is where that sentence comes from. Diffraction: how we know where the atoms are A crystal is a repeating arrangement, and waves with a wavelength comparable to the spacing, about an ångström (10⁻¹⁰ m), bounce off it like light off a diffraction grating. In 1912 Max von Laue's group showed that X-rays diffract from crystals, proving both that X-rays are waves and that crystals are regular. In 1913 William Henry Bragg and his son William Lawrence Bragg turned it into a method for finding where atoms sit. Their rule is one line: nλ = 2d sin θreflections from stacked atomic planes add up only when the extra path, 2d sin θ, is a whole number n of wavelengths A worked number: silicon's (111) planes are 3.136 Å apart. Copper-Kα X-rays have λ = 1.5406 Å. The first strong reflection comes at sin θ = 1.5406 ÷ (2 × 3.136), so θ = 14.2°, a detector at 28.4° from the beam. Measure the angles and intensities for many planes and you can reconstruct the whole structure: this is how salts, metals, DNA and proteins were first seen. Slide through the angles. More planes (a bigger crystal) means sharper peaks. Interactive · Find the Bragg peaks Si (111), Cu Kα Si (220), Cu Kα NaCl (200), Cu Kα Si (111), Mo Kα Angle θ Planes in the crystal Intensity from N planes: [sin(Nφ) / (N sin φ)]² with φ = 2π d sin θ / λ. Spacings from lattice constants (Si 5.431 Å, NaCl 5.640 Å); Cu Kα 1.5406 Å, Mo Kα1 0.7093 Å. Idealised: ignores atomic scattering strength and absorption. Superconductors: zero resistance, and a field pushed out In 1911 Heike Kamerlingh Onnes in Leiden cooled mercury to about 4 K and watched its resistance fall to an immeasurable value. Below a critical temperature Tc many metals carry current with no loss at all. Two decades later Meissner and Ochsenfeld found the second property: a superconductor also pushes magnetic fields out of itself, which is why a magnet floats over one. It is not just a perfect wire. The explanation, by Bardeen, Cooper and Schrieffer in 1957 (Nobel Prize 1972), is that electrons near the Fermi surface pair up through tiny lattice distortions. Pairs behave like bosons and fall into one shared quantum state, separated from the next excitation by an energy gap, so there is nothing for a bump to scatter them into. The weak-coupling estimate for the gap is 3.52 kBTc. The 1986 discovery of copper-oxide superconductors by Bednorz and Müller (Nobel Prize 1987) pushed Tc beyond liquid nitrogen's 77 K within months: YBa₂Cu₃O₇ at about 92 K. These are not explained by simple BCS theory, and no one yet agrees on the mechanism. In 2015 hydrogen sulfide at about 155 GPa (1.5 million atmospheres) reached 203 K, and a few hydrides since. No ambient-pressure room-temperature superconductor has been confirmed: the 2023 claim of "LK-99" was not reproduced by groups that tried. Interactive · Cool it and watch the resistance MercuryNiobiumMgB₂YBCOH₃S* Temperature Tc values: Hg 4.15 K (Onnes 1911), Nb 9.25 K, MgB₂ 39 K (2001), YBCO about 92 K (1987), H₃S 203 K (2015). *H₃S needs about 155 GPa. The resistance curve is schematic (a straight line above Tc); the gap is the weak-coupling estimate 3.52 kBTc, and real values differ by material. Superconductors are in daily use: the magnets of MRI scanners are niobium–titanium wires cooled by liquid helium at 4 K, and the Large Hadron Collider's bending magnets run at 1.9 K. More is different: phase transitions and the Ising model In 1972 Philip Anderson wrote an essay called "More Is Different". Its point: a crowd of particles has properties that no single particle has, and that cannot be read off the single particle's rules. Water molecules are not wet, and one iron atom is not a magnet. A magnet appears when billions of spins agree. The simplest model of that agreement is the Ising model: a grid of tiny arrows, each pointing up or down. Each arrow likes to match its four neighbours, and heat shakes it randomly. At low temperature agreement wins and the grid is mostly one direction: a magnet. At high temperature randomness wins. In between is a sharp critical temperature: Onsager solved the two-dimensional case exactly in 1944, with Tc = 2J ÷ (kB ln(1+√2)) = 2.269 J/kB, where J is the neighbour coupling. The same maths describes boiling and many other transitions. Interactive · Heat a magnet Start all upRandomiseRun 100 more sweeps Temperature (in units of J/k) A 24 × 24 grid with periodic edges, Metropolis updates, 150 sweeps each time you change temperature. Red is up, blue is down. A small grid blurs the transition: the real one is sharp only for infinitely many spins. Exact result (Onsager): magnetisation (1 − sinh−4(2J/kT))1/8 below Tc. Condensed matter has found phases that do not fit the "ordered or disordered" picture too: the quantum Hall states discovered in 1980 (Nobel Prize 1985), and the topological phases of Thouless, Haldane and Kosterlitz (Nobel Prize 2016), whose properties are protected by the shape of the electrons' band structure rather than by a symmetry. The field has never stopped producing surprises. What a graduate just sees Levels become bands when atoms are brought together, and closer atoms mean wider bands. Whether a solid conducts depends on whether the top occupied band is full, and, if it is, on the size of the gap above it. Carriers in a semiconductor follow e−Eg/2kT: small changes in gap or temperature change conduction enormously. A trace of dopant sets the electrons and holes, and a p–n junction is a voltage-controlled one-way valve. Electrons in a wire drift at a snail's pace while the field moves almost at light speed. X-rays and electrons diffract from crystals; peaks at nλ = 2d sin θ tell you the atoms' arrangement. Superconductors are a collective quantum state with a gap, not "very good conductors". Collective behaviour (a magnet, a phase) is a new thing that the parts do not have. Where it shows up next Electronics (34/35) and Digital Logic (34/36): the diode and transistor in those courses are the p–n junction here. Astrophysics & Cosmology (34/88): a white dwarf is a star held up by the same electron degeneracy that gives copper its 7 eV Fermi energy. Materials Science (34/13): X-ray diffraction, which you slid through above, is how metallurgists identify phases. In the world: chips, LEDs and lasers (the gap sets the colour), solar cells, hard-disk read heads, MRI magnets, and the superconducting circuits in quantum computers. If you want to go deeper 📘 Textbook. Charles Kittel, Introduction to Solid State Physics (Wiley, 8th edition, 2004). The standard first text, with problems. 📘 Textbook. Neil Ashcroft and N. David Mermin, Solid State Physics (1976). Longer, deeper and still widely used as the graduate reference. 📘 Modern. Steven Simon, The Oxford Solid State Basics (Oxford, 2013). Short chapters, strong on intuition. 📘 Gentler. The Feynman Lectures on Physics, vol. III, ch. 14 "Semiconductors", free online at feynmanlectures.caltech.edu, and Anderson's essay More Is Different (Science, 1972). 🌐 Free course. MIT OpenCourseWare 8.231 Physics of Solids I (Fall 2006). The takeaway When many atoms sit together their levels spread into bands, and electrons fill those bands from the bottom. Conductors have a band half-full; insulators and semiconductors have a full band below a gap, and the gap's size, through an exponential, decides how many carriers there are. Doping and the p–n junction turn that into devices, X-ray diffraction reads the structure, and in the cold, electrons can pair into a state with no resistance at all. The crowd does things the parts cannot. Try this: this week, look at any LED. Its colour is its band gap: red is about 1.9 eV, blue about 2.7 eV. The same physics that made the copper coin conduct is choosing the colour of the light. Sources & Further Reading Sources. Copper electron density 8.49 × 10²⁸ m⁻³ and Fermi energy about 7.0 eV from Kittel's tables. Band gaps (Ge 0.67, Si 1.12, GaAs 1.42, GaN 3.4, diamond 5.47 eV) are standard room-temperature values. Bragg and Laue: Laue's X-ray diffraction experiment 1912; W. H. and W. L. Bragg 1913 (Nobel 1915). Superconductivity: Onnes 1911; Meissner and Ochsenfeld 1933; BCS 1957 (Nobel 1972); Bednorz and Müller 1986 (Nobel 1987); YBCO about 92 K, 1987; H₃S 203 K at about 155 GPa (Drozdov et al., Nature, 2015); LK-99 failed replication (South Korean Society of Superconductivity and Cryogenics review, December 2023). Ising: Onsager 1944. Anderson, "More Is Different", Science 177 (1972). Topological phases: Nobel Prize in Physics 2016. Quantum Hall effect: von Klitzing 1980 (Nobel 1985). Course contents: MIT OCW 8.231. Every number an interactive shows was computed in node: Fermi energy of copper 7.04 eV, Fermi speed 1.57 × 10⁶ m/s, drift speed at 1 A in 1 mm² = 7.35 × 10⁻⁵ m/s; ni (model) Ge 4.0 × 10¹³, Si 6.6 × 10⁹, GaAs 2.0 × 10⁷, diamond 1.9 × 10⁻²⁷ cm⁻³; Si/diamond carrier ratio e−84 ≈ 3 × 10⁻³⁷; 60 mV/decade (59.5); Si (111) first Bragg angle 14.22°; Ising Tc = 2.269 J/kB; magnetisation at T = 1.5 is 0.986. 🌐 MIT OCW 8.231 Physics of Solids I 📘 Kittel, Introduction to Solid State Physics 📘 Simon, The Oxford Solid State Basics Step 22. Astrophysics & Cosmology: Reading the Universe from Light Alone ------------------------------------------------------------------------ Why: Stars, galaxies, dark matter and the history of the universe. Nobody has visited a star, weighed a galaxy on a scale or watched the universe begin. Everything we know comes from light and a few ideas that hold from the kitchen to the Big Bang. Look up on a clear night and every point of light is a sun. The faint smudge you can sometimes spot in Andromeda is a galaxy of a trillion suns about 2.5 million light-years away. The light reaching your eye left it before our species existed. There is no way to travel there, take a sample, or send a probe. And yet astronomers can tell you the star's mass, its temperature, how long it has left to live and how far away it is, from the colour and the brightness of that light. That is the odd thing about this subject: it is the one place in physics where you may not touch, and the whole discipline is built on inference. A graduate learns to see a point of light as an equation: brightness falls with the square of distance, colour tells temperature, and the stretching of its wavelengths tells how the space between us is growing. Out of three such ideas comes the age of the universe. The course in one box Who takes itPhysics majors in year 4, and astronomy majors earlier. MIT's Course 8 offers it in courses such as 8.282 (Introduction to Astronomy) and 8.286 (The Early Universe); the Cambridge Natural Sciences physics route teaches it in the later options. What it is forTurning light, and a few laws of physics, into the mass, size, history and fate of stars, galaxies and the universe. Comes afterStatistical Mechanics (34/84), General Relativity (34/85) and Particle & Nuclear Physics (34/86). Leads toNothing later on this list: it is the end of the physics major, and the door to research, where the open questions in the last section live. What this piece gives youYou will not be able to model a stellar interior or solve the Friedmann equations. You will see how astronomers get distance from brightness, why a star's mass fixes its life, what the evidence for dark matter really is, and how to turn two numbers into the age of the universe. Easier first reads in the library: The Big Bang and Our Expanding Universe (13/08), Orbits: Why the Moon Keeps Falling (13/11) and The Far Future: How the Universe Ends (13/10). This one goes further and lets you move the numbers. Light is all we get: the cosmic distance ladder A lamp twice as far away looks four times fainter, because its light spreads over four times the area. This inverse-square law is the first tool of astronomy: if you know how bright something really is, its apparent brightness tells you its distance. Magnitudes are astronomers' logarithmic scale for brightness, and the working form is the distance modulus: m − M = 5 log₁₀( d / 10 pc )apparent magnitude minus absolute magnitude, for a distance d in parsecs (1 pc = 3.26 light-years). Smaller magnitudes are brighter; 5 magnitudes is a factor of 100 The hard part is knowing the true brightness, M. For nearby stars, geometry gives it directly: as the Earth goes round the sun, a nearby star seems to shift against the background. Its parallax angle p, in arcseconds, gives distance 1/p parsecs. The Gaia satellite has measured Proxima Centauri's parallax as about 768 milliarcseconds, so it is 1.30 pc, 4.25 light-years away. Past a few thousand parsecs parallax fails, and astronomers climb a ladder instead: Cepheid variable stars, whose pulsation period fixes their luminosity (Henrietta Leavitt, 1912), and then Type Ia supernovae, exploding white dwarfs that are all about equally bright, at around absolute magnitude −19.3, visible across billions of light-years. Interactive · Two rungs of the ladder Parallax shift of a star Sun-like star (M ≈ +4.8) Cepheid, 10-day period (M ≈ −4) Type Ia supernova (M ≈ −19.3) How bright it looks (apparent magnitude) Parallax: d (pc) = 1000 ÷ p (mas). Candle: d = 10(m − M + 5)/5 pc. Ignores dust dimming, which real work must correct. Absolute magnitudes are rounded textbook values. Each rung is calibrated on the one before. That chain is why a 5% mistake near the bottom spreads to everything above, which matters later in this piece. A star is a balance, and its mass sets its life A star is a ball of gas in which two things fight. Gravity pulls everything inward. Pressure from the hot gas pushes outward. The heat is replenished by fusion in the core (the binding-energy story from Particle & Nuclear Physics, 34/86). If the core cools, gravity squeezes it, it heats up and burns faster: the balance is self-correcting. Because of that, mass is almost the only thing that decides a main-sequence star's luminosity, size and temperature. The fuel runs out faster than you would think. A star's luminosity grows steeply with mass, roughly as M3.5 for stars a few times the sun. Its fuel grows only as M. So the lifetime, fuel divided by burn rate, drops as about M−2.5. Worked for the sun: it fuses about 10% of its hydrogen, converting 0.7% of the mass to energy, so its lifetime is 0.1 × 0.007 × Mc² ÷ L ≈ 10 billion years. A star of ten solar masses burns 4,400 times brighter and lasts of order tens of millions of years. Move the mass. Interactive · Pick a star's mass Red dwarf 0.1Sun 1Sirius-like 2Blue giant 10 Mass (solar masses) Rough main-sequence scalings: L/L☉ = 0.23 M2.3 (M < 0.43), M4 (to 2), 1.4 M3.5 (above); R ∝ M0.9 below 1 and M0.8 above; T = 5772 K × (L/R²)1/4; lifetime = 10 Gyr × M/L. Good to within a factor of a few. Real red dwarfs mix their fuel and last far longer than this gives. The plot is a Hertzsprung–Russell diagram: temperature (hot on the left) against luminosity. Stars burning hydrogen fall on a band across it, the main sequence, where the sun sits in the middle. Every star ever catalogued is a point on that diagram, and its position, together with its mass, tells the stage of its life. When the balance fails: white dwarfs, neutron stars, black holes When the core's fuel is spent, nothing replaces the heat, and gravity wins. What stops the collapse depends on the mass left behind. For stars like the sun, electrons are squeezed until the Pauli principle resists: a white dwarf the size of the Earth. In 1930–31 Subrahmanyan Chandrasekhar showed that this support fails above about 1.4 solar masses (the Chandrasekhar limit; Nobel Prize 1983). Beyond that, the core collapses until protons and electrons merge into neutrons, a neutron star about 12 km across, with a teaspoon weighing billions of tonnes. And above a limit near two to three solar masses, nothing known can hold it up: a black hole. A black hole has one size, the radius inside which not even light escapes. In general relativity (34/85) it is: rs = 2GM / c²the Schwarzschild radius: about 2.95 km per solar mass The sun would be a black hole 3 km wide, and the Earth one under 9 mm. Black holes are not cosmic vacuum cleaners; from afar they pull as any other mass does. In 2015 the LIGO detectors recorded the gravitational waves of two black holes of about 36 and 29 solar masses merging (GW150914), the first direct detection, and in 2019 and 2022 the Event Horizon Telescope imaged the shadows of the black holes at the centres of the galaxy M87 and of our own. Interactive · How big is a black hole? EarthSunWhite dwarf (Sirius B)Neutron starGW150914 resultSgr A*M87* Mass rs = 2GM/c² with G = 6.6743 × 10⁻¹¹, c = 299,792,458 m/s, M☉ = 1.98847 × 10³⁰ kg. Masses: Sirius B about 1.02 M☉; neutron star 1.4 M☉ with a radius near 12 km; GW150914's remnant about 62 M☉; Sgr A* about 4.3 million and M87* about 6.5 billion M☉ (EHT, GRAVITY). The density line is the surprise. A black hole's average density, mass over the volume inside its horizon, falls as 1/M². The 6.5-billion-sun hole in M87 is, on average, lighter than air. Galaxies spin too fast: the dark matter evidence Kepler's law for planets says the farther out you go, the slower you orbit. Stars in a galaxy should do the same: outside the bright disk, where little mass is visible, their orbital speed should fall. In the 1970s Vera Rubin and Kent Ford measured the Andromeda galaxy, and later Rubin, Ford and Norbert Thonnard measured many more. The speeds did not fall. They stayed flat to the edge of the visible disk. The simplest reading is that there is unseen mass, more than the visible stuff, spread in a huge halo. The same hint, from the Coma cluster, had been noticed by Fritz Zwicky in 1933. v² = G M(