A beautiful mind

Complicite's latest production is inspired by the life of the Indian mathematician Srinivasa Ramanuj

At first glance, the story of Srinivasa Ramanujan's life and achievements seems like a neat series of diametrically opposed facts. A bona fide, heart-stopping genius - but one who is lacking in some of the most basic mathematical tools. A stubborn maverick who flunks his exams and rebels against the oppressive rote of Indian schooling - yet one who craves institutional inclusion and academic recognition once he gets to Cambridge. A man whose truth comes through numbers, who due to the very nature of his work has to embrace logic, and yet one who claims to believe in the divine: a goddess, specifically, by the name of Namagiri, from whom he takes advice and guidance on all major decisions in life. A mathematician without a desire or need for proofs. A shy man, visibly insecure in Cambridge society, borne out of being a brown person in uncharted, unapologetically white territory, but one with enough pride to walk out of his own dinner party because of a perceived insult, leaving town (his guests still at the dinner table) and not coming back for three days. A man who observes the sanctity of life because of his religion, but who tries to commit suicide.

If you look more closely, the space between each of these apparently contrary notions reveals itself to be ineffable and dirtier than at first, not unlike mathematics itself - something that the theatre company Complicite exploits beautifully in its latest production, A Disappearing Number, which takes us to the present day and back with a series of parallel narratives riffing on "our relentless need to understand". The show takes as its starting point one of the most mysterious and compelling collaborations of all time - between Ramanujan, the Indian prodigy, and the esteemed Cambridge mathematician G H Hardy. Hardy would later call their involvement "the one romantic incident" of his life.

"Ramanujan admitted mystery into his life, rather than being a hardened sceptic," says Complicite's founder and director, Simon McBurney. "One thinks of mathematics as having an implacable set of steps, arriving at a logical conclusion, but what is thrilling with Ramanujan is that all of the conclusions he came to were based on a mingled set of intuition, argument and instinct, for which sometimes he was not able to give any coherent account. Immediately, what that makes me think of is the mental activity of an artist or composer such as Mozart."

Ramanujan died when he was just 32 years old, leaving behind work that would prove more important over time than Hardy could ever have imagined, his paper on modular functions anticipating some of the ideas in contemporary string theory. His story is all the more consuming because it took place over such a brief period of time and had such simple origins. As well as the Complicite show, there are plans for a film about his life involving Stephen Fry.

As a writer, I have always been fascinated with the overlap between mathematics and mysticism - touched upon in Gifted, my own novel about a maths prodigy of Indian descent. The legend of Ramanujan has always baffled me, because, like with all the best stories, when I heard it as a teenager, I thought it had so much weird and wonderful masala that it had to be true. There are some things you can't make up. This article took me on a trip to Tamil Nadu, the southern Indian state where Ramanujan was born and spent the first two-thirds of his short life, to retrace some of his steps.

Srinivasa Ramanujan was born in 1887, and spent most of his childhood in a small town called Kumbakonam on the banks of the Cauvery River, about 170 miles from Madras (now Chennai). He was the son of a cloth merchant's clerk, and lived in a lean household with barely enough income to cover general subsistence, often going hungry. Today his childhood home still stands on a small market road in the main town, built in the local Agraharam Brahmin style and preserved without much fuss, simple signs labelling the empty rooms and thin turquoise pillars providing support. The bedroom, which faces the main street, is almost filled by a blocky rectangular bed up against a window that looks out on to a narrow strip of porch: the pyol where he is famed to have spent many hours working on his slate. Other than that, there is just one other room and a connecting kitchen, and then, out the back, a large old well for water and a small toilet - a sheltered hole in the ground.

Ramanujan's mother has been depicted as protective of her son but ambitious for him, and when he began to show promise in his chosen subject from a young age, she supported his interest, even after he flunked college and pursued his growing addiction to maths on his own. Later, living in rooms at Cambridge, Ramanujan would try to re-create his mother's home dishes with poor substitutes for fresh ingredients. It is easy to imagine her running quite a tight ship in this house, bringing her son hot-and-sour rasam soup to drink thirstily as he chalked up his ideas, wiping the slate clean and writing each round as a new mental "page", in the absence of funds for paper.

Just a few yards up the road, the Sarangapani temple towers over the street. This is another place where Ramanujan worked, in the shade of its great hall. From the outside, the temple's entrance is an ornate tetragonal structure, made up of 12 rows of deities and mortals of both sexes in various states of grace and revelry. Taut, curvaceous, peach-toned cheeks, trunks, bellies and excess limbs dominate the scene along with gilt-edged crowns, ornaments and thrones. Inside, a cavernous central hallway with an echoing sense of calm, dating to the 17th century. The roof is supported by large bunches of thin branches; geometric rows of grey pillars in quartz-like stone are etched with women in yogic poses, their smiles beatific. On the ground, kolam designs - dots linked by curved shapes in white rice flour. The inner sanctum where the deities are housed is a circular warren of shadowy corridors, to be approached only in a clockwise direction, in keeping with Hindu tradition.

As I get close to the presiding deity, inset behind two squat stone elephants and covered in beaten gold leaf, a row of men walk past in the dark, carrying a large piece of stone between them that's covered in pink silk. They are bare-chested, each man wearing a simple dhoti, the piece of white cotton wrapped economically around their legs. Behind them a priest carries a tray of lit diyas, small pinpoints of flame, stopping to wave his hand over the light and waft the holy aura towards any devotees in his path. I think about the intersection of Ramanujan's faith with his mathematics, the two disciplines coexisting and possibly co-dependent in his mind here in India - surely an interaction that would have been questioned once he left his home town to begin life among strangers.

Ramanujan was working as an accounts clerk at the Madras Port Trust in 1913 when he wrote to G H Hardy, considered to be one of the foremost mathematicians in the world at that time. "I am now about 23 [sic] years of age," said the letter. "I have had no university education but I have undergone the ordinary school course. After leaving school I have been employing the spare time at my disposal to work at mathematics. I have not trodden the conventional regular course which is followed in a university course but I am striking out a new path for myself."

The letter contained more than a hundred formulae and theorems, some of which were so bizarre that Hardy at first wondered if he was in dialogue with a prankster. Because of Ramanujan's lack of formal schooling, much of the mathematical language of his letter felt very peculiar to him: self-made, cut and stitched together in a seemingly haphazard way, littered with mistakes, and yet at times yielding what looked like extraordinary results, beyond anything Hardy had seen in his career up to that point. Most thrilling, and also causing him the most anxiety, there were no proofs. Defying the standard mathematician's practice of showing your workings, the theorems seemed instead to have materialised out of thin air.

This liberating aspect of the Ramanujan mythology - his ability to engage in freewheeling thought, as opposed to following the academic conventions espoused by Hardy and his peers - is an important part of A Disappearing Number. "Education is hugely influential in terms of our capacity to imagine and our capacity to learn," says McBurney. "But education can also inhibit, as it demands that you only think along certain lines. It is possible that your capacity for originality will diminish. Ramanujan thought, if you like, in all ways - many ways were possible for him and he didn't really care if he arrived at the result by the right path or not."

The port in Chennai is a long strip of confined space, crammed with cranes and internal transport systems, leading on from Marina beach in the Triplicane area, where Ramanujan used to go to walk by the sea. The current Port Trust administration building has the many-floored, off-white anonymity of a high-security government building. The beach itself so often visited by Ramanujan is supposed to be the second largest in the world.

I try to go and find the place where he lived when he wrote to Hardy, on Hanumantharaman Koil Street. I find myself on a residential road, tailing a guy with a vegetable cart in a cab with a restless driver. There is supposed to be a plaque on the house, but it is difficult to find. In and among all the new developments, I find a rickety old building covered in peeling orange paint, but still I can't see the plaque.

The cab driver is keen to get things going. He gets out and chats in Tamil to a guy who is sat on a folding chair in his front yard reading the paper, and then he comes back to the car. Before I know it, we are driving back to the main road and turning off in a wayward direction. Where are we going?

"I have found out who Ramanujan is," he says in a no-nonsense voice. "He is the deity at the temple two blocks away, and the priests who live round the corner, they're the ones to go and see."

"But I don't think so," I say, panicking. "He was a mathematician, you see . . . an academic . . ." My voice falters. The cab driver sighs impatiently.

"So then? He can still be their god, can't he?" he says. And, well . . . why not, I think, suddenly. Maybe I am being an idiot. Maybe Ramanujan is a deity here. Maybe that makes perfect retro active sense. What do I know? Why not engage in this kind of free association? Who knows where it will lead? But we never find the priests, or the temple.

After exchanging several letters with Rama nujan, Hardy managed to gather the funding to transport him over in 1914 and give him a room within the halls of his own college, Trinity, at Cambridge. It was a gamble that paid off in a creative partnership and friendship. The two men published papers jointly and collaborated throughout the First World War, giving birth together to the "circle method", a fundamental tool in analytic number theory. During his five years at Cambridge, Ramanujan would publish extensively on a wide range of topics: the dis tribution of prime numbers, hypergeometric series, elliptic functions, modular forms, probabilistic number theory, the theory of partitions and q-series, among others. He would write more than 30 papers, including seven with Hardy. This period would end with Hardy proposing Ramanujan as a fellow of the Royal Society as well as for a fellowship at Trinity. His proposals were accepted, in spite of opposition due to Ramanujan's ethnicity and youth.

Later in life, Hardy would name Ramanujan as his greatest discovery, rating him at 100 on a scale of one to 100 for mathematical prowess (and putting himself at 25), thereby making it clear that he "did not invent him. Like all great men, he invented himself."

In Chennai, I go to the university library to look at Ramanujan's original notebooks. I am not ready for how exciting it feels to handle the red books, feel the thick yellowing pages, see the neat letters and numbers written in blue, red and green ink. It is something to do with the handwriting, how it feels more emotive than ever to see a human scrawl in an age of the constantly printed word. Surely it must reveal something about his personality, I think. But of course, being no graphologist, I am unable to deduce anything, though I wonder how a graphologist would approach something that is written in almost exclusively mathematical lingo, as opposed to sentences of the kind of language we are used to reading.

As I flick through, I recognise only the basics: "magic squares", composite numbers, drawings of triangles and split circles. The books are full of unexplained formulae that are still studied today. The content feels like final versions rather than notebook workings, as crossing-out is quite rare. Each page is numbered neatly in the top right-hand corner, but the subject areas are very rarely labelled or defined in text.

Aside from maths and his relationship with Hardy, the gamble of bringing Ramanujan over to the UK had other side effects. A cultural specimen, known locally as the "Hindu calculator" by the preening Trinity elite, he lived an isolated life at Cambridge, far from his young wife and parents. He suffered over his dietary requirements - being of the Brahmin caste, he was a strict vegetarian at a time when fresh vegetables were more and more difficult to come by, due to the war but also to the general nature of the British diet. He found the cold climate particularly cruel, and tried to deal with it (and fulfil the need to appear "gentlemanly") by wearing heavy, ill-fitting suits that he purchased with the advance payment on his stipend, as opposed to the light dhotis he was accustomed to wearing in his homeland. After a few years, he fell ill, was diagnosed with tuberculosis (although later reports suggest that he was probably suffering from a kind of infection of the liver) and sank into depression. In 1918, Hardy was summoned to a London police station and told that Rama nujan had thrown himself on to the tracks at an Underground station, in an unsuccessful suicide attempt.

In A Disappearing Number, Ramanujan's sense of otherness becomes a recurrent theme of each of the stories we see unfolding on stage. Old meets new: we are presented with modern India, via the bustle of video, sound design and current-day characters. A hedge-fund analyst from America and a backpacker from Ealing, both of Indian origin, try to define their place in the "homeland". Meanwhile, Ramanujan dreams that he has the theta function in his stomach.

"I saw the idea of an equation and proof as a kind of story," says McBurney. "I felt that a story from any time and any age which deals with the same questions can carry the weight of what went on in Ramanujan's life. The reverberations and constants of those stories are to be found in any age, such as: where do you call home? What happens when you leave home? What is the consequence of your national upbringing? How do you believe in the world? And also, how difficult it is to communicate with another person."

We see aspects of the central narrative through various lenses. A maths layman tries to understand his lover's passion for numbers and eventually loses her when she goes on a journey to retrace Ramanujan's early life. "I am an actor playing Alex," says the man in question at the start. "And she is an actor playing Ruth. But the maths is real. It's terrifying, but real." After everything is gone, we are told, the mathematics is what is left. And indeed, when Alex loses Ruth, he is left with an important series of digits, a pattern of figures that carries extreme significance for him - her phone number. Locked by accident in the confined space of the lecture theatre where he first met her and actually asked for her number, he engages in a series of phone calls to try to keep hold of this code, even though she is gone. Faced with the infuriating geniality and exactitude of a voice from an Indian call-centre, he goes on a journey in which he has to confront the dark reaches of the unknown.

Ramanujan's references to his feeling that mathematics helped him in his attempts to understand the spiritual universe were difficult for Hardy, an avowed atheist. Ramanujan believed, for example, that zero represented "Absolute Reality", and that infinity represented the many manifestations of that reality. He once told a friend: "An equation for me has no meaning unless it expresses a thought of God." With touching emotion and unnerving disquietude, A Disappearing Number forces the spectator to consider the facts of love, death and belonging, within the space of his or her own personal universe. "With you, I can imagine what it is to find a single unifying theory," says a voice towards the end. "With you, I can imagine a place where being phosphate of calcium is enough."

"A Disappearing Number" by Complicite is at the Barbican, London EC1, from 5 September to 6 October. Info: http://www.barbican.org.uk

Nikita Lalwani's Booker-longlisted debut novel, "Gifted", is published by Viking (£16.99)

This article first appeared in the 27 August 2007 issue of the New Statesman, Bush: Is the president imploding?