Mathematics in Movies: 30 Scenes Where Math Steals the Show
A theorem on a hallway blackboard, a limit that does not exist, sixteen matches in a baroque hotel. Thirty scenes where the mathematics on screen is real, each one checked at the board, and 168 more films in the catalog.
30
scenes
6
reels
5
to play
198
films
Most mathematics in film is set dressing. A blackboard full of integrals tells the audience that someone is clever, and nobody is expected to read it. But every so often a director lets the mathematics do the work: a character solves something on screen, the solution is right, and the scene is better for it. Those are the scenes collected here.
Our earlier list of the best math movies was about whole films and the people at their centre. This one is about moments: a minute or two of footage where you can pause, look at the board and check the working. Some of those moments come from films about mathematicians, like Good Will Hunting and A Beautiful Mind. Just as many turn up where nobody expects them: in a Bruce Willis action movie, a teen comedy, a 1961 French art film, a Disney cartoon.
Each scene gets a verdict, because Hollywood gets it wrong as often as right, and the wrong ones are often the most fun. Five of the scenes come with a working version you can play right below the clip. And if you want the films where the mathematics really happened, start with five math movies based on true stories, or the 25 documentaries where nothing is acted at all.
✓20
Correct
The mathematics on screen holds up.
≈6
Half right
Real mathematics, stretched by the story.
✗1
Wrong
The film gets it wrong, sometimes famously.
☺3
Played for laughs
Wrong or trivial on purpose.
Reel 1 of 6 · 7 scenes
Numbers & Primes
Counting, digits and primes: the oldest mathematics there is, and the easiest kind to put on a screen.
Contact
1997
Clip coming soon
On the board
2, 3, 5, 7, 11, 13, … , 101
01✓Correct
Contact1997
The scene
At the Very Large Array in New Mexico, Ellie Arroway (Jodie Foster) picks up a pulsing signal from the direction of Vega. Her team counts the pulses: two, three, five, seven, eleven.
The mathematics
Primes are the natural choice for a message meant to prove intelligence. No pulsar, star or chemical process produces them; they are a pattern only something that counts would send. A list of primes up to 101 carries no information beyond "we are here and we do arithmetic," which is exactly the point. Carl Sagan, who wrote the novel, knew the argument from the real search for extraterrestrial intelligence.
Proof
2005
Clip coming soon
On the board
ζ(s) = 0 ⇒ Re(s) = ½ ?
02✓Correct
Proof2005
The scene
Catherine (Gwyneth Paltrow), daughter of a brilliant and unravelling Chicago mathematician (Anthony Hopkins), says the proof found in her father's desk is hers. Nobody believes her.
The mathematics
The notebook holds a long-sought result about prime numbers, the territory of the Riemann hypothesis. What the film gets exactly right is how mathematicians settle the question: not by asking who wrote it, but by checking every line, and by reading the style of the argument. A proof has a fingerprint, and Hal, the former student, goes looking for it.
Max Cohen, a reclusive number theorist in a Chinatown apartment, hunts for a 216-digit number that he believes encodes the stock market and, possibly, the true name of God.
The mathematics
The golden spirals Max traces on a nautilus shell are genuine: the ratio of consecutive Fibonacci numbers really does close in on φ. The rest, the magic number and the market patterns, is numerology in a mathematician's coat. Darren Aronofsky knows it. The film is about obsession, not about a theorem.
Harold Finch, standing in as a substitute teacher, writes π on the board and answers the oldest question in any classroom: when are we ever going to use this?
The mathematics
Finch says the digits of π contain every possible sequence: every name, every conversation, every life. Mathematicians suspect he is right, because π is believed to be a normal number, one in which every string of digits eventually turns up. Nobody has proved it. It is one of television's most moving defences of mathematics, resting on an open problem.
After seven and a half million years of computation, the supercomputer Deep Thought delivers the Answer to the Ultimate Question of Life, the Universe, and Everything.
The mathematics
Forty-two is a joke, and Douglas Adams always said so. In the books the Question surfaces as "what do you get if you multiply six by nine?" Fans noticed that in base 13 the answer really is 42, since 4 × 13 + 2 = 54. Adams replied that he did not write jokes in base 13.
Rain Man
1988
Clip coming soon
On the board
82 + 82 + 82 = 246
06✓Correct
Rain Man1988
The scene
A waitress drops a box of toothpicks on the diner floor. Before anyone bends down, Raymond (Dustin Hoffman) says eighty-two, eighty-two, eighty-two. Two hundred and forty-six in all. The box held 250, and four are still inside.
The mathematics
The arithmetic checks out. What Raymond does is not counting but grouping at an impossible scale: he splits the pile into three equal clusters at a glance, the way anyone can see five dots without counting them. Kim Peek, the savant who inspired the role, could read two facing pages at once, one with each eye.
In the Navy (Abbott and Costello)
1941
Clip coming soon
On the board
7 × 13 = 28
07☺Played for laughs
In the Navy (Abbott and Costello)1941
The scene
Lou Costello proves to Bud Abbott, three different ways, that 28 divided by 7 is 13, and then that 7 times 13 is 28.
The mathematics
Every proof hides the same mistake: the 1 in 13 is a ten, but Costello counts it as a one. Seven threes make 21, seven ones make 7, and 21 + 7 = 28. The routine is a perfect classroom exercise in why place value matters, and it is funnier than any worksheet.
Reel 2 of 6 · 4 scenes
Chance, Statistics & Growth
Doors, batting averages and chain letters. The scenes where intuition loses to arithmetic.
21
2008
Clip coming soon
On the board
P(win | switch) = 2/3
08✓Correct
212008
The scene
In an MIT lecture hall, Professor Rosa (Kevin Spacey) puts the Monty Hall problem to Ben Campbell (Jim Sturgess). You pick door number one. The host opens door three and shows you a goat. Do you switch?
The mathematics
Ben switches, and he is right. Your first pick wins one time in three, and nothing the host does changes that, because he always opens a goat door. The other two-thirds lands on the one door left closed. Play it below: intuition usually holds out for about ten games, and the statistics win by the hundredth.
Pick a door. Behind one is a car; behind the other two, goats.
Always stay— of 0
Always switch— of 0
Black tick = the theoretical rate: 1/3 for staying, 2/3 for switching
Moneyball
2011
Clip coming soon
On the board
OBP = (H + BB + HBP) ÷ (AB + BB + HBP + SF)
09✓Correct
Moneyball2011
The scene
Peter Brand (Jonah Hill), a young economics graduate, shows Oakland's general manager Billy Beane (Brad Pitt) that baseball has been paying for the wrong things.
The mathematics
The idea, taken from Bill James and sabermetrics, was that on-base percentage predicts runs better than batting average, and the market priced it far lower. The 2002 Athletics won 103 games with one of the smallest payrolls in the league. It is a film about mispriced data and the nerve to believe a spreadsheet over a scout.
FBI agent Don Eppes is chasing a serial attacker across Los Angeles. His brother Charlie, a mathematician, tells him to think of a lawn sprinkler: from where the drops land, you can work out where the sprinkler stands.
The mathematics
This is geographic profiling, a real technique developed by the criminologist Kim Rossmo. Offenders rarely strike right next to home and rarely very far from it, so a probability surface built from the crime locations peaks near where they live. The series kept working mathematicians on call to check its boards.
Pay It Forward
2000
Clip coming soon
On the board
3 → 9 → 27 → … 3²⁰ ≈ 3.5 billion
11✓Correct
Pay It Forward2000
The scene
Asked by his teacher to come up with a plan to change the world, twelve-year-old Trevor proposes this: do a big favour for three people, and ask each of them to do the same for three more.
The mathematics
This is exponential growth, the arithmetic of chain letters and epidemics. After n rounds, 3ⁿ new people have been helped: 27 after three rounds, 59,049 after ten, about 3.5 billion after twenty. In round twenty-one the plan runs out of humans.
Reel 3 of 6 · 5 scenes
Shapes & Space
Cones, triangles, billiard tables and the dimension next door, from Alexandria to Oz.
Agora
2009
Clip coming soon
On the board
plane ∩ cone = ellipse
12≈Half right
Agora2009
The scene
In fourth-century Alexandria, Hypatia (Rachel Weisz) slices a cone with a tilted plane, studies the oval edge of the cut, and wonders whether the Earth's path around the Sun might be that shape.
The mathematics
The geometry is Apollonius of Perga's Conics, written around 200 BC; Hypatia really did teach it and is said to have written a commentary on it. Tilt the plane and the cut runs from circle to ellipse to parabola to hyperbola. The astronomy is invented: there is no evidence Hypatia doubted circular orbits. Kepler found the ellipse in 1609.
The Wizard of Oz
1939
Clip coming soon
On the board
√a + √b = √c ✗
13✗Wrong
The Wizard of Oz1939
The scene
The Wizard hands the Scarecrow a diploma, and the Scarecrow at once recites a theorem to prove he finally has a brain.
The mathematics
He says the square roots of any two sides of an isosceles triangle add up to the square root of the third. Wrong triangle, square roots instead of squares, and false even so: a triangle with three sides of 1 gives 2 = 1. He was reaching for Pythagoras, a² + b² = c², for right triangles. Homer Simpson repeats the line word for word in 1993 and is corrected by a man in a toilet stall.
Donald in Mathmagic Land
1959
Clip coming soon
On the board
angle in = angle out
14✓Correct
Donald in Mathmagic Land1959
The scene
Donald Duck learns three-cushion billiards from a narrator who turns the table into a grid of diamonds and every shot into a calculation.
The mathematics
The diamond system is real pool-hall practice. Every bank shot is a reflection, and the angle of incidence equals the angle of reflection. Mirror the table across a cushion and a three-rail shot unfolds into a single straight line. Disney's 27-minute featurette was nominated for an Academy Award and has been shown in classrooms ever since.
Flatland: The Movie
2007
Clip coming soon
On the board
point → circle → point
15✓Correct
Flatland: The Movie2007
The scene
Arthur Square lives in a world of two dimensions. One night he is visited by Spherius, a sphere, who appears to him as a circle that grows out of nothing and shrinks away again.
The mathematics
A sphere passing through a plane leaves a cross-section that starts as a point, swells to a full circle and shrinks back. It is the cleanest way to imagine a fourth dimension: a hypersphere passing through our space would look like a ball inflating and deflating in mid-air. The story comes from Edwin Abbott's 1884 novella.
Rushmore
1998
Clip coming soon
On the board
A = π a b
16☺Played for laughs
Rushmore1998
The scene
Max Fischer daydreams that he walks up to the board and solves, in front of a stunned class, what his teacher calls the hardest geometry equation in the world: the area of an ellipse.
The mathematics
The area of an ellipse with semi-axes a and b is πab, a result Archimedes already had. The joke is Max's self-mythology: the hardest problem in the world turns out to be one line. Its perimeter, by contrast, has no exact formula in elementary terms at all. That would have been a real flex.
Reel 4 of 6 · 5 scenes
Calculus on the Blackboard
Hollywood's favourite prop is a blackboard full of integrals. Sometimes the integrals are real.
Mean Girls
2004
Clip coming soon
On the board
lim x→0 [ln(1−x) − sin x] ÷ [1 − cos²x]
17✓Correct
Mean Girls2004
The scene
The state Mathletes final goes to sudden death on a single limit problem. Cady Heron (Lindsay Lohan) looks at it, looks at her opponent, and realizes the answer is that there isn't one.
The mathematics
Near zero the top behaves like −2x and the bottom like x², so the whole fraction behaves like −2/x. From the right it plunges toward −∞; from the left it climbs toward +∞. The two one-sided limits disagree, so the limit does not exist. Slide x toward zero below and watch the two sides run apart.
Try it · Mean Girls
The limit does not exist
From the left, f(−h)
31.324
heading to +∞
From the right, f(+h)
-32.327
heading to −∞
For small x the fraction is close to −2/x. Two sides, two different infinities: a limit has to be one number, so there is none.
Stand and Deliver
1988
Clip coming soon
On the board
∫ x² sin x dx = −x² cos x + 2x sin x + 2 cos x + C
18✓Correct
Stand and Deliver1988
The scene
Jaime Escalante (Edward James Olmos) teaches AP Calculus at Garfield High in East Los Angeles, and shows a room of skeptical teenagers a trick he calls tic-tac-toe.
The mathematics
Repeated integration by parts collapses into a table: differentiate one factor down a column until it hits zero, integrate the other down the next, then multiply along the diagonals with alternating signs. For ∫x² sin x dx it takes three moves. In 1982, eighteen of Escalante's students passed the AP exam; the testing service, suspicious, made them sit it again, and they passed again.
Professor Lambeau leaves a problem on a hallway blackboard at MIT for his graduate students. By morning someone has solved it, and it turns out to be Will Hunting, the janitor.
The mathematics
Among the formulas on Will's boards is Cayley's: there are nⁿ⁻² different trees joining n labelled points. Sixteen on four points, 125 on five, a hundred million on ten. The neatest proof, by Heinz Prüfer, turns every tree into a list of n − 2 labels and back, which makes the count obvious. Each shuffle below draws a random list and the tree it encodes.
5 slots, each holding any of 7 labels: that is 75 codes, and every code builds exactly one tree.
A Beautiful Mind
2001
Clip coming soon
On the board
V = {F : ℝ³∖X → ℝ³ | ∇×F = 0}, W = {F = ∇g}, dim(V/W) = ?
20≈Half right
A Beautiful Mind2001
The scene
John Nash (Russell Crowe), bored by his multivariable calculus class at MIT, writes a problem on the board, says it may take some of them the rest of their lives, and opens the window.
The mathematics
The problem asks how many curl-free vector fields fail to be gradients once a set X is removed from space. That is de Rham cohomology, the bridge between calculus and topology, and the answer depends on the shape of X: remove a single line and the answer is one. Mathematicians love the scene, with one complaint. The board never says what X is.
At NASA Langley, Katherine Goble Johnson (Taraji P. Henson) has to bring John Glenn's capsule down from an elliptical orbit, and the clean equations will not do it.
The mathematics
Her answer in the film is old mathematics: Euler's method, which walks along a differential equation in small steps, each one following the current slope. It is still how computers solve equations nobody can integrate by hand. The real Johnson did check Glenn's 1962 trajectory; he asked for her to verify the IBM's numbers before he would fly.
Matches, jugs, hourglasses and hidden primes. Games with rules, and the rules have proofs.
Last Year at Marienbad
1961
Clip coming soon
On the board
1 ⊕ 3 ⊕ 5 ⊕ 7 = 0
22✓Correct
Last Year at Marienbad1961
The scene
In a baroque hotel, a man lays out sixteen matches in rows of 1, 3, 5 and 7 and invites the guests to play: take as many as you like from one row; whoever takes the last match loses. He never loses.
The mathematics
The game is Nim, solved by Charles Bouton at Harvard in 1901. Write each row in binary and add without carrying: 1 ⊕ 3 ⊕ 5 ⊕ 7 = 0. A position whose nim-sum is zero is lost for the player to move; every move breaks the zero, and the expert puts it back. That is why he always lets his opponent go first. Play him below. You start, so you are already losing.
Try it · Last Year at Marienbad
Beat the man who never loses
001
011
101
111
Your move: click a match to take it and every match to its right.
nim-sum 000 · zero
You 0 · He 0
The grey numbers are each row in binary. Until the last few matches, whenever he hands you the board, every column holds an even number of 1s and the nim-sum reads 000. Let him start and he has to break that himself, and then perfect play wins for you.
Die Hard with a Vengeance
1995
Clip coming soon
On the board
3x + 5y = 4
23✓Correct
Die Hard with a Vengeance1995
The scene
Beside a fountain in Tompkins Square Park, a bomb waits with Simon's next riddle: put exactly four gallons of water on the scale, using only a three-gallon and a five-gallon jug. McClane and Zeus have five minutes.
The mathematics
Fill the 5, pour it into the 3 (two gallons left), empty the 3, pour the two across, refill the 5, top up the 3. Four gallons. It works because 3 and 5 share no common factor: by Bézout's identity, jugs whose sizes are coprime can measure any whole amount up to the larger jug. Try it yourself below, then try 6 and 4 and see why some puzzles cannot be solved.
Try it · Die Hard with a Vengeance
Exactly four gallons, or the bomb goes off
0 / 3 gal
0 / 5 gal
Target: 4 gallons in either jug. Moves so far: 0.
gcd(3, 5) = 1. Every amount you can ever measure is a multiple of 1, and so is the target: this one can be done.
Sneakers
1992
Clip coming soon
On the board
n = p × q
24✓Correct
Sneakers1992
The scene
A team of security testers steals a black box that turns out to open every encryption system in the world. Its inventor, the mathematician Gunter Janek, has just lectured on a breakthrough in factoring.
The mathematics
Modern encryption, RSA above all, rests on an asymmetry: multiplying two large primes is easy, and splitting the product back into them is extraordinarily hard. Janek's lecture name-checks real methods such as the number field sieve. A fast way to factor would indeed break the internet's locks. Today the realistic threat is a large quantum computer running Shor's algorithm.
Cube
1997
Clip coming soon
On the board
289 = 17² → trap
25✓Correct
Cube1997
The scene
Six strangers wake up inside a maze of identical cubic rooms, some rigged with lethal traps. Every hatch carries three three-digit numbers, and Leaven, a mathematics student, realizes the numbers decide which rooms kill.
The mathematics
Her first theory is that a room is trapped if any of its numbers is prime. Later she corrects it to powers of a prime, which is much harder to check in your head: 289 looks harmless until you notice it is 17². The numbers also hide each room's position in the cube. It is a rare thriller whose plot runs on number theory.
Fermat's Room
2007
Clip coming soon
On the board
⌛4 + ⌛7 → 9 minutes
26✓Correct
Fermat's Room2007
The scene
Four mathematicians accept a dinner invitation from a host who calls himself Fermat. The room they are shown into has walls that close in a little more every time a puzzle goes unsolved.
The mathematics
The puzzles are classics. One asks how to time nine minutes with a four-minute and a seven-minute hourglass. Start both. When the 4 runs out, flip it. When the 7 runs out at minute seven, flip it. When the 4 runs out again at minute eight, the 7 has exactly one minute of sand in its lower half; flip it, and it finishes at nine.
Alice in Wonderland
1951
Clip coming soon
On the board
365 − 1 = 364 unbirthdays
27✓Correct
Alice in Wonderland1951
The scene
The Mad Hatter and the March Hare are celebrating their unbirthday, and so, it turns out, is Alice.
The mathematics
Everyone has one birthday and 364 unbirthdays a year, so on any given day nearly the whole world is due a party. Its serious cousin is the birthday paradox: in a room of just 23 people, the chance that two share a birthday is already above one half. Lewis Carroll, who was the Oxford mathematician Charles Dodgson, would have liked both.
Reel 6 of 6 · 3 scenes
Chaos & the Cosmos
Butterflies, roulette wheels and a planet where an hour costs seven years.
Jurassic Park
1993
Clip coming soon
On the board
δ(t) ≈ δ₀ · e^(λt)
28≈Half right
Jurassic Park1993
The scene
Riding through the park in a jeep, the chaotician Ian Malcolm (Jeff Goldblum) lets drops of water fall on Ellie Sattler's hand to show her that no two take the same path.
The mathematics
Sensitive dependence on initial conditions is real: in a chaotic system, tiny differences grow exponentially, which is why weather forecasts fall apart after a week or two. Malcolm's leap from water drops to the dinosaurs will get out is a mood more than a theorem, but the film gave millions of people their first lesson in chaos theory.
Run Lola Run
1998
Clip coming soon
On the board
P(20, then 20) = 1/37²
29≈Half right
Run Lola Run1998
The scene
Lola has twenty minutes to find 100,000 marks. The film runs her race three times; each time a few seconds change at the start, and each ending is completely different.
The mathematics
The structure is the butterfly effect, turned into a film. In the third run Lola walks into a casino and puts everything on 20 at roulette, twice. On a single-zero wheel each bet wins with probability 1/37, so two in a row is 1 in 1,369. The film suggests her scream helps.
Interstellar
2014
Clip coming soon
On the board
1 hour ↔ 7 years (× 61,000)
30✓Correct
Interstellar2014
The scene
Cooper's crew lands on Miller's planet, which orbits close to the black hole Gargantua. Every hour they spend on its surface costs seven years for the crewmate waiting on the ship.
The mathematics
That is a slowdown factor of about 61,000, and it comes straight from general relativity: clocks run slower deep in a gravitational well. Kip Thorne, the film's science adviser and later a Nobel laureate, worked out that it is possible only if Gargantua spins at almost the maximum rate a black hole can. GPS satellites correct for a far gentler version of the same effect every day.
The thirty scenes above are the ones worth stopping the film for. The rest of the list is wider and stranger: a Marcel Pagnol bartender whose four thirds do not add up, a Monty Python football match between Greek and German philosophers, a Harrison Ford adventure built around the Antikythera mechanism, an episode of Futurama that needed a new theorem to resolve its plot. Search it, filter it by the kind of mathematics, or browse it by decade.
Mathematics on screen is not an old habit. Of the 198 films on this page, the decades since 2000 hold more than all the earlier ones together, helped along by science advisers, streaming series and a generation of writers who took calculus.
Films on this page, by decade
NumbersChanceGeometryCalculusPuzzlesCosmos
168 films
2026
Project Hail Mary
A teacher and an alien build a shared language from numbers and units.
Cosmos
2025
Prime Target
A Cambridge mathematician's breakthrough on prime numbers puts him in danger.
Numbers
2024
3 Body Problem
Three suns and no general formula for their motion: chaos at a planetary scale.
Cosmos
2023
Oppenheimer
Will the bomb ignite the atmosphere? The calculation says the chance is near zero.
Cosmos
2023
Tetris
The falling-block puzzle, born on a Soviet research computer.
Puzzles
2023
Marguerite's Theorem
A doctoral student's work on the Goldbach conjecture collapses, and she starts over.
Numbers
2023
Indiana Jones and the Dial of Destiny
Archimedes' Antikythera mechanism, turned into a device for finding time fissures.
Geometry
2022
Everything Everywhere All at Once
The multiverse, one branching choice at a time.
Cosmos
2022
Lightyear
Time dilation: every four-minute test flight costs four years at home.
Cosmos
2022
Matilda the Musical
Matilda multiplies large numbers in her head in front of her class.
Numbers
2022
The Batman
The Riddler leaves ciphers at every crime scene.
Puzzles
2021
Squid Game
The glass bridge: every step a coin flip, with an expected number of survivors.
Chance
2021
Don't Look Up
A comet's orbit computed, confirmed and ignored.
Cosmos
2021
Ted K
Ted Kaczynski, a former Berkeley mathematician, alone in the woods.
Cosmos
2020
The Queen's Gambit
Beth plays out whole chess games on the ceiling.
Puzzles
2020
Tenet
Entropy runs backwards for inverted objects.
Cosmos
2020
Enola Holmes
Anagrams and ciphers hidden in a mother's message.
Puzzles
2020
The Banker
Two Black entrepreneurs in 1960s America teach a front man the numbers of real estate.
Chance
2020
Shakuntala Devi
India's 'human computer' extracts roots of huge numbers in seconds.
Numbers
2019
Radioactive
Marie Curie and the mathematics of decay.
Cosmos
2017
Gifted
Seven-year-old Mary multiplies in her head with the Trachtenberg method.
Numbers
2016
Arrival
A linguist decodes a language; Fermat's principle of least time hides in the story.
Puzzles
2016
The Thinning
A linear algebra and calculus test decides who lives.
Calculus
2015
The Man Who Knew Infinity
Ramanujan and Hardy at Cambridge, and partitions checked by hand.
Numbers
2015
The Big Short
Correlated risk and the hot-hand fallacy, explained at a blackjack table.
Chance
2014
The Imitation Game
Turing's machine against Enigma, and the statistics of not acting on every broken message.
Puzzles
2014
The Theory of Everything
Hawking's radiation sketched in chalk.
Cosmos
2014
Ex Machina
A Turing test with far higher stakes than usual.
Puzzles
2014
X+Y
A teenage prodigy competes at the International Mathematical Olympiad.
Numbers
2014
The Fault in Our Stars
Some infinities are bigger than other infinities: Cantor in a love story.
Numbers
2014
Guardians of the Galaxy
What does it mean to have twelve percent of a plan?
Chance
2013
Coherence
A passing comet splits one dinner party into many versions.
Cosmos
2013
The Physician
Ibn Sina's school in Isfahan, where medicine and astronomy meet.
Cosmos
2013
After the Dark
A philosophy class runs thought experiments, including the infinite monkey theorem.
Chance
2012
Safe
A girl who memorizes long strings of numbers is hunted for what is in her head.
Numbers
2012
Lincoln
Lincoln quotes Euclid's first common notion: things equal to the same thing are equal to each other.
Geometry
2012
Travelling Salesman
Four mathematicians solve P versus NP and argue over handing it to the government.
Puzzles
2012
Measuring the World
Gauss and Humboldt measure the world, one with numbers and one on foot.
Geometry
2011
Calculus of Love
A short film about a man consumed by the Goldbach conjecture.
Numbers
2011
The Double
A classroom lesson on hypothesis testing and p-values.
Chance
2010
The Names of Love
Integrals glimpsed in a French math class.
Calculus
2010
Flipped
Working out the area of a rhombus in the middle of a love story.
Geometry
2010
The Killer Inside Me
A brief moment of calm in a brutal film: Lou works through integrals.
Calculus
2010
Rites of Love and Math
Edward Frenkel's short film, in which a formula is tattooed onto skin.
Numbers
2010
Inception
The Penrose stairs, an impossible loop, built inside a dream.
Geometry
2010
Futurama: "The Prisoner of Benda"
A real theorem in group theory, proved by a writer for the episode.
Puzzles
2010
Sherlock: "The Blind Banker"
A book cipher painted in graffiti across London.
Puzzles
2009
Agora (relative motion)
Hypatia drops a sack from the mast of a moving ship to show that motion is relative.
Cosmos
2009
Agora (epicycles)
A student models the Ptolemaic universe of circles riding on circles.
Cosmos
2009
A Serious Man
A physics professor's life as a running demonstration of the uncertainty principle.
Cosmos
2009
G.I. Joe: The Rise of Cobra
A shadow's angle reveals the latitude of a photo: Eratosthenes' trick.
Geometry
2009
The Hangover
Alan counts cards in Las Vegas while equations swirl around his head.
Chance
2009
Star Trek
Young Spock is quizzed on the volume of a sphere, 4/3 πr³.
Geometry
2009
Night at the Museum: Battle of the Smithsonian
The secret combination at the heart of the pyramid is π.
Numbers
2009
Up in the Air
Ryan treats frequent-flyer miles as a number worth living for: ten million.
Numbers
2009
Knowing
A page of numbers predicts disasters with dates, death tolls and coordinates.
Numbers
2008
The Last Enemy
A mathematician returns to London; the theorem in the background is the Poincaré conjecture.
Numbers
2008
Suspect X
A genius math teacher in a Japanese thriller; the four colour theorem comes up over dinner.
Numbers
2008
Butterfly Dreaming
What are the odds that two raindrops hit the same leaf?
Chance
2008
The Oxford Murders
A lecture on Wittgenstein and truth, then a string of murders built like a logic puzzle.
Puzzles
2008
The Happening
A math teacher calms a panicking passenger with a doubling-penny problem.
Numbers
2008
21 (Newton's method)
Ben recognizes Newton's method for finding roots on the blackboard.
Calculus
2008
The Office: "The Duel"
Oscar explains a budget surplus as if to a five-year-old.
Chance
2008
Revolutionary Road
John Givings, a mathematician on leave from an asylum, says what nobody else will.
Cosmos
2008
Dimensions
A free educational film by Leys, Ghys and Alvarez about the fourth dimension.
Geometry
2008
Einstein and Eddington
The 1919 eclipse that confirmed the bending of starlight.
Cosmos
2007
Cranford
Adding up household incomes, and an aside on whether girls should learn mathematics.
Numbers
2007
Shrek the Third
Pinocchio tangled in double negatives, trying not to lie.
Puzzles
2007
The Number 23
Jim Carrey finds 23 everywhere, which is easy if you look hard enough.
Numbers
2007
The Office: "Dunder Mifflin Infinity"
The bouncing logo screensaver: will it ever hit the corner? A modular arithmetic question.
Numbers
2006
Jane Eyre (BBC)
Jane tutors Adèle in fractions.
Numbers
2006
Mission: Impossible III
Swinging off a skyscraper: pendulum physics.
Calculus
2006
The Da Vinci Code
A scrambled Fibonacci sequence is the first clue at the Louvre.
Numbers
2006
Idiocracy
A bucket question that nobody in the year 2505 can answer.
Numbers
2005
The Wild Blue Yonder
Werner Herzog mixes real NASA footage and interviews into a tale of chaotic orbits.
Cosmos
2005
The Island
Clones believe a lottery decides who goes to the island.
Chance
2005
Mozart and the Whale
Two people with Asperger's, one of them a numbers prodigy driving a cab.
Numbers
2004
National Treasure
An Ottendorf cipher hidden in Benjamin Franklin's letters.
Puzzles
2004
P.S.
An astrophysicist's equations on a Columbia University blackboard.
Cosmos
2004
The Perfect Score
SAT problems for a heist crew.
Numbers
2004
Yakitate!! Japan
A message encoded as a number in base 26.
Puzzles
2004
Primer
Engineers build a time machine in a garage; the plot rewards a flowchart.
Cosmos
2003
Old School
Tough calculus problems on a college test.
Calculus
2002
Equilibrium
The gun kata is sold as a statistical analysis of where bullets are likely to fly.
Chance
2002
The Time Machine
A professor's blackboards full of time-travel mathematics.
Calculus
2002
A Walk to Remember
A tutoring session on equilateral and isosceles triangles.
Geometry
2002
Hypercube
The sequel to Cube, set inside a four-dimensional tesseract.
Geometry
2002
The Count of Monte Cristo
Abbé Faria teaches Edmond mathematics in prison.
Numbers
2002
Copenhagen
Heisenberg and Bohr's 1941 meeting, replayed under uncertainty.
Cosmos
2001
Intacto
Luck as a property that can be stolen, with talk of the odds of drawing an ace.
Chance
2001
The Bank
A young mathematician believes complex dynamics can forecast the stock market.
Cosmos
2001
A.I. Artificial Intelligence
Humans as meaning-seekers, through art, poetry and mathematical formulas.
Cosmos
2001
The Code Conspiracy
The Ulam prime spiral appears on screen.
Numbers
2001
Enigma
Bletchley Park codebreakers chase Shark, the naval Enigma.
Puzzles
2001
K-PAX
Prot sketches a planet's orbit for astronomers who cannot believe it.
Cosmos
2001
A Beautiful Mind (the bar)
The blonde in the bar: Nash's equilibrium, which the film gets wrong.
Chance
2000
In July
A free-fall problem, solved first on paper and then for real.
Calculus
2000
Bedazzled
The Devil, as a teacher, assigns Fermat's Last Theorem, then cancels all homework.
Numbers
2000
Cast Away
Chuck computes the search area rescuers would have to cover: twice the size of Texas.
Geometry
1999
October Sky
Homer Hickam teaches himself the equations of free fall to build rockets.
Calculus
1999
Fight Club
The recall formula: A × B × C = X.
Chance
1998
23
German hackers in the Cold War, drawn into the numerology of 23.
Puzzles
1998
Croupier
Odds and house edges from the dealer's side of the table.
Chance
1998
The Red Violin
A violin's vibration patterns, three centuries of them.
Geometry
1997
The Full Monty
A blunt piece of mental arithmetic: ten times a thousand.
Numbers
1997
The Ice Storm
A musing that 2 × 2 = 4 is not about numbers but about space.
Geometry
1997
Smilla's Sense of Snow
Smilla tells a boy why she loves numbers: naturals, negatives, fractions.
Numbers
1997
The Saint
Formulas for cold fusion scribbled on scraps of paper.
Cosmos
1997
Good Will Hunting (Parseval)
A linear algebra lecture at MIT on Parseval's identity from Fourier theory.
Calculus
1997
Contact (the cube)
The alien message is a primer whose pages assemble into a cube.
Geometry
1996
Breaking the Code
Derek Jacobi as Alan Turing, explaining the scale of the Enigma problem.
Puzzles
1996
The Mirror Has Two Faces
A math professor lectures on twin primes.
Numbers
1996
Infinity
Young Richard Feynman races an abacus seller at computing cube roots.
Numbers
1995
Hackers
A computer worm visualized as a storm of floating formulas.
Puzzles
1995
12 Monkeys
Brad Pitt's patient rambles about predicting the future with probabilities.
Chance
1995
Antonia's Line
A lecture on algebraic topology in a Dutch village saga.
Geometry
1995
The Prophecy
"Study math, it's the key to the universe," an angel advises.
Cosmos
1995
The Simpsons: "Treehouse of Horror VI"
Homer slips into the third dimension past floating equations.
Geometry
1995
Good Night, Mr. Bean
Counting sheep, Mr. Bean switches to addition to fall asleep.
Numbers
1995
Mr. Holland's Opus
Long division against Mozart in the school budget fight.
Numbers
1995
Die Hard with a Vengeance (St Ives)
As I was going to St Ives: the riddle whose answer is one.
Numbers
1994
Reality Bites
A conversation about the mathematics of astronomy.
Cosmos
1994
Little Big League
A boy manager tests his team with the two-painters work-rate problem.
Calculus
1991
Star Trek: TNG, "The Nth Degree"
Barclay becomes a genius and debates a unified theory with a holographic Einstein.
Cosmos
1991
Father of the Bride
Hot dogs come in eights, buns in twelves: George Banks's war on packaging.
Numbers
1991
Little Man Tate
A seven-year-old genius among college students and quiz champions.
Numbers
1990
Lambada
A Beverly Hills teacher on complementary angles and sin²x + cos²x = 1.
Geometry
1990
Back to the Future Part III
Doc calls Clara one in a googolplex: ten to the power of a googol.
Numbers
1990
The Simpsons: "Bart the Genius"
Bart sweats over a train problem at the learning centre.
Numbers
1989
Parenthood
A child prodigy takes the square root of a large number.
Numbers
1988
Drowning by Numbers
Peter Greenaway counts from 1 to 100 on screen; a girl counts the stars.
Numbers
1988
Big
Josh helps a kid with his algebra homework.
Calculus
1988
Young Einstein
Yahoo Serious splits the beer atom.
Cosmos
1987
Three O'Clock High
To clear a cheating accusation, a student must solve two problems at the board.
Calculus
1986
The Clan of the Cave Bear
Ayla learns to count beyond her fingers, to the alarm of the clan.
Numbers
1986
Labyrinth
Two doors, two guards: one always lies, one always tells the truth.
Puzzles
1985
Real Genius
Power series, then Bessel functions, in a lecture hall that empties until only tape recorders remain.
Calculus
1983
The Pirates of Penzance
The very model of a modern major-general, with quadratic equations.
Numbers
1980
It's My Turn
Jill Clayburgh proves the snake lemma, a real result from homological algebra, at the board.
Calculus
1979
Apocalypse Now
The photojournalist's manic speech about math and poetry.
Numbers
1976
Network
Arthur Jensen's thundering speech casts money and markets as the one primal force of nature.
Numbers
1976
The Pink Panther Strikes Again
Torture by fingernails on a blackboard full of wrong sums.
Numbers
1973
Amarcord
A Fellini classroom where a student stumbles through the quadratic formula.
Calculus
1972
Monty Python: "Philosophers' Football"
Greek against German philosophers; Archimedes finally shouts Eureka and scores.
Puzzles
1972
Monty Python: "Argument Clinic"
What exactly is an argument? Logic as a paid service.
Puzzles
1971
Straw Dogs
An astrophysicist and a blackboard his wife quietly sabotages.
Cosmos
1970
The Phantom Tollbooth
The Dodecahedron guards the road to Digitopolis with riddles.
Numbers
1970
Little Big Man
A liar's paradox on the road to Little Bighorn.
Puzzles
1970
Colossus: The Forbin Project
Two supercomputers invent a shared mathematical language to talk to each other.
Puzzles
1970
Zorns Lemma
Hollis Frampton's experimental film, built from an alphabetical grid.
Numbers
1970
Catch-22
The logical trap that gave the language its phrase.
Puzzles
1968
Once Upon a Time in the West
Counting horses, and thousands of thousands.
Numbers
1967
Bedazzled
The liar's paradox in a Faustian comedy.
Puzzles
1966
Fahrenheit 451
Uniformed students recite multiplication tables.
Numbers
1965
The Knack …and How to Get It
The law of reflection, stated in a Swinging London comedy.
Geometry
1965
Flatland (short)
An animated short in which a sphere reveals the third dimension.
Geometry
1965
For a Few Dollars More
Counting the bounty, one dead outlaw at a time.
Numbers
1965
Alphaville
Lemmy Caution against a city run by a computer of pure logic.
Puzzles
1963
It's a Mad, Mad, Mad, Mad World
Motorists try to divide the loot fairly and get lost in the division.
Numbers
1958
Merry Andrew
Danny Kaye teaches Newton, geodesics and Pythagoras in song.
Geometry
1957
Desk Set
Katharine Hepburn fields rapid-fire 'mathematical' questions on a rooftop.
Numbers
1955
The Dam Busters
Simple triangle geometry turns a wooden sight into a rangefinder for the bouncing bomb.
Geometry
1951
Alice in Wonderland (the raven)
Why is a raven like a writing desk? Carroll's riddle with no intended answer.
Puzzles
1949
Ma and Pa Kettle
Three confident 'proofs' that 25 ÷ 5 = 14.
Numbers
1941
The Maltese Falcon
Layers of double-talk and twisted logic about a black bird.
Puzzles
1941
How Green Was My Valley
A bathtub filling from two taps while it leaks: a classic rate problem.
Calculus
1932
Horse Feathers
The Marx Brothers on a college campus: mathematics by bluster.
Numbers
1931
Marius
A bartender's recipe in thirds that do not add up: it depends on the size of the thirds.
Numbers
Questions people ask
Which movie says "the limit does not exist"?+
Mean Girls (2004). At the state Mathletes final, Cady Heron wins the sudden-death round by recognizing that the limit of [ln(1−x) − sin x] / [1 − cos²x] as x approaches 0 does not exist. The function behaves like −2/x near zero, so it runs to −∞ from the right and +∞ from the left.
What is the math problem in Good Will Hunting?+
The hallway blackboard problems are real graph theory. One involves counting walks with an adjacency matrix, another asks for all homeomorphically irreducible trees with ten vertices, and Cayley's formula, nⁿ⁻² labelled trees on n points, also appears. They are hard for a first-year student but not research-level mathematics.
Is the Monty Hall scene in 21 correct?+
Yes. Switching doors wins two times out of three. Your first pick is right one time in three, and because the host always opens a door with a goat, the remaining two-thirds probability moves to the other closed door.
How do you get exactly 4 gallons with a 3- and a 5-gallon jug?+
Fill the 5-gallon jug and pour it into the 3-gallon jug, leaving 2. Empty the 3, pour the 2 gallons into it, refill the 5 and top up the 3. Exactly 4 gallons remain in the big jug. It works because 3 and 5 have no common factor.
What are the most mathematically accurate movies?+
Films that hired mathematicians or physicists as advisers tend to get it right: Good Will Hunting, A Beautiful Mind, Proof, Hidden Figures, Interstellar and Contact. Cube and Last Year at Marienbad are also exact in their mathematics, even though nobody in them is giving a lecture.
The best of these scenes do what a good teacher does. They make you want to know the answer before they give it to you. Harold Finch makes the case in his speech about π, and Aronofsky's Pi shows what happens when the wanting goes too far. Somewhere between the two is a seat in the dark, a scene you have seen ten times, and a sudden urge to pause it and check the board.
Sources
Oliver Knill, Mathematics in Movies, Harvard University. Since 2006 the archive has collected some six hundred film clips with mathematics in them, and it is where this list began.
Charles L. Bouton, “Nim, a Game with a Complete Mathematical Theory,” Annals of Mathematics, 1901.
Kip Thorne, The Science of Interstellar, W. W. Norton, 2014.
Michael Lewis, Moneyball: The Art of Winning an Unfair Game, W. W. Norton, 2003.
D. Kim Rossmo, Geographic Profiling, CRC Press, 2000.
✦Read more✦
Keep wandering
A few more pieces in the same spirit — math, design, and slow attention.