The Math in the Movies Page

A Guide to Major Motion Pictures with Scenes of Real Mathematics

"*** Totally delightful" Excite Reviews and Movie Guide

" ...worth a few visits, and quite a bit of fun" NSDL Scout Reports

Hear an interview with Math in the Movies and some great sound clips of math scenes from National Public Radio.

New! Letters to Math in the Movies and Mathematicians in the Movies

Your letters on over 80 different movies with at least a little math content, and a list of movies featuring real mathematicians. Suggest some more!

Also, try our new, free, Big Number Calculator.
(It uses the BigInteger class in the latest versions of Java, so you'll need Netscape 6 or later, Internet Explorer 5 or later, or Opera. They could have used it in Cube)

Looking for a gift suggestion?  Check out my new book: Switching to a Mac For Dummies.

Numb3rs (2005)

A CBS TV series starting its third year, where David Krumholtz plays Charlie Eppes, a "world class" mathematician who helps his brother Don, an FBI agent played by Rob Morrow, solve crimes. There were some nice moments, as when a colleague advises him not to waste his productive years chasing serial criminals, but the math in the premier was pretty lame, mostly the usual equations-on-a-blackboard, but with some clever visualization of a sprinkler. They did work some real mathematical thinking into later episodes but Charlie is a bit too successful predicting the next crime scene from lousy data and way too guilt-ridden when he fails.

I've upped my rating based on another episode, this one about someone getting ready to announce a proof of the Riemann hypothesis when his daughter is kidnapped. Serious math questions were actually woven into the plot. Here is a spoiler in rot13:

Gur svefg zlfgrel vf gur xvqanccref zbgvir. Gurer vf fbzr fcrphyngvba nobhg gur $1 zvyyvba Pynl cevmr, ohg vg jbhyq gnxr gbb ybat gb irg gur cebbs. Gheaf bhg gurl jnag n orggre fvrir sbe snpgbevat vagrtref, boivbhfyl gb oernx EFN rapelcgvba. Gur ivpgvz'f sngure naq gur SOV ntrag'f oebgure jbex ba cebqhpvat gur nytbevguz, ohg ernyvmr gurer vf n ubyr va gur cebbs gurl pna'g cngpu. Gurl pbzr hc jvgu cyna O: thrff jung gnetrg gur xvqanccref ner nvzvat ng naq ohvyq n snxr jro fvgr cebgrpgrq ol n xrl gurve cubal cebtenz jvyy oernx.

Math ***
Series ***

Proof logoProof

Leaving the Wilbur Theater in Boston after seeing the play Proof, a theatergoer remarked "This is the year of mathematicians." Proof is now a movie (Directed by Miramax, staring Gwyneth Paltrow and Anthony Hopkins), adapted from David Auburn's Tony and Pulitzer winning play. Three of the four main characters are mathematicians. The father character is loosely based on John Nash, but the story is fiction and takes a very different path from A Beautiful Mind, focusing on the daughter.

The title is apt. Proof's plot is filed with attempts to prove things: sanity, love, correctness of care decisions, theorems, authorship, adulthood to an older sibling. Even the champaign bottle in the first scene is a mysterious counterexample.

In particular, the story asks if proof checking can be an act of love. Checking is violent work. You must try to demolish someone else's creation. But what if you love that person? Is it better to trust condescendingly or to seek the truth and resolve any doubts?

Proof's themes are universal, but the emotional life of mathematicians is dealt with well. Stereotypes are dissected. The math jokes aren't great but it's fun to hear the two waves of laughter: from the people who get them immediately and those that have to wait for the playwright's explanation. Proof's ending is mathematically satisfying. NYU's Courant Institute hosted a symposium on Proof. PG-13. (There's a seduction scene in the play.)

Math ***
Play ****
Move TBD

A Beautiful Mind (2001)

movie logo

Nash, Crowe and Howardthe real John Nash, Russell Crowe & Ron Howard (courtesy of Universal Pictures).

I hated the first half of this movie. The caricature of cryptography, right out of "Mercury Rising," made me squirm. I was tempted to walk out, but I had this review to write, so fortunately I stayed. The second half was wonderful and made complete sense of Act I. All those Hollywood spy cliches turn out to be a brilliant device to let us see what happens from from John Nash's perspective.

There is one good math scene where Nash and some fellow grad students are in a bar and a bevy of young women walk in, lead by a very attractive blonde. Nash realizes that all the guys hitting on the blonde would not be an optimal strategy and that this dating situation is a counter example to the claims of classical economic theory. The insight leads to his Nobel-prize winning result. If true, this would be the best eureka yarn since Newton and the apple. Otherwise the math was a little weak. Lots of scrawled equations do not a math movie make. More of an explanation of Nash's work would have been welcome.

A Beautiful Mind is also one of the finest love stories ever filmed. After reading how Andrew Wiles enjoyed the full support of his wife while holed up in his attic for seven years proving Fermat's Last Theorem, I thought there should a hall of fame for great spouses of mathematicians. Mrs. Nash could be another charter member. PG-13 (One mild bedroom scene, guys on the make, high emotional intensity)

Math ***
Movie *****

Winner of 4 Academy Awards (Best Picture, Best Director, Best Supporting Actress, Best Adapted Script) with 8 nominations.

Fermat's Last Tango

I haven't seen this musical play about Wiles' proof (featuring songs like "There's a Big Fat Hole in your Proof" and "Math Widow"), but I have the album. The play is available on VHS video tape and DVD from the Clay Institute and there is a fine review of it in the Notices of the AMS.


Quantum mechanics beats Newton's as a metaphor for human thought. Our actions are only a projection of the super-positioned thoughts swirling in our brains. Why did Werner Heisenberg as director of the Nazi nuclear program fail to build an atomic bomb? Distaste for Hitler? Lack of resources? Incompetence? A complex linear combination of all three? Will we ever know? Did he?

In Copenhagen the ghosts of Heisenberg, Niels Bohr and Bohr's wife, Margrethe, explore the motives behind their meeting in 1941. Along the way they explain a fair amount of physics, exhibit some good mathematical thinking and let us experience the deep emotional bond between teacher and protege.

Math ***
Play ****

It's My Turn (1980)

In the opening scene of this romantic comedy, Jill Clayburgh, playing a mathematics professor, proves the "snake lemma" of homological algebra:

 0 -> A -> B -> C -> 0
| | |
0 -> A'-> B'-> C'-> 0

to an obnoxious graduate student. To the best of our knowledge, this is the most erudite mathematical scene in a major motion picture, though spoiled somewhat by a heavy handed portrayal of the grad student. The rest of the film is mostly math-free, unfortunately. R

Math ****
Film ***

Straw Dogs (1971)

Dustin Hoffman has moved to his wife's home town in Cornwall, England in the hope of getting some astrophysics done. His bored wife's flirtations lead to serious trouble. Somewhere along the line she mischievously changes a plus sign to a minus sign in a set of gravitational equations on a blackboard. Hoffman's response when he finally notices is by far the best and most realistic portrayal of a mathematician in action in the movies.

Caution: The moral of this film is "don't mess with a mathematician," so, as you might expect, a great deal of violence occurs. R

Math ****
Film ****

My Lock, My key logoThe U.S. FBI has lobbied for legislation that would prevent your use of cryptography unless the Government can instantly access your unencoded messages. Similar threats exist in other countries. In the long run, it is impossible to suppress cryptography without restricting mathematical research and teaching. Our CipherSaber page demonstrates this by showing how little knowledge is required to build a strong encryption program.

Fight the Crypto Ban with Cybersaber! We'll tell you how.

Good Will Hunting (1997)

Like its Fields-medalist Salieriesqe math professor, this movie begins by putting a hard problem on the blackboard: Can anyone save a defiant, troubled kid from working-class South Boston who happens to be a Ramanujan-level genius?

But instead of a convincing solution, we get easy answers. Robin Williams' soberly played shrink brushes past Hunting's intelligence to get at his abusive childhood, never contemplating genius as an equal source of pain. The women are either on a pedestal or deserve to be. The movie plinks every soft target that gets in it sights: gullible psychotherapists, corporate recruiters, snotty Harvard students, the NSA, even MIT custodial foremen.

The film's best aspect is the love and care lavished on getting South Boston right. If they had only done as well by the mathematicians, depicted here as corporate, arrogant, joyless and cold. The movie shows the outside of MIT, but not the inside.

There is so much talent here that I want to give an Incomplete and make them turn in a more thoughtful version next semester. Too bad serious movies don't get sequels.
R (mostly for foul language it would seem)

Math *
Film ***

Note: Bert Jagers created a Maple worksheet on the math in Good Will Hunting:

pi symbolPi (1998)

This a movie about madness, not mathematics. The math, computer science, theology, and pharmacology are bad. (One faux pas is a suggestion that one could try all possible 216 digit numbers.) But they are brilliantly combined with music, and camera work to place us in the tormented mind of a paranoid obsessive seeking the central truth of the universe --which is excreted by computers just before they melt down -- while he is pursued by Wall Street brokers and Hassidic Jews who know he is onto something. See the Pi page for more links. R

Math *
Gematria **
Film ***

Flubber (1997)

Robin Williams explains Newton's Law of Gravitation to a life drawing class in this '90s remake of the 1961 Absent Minded Professor, and there is a lot of pseudo-science in the background -- even the titles are filled with math symbology. But the story has been whimsyectomized: the long suffering girlfriend, promoted to college president, really suffers, the professor feels her pain, the goons are scary, and there is a poignant death scene. If the Professor can make a robot fly, why does he need flubber? Still, the movie-clip-emoting robot redeems the movie, out cuteing R2D2. Weebo deserved an Oscar for best supporting actress. PG

Math **
Film ***

This space reserved for Unabomber - The Movie

"Math didn't make him kill, it just made him hard to catch."

(It seems there was a TV docudrama Unabomber: The True Story (1996) )

Big (1988)

Tom Hanks plays a twelve year old boy whose wish to be big is granted by a magical arcade game. His ability to find work and even succeed mocks the adult world. At a dinner party, Hanks helps the young son, whom the real adults are ignoring, with his homework. In the process he offers a nice explanation of basic algebra. PG

Math ***
Film *****

Stand and Deliver (1987)

A high school math teacher, played by Edward James Olmos, gets a group of inner city kids to learn calculus, amazing and threatening the educational establishment. Some decent calculus teaching is shown in this true story. PG

Math ***
Film ****

A Brief History of Time (1992)

Biography of one of our greatest living physicsts, Stephen Hawking, though a bit light on his work. G

Math ***
Film ****

Sneakers (1992)

Freelance spies track down an all powerful code breaking chip developed by a mysteriously funded mathematician named Gunter Janek. In a brief scene, the long-haired, white-suited Janek lectures on the possibility of finding a faster way to factor numbers, shouting lots of big math words, but not really explaining anything. Still, the film correctly points out that a breakthrough in factoring could happen and would be worth a lot to criminals and people who break codes. The mathematician Len Adleman advised on the making of this move. Click here for his story. PG-13

Math **
Film ***

The Man Without a Face (1993)

Mel Gibson plays a former teacher turned recluse whose face is badly disfigured. He befriends a troubled boy and helps him prepare for a military school's entrance exam. In one of his lessons, Gibson shows the boy how to find the center of any circle by constructing the perpendicular bisectors of two chords. The figure he draws isn't quite general enough: the chords share a common point and they needn't. But that's the least of their troubles as the secret of Gibson's past comes back to haunt their relationship. PG-13

Math ***
Film ****

Antonia's Line (1995)

In this somewhat morbid chronicle of five generations of sturdy women, we see Antonia's granddaughter Theresa, who grows from a child prodigy to become a mathematician, lecturing on cohomology and reading a monograph on differential geometry in preference to nursing her baby. In a movie filled with stereotypes, we should not expect a woman mathematician to be anything but cold. One nit: Theresa says "X comma A" while reading a diagram during her lecture scene but it appears in the subtitles as "X.A". The translators must habitually change European commas into English decimal points. Dutch. Unrated, Quite a bit of S.ex and Violence

Math ***
Film ****

Die Hard: With A Vengeance (1995)

Bruce Willis and Samuel L. Jackson are given a five gallon jug and a three gallon jug, and must put exactly four gallons of water on a scale to keep a bomb from exploding. R

Math ***
Film ***

The Mirror has Two Faces (1996)

Hunk math prof Jeff Bridges explains the Twin Prime Conjecture (that there are infinitely many pairs of primes only two numbers apart) to dowdy english prof Barbara Streisand who actually gets it. She critiques his calculus teaching. Bridges proposes. I thought the "before" Straisand was cuter. PG-13

Math ***
Film ***

Remake of Le Miroir a Deux Faces (1959)

Trivia question: what is the relationship between the Twin Prime Conjecture and the infamous floating point bug in Intel's original Pentium chip? Click here to find out.

Contact (1997)

Jodie Foster is perfect when she defines prime numbers for a group of Washington bigwigs and is greeted by blank stares. But why does the movie have to work so hard explaing her devotion to science? The book's nonsense about pi is not in the movie. PG

Math ***
Film ****

Real Men Do Count

If we had a dollar for every war movie made, we could afford a T1 Internet connection. Yet almost every soldier flick is predictable: If the movie has a happy ending, the heroes win a few in the beginning, then start losing until the very end when they win the big battle, but the supporting actor is killed. If it's a tragedy, they lose in the beginning, win in the middle, lose the big one and the star dies. Good military tactics never seem to play any part in the outcome. We know of only two movies where the heroes even bother to count how many of the enemy are out there. These movies are:

The Seven Samurai (1954) (Shichinin no Samurai)

Akira Kurosawa's masterful story of a 16th century Japanese village that defends itself by hiring down-and-out samurai. The wisest teaches his comrades in arms to plan. Japanese. No rating. Fairly violent.

Math ***
Film *****

Kelly's Heroes (1970)

Clint Eastwood leads an all star cast in search of Nazi gold. But first they have to take out the German tanks one at a time. How do they know when they're all gone? They counted them first, silly. PG

Math **
Film ****

Computers in the Movies

The Charles Babbage Institute at the University of Minnesota beat me to this one. They had a list (see link to Hollywood and Computers at the Internet Archives, below) of 42 movies with computers in them. But here is one they missed:

Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb (1963)

If you want to know what a scientific computer looked like in the good old days, see Stanley Kubrick's classic satire on nuclear doomsday with its fine scenes of an IBM 7094/ 1401 installation. Peter Sellers almost saves the world with a transistor radio hidden in a 1403 printer.Unrated. OK, I think, for older teens

Computer ***
Film *****

Movies in Mathematics

Here is a paper that discusses the properties of the Kevin Bacon Graph (KBG), whose nodes are actors in major motion pictures (as listed at and where each node is connected by an edge iff the two actors appeared together in a film. Interestingly, its largest connected component contains 90% of all actors.

Help support this page by buying one of these great gift ideas:
Switching to a Mac For Dummies,
"Banging your head against a wall--it feels so good when you stop"
Service Oriented Architecture for Dummies
"If you're in IT, better know SOA."
The Internet for Dummies Quick Reference, 8th Edition,
"Everything you need in a small, lay-flat package."
Both are co-authored by me and published by IDG Books.
You can find these books at your favorite bookstore, or on-line in association with

Find Out How to Fight the Crypto Ban!

More Movies Suggested by Our Readers

A Hill on the Dark Side of the Moon (1983)
( Berget paa maanens baksida (1983))

Roger Cooke asks "how in the world did you overlook [this] story of Sonya Kovalevskaya's stay in Sweden--advertised as the feminist movie of the 1980's. Actually, as a female colleague said to me after seeing it, 'That movie says that to be a female mathematician you have to be ugly, neurotic, and a bad mother.' Since I have spent considerable time researching and writing about Kovalevskaya, I concur. Mathematically they missed the point entirely about Kovalevskaya. On the plus side, where else would you see actors portraying Weierstrass and Mittag-Leffler?"

"On the personal side, they also got it wrong. I remember thinking Meg Ryan was hardly the ideal actress to play Einstein's brilliant niece in IQ, but she'd have been about right physically (with her hair dyed brown) to play Kovalevskaya. Instead they got an extremely homely Swedish actress to play the part, and they made her a temperamental prima donna at her first lecture in Stockholm. Actually, she was diffident to the extreme, and always afraid she wasn't doing a good enough job. As for my colleague's comments, well, Kovalevskaya was neurotic and a bad mother, but she wasn't ugly. A century after her death, though, she still leaves a legacy of two very brilliant mathematical results." Search with the key word " Kovalevskaya" for more resources about her.

" P.S. There is a mountain on the far side of the moon that the Soviets named after Kovalevskaya (their robot space ship [Luna 3] was the first to photograph the far side of the moon). I presume that's the reason for the title, though no reference is made to it in the movie, either at the beginning or the end."

Sweden 7 (~PG)

Math ?
Film ?

I.Q. (1994)

Walter Matthau as Albert Einstein plays matchmaker for his niece played by Meg Ryan. Judy Ann Brown's favorite scene is where Meg Ryan attempts to explain to Tim Robbins why she can't dance with him: she can only walk half the distance between them and then half again and half again and she will never reach him. Rhiju Das was impressed when Meg Ryan's character puts the Schrodinger equation on the board, in operator form.PG

Math **
Film ***

Cube (1997)

This dark, nihilistic film has generated the most letters to Math in the Movies. A group of people are trapped in a nightmare lattice of cubic rooms and have to figure out how to escape. Cartesian coordinates and prime numbers play a key role. The moral: factor or die! The most interesting math here is in thinking about how they made the movie. R brutal violence, language

Math **
Film **

Death of a Neapolitan Mathematician (Morte di un Matematico Napoletano) (1992)

Laura Parigi, from Florence, Italy and Dan Schnabel suggest this Italian movie, written and directed by Mario Martone. It's the story of an important Italian mathematician looking at the last week of his life before he kills himself in 1959. I haven't seen it yet. Unrated

Math ?
Film ?

Infinity (1996)

Jon Reeves says you must see, this biopic about Richard Feynman. There's a priceless scene where he has a calculating duel with a guy with an abacus. Feynman, using pencil and paper, adds a bit slower, but multiplies slightly faster, and really whips him in the cube root competition. Afterward, he explains it all to his fiancee. PG

Math ?
Film ?
Subject *****

Little Man Tate (1991)

A bright 8-year-old is placed in a program for gifted children. Edie Bennett liked the scene where a teacher has several odd and even numbers on the board and asks how many of them are divisible by 2. Tate raises his hand and answers "All of them." PG

Math **
Film ****

Wall Street (1987)

Tel Lekatsas points out that financier Michael Douglas, after buying the airline company Charlie Sheen's father works for, tells Charlie : "Zero sum game. Somebody wins. Somebody loses." I suppose this proves the director, Oliver Stone, doesn't understand finance either. PG-13

Math *
Film ***

Hauser's Memory (1970)

Keith Dennis mentions this sci-fi movie about some famous scientist being taken out of Russia. He dies, but they take chemicals from his brain and recover his memory. Early in the movie there a car is rushing to an airport and the camera pans down to show a book on the seat, presumably to tell us that we have a physicist in the car. Unfortunately the book is Artin & Tate, Class Field Theory, the green IAS version. It must have sounded like a physics book to the prop man. I haven't seen this one. Made for TV

Math ?
Film ?

The Hitchhiker's Guide to the Galaxy (1981)

Richard Maso suggests this 6-episode TV series, sometimes shown spliced together on TV, and available on laserdisc, etc. There are some bits of comedic, Lewis-Carroll-type math. In particular, the narrator argues that the number of planets in the universe is infinite, but the number of inhabited planets is finite. Therefore the fraction of inhabited planets is zero, and the universe contains no life.Made for TV

Math *
Film ***

Merry Andrew (1958)

Dr. Sidney J. Kolpas points out this Danny Kaye musical comedy with a song about the Pythagorean Theorem. I haven't seen it yet, but IMDB reviewers give it high marks. Unrated

Math ?
Film ?

While were on the topic of the Pythagorean Theorem, here is a storyboard proof:

Four identical right triangles are arranged in two squares of side (A+B). In the first square, the triangles are pared into two rectangles which touch at a corner, creating two square holes of size A and B. In the second, the triangles are arranged with their right angles in the corners of the square, creating a square hole of size C.

(I found this in Glimpses of Algebra and Geometry by Gabor Toth (Springer, 1997) and on the Web . Anyone know who invented it?)

Little Big League (1994)

Bernd Ensing suggests this family movie about a boy who inherits the Minnesota Twins from his grandfather. He takes his homework to the ballpark, where the whole team struggles with a problem about two men wanting to paint a house: It takes the first man three hours to paint a house, the second one needs five hours. How long will it take both of them working together? Fun movie, but I found the solution unedifying. PG

Math *
Film ***

Star Trek : Wolf in the Fold (1967)

Simon Plouffe suggest the scene in this episode from the first TV series where Spock asks the computer to compute Pi to the last digit.

Stephen Gagola writes concerning It's My Turn (1980):

"You mentioned that in the movie It's My Turn (1980), except for all-too-brief glimpse of the proof of the snake lemma of homological algebra, the rest of the film is math-free. But actually, there are some tid-bits scattered here and there throughout.

Other ... in The Movies pages

Oliver Knill's collection of movie clips in which mathematics appear.

Mike Shor's has a nice section on Game Theory in the Movies.

The Mathematical Fiction Homepage includes over 400 works of mathematical fiction (none, apparently from refereed journals).

Morse Goes to The Movies movies with Morse code scenes (..- -.-. --- .--. -.-- ..--..)

Hollywood and Computers from the Charles Babbage Institute at the University of Minnesota.

Cybercinema sponsored by the Department of English at the University of Illinois at Urbana-Champaign. (Link is to a reveiw, site is 404'd)

The Mathematical Sciences Research Institute in Berkeley, California held a math film festival in October 2002.

Juggling in Movies

Hollywood Math and Science Film Consulting

Translations of Math in the Movies

Belorussian translation by Bohdan Zograf.

Other Math humor

A list of some common proof techniques.

MASSIVE Math And Science Song Information, Viewable Everywhere

Movie information links provided courtesy of the Internet Movie Database, a truly cool site.
Motion Picture Association of America ratings are shown where available. Other comments on suitability for children minds are the author's personal opinions. Concerned parents should seek additional points of view and pre-screen movies if possible.

Comments and additional references to movies where mathematics or mathematicians are accurately portrayed are welcome. Mumbo-jumbo, pseudo-math and mad scientist cliches (e.g. Jurassic Park, Independence Day) are not what we are looking for. Please send e-mail with as much specific information as possible to:

We'll consider your letters for a future update to Letters to Math in the Movies.

We wrote a set of math activites based on Math in the Movies themes for Public Broadcasting's PBS TeacherSource. Check it out.

Created and maintained by Arnold G. Reinhold

Thanks also to: Asari Hirotsugu, Jay Sulzberger, Jeff Erickson, Naoki Sato, Jose Maria Vinna Rebelledo, Jon Bell, Matt Holzman, Tom Zaslavsky and many, many others.

Ascii key+ || 08d0a5d961603380e2949d682c
10 Byte IV || bfe8da5c1dec3aba9725d4f689
Ron's No.4 || 40761763d4d38935e8bd8a44bf
All u need ==== 4656a7bd7f9ae5d082a30cdfa7
|| f21a918d29c5917956d0468eaf

Copyright 1996-2011 A. G. Reinhold. If you think you need it, permission is hereby given to link to this page. E-mail informing me of new links and other interesting uses of this page is appreciated. "Math in the Movies" is a trademark of A. G. Reinhold. All rights reserved.
Created February 1996 Last update 2011-6-16a