From what source does mathematics arise? Is it divine inspiration, secular intellectual labor, or the pure play of human imagination? For the Indian mathematical genius Srinivasa Ramanujan, the answer lay definitively with the divine. Ramanujan believed that the extraordinary equations and formulas he produced throughout his life were “written on his tongue” while he was sleeping by the goddess Namagiri, who revealed to him, in dreams, scrolls containing many of the most fascinating and elliptical insights mathematicians have ever encountered. Ramanujan’s visions and his goddess guide haunt the pages of David Leavitt’s remarkable new novel, The Indian Clerk, about the brilliant, young, self-taught Hindu prodigy from Kumbakonam and his English champion G.H. Hardy, one of the seminal figures of 20th-century British mathematics.

Hardy, a militant atheist, had no stomach for the cult of mysticism that grew up around Ramanujan after the latter’s untimely death at the age of 32 (in 1920), and in his own writing, Hardy decried the tendency to elide spiritual and mathematical matters in the life of the man whom he famously called his single greatest “discovery.” All of this is the official record, but Leavitt, with the freedom of the novelist, aims to give us a portrait of the interior man — not Ramanujan, but Hardy.

Though Ramanujan is the titular figure, he is the object, not the subject, here — and he remains, to the end, a most obscure object of desire. Did he truly believe his equations were gifts from a god? Did he really believe in the Hindu gods at all? Or was his apparently devout faith “merely,” as Hardy would put it, a sop to his very traditional, Indian Brahmin mother? For Hardy, the questions have more than singular importance, for they touch on the wellspring of his own intellectual life. Hardy had dedicated his career to giving mathematics a more formalist foundation — a project that was much in vogue on the Continent in the late 19th and early 20th centuries; he wanted the edifice he was helping to build to rest on rock-solid and rigorous footings. To this “apostle of proof,” the goddess Namagiri was, publicly at least, all just so much bunkum.

The story of Ramanujan has been told before, most splendidly by Robert Kanigel in his 1991 biography, The Man Who Knew Infinity, and is currently being made into two feature films. Leavitt’s great innovation is to give us this enigmatic, and in many ways unknowable, figure through the eyes of his English mentor and to use this profoundly idiosyncratic case as a lens through which to examine the great philosophical conundrums posed by the very existence of mathematical discoveries.

The plain facts of the story are astonishing: In January 1913, G.H. Hardy received in his rooms at Cambridge a package from Madras that contained a sheaf of papers covered with bizarre and byzantine equations. Mathematicians not infrequently receive such letters, many of them claiming answers to hitherto-unsolved problems. The trajectory of these missives is usually short and swift: straight from the mailroom into the wastebasket. The writer from Madras, a lowly clerk without even a degree to his credit, also claimed to have made progress on one of the most difficult of all mathematical problems — the Riemann hypothesis.

Hardy immediately noticed that some of Ramanujan’s formulas were wrong, others were already known, but some of them were so strange that “they seemed scarcely possible to believe.” Though Hardy considered the possibility of fraud, he concluded that if such bizarre formulas were not true, then nobody would have the imagination to invent them, and he began a campaign to bring the unknown genius to Cambridge.

Things did not go well at first, for the Brahminic brand of Hinduism that Ramanujan’s family practiced prohibited its members from crossing the ocean. Eventually, the goddess Namagiri conveyed to the genius’s mother that in this particular case the religious injunctions could be lifted, and two months later, Ramanujan left by boat for England and a new life in Cambridge. Had it been a different decade, or a different century, Leavitt’s Hardy reflects, the Indian clerk might have wrought a mathematical revolution. As it is, World War I broke out, and along with it, all the privations of that great shattering conflict. Food was scare, and scarcer still for Ramanujan, who, as a Brahmin, was a strict vegetarian. He began to suffer from malnutrition and also from mysterious ailments. He hated the cold, and he missed India, with its warmth and spices and its multilimbed deities. Most of all, he missed his family and his precious child bride.

Hardy, focused on math, barely noticed. When he wasn’t doing math, he promoted pacifism, for he was as much against the war as he was against God. Finally, when it was over and an exhausted England could take stock, one of the casualties was Ramanujan, who was by now in a sanitarium — perhaps with tuberculosis, or something more insidious. Whatever the malaise, he was fading, and although he survived another year back in India, Ramanujan’s career was effectively over.

The fruits of that career were stranger even than the life. Visually, most mathematical equations look terse and dry, like beef jerky, all superfluous waters removed, leaving only the pure flavor. The drier the better is how most mathematicians think. Ramanujan’s equations are baroque and florid, encrusted with curlicues and divided into petallike segmentations; they seem to have emerged out of a richer, more exotic soil. They are partition functions and hypergeometric series, they tell us weird, wondrous things about Bernoulli numbers and round numbers and highly composite numbers, and some of them address the great, abiding question of the primes — the building blocks of the real numbers, which are the subject of the now-near-mystical Riemann hypothesis.

All this we observe in Leavitt’s utterly thrilling account through the eyes of other people — mostly Hardy, but also several of his acquaintances, principally a young woman named Alice Neville, the real-life wife of one of Hardy’s junior colleagues. Neville, at least in this account, seems about the only person in England to have grasped that even a genius might sometimes feel homesick and need sustenance other than a purely mathematical diet. Though Alice’s relationship with Ramanujan is invented (as Leavitt acknowledges in his endnotes), she becomes the primary voice through which we get to hear — or think we hear — the Indian enigma himself.

But then again, how would we know? For although we have Ramanujan’s notebooks filled with his mathematical amazements, we have little record of the man himself except in other people’s reflections — principally Hardy’s. And so we come back not to the genius, but to his cipher. Leavitt’s narrative strategy emerges then not as an evasion but as a stroke of genius, for through Hardy we are also inducted into the cosmos of early-20th-century British mathematics and, along with that, all the complex social stratification in which Hardy’s life at Cambridge was embedded.

It would be hard to make up a richer character or setting. A homosexual, a friend of the Bloomsbury circle that included Virginia Woolf, and a member of the elite Cambridge “Apostles,” a secret club that included Bertrand Russell, John Maynard Keynes and Lytton Strachey, Hardy was at the center of so many currents that typified Britain at the dawn of the modern age. All this Leavitt portrays with a wit and ease, as if he himself were channeling Strachey, one of the most masterful writers of his time. And bound into this, we have Hardy’s reflections on mathematics, prompted by his increasing sense, as the novel progresses, that perhaps his “official” view of Ramanujan might need some amendment.

Near the end of his life, Hardy wrote a short book called A Mathematician’s Apology in which he wrote eloquently about the importance of pursuing pure mathematics for its own sake. It is one of the great personal accounts of a subject that, as the fictional Hardy explains in Leavitt’s novel, is beyond the domain of natural language. When mathematicians like Hardy and Ramanujan get together to work, they leave behind the signifiers of normal human intercourse and enter an alien landscape that can only be described in an entirely other language. Is this the language of gods? Though the real-life Hardy would have publicly answered “no,” Leavitt succeeds in convincing us that the inner Hardy — the true Hardy — was not so sure. The Indian Clerk, as a work of fiction, rewrites history as Leavitt would have liked it to be; it is, in effect, Hardy’s reassessment, and ultimately his apology, to the man he revealingly described “as the one romantic incident in my life.”

THE INDIAN CLERK | By DAVID LEAVITT | Bloomsbury | 485 pages | $25 hardcover

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.