Growing up in South India, Srinivasa Ramanujan (Dev Patel) shows an immense fascination with mathematics, even though he has no formal training in the subject. He fills notebooks with equations and formulas. In order to support his wife Janaki (Devika Bhise) and mother (Arundathi Nag), this earnest and self-confident young man lands a lowly job as a clerk in a British firm. With great enthusiasm, Ramanujan explains to his bride that there are beautiful patterns in everything and mathematics is like painting without colors. She does not understand but an Indian mentor at the firm recognizes him as a math genius and encourages him to share his work with the world.

In 1913, Ramanujan sends some of his theorems to G. M. Hardy (Jeremy Irons), the leading British mathematician at Cambridge in England. He recognizes that that this young Indian possesses vast intellectual powers that must be tapped. He invites Ramanujan to England and along with his longtime collaborator John Littlewood (Toby Jones) tries to convince his protégé that formal proofs must be added to his mathematical adventures. Otherwise, they can never be published.

It is very edifying to witness the friendship that slowly blooms between these two mathematicians: Hardy, a pragmatist and atheist, and Ramanujan, a Hindu believer who claims that every math equation expresses a "thought of God." Both of these tireless explorers are viewed as outsiders. Hardy is seen by his colleagues as a workaholic unwilling to waste his precious time with human beings. More than once, Ramanujan is scorned by Indian-hating academicians who treat him without respect. These slights and humiliations conspire against this scientific pioneer who is initially denied a fellowship at Cambridge, despite his achievements. Trying to maintain his vegetarian diet during World War I rationing, combined with the constant work and his longing for Janaki and India, he begins to suffer health problems. But when he is diagnosed with tuberculosis, he doesn't tell his mentor and friend. When Hardy visits him in the hospital, he is a burnt-out shell of the once ardent and passionate Indian mathematician aglow with new projects.

The Man Who Knew Infinity has been written and directed by Matthew Brown based on a 1991 book by Robert Kanigel. This heart-affecting biodrama stands shoulder-to-shoulder with other top-drawer films about mathematicians and theoretical physicists — A Beautiful Mind, Proof, and The Theory of Everything. While many in the audience may not understand the talk about infinite series, prime numbers, and partitions, they will sense in their bones the passion and the thrills that accompany Ramanujan's math discoveries and triumphs.

Dev Patel, who was so marvelous in Slumdog Millionaire, effectively depicts Ramanujan's Hindu zeal, his passion for mathematics, and his reverence for its beauty. In another richly detailed and nuanced performance, Jeremy Irons reveals the admirable efforts of a cerebral scholar who finds the courage to stand up for the mind-blowing work of his friend in the face of steep opposition and racial prejudice. Both men would no doubt agree with Henry David Thoreau who said: "The language of friendship is not words but meanings."