Dev Patel freely admits that math gives him a “brain freeze,” so playing math genius Srinivasa Ramanujan in the new film The Man Who Knew Infinity proved intimidating, especially in one scene in which he had to authoritatively solve an equation in front of a classroom full of extras.
“It took me a week to get the numbers in the right sequence,” Mr. Patel recalled. “After I went up to the board and wrote it out, the crew looked at each other as if to say, ‘Was that gibberish or was that correct?’ ”
The film, which premiered at the Tribeca Film Festival and opens in theaters tomorrow, tells the story of Ramanujan, who was born to a poor family in India in 1887. He had no formal math training, but he learned about it from books and began developing his own formulas. As he got older he sent his work to various British universities, and was finally invited to Cambridge by Professor G.H. Hardy in 1914. Hardy and Ramanujan worked together for the next five years, publishing theorems that became the basis for modern mathematics.
Oscar-winner Jeremy Irons, who plays Hardy, admitted to a similar lack of math knowledge before signing on for the film. But he told the Observer that he was helped by Hardy’s own writings, in particular A Mathematician’s Apology.
“That got me into his mindset and made me realize that math was a real art form for him, which I could empathize with,” Mr. Irons said.
The Man Who Knew Infinity is most concerned with Hardy and Ramanujan’s work on partitions, or the amount of times a number can be expressed as the sum of smaller positive integers (i.e. 2 = 1 + 1). Partitioning can be quite complex—for example, there are over 190 million ways that numbers can add up to 100. The Hardy-Ramanujan formula, however, was able to find the approximate number of partitions for any number, no matter how large.
Luckily there was someone on set to make sure the actors got this complicated math right. Dr. Ken Ono, professor of mathematics at Emory University and author of the book My Search for Ramanujan: How I Learned to Count, served as a math consultant on the film, and was also an associate producer.
Dr. Ono first learned about Ramanujan as a rebellious high school student—his father, a math professor at Johns Hopkins, told him about the Indian autodidact hoping that the boy would see him as a role model.
“When I was a child, I thought being good at math meant solving arithmetic problems quickly,” Dr. Ono said. “With this story, I learned you didn’t have to be a straight-A student to be successful. Ramanujan was my unofficial guardian angel.”
As such, Dr. Ono was the ideal adviser for the film. Some of his work was aesthetic—he worked with the art department to get props right. But he also helped Mr. Patel and Mr. Irons learn math, which they said was essential for helping them get into character.
“Ken was fantastic,” Mr. Patel said. “He was very present. He explained things at their primal base core, and added the texture to the scene.”
“I had Ken Ono at my elbow,” Mr. Irons added. “I got a feeling of pure mathematics from him. He was on his game.”
For his part, Dr. Ono was equally effusive in praising the two actors—he applauded Mr. Patel’s “mastery of formulas” and Mr. Irons’ “attention to detail.”
In the film (as in real life) Ramanujan often comes into conflict with the Cambridge academics, because he solves problems through intuition while they demand detailed proofs. Dr. Ono sees value in each approach.
“We need both visionaries and problem solvers to determine the future of the subject,” he said.
‘Ramanujan’s formulas are used in areas of math and science that weren’t even conceived when he was alive. He anticipated the future without knowing what it would bring.’—Dr. Ken Ono
Not surprisingly, however, Dr. Ono is an ardent defender of Ramanujan’s methods.
“Ramanujan was a fireball who brought science forward,” he said. “I wish we had more Ramanujans.”
To that end, Dr. Ono is one of the sponsors of the Spirit of Ramanujan Talent Search, a global online search for math geniuses tied to the release of the film.
Ramanujan’s work is also being used in modern science—in his last letter to Hardy he detailed mock theta functions, which have a complex repeating pattern. An international group of scientists, including Dr. Ono, is now using mock thetas to study black holes, which are similarly elaborate in that they have multiple centers.
“Ramanujan’s formulas are used in areas of math and science that weren’t even conceived when he was alive,” Dr. Ono said. “He anticipated the future without knowing what it would bring.”
Indeed, Dr. Ono concluded that the greatest strength of Ramanujan’s work was its staying power.
“Every time we go back to those shabby notebooks, we learn something we didn’t know before,” he said.