Thursday, September 25, 2014

Doing math with movie stars

Emory mathematician Ken Ono, left, coaches actor Dev Patel for his portrayal of the math genius Ramanujan, on the set of "The Man Who Knew Infinity." (Photos by Sam Pressman.)

By Carol Clark

Emory mathematician Ken Ono did not plan for his career to veer into the movie business. Unexpected paths can open, however, when your work involves unraveling the trail of mysteries left by Srinivasa Ramanujan. The Indian math genius had little formal education, but filled notebook after notebook with fantastic formulas that he said were visions from a Hindu goddess.

While British colonialism was still at its height, English mathematician G.H. Hardy helped Ramanujan become a scholar at Cambridge University, where he dazzled and baffled professors. Ramanujan died in 1920 at the age of 32, leaving behind many extraordinary contributions to math, along with big questions about the proofs underlying his work.

The film is based on a 1991 book
Ono is among those who’ve cracked some of these questions: Most notably, the realization in 2011 that partition numbers are fractals, an insight that opened a theoretical window onto “seeing” their infinitely repeating superstructure. Ono’s team also devised the first finite formula for calculating the partitions of any number.

In July, Ono received a request from film director Matt Brown in London to chat over Skype about a biopic he was working on. “The Man Who Knew Infinity,” produced by Stillwater Pictures, will feature Dev Patel as Ramanujan and Jeremy Irons as Hardy.

Ono happily agreed to the Skype session. The next thing he knew, he was flying to London to serve as an on-the-scene consultant during filming at Pinewood Studios.

In the following Q&A, eScienceCommons talks with Ono about what it’s like for a mathematician to get swept up into the production of a major motion picture.

eScienceCommons: What did you and Matt Brown talk about during that Skype session? 

Ken Ono: I had gone to India in 2012 to work on a docu-drama about Ramanujan by an Indian film company. Matt had seen that short movie, and he knew that as part of that project I had gotten to actually hold Ramanujan’s original notebooks and go through them. For his movie, Matt wanted me to advise the art department to ensure the props were accurate. And also to make sure that the script had all the math details right. The problem with the partition numbers raised by Ramanujan is a key part of the script and Matt said he found it fascinating that mathematicians still hadn’t cracked that mystery. I told him, “Actually, I led the team that solved that problem a couple of years ago.”

His response was: “You need to come to England tomorrow, if you can!”

I was already planning to compete in the World Triathlon Championships in Germany in two weeks, so I agreed to just go to Europe early and spend that time in London.

Working with the art department to get every detail right. "All of the math in this movie will be absolutely accurate," Ono says. 

eSC: What was your first day of work like? 

Ono: A driver came and picked me up from my London hotel in a BMW. I’m definitely not accustomed to having my own personal driver! Pinewood Studios is in a rural area. We traveled through pastures with cows grazing in them and then, out of nowhere, you see these gigantic buildings. 

The art department for the film is amazing. They were reproducing artifacts related to Ramanujan in fanatical detail, including 100-year-old issues of mathematical journals and an 11-page letter he wrote to Hardy. One person’s job was to master Ramanujan’s handwriting and replicate it. They had more than 400 photos taken from reconnaissance trips to various places and they asked me what it was like to be in Ramanujan’s home, which I had visited when I was in India.

Kevin McNally, left, is portraying British mathematician Major McMahon. "McNally played Mr. Gibbs in 'Pirates of the Caribbean' and he would do this pirate fist bump," Ono says. "I'm not sure what it means."

eSC: How did you wind up actually working with the actors? 

Ono: The second day when I arrived at the studio Matt Brown said, “We need you to come to rehearsal.” So suddenly I found myself in a room witnessing two world-class actors, Dev Patel and Jeremy Irons, recreating one of the greatest stories of math, and one that has been the basis of my career. It was a huge thrill.

I was the only mathematician present and I was helping to both get the math right and tweak the dialog to maximize the impact of each scene. A big part of the movie is how Ramanujan and Hardy learn to understand each other so they can work together. Their cultures and their methods of doing math are in conflict.

In a scene soon after Ramanujan arrives in England, Hardy is trying to get him to write down a proof to one of his formulas. But Ramanujan received his formulas as complete visions and thought it was a waste of time to write down proofs of things he already knew. I explained to the actors that there is a difference between a claim, or a formula, and a proof. For trained mathematicians, a proof is necessary, it gives value to a statement. Ramanujan eventually realized why it’s important to prove things, that even he can make a mistake.

Taking a break from filming, from left: Producer Ed Pressman, Jeremy Irons, Dev Patel, Ken Ono, Matt Brown and actress Sorel Carradine.

Another key part of the movie is Ramanujan and Hardy working together to find a good approximation for the partition numbers. These numbers grow at an astronomical rate. I described what it’s like for two mathematicians to be working at a board, trying to figure something out. I wanted the actors to know that when you finally are confident that you have a method to find the answer, that’s the “aha” moment, not the dotting of the i’s that comes later. We wanted the audience to really feel what it meant to get closer and closer to a theorem. Ramanujan had an idea and Hardy had the technical expertise required to write it out.

It's pivotal when Hardy realizes that they have found a way to approximate the partition numbers. We needed a line of dialogue to describe his excitement over this insight into these numbers that keep growing so rapidly. We couldn’t use the word “trillions” because it wasn’t part of the British vernacular in the early 18th century.

I suggested the line, “Ramanujan, you are truly the man who knows infinity.” It both makes mathematical sense and it worked the name of the name of the movie into the script.

When we finally got all of the details of the scene right, and Jeremy Irons read that line in his magical voice, the feeling was electric!

A letter from Ramanujan to Hardy is among the many props painstakingly reproduced by the art department for the film.

eSC: What’s your favorite scene of those that you worked on? 

Ono: One scene that I am quite fond of shows Ramanujan sitting in a class of students at Cambridge looking absolutely bored as a professor discusses a math problem. The professor resents having this lowly Indian in his class. And Ramanujan is not even taking notes, which is infuriating to him. So he challenges Ramanujan to complete a formula. Ramanujan walks to the board and instantly writes it out. 

My job was to come up with a formula for the scene that makes sense in terms of the topic of the class. It also had to be complex enough to be impressive, but simple enough so that it would not be too difficult for Dev Patel to easily remember it and write it down quickly.

I chose a special decimal expansion for Pi, which involves having the odd numbers in order by means of a special fraction that Ramanujan knew. Ramanujan saw beautiful patterns in numbers and I wanted the math for the scene to reflect that. The formula had to look pleasing to the eye, so whether you were an expert or not you could sense this beautiful symmetry that represents Ramanujan’s talent.

Between takes: "Jeremy Irons' attention to detail is amazing," Ono says.

eSC: How did the actors react to having a mathematician working with them? 

Ono: I was referred to as “the guy who cracked partitions” all over the set. Dev Patel did a hilarious, over-the-top impression of me talking about math. I didn’t realize I got so excited.

He is only 24, very humble and super smart, although he’ll tell you that he’s bad at math. He’s a great actor and fun person. Someone took a video of he and I running across a campus green, and then kept playing it backwards.

It was mostly, however, very serious hard work and really long days. The actors were really down-to-earth and focused.

Jeremy Irons’ attention to detail is amazing. He now knows that Pi(x) is not always less than Li(x). We discussed partitions, Skewe’s number, PNT and the Old English ways of pronouncing huge numbers. 

For one scene, Hardy barges into the vice chancellor of the university’s office, to tell him that he must not reject Ramanujan for a Royal Society fellowship. Irons was wearing a top coat and a hat and before each take for this 15-second scene he would walk fast in a circle about 20 times. Then he knocks on the door.

When I asked why he did that, he explained that walking in circles changed his face slightly and said, “Acting angry is the easy part. Convincing the audience that I just ran across campus in a huff is much harder.”

Irons even practiced Hardy’s handwriting using a 1930s-era fountain pen. The movie opens with Hardy writing this very special speech about Ramanujan that he delivered at Harvard: “I’m charged with the task today of telling you one of the most romantic and peculiar stories in the history of math.”

I almost cried when we were filming that. I knew the speech well and, on top of that, to hear it spoken in Jeremy Irons’ voice was incredible.

eSC: Now that you have your own IMDb page, will you be leaving math for the movies? 

Ono: I’ll definitely be sticking to math. Making movies is a lot harder! It’s grueling work but I also had a wonderful time. I signed some autographs one night just because I was sitting next to Dev Patel and Jeremy Irons in a swanky restaurant. I still can’t believe that they are making this movie and that I got to be involved. It’s so awesome that math is now hip!

New theories reveal the nature of numbers
Math formula gives new glimpse into the magical mind of Ramanujan

1 comment: