Ask your average student of mathematics/engineering/computer science about the scene, and she will practically snort with laughter. It’s a classic Hollywood attempt to inject some authenticity into a character who’s a techie – except filmgoers who are themselves techies will, well, snort with laughter.

The scene is from the 1987 film No Way Out. We are in a lab of sorts, computers and other tech-like equipment everywhere. A wheelchair-bound character rolls over to another who’s staring at his screen, and this exchange ensues.

Wheelchair: I’m not satisfied with the way this is coming up. The eigenvalue is off.

Screen: Looks all right to me!

Wheelchair: We’re pulling away from our reference information. Programme a Fourier transform.

Screen: That seems like a waste of time.

Wheelchair (angrily): Just do what I want, OK?

Play
‘No Way Out’.

“Eigenvalue”? “Fourier transform”? The terms make no sense here, except as an attempt to impress filmgoers who don’t know them. Perhaps the writer called a friend in Silicon Valley and said, “Dude, toss me a few impressive-sounding tech words. Have a scene to finish writing tonight.” Perhaps “pi” and “RAM” were rejected – too common – but these two made the cut because few people outside mathematical circles know them.

I don’t want to sound supercilious, as if I’m flaunting my own familiarity with those terms. Besides, apart from this scene, No Way Out is a favourite, an engrossing thriller that had me hooked all the way through. But I’ve always felt this scene is indicative of two things: that it’s a challenge to make mathematics and science seem authentic on film, and that it’s easy to be lazy about that challenge.

It’s a challenge that must have come up in the making of films as varied as Pi, Agora and Good Will Hunting – and, of course, the recent film biographies of Alan Turing, Stephen Hawking and Srinivasa Ramanujan. Probably first primed by the No Way Out fiasco, I like to watch for how films like these treat the mathematics that’s important to their stories.

In Good Will Hunting, for example, Matt Damon writes stuff on blackboards that persuades others of his genius. There’s one scene in which he and his professor alternate writing numbers on some kind of diagram, as if they are jointly arriving at a monumental mathematical truth. Only, the numbers and diagrams are about as meaningful as the eigenvalues and Fourier transforms in No Way Out. Mathematicians who watch this otherwise splendid film must, I imagine, grind their teeth in frustration during these scenes.

Play
‘Good Will Hunting’.

In contrast, Agora has Rachel Weisz show us, with models and experiments, the state of scientific thinking in the 4th Century AD. We know now that some of that thinking is wrong. But the models are simple and authentic, and the lessons she takes from them are believable. And there’s a subtle but vital lesson in one experiment she carries out: that science celebrates and learns from failures too.

Play
‘Agora’.

Like Damon, Dev Patel, playing Ramanujan in The Man Who Knew Infinity, also writes something on a blackboard. But perhaps because the makers of this film brought on board the eminent mathematicians Ken Ono and Manjul Bhargava as consultants, what Patel scribbles effortlessly on that board actually means something. Also in the film is the famous anecdote about the number 1729, which Hardy finds dull but Ramanujan finds so intriguing. Both these episodes speak of the comfortable marriage this film manages to shape, between the mathematical sensibilities of its characters and the storytelling imperatives of Hollywood.

Play
The trailer of ‘The Man Who Knew Infinity’.

Yet I found myself wanting more from Infinity, and in two respects.

One, the film mentions several times Ramanujan’s interest and groundbreaking work in partitions. Of all that he worked on, arguably the easiest for the rest of us to understand is the idea of a partition of a given number, which is simply a way to break it into parts. With 4, there are these five options: 4 itself (i.e. a part that is the whole), 3 + 1, 2 + 2, 2 + 1 + 1, and 1 + 1 + 1 + 1.

Ramanujan discovered some remarkable things about partitions. Hardy helped him with one – a formula that approximates how many partitions any given number has. In the film, this is the source of some tension with another Cambridge professor. But I’d have liked the film to explain partitions better than it did, particularly so as to point out that delicious mathematical conundrum: how simple ideas can hide diabolically difficult puzzles. In this case, it’s easy to explain what a partition is, but not trivial at all to find even the formula Hardy and Ramanujan did.

Two, there’s an essential tension at the heart of Ramanujan’s stay in England. At home in India, he made the remarkable discoveries that spoke of his rare genius and which sparked Hardy’s interest in him. They came to him, he said, via his goddess Namagiri. But once in Cambridge, he had to go beyond such divine intuition and find rigorous proofs for his results. Certainly no mere dabbler like me could have come up with Ramanujan’s discoveries. But without proofs, they were really no different from major scientific leaps a mere dabbler like me might suddenly claim – like a cure for cancer, or a cheap way to desalinate water on a huge scale, or (to return to mathematics) that Goldbach’s conjecture is false.

Proofs are the bedrock of scientific progress because they allow others to verify and replicate your results. This is the standard that Hardy demands of Ramanujan. The film mentions this more than once, but it falls some way short of explaining why proofs are so fundamental to mathematics.

Still, these are really quibbles. What’s in The Man Who Knew Infinity is a long way indeed from flinging “Fourier transform” and “eigenvalues” about. I’ll go out on a limb: there’s much less teeth-grinding happening with this film, I’ll bet.