THE MAN WHO KNEW INFINITY: A Life of the Genius Ramanujan. By Robert Kanigel. Macmillan. 438 pages. $27.95. ONE OF the quickest ways to kill a conversation is to say that one is a mathematician; and one of the surest ways to produce glazed expressions is to actually discuss mathematics.

Thus Baltimorean Robert Kanigel has set himself a formidable challenge, since he writes about a mathematician and necessarily discusses his mathematics.

In January 1913, G.H. Hardy, a prominent English mathematician, received a letter from Scrinivasa Ramanujan, an obscure 23-year-old clerk living in Madras, India. Ramanujan sought Hardy's advice and included some of his own mathematical results in the letter. Hardy was the third mathematician Ramanujan had written but the first to look closely at the mathematics. What he found profoundly affected the lives of both men.

The author arrives at the 1913 letter only in Chapter 5, after devoting the first four chapters to the lives of Hardy and Ramanujan to that point, and the contrast between the educational opportunities open to both men makes Ramanujan's achievements even more the remarkable. In particular, Ramanujan's development was shaped by an English text which listed mathematical formulas without giving motivations or proofs. He took that abbreviated style as a model and completed several notebooks filled with his own creations, some of which he copied in his letter.

Hardy had to decide first if there was anything new in Ramanujan's results. Since he was a proponent of rigorous argument and Ramanujan presented little or no justification for his assertions, Hardy worried that the letter could even have been an elaborate hoax.

Hardy sought advice from a long-time collaborator, J. E. Littlewood. The two men soon realized that their Indian correspondent possessed a formidable mathematical talent. Hardy replied to Ramanujan with detailed questions about some of his equations and soon began laying the groundwork for Ramanujan to come to Cambridge University.

To say that Ramanujan subsequently went from South Indian obscurity to Cambridge fame is a bit like saying that Mozart went from Salzburg to Vienna and composed music. One needs considerably more context to put the genius into perspective.

Kanigel provides that context, weaving together the cultural threads of Ramanujan's Brahmin beliefs with the intellectual and physical ambience of pre-1920 Cambridge University. He also gives a real sense of Ramanujan's creative compulsion which, like Mozart's, contained the seeds of both success and tragedy. Both mathematical and musical composition require a balance of technical skills with informed imagination, and they both require an audience. The difference is that one can hear Mozart's music without reading the score, but one has to understand at least some mathematical notation to appreciate Ramanujan's results.

The author has done a commendable job of explaining some of the ideas that so impressed Hardy. The mathematically illiterate reader should resist the temptation to glaze over his explanations. The ideas are an integral part of the story and essential to understanding the impact of Ramanujan's work on modern mathematics.

In fact, because of Ramanujan's novel approach and idiosyncratic notation, mathematicians are still mining his notebooks for gems in the fields of number theory and combinatorial analysis.

However, this is by no means a textbook, and Ramanujan's absorption with mathematics is presented from a very human perspective. We see how he loses himself in mathematics to the point of failing examinations in other subjects, and how he works at all hours on ideas that have captivated him.

Even when hospitalized in England with the tuberculosis that eventually killed him, Ramanujan remained the consummate professional. For example, during one bedside visit Hardy commented that his cab was No. 1729, a most uninteresting number. On the contrary, replied Ramanujan; it's the smallest number that can be represented in two different ways as the sums of two cubes of integers.

Late in the book, Kanigel describes Ramanujan's return to India in 1919 and his death at the age of 33 one year later. He also chronicles Ramanujan's continuing effect on Indian intellectual circles and on Hardy as well. In fact, the book is almost as much about Hardy as it is about Ramanujan.

The author's research was thorough, and he provides the right amount of political and cultural context for his story. Although his attempts at possible first-person musings occasionally seem a bit contrived, the results are credible and are usually supported by cited sources. All in all, this is an accessible look at an almost romantic episode in the enormously rich intellectual world of mathematics.

A. O. Pittenger is dean of arts and sciences and professor of mathematics at the University of Maryland Baltimore County.