1.1816584-1066285019
Russell Crowe plays mathematician John Nash in A Beautiful Mind; a scene from The Social Network (top) Image Credit: UNIVERSAL STUDIOS

In the Tina Fey sitcom “Unbreakable Kimmy Schmidt”, wealthy Manhattanite Jacqueline Vorhees wails to her assistant that she can’t afford to get divorced. Even though she’d get $1 million for every year of her marriage. “I spend 100 grand a month. I’ll be broke in 10 years,” she wails. “No, that’s wrong,” counters Kimmy (Ellie Kemper), who scribbles some sums with a marker on Mrs Vorhees’s window.

“So $100,000 times 12 months. That’s $1.2 million a year. Divide that into $12 million, and yes, you’d be broke in 10 years. But if you invest some of it, assuming a 7 per cent rate of return, using the compound interest formula, your money would almost double.”

Kimmy turns round triumphantly: “Mrs Voorhees, I mathed, and you can get divorced!”

Mrs Vorhees eyes Kimmy narrowly. “Those are not,” she complains, “erasable markers.” What she doesn’t mention is that math isn’t a verb. Not yet.

The scene is, among other things, Fey’s satire of the Hollywood cliché of genius squiggling on glass. In “A Beautiful Mind” (2001), for instance, Russell Crowe, playing troubled maths star John Forbes Nash Jr, writes formulae on his dorm window. This scene is echoed in “The Social Network” (2010), where Andrew Garfield sets out the equations for Facebook’s business model on a Harvard window while Jesse Eisenberg’s Mark Zuckerberg looks on. In the opening scene of “Good Will Hunting” (1997), janitor prodigy Matt Damon writes equations on a bathroom mirror. Why do so many Hollywood maths whizzes forego paper?

Stanford mathematician Keith Devlin explains. “Depicting a mathematician scribbling formulas on a sheet of paper might be more accurate, but it certainly doesn’t convey the image of a person passionately involved in mathematics, as does seeing someone write those formulas in steam on a mirror or in wax on a window, nor is it as cinematographically dramatic.”

Good point. When we watch “A Beautiful Mind” and look through the window at our Russ, Hollywood’s most built mathematician, we pass beyond incomprehensible equations and convince ourselves we’re seeing Genius at Work. Even if, as some critics have complained uncharitably, Russ’s pi glyphs, greater-than and less-than symbols and such don’t make sense.

But there’s another way maths movies can confound the Boredom Equation, namely by leaving a black hole where the maths should be. “The Man Who Knew Infinity”, the recent film starring Dev Patel and Jeremy Irons about the great Indian mathematician Srinivasa Ramanujan, is intriguing in this respect. Although we see Ramanujan doing maths, mostly the film is interested in other things — how he falls in love with his wife, the pain of separation when he travels from Madras [now Chennai] to study at Cambridge, the racism he suffers in England and, most stirringly, the narrative arc from lowly clerk to globally recognised mathematician.

That said, the film has its charming moments. When Hardy visits Ramanujan in a nursing home, he complains about the boring number of the cab that brought him there. Ramanujan begs to differ: 1,729 is the smallest that is expressible as the sum of two cubes in two different ways. Today 1,729 is known as the Hardy-Ramanujan number. How does that work, you may be wondering? Like this: 1729 = 13 + 123 = 93 + 103.

Ramanujan’s mentor G.H. Hardy (Irons) is an atheist and rationalist, exasperated that this Indian prodigy cannot produce proofs for his work and, worse, is doubtful that proofs can explain the inexplicable.

“You wanted to know how I get my ideas,” says Ramanujan. “God speaks to me.”

But while the film may sketch two different mathematical philosophies, we leave the cinema with a warm glow that comes from anything but hard thinking.

If you want to learn some more about Ramanujan’s contribution to mathematics, rent “High School Musical”. Freeze-frame it at the moment brainy Gabriella Montez challenges her teacher. On the board are two of the equations of the inverse of the constant pi (1/) that Ramanujan offered in his first paper published in England. “Shouldn’t the second equation read 16 over pi?” asks Gabriella. Of course it should.

Cinema often struggles with dramatising difficult ideas, particularly if they are abstract. One way of overcoming that problem is by metaphorical explanation. For instance, in Nicholas Roeg’s “Insignificance” (1985), a Marilyn Monroe-like character demonstrates relativity using toy trains and flashing lights.

In “The Theory of Everything”, Jane Hawking uses a pea and a potato to explain the difference between quantum theory and general relativity, while her husband’s friends explain Hawking Radiation with beers and crisps.

Movie explanations of difficult stuff, though, may obscure rather than enlighten. What’s more, some directors know this and have fun pointing out the shortcomings of their medium — and those of their audiences. In Adam McKay’s “The Big Short” (2016), for instance, Margot Robbie sits in a tub sipping champagne and describing how sub-prime loans work. Her explanation is doubtless coherent, but when I’m looking at a beautiful woman in a bubble bath, I’m not thinking about credit default swaps. So sue me. Later in the film, chef Anthony Bourdain chops fish in his kitchen while describing how collateralised debt obligations work. Finally, Selena Gomez plays roulette to illustrate the idea of gambling on other people’s gambles.

Each scene serves as a parody of explanation. They are part of a film that mocks you, you poor fool, and your intellectual aspirations. You are never ever going to understand how difficult stuff works from watching movies, however much you’d like to.

Sometimes, though, cinema can give a real insight into the intellectual process. In “Agora” (2009), Rachel Weisz as ancient philosopher Hypatia does an experiment on a ship to test relative motion. If, she hypothesises, you drop a heavy sack from the mast while the ship is moving forward, it will fall on the deck several feet behind the mast. The sack is dropped and falls much closer to the mast than she predicted. Hypatia claps her hands in delight. “But you were wrong!” says the ship’s captain. “Yes, but it is definitive proof! The sack behaves as if the boat were stationary.”

“What does that mean?”

“I don’t know. But the same principle could be applied to the Earth. It could be moving around the Sun without us realising.”

Hypatia, that is to say, infers a revolutionary heliocentric cosmology from her falsified hypothesis. The film thus generously gives us what we are effectively denied in “Good Will Hunting” or “A Beautiful Mind” — the inside track on how someone clever is thinking about a problem. What’s more, it’s an antidote to Hollywood’s vision of genius. It suggests that getting stuff wrong is at least as important in the story of human intellectual progress as being right all the time.

Maths is often reduced to nothing more than a MacGuffin. In “Rushmore” (1998), for instance, Max Fischer (Jason Schwartzman) is reading the newspaper while his teacher tells his class that on the blackboard is the hardest geometry equation in the world. What credits would anyone solving it get, asks one student. “Well, considering I’ve never seen anyone get it right, including my mentor Dr Leaky at MIT, I guess if anyone here can solve that problem, I’d see to it that none of you ever have to open another math book again for the rest of your lives.”

Thus tempted, Fischer folds his paper and goes to the blackboard, and squiggles his solution while nonchalantly sipping espresso. The film at this point has nothing to declare but Fischer’s genius. Do we really believe Jason Schwartzmann can compute the area of an ellipse? Sure. Whatever.

Genius squiggling is there once again merely to help Hollywood tell the sentimental story it never tires of: namely the story of someone — usually borderline demented and by definition insufficiently recognised — sticking it to the establishment.

None of this should suggest we can’t learn maths from movies. In Tina Fey’s “Mean Girls” (2004), for example, Lindsay Lohan plays a finalist in the Illinois high school mathletes state championship. Will her North Shore High team stick it to those prep school toffs opposite? Here’s the first question: “Twice the larger of two numbers is three more than five times the smaller, and the sum of four times the larger and three times the smaller is 71. What are the numbers?” Got it yet? 14 and 5.

In the end, Lohan’s team become the new state champs because she wins the sudden death tie-break. What does the scene prove? That those of you who thought Lindsay Lohan can’t do maths should really have a word with yourselves. Perhaps the most resonant maths scene in Hollywood cinema, though, comes in a very old comedy. In the Abbott and Costello movie “In the Navy” (1941), Lou is a ship’s cook. He’s baked 28 doughnuts, which he reckons is just enough to give 13 to each of his seven officers. But seven goes into 28 four times, objects Lou’s straight man. Not so, says Lou, who goes on to prove it on the blackboard in a masterclass of cheating and illusion. The scene demonstrates a general truth, namely that when Hollywood does maths, it doesn’t necessarily add up.

–Guardian News & Media Ltd