Math in the Movies

I’ve been running around this weekend doing important things like appearing in a musical comedy — 22, in which the terrorist threat involves an Infinite Improbability Drive — so thanks for not breaking the Internet whilst I was away! I notice that Mollishka has raised the topic of science and math in the movies, which sounds like a nice way to ease everybody back into the work-week.

Several years ago, I was visiting a friend in a mental institution. (See? Your first story of the week is shaping up just great!) In fact, she was a resident of McLean Hospital, whose wards have housed such notables as John Nash, James Taylor and Sylvia Plath (and oddly enough, I’ve seen the first two of those notables, live). My friends and I had driven out to Belmont to visit our colleague, and while we were chatting in the dining area, another resident of that hall poked into the conversation. He was of average height, but wiry, and spoke as if drawing upon deep reservoirs of energy; he had been placed in McLean by his family, he said, and he let loose a shrill cascade of invective upon the orderlies who eventually took him away.

Before he was hauled back to his room, he got to talking about Darren Aronofsky movies. At the time, those were Pi (1998) and Requiem for a Dream (2000). I’m grateful to him for providing a calibration mark by which I can judge those movies, for in the interval before the orderlies carried him away, he told us that Aronofsky was going to be making more movies, and — children, cover your eyes —

“They’re gonna be just as fucked up as the first two.”

Every man’s a critic.

PI (1998)

Mollishka says that Pi is “an artsy-fartsy film that is trying way too hard.” Just consider the main character, Maximillian Cohen (Sean Gullette) :

He’s clearly supposed to be the troubled genius, an antisocial outcast rife with self-destructive hallucinations and unthinkable mathematical insight. No. Just, no. Even if mania/insanity/depression/whate-have-you and intelligence are linked or correlated, the movie still screams, “Ooooh, look at me! Isn’t this disturrrrrrbing?” No. It’s ridiculous. Now get over yourself.

I have to admit: I rather enjoyed Pi — but then again, I’m the sort of guy who walks around in a trenchcoat and fedora whenever the weather permits. I’m not just your ordinary poser, but a poseur noir. Still, I’ll agree that Pi would have floated off into self-indulgent madness if it didn’t have some nice, earthy touches. The character of Max’s mentor, Sol (Mark Margolis), is considerably more “grounded” than his student; Aronofsky’s mixture of the gritty and the ethereal on the streets of Chinatown is also rather nifty to watch.

Near the end of the film, Max has a verbal showdown with a shul-full of Chasidim, the leader of whom (Stephen Pearlman) tells Max that the 216-digit number stuck in Max’s head is the true Name of God. Mathematically, this scene is the weakest in the film: Rabbi Cohen tells us that aforesaid Name of God is 216 letters long, and as any student of gematria can tell you, each of those letters has a numerical value based on its position in the Hebrew alphabet. However, the Hebrew numerical system involves adding numbers up, like Roman numerals, rather than positional notation like what we use today. Aleph followed by beth is 1 + 2 = 3, not 12. A sequence of 216 letters has a numerological “translation” which is the sum of 216 numbers, which is not necessarily an integer 216 decimal digits long.

Furthermore, Max taunts the Chasidim with the ineffectiveness of their approach, saying that they’ve surely gone through all the possible 216-digit numbers: “You’ve translated them all, you’ve intoned them all, and what’s it gotten you? Nothing!” He goes on to explain that the Number’s true significance is “between” or “behind” the digits — presumably, whether or not a person who gets the Number enters the presence of God depends upon the path taken to acquire the Number, and extracting the digits from natural phenomena as Max did might be more worthy or more purifying than studying the Torah. This would be a neat, perhaps even admirable touch, but it’s bungled by the arithmetic: if you could say one possible Name of God every minute, it would take 1.7 × 10284 years to intone each possible combination of 216 Hebrew characters.

Now, the Chasidim have been using number theory to try and get the Name, which might prune down the possibilities. Perhaps they know that the Name of God must translate to a prime number, for example. Nevertheless, they can’t have been using modern number theory for more than a century or so, and that’s only long enough to say about 52 million names, assuming you never break to sleep or eat some challah bread. Aronofsky clearly wants Max to come out on top during this scene, but his way of getting there just doesn’t hold up.

The goofiness of this scene is balanced by a well-crafted moment near the beginning of the film, in which Max has a “Eureka!” moment upon seeing a swirling cloud of cigarette smoke and a swirling mix of cream in coffee. It’s a nice cinematic representation of “universality” in fluid dynamics, and it’s the sort of thing which scientists do get excited about: why do the flows of such different substances in different media look so much alike?

CONTACT (1997)

Mollishka contrasts Pi with Contact, Robert Zemeckis’ film adaptation of Carl Sagan’s novel. This is, the way I see it, a rockin’ movie which manages to fall apart completely in the final few minutes. Mollishka says,

The particular scene in Contact that doesn’t try to painfully explain the details to the audience is the one in which they are taking the Vegan signal and converting it to a TV visual and audio output; the dialog exchanged is reasonably realistic, and the audience doesn’t have to understand it all because it all makes sense when the TV is turned on—and part of the humor in the scene is that the nasty military man doesn’t understand the conversation either. Contact has its own shortcomings of course—you can seriously not convince anyone who has spent time trying to decipher puzzles lacking instructions that “we can only get three sides to fit together!” doesn’t scream “I’m a cube, damn you!!!”—but it is still one of the best movies with scientists as characters I know of.

We get the second act rolling when Ellie Arroway (Jodie Foster) and her kooky — but not Max-Cohen-insane — colleagues detect a powerful radio signal from the vicinity of Vega. Right away, they verify that the signal isn’t coming from anywhere near Earth: we see a charmingly exuberant radio astronomer proclaim, “Whatever it is, it ain’t local!” Vega is about to set below the horizon in New Mexico, so Arroway contacts another astronomer in Australia, who says via video teleconference that he’s pinpointed the signal “right smack in the middle — Vega.”

Consider the issue of parallax. Stretch out your hand and look at your index finger with one eye closed, and notice how your finger appears to move when you switch from one eye to the other. Your elbow appears to “jump” side to side more than your index finger, while the tree outside moves less. When driving along the highway, distant mountains don’t appear to move at all, minute-by-minute, while the nearby guardrail is zipping past. As we shift the point of observation, nearby objects appear to move, but objects farther away displace by angles too small to notice.

Now, imagine how far away a radio source would have to be for astronomers in both New Mexico and Australia to see its signals coming from the same point! Then, too, we see other observers join in the effort, and the astronomers around the world all keep listening for many months — enough time for the Earth itself to move around the Sun. Any radio source within many light-years would show a parallax over that interval which telescopes could detect. Nowadays, direct parallax measurements can locate radio sources over six thousand light-years away, so if — as the “nasty military man” insists — the tycoon S. R. Hadden had tried to put up a satellite sending out a fake Vegan signal, his ploy wouldn’t have lasted very long.

Consider, also, what happens at the end of the movie. Arroway travels through an ancient interstellar transit network of interlocking wormholes, returning to Earth the very moment that she left; her digital video camera is fried, and the people who play the recording back get only static — but they get eighteen hours of it, exactly the length of time Arroway claimed she was zipping around the Galaxy. We viewers receive this information during a private chat between the “nasty military man” and another government official, after the inquiry into the affair has been concluded, and Arroway has ridden off into the sunset with her beau, Palmer Joss (Matthew McConaughey).

Excuse me?

None of the technicians on the “video crew” who studied Arroway’s camera and saw all that static went to CNN saying, “Here’s the evidence that Arroway is telling the truth and that schmuck is full of it?” Sure, anybody who did that might risk being fired or even prosecuted, but you can’t tell me that everyone involved in the investigation passed up the chance to become the most famous whistleblower in history. I’d sure risk getting fired from the Defense Department to make millions on the lecture circuit!

It’s worth noting that in the novel, the idea that the Message was faked is treated as the private, paranoid fantasy of Kitz, the military-political slimeball. I find this version far more satisfying, dramatically speaking.

Another difference between the novel and the movie is worth commenting upon, because I think it works to the movie’s detriment. The novel is set in a plausible near future, with some extrapolations which were well-grounded in the late 1980s and don’t sound too terrible today. Space travel has become commercialized, with the world’s richest people taking up residence in Earth orbit; France imports marijuana cigarettes from the United States and sells them with the slogan, “This will be deducted from your share in Paradise.” (Ah, Carl Sagan.) The tycoon who funds Ellie Arroway, S. R. Hadden, made his millions with “AdNix,” a module which plugs into your TV and detects when commercials come on — later improved with “PreachNix,” a plug-in expansion which shuts out religious broadcasting.

By contrast, Zemeckis’ film has — no doubt intentionally — the feel that “You could see this on the news tomorrow.” Instead of the television programs which Arroway browses during an idle moment, which sound rather like the shows Sagan proposes in The Demon-Haunted World to make television a better resource, we see Palmer Joss being interviewed on Larry King Live. The President of the United States in Sagan’s novel is a woman; in the film, it is Bill Clinton. This may have made the movie feel topical and relevant in 1997, but the same segments feel dated now.

Planned obsolescence should not be a part of cinema! The movie would have been richer, thematically, had its producers taken more from Sagan’s novel to provide background and atmosphere. Fer chrissakes, get Alan Alda on stage and just tell everybody that he’s the president: don’t waste time digitally splicing Clinton into your plot.


I enjoyed this movie greatly when I saw it at the cineplex, shortly after its release. Later, when watching the DVD, it was significantly less remarkable. I think this is a special case of the general rule that movies are better when seen in good company, on the largest screen possible, in the atmosphere of a special occasion. The best part of the movie as it stands is the scene in which Alicia (Jennifer Connelly) persuades the construction workers to operate their jackhammers elsewhere, so that John Nash (Russell Crowe) can teach his multivariable calculus class without the extra noise. MIT is always under construction.

Incidentally, I sat at the banquet table next to the Nash family at last summer’s International Conference on Complex Systems. Nash gave a talk on multiplayer game theory which managed to sail parsecs over the head of almost all in attendance (which is what a few of us had privately expected). He also tripped over a power cable on his way to his seat and almost toppled onto my chair — and that’s the story of my brush with celebrity! His son, oddly enough, bore a noticeable resemblance to Russell Crowe.

The way A Beautiful Mind treats Nash’s work is interesting. In the barroom scene examined and parodied by Randall Munroe, we get to see mathematics applied to real-life phenomena, and in a considerably more concrete way than in Aronofsky’s Pi. Unlike the prodigal character in Good Will Hunting (1997), the fictionalized Nash works on math which connects to Nature, and in a way which the audience can grasp. However, like the the genius of standoffish Will Hunting (Matt Damon), the brilliance of the cinematic Nash is a MacGuffin: it matters to the other characters, but not directly to the viewer. (Gus Van Sant admits as much in the introduction to the screenplay, which I happened to find in a public library some years ago.) The details of the fictional Nash’s discovery don’t matter to the rest of his life, and he doesn’t even use game theory in his hallucinatory attempts to break Russian codes.

(I just happened to notice that in Affleck and Damon’s screenplay for Good Will Hunting, the MIT graduate students laugh at Professor Lambeau’s description of The Tech as “auspicious.” This detail, omitted from the film, is entirely correct.)

PROOF (2005)

David Auburn’s play Proof was also based, loosely, upon the John Nash story, although little of that survives in the play or the 2005 film version besides the idea of a schizophrenic mathematician. Mollishka says of the Proof movie,

Gwyneth Paltrow is supposed to have proven this really amazing theorem about “prime numbers,” but she is also battling various mental issues. While the psychosis in this film still comes across as a bit off, I think it’s a good effort; where the movie is utterly painful for me is whenever the characters attempt discussing math. This is the problem the writers face: they can either have the characters speak naturally like real scientists or mathematicians would—and thus have essentially no one in the audience understand any of the jargon-laden sentences, or they can have the characters repeat definitions to one another that they would have realisitically known since they were six years old and have the conversation come across and stilted and forced.

I recall that Paltrow and Jake Gyllenhaal’s characters discuss Germain primes, which are those prime numbers [tex]p[/tex] such that [tex]2p + 1[/tex] is also prime. Anybody with a number-theory background should know about these, and Gyllenhaal’s character was a little slower on the uptake than he should have been, but he was certainly better than Nicole de Boer’s character in Cube (1997), who takes an awfully long time to realize that even numbers other than 2 aren’t prime. She also describes the difficulty of testing numbers for primality as “astronomical,” which is fairly correct if your numbers are big, but not so accurate if — as in the movie — all the numbers under consideration are three digits long.

Proof also takes the whole “peaking at 23” thing a bit more seriously than the math and science people I know; it’s a romantic notion, but it’s not compatible with our other romantic tales, of people like Richard Feynman having great ideas all life long.

The most priceless moment in Proof transpires when the Paltrow character’s sister (Hope Davis) meets a man at the party organized by Gyllenhaal and asks if he is also a mathematician. “Hell, no,” he says. “Theoretical physicist.”

7 thoughts on “Math in the Movies”

  1. I did experience pain when Max claimed that the guys must have tried “intoning” every possible combination. And, part of what repelled me about the “dark silent math type” is that, uhm, I know the people who fit the description they’re trying to reach, and that just ain’t it.

    I’m also willing to sort of forgive the end of Contact (the film) because I know that someone has to make Stupid Choices in order to compress a good novel into a decent film. That said, Contact doesn’t rank as one of my Favorite Movies because I get so sick of the “religion and science can’t coexist but no wait they can” bullshit.

    I personally absolutely abhor the film Good Will Hunting because it is soooooooooo painfully contrived an unrealistic. No one with a background like that is going to have nice supportive understanding friends when it comes to academic pursuits. Just ask any first generation college goer whether or not everyone in their family was supportive, and whether or not they think that’s normal.

    I’m conflicted when it comes to the adapation of A Beautiful Mind; the biography is by far the best biography I’ve ever read because it gives so much detail and background behind every place Nash went (e.g., what was MIT like in the 50s? Let’s find out!). The film, though, definitely had some parts that were like, uhh…; for example, the scene when he is staring at a bunch of diagrams for the CIA and the patters are “jumping” out at him. *shrug*.

  2. Keith Devlin pegged that scene as one of the episodes which the director “clearly intended the audience to see as taking place inside Nash’s mind.” Nash’s appearance and demeanor change entirely, the wall displays are beyond 1950s technology, and so forth.

  3. Just ask any first generation college goer whether or not everyone in their family was supportive, and whether or not they think that’s normal.

    *raises hand*

    My family were almost over-supportive. As in, hopes and dreams riding on your shoulders, we’ll give you whatever you need but you damned well better graduate, kind of supportive.

    Granted, my background isn’t quite poor-kid-from-Southie, but I was a first generation college-goer. (Unless you count bible college, but my dad never did manage to graduate even from that.)

  4. Fair enough. My mother was actually first generation college (her mother had dropped out in order to get married and didn’t go back til she was 65); she says her immediate family was extremely supportive, but her aunts and cousins were all like, “you think you’re better than us?”

  5. “A sequence of 216 letters has a numerological “translation” which is the sum of 216 numbers, which is not necessarily an integer 216 decimal digits long.”

    By “not necessarily” I think you mean “almost certainly not”, because the numbers in question are rather small.

    And I was rather bothered by the MIT scenes in A Beautiful Mind because they didn’t look like MIT. I understand that they couldn’t actually film there, but somehow they didn’t even choose to film somewhere that seemed like a reasonable stand-in.

  6. I chose to go for the understatement. ;-)

    Whatever site they found to substitute for Killian Court was, indeed, awful. Given their overboard reliance upon computer graphics, I’m surprised they couldn’t have fabricated something better.

Comments are closed.