This April, as undergraduates strolled along the street outside his modest office on the campus of the University of California, Los Angeles, the mathematician Terence Tao mused about the possibility that water could spontaneously explode. A widely used set of equations describes the behavior of fluids like water, but there seems to be nothing in those equations, he told me, that prevents a wayward eddy from suddenly turning in on itself, tightening into an angry gyre, until the density of the energy at its core becomes infinite: a catastrophic ‘‘singularity.’’ Someone tossing a penny into the fountain by the faculty center or skipping a stone at the Santa Monica beach could apparently set off a chain reaction that would take out Southern California.

This doesn’t tend to happen. And yet, Tao explained, nobody can say precisely why. It’s a decades-old conundrum, and Tao has recently been working on an approach to a solution — one part fanciful, one part outright absurd, like some lost passage from ‘‘Alice’s Adventures in Wonderland.’’

Imagine, he said, that someone awfully clever could construct a machine out of pure water. It would be built not of rods and gears but from a pattern of interacting currents. As he talked, Tao carved shapes in the air with his hands, like a magician. Now imagine, he went on, that this machine were able to make a smaller, faster copy of itself, which could then make another, and so on, until one ‘‘has infinite speed in a tiny space and blows up.’’ Tao was not proposing constructing such a machine — ‘‘I don’t know how!’’ he said, laughing. It was merely a thought experiment, of the sort that Einstein used to develop the theory of special relativity. But, Tao explained, if he can show mathematically that there is nothing, in principle, preventing such a fiendish contraption from operating, then it would mean that water can, in fact, explode. And in the process, he will have also solved the Navier-Stokes global regularity problem, which has become, since it emerged more than a century ago, one of the most important in all of mathematics.

Tao, who is 40, sat at a desk by the window, papers lying in drifts at the margins. Thin and unassuming, he was dressed in Birkenstocks, a rumpled blue-gray polo shirt and jeans with the cuffs turned up. Behind him, a small almond couch faced a glyph-covered blackboard running the length of the room. The couch had been pulled away from the wall to accommodate the beat-up Trek bike he rides to work. At the room’s other end stood a fiberboard bookcase haphazardly piled with books, including ‘‘Compactness and Contradiction’’ and ‘‘Poincaré’s Legacies, Part I,’’ two of the 16 volumes Tao has written since he was a teenager.

Fame came early for Tao, who was born in South Australia. An old headline in his hometown paper, The Advertiser, reads: ‘‘TINY TERENCE, 7, IS HIGH-SCHOOL WHIZ.’’ The clipping includes a photo of a diminutive Tao in 11th-grade math class, wearing a V-neck sweater over a white turtleneck, kneeling on his chair so he can reach a desk he is sharing with a girl more than twice his age. His teacher told the reporter that he hardly taught Tao anything, because Tao was always working two lessons ahead of the others. (Tao taught himself to read at age 2.)

A few months later, halfway through the school year, Tao was moved up to 12th-grade math. Three years later, at age 10, Tao became the youngest person in history to win a medal in the International Mathematical Olympiad. He has since won many other prizes, including a MacArthur ‘‘genius’’ grant and the Fields Medal, considered the Nobel Prize for mathematicians. Today, many regard Tao as the finest mathematician of his generation.

That spring day in his office, reflecting on his career so far, Tao told me that his view of mathematics has utterly changed since childhood. ‘‘When I was growing up, I knew I wanted to be a mathematician, but I had no idea what that entailed,’’ he said in a lilting Australian accent. ‘‘I sort of imagined a committee would hand me problems to solve or something.’’ But it turned out that the work of real mathematicians bears little resemblance to the manipulations and memorization of the math student. Even those who experience great success through their college years may turn out not to have what it takes. The ancient art of mathematics, Tao has discovered, does not reward speed so much as patience, cunning and, perhaps most surprising of all, the sort of gift for collaboration and improvisation that characterizes the best jazz musicians. Tao now believes that his younger self, the prodigy who wowed the math world, wasn’t truly doing math at all. ‘‘It’s as if your only experience with music were practicing scales or learning music theory,’’ he said, looking into light pouring from his window. ‘‘I didn’t learn the deeper meaning of the subject until much later.’’

**Possibly the greatest **mathematician since antiquity was Carl Friedrich Gauss, a dour German born in the late 18th century. He did not get along with his own children and kept important results to himself, seeing them as unsuitable for public view. They were discovered among his papers after his death. Before and since, the annals of the field have teemed with variations on this misfit theme, from Isaac Newton, the loner with a savage temper; to John Nash, the ‘‘beautiful mind’’ whose work shaped economics and even political science, but who was racked by paranoid delusions; to, more recently, Grigory Perelman, the Russian who conquered the Poincaré conjecture alone, then refused the Fields Medal, and who also allowed his fingernails to grow until they curled.

Tao, by contrast, is, as one colleague put it, ‘‘super-normal.’’ He has a gentle, self-deprecating manner. He eschews job offers from prestigious East Coast institutions in favor of a relaxed, no-drama department in a place where he can enjoy the weather. In class, he conveys a sense that mathematics is fun. One of his students told me that he had recently joked with another about the many ways Tao defies all the Hollywood mad-genius tropes. ‘‘They will never make a movie about him,’’ he said. ‘‘He doesn’t have a troubled life. He has a family, and they seem happy, and he’s usually smiling.’’

This can be traced to his own childhood, which he experienced as super-normal, even if, to outside eyes, it was anything but. Tao’s family spent most of his early years living in the foothills south of Adelaide, in a brick split-level with views of Gulf St. Vincent. The home was designed by his father, Billy, a pediatrician who immigrated with Tao’s mother, Grace, from Hong Kong in 1972, three years before Tao, the eldest of three, was born in 1975. The three boys — Nigel, Trevor and ‘‘Terry,’’ as everyone calls him — often played together, and a favorite pastime was inventing board games. They typically appropriated a Scrabble board for a basic grid, then brought in Scrabble tiles, chess pieces, Chinese checkers, mah-jongg tiles and Dungeons & Dragons dice, according to Nigel, who now works for Google. For story lines, they frequently drew from video games coming out at the time, like Super Mario Bros., then added layers of complex, whimsical rules. (Trevor, a junior chess champion, was too good to beat, so the boys created a variation on that game as well: Each turn began with a die roll to determine which piece could be moved.) Tao was a voracious consumer of fantasy books like Terry Pratchett’s Discworld series. When a class was boring, he doodled intricate maps of imaginary lands.

By the spring of 1985, with a 9-year-old Tao splitting time between high school and nearby Flinders University, Billy and Grace took him on a three-week American tour to seek advice from top mathematicians and education experts. On the Baltimore campus of Johns Hopkins, they met with Julian Stanley, a Georgia-born psychologist who founded the Center for Talented Youth there. Tao was one of the most talented math students Stanley ever tested — at 8 years old, Tao scored a 760 on the math portion of the SAT — but Stanley urged the couple to keep taking things slow and give their son’s emotional and social skills time to develop.

Even at a relatively deliberate pace, by age 17, Tao had finished a master’s thesis (‘‘Convolution Operators Generated by Right-Monogenic and Harmonic Kernels’’) and moved to Princeton University to start on his Ph.D. Tao’s application to the university included a letter from Paul Erdos, the revered Hungarian mathematician. ‘‘I am sure he will develop into a first-rate mathematician and perhaps into a really great one,’’ read Erdos’s brief, typewritten note. ‘‘I recommend him in the highest possible terms.’’ Yet on arrival, it was Tao, the teenage prodigy, who was intimidated. During Tao’s first year, Andrew Wiles, then a Princeton professor, announced that he proved Fermat’s Last Theorem, a legendary problem that had gone unsolved for more than three centuries. Tao’s fellow graduate students spoke eloquently about mathematical fields of which he had barely heard.

Tao became notorious for his nights haunting the graduate computer room to play the historical-simulation game Civilization. (He now avoids computer games, he told me, because of what he calls a ‘‘completist streak’’ that makes it hard to stop playing.) At a local comic-book store, Tao met a circle of friends who played ‘‘Magic: The Gathering,’’ the intricate fantasy card game. This was Tao’s first real experience hanging out with people his age, but there was also an element, he admitted, of escaping the pressures of Princeton. Gifted children often avoid challenges at which they might not excel. Before Tao went to Princeton, his grades had flagged at Flinders. In a course on quantum physics, the instructor told the class that the final would include an essay on the history of the field. Tao, then 12, blew off studying, and when he sat down for the exam, he was stunned to discover that the essay would count for half the grade. ‘‘I remember crying,’’ Tao said, ‘‘and the proctor had to escort me out.’’ He failed.

At Princeton, crisis came in the form of the ‘‘generals,’’ a wide-ranging, arduous oral examination administered by three professors. While other students spent months working through problem sets and giving one another mock exams, Tao settled on his usual test-prep strategy: last-minute cramming. ‘‘I went in and very quickly got out of my depth,’’ he said. ‘‘They were asking questions which I had no ability to answer.’’ Immediately after, Tao sat with his adviser, Elias Stein, and felt that he had let him down. Tao wasn’t really trying, and the hardest part was yet to come.

The true work of the mathematician is not experienced until the later parts of graduate school, when the student is challenged to create knowledge in the form of a novel proof. It is common to fill page after page with an attempt, the seasons turning, only to arrive precisely where you began, empty-handed — or to realize that a subtle flaw of logic doomed the whole enterprise from its outset. The steady state of mathematical research is to be completely stuck. It is a process that Charles Fefferman of Princeton, himself a onetime math prodigy turned Fields medalist, likens to ‘‘playing chess with the devil.’’ The rules of the devil’s game are special, though: The devil is vastly superior at chess, but, Fefferman explained, you may take back as many moves as you like, and the devil may not. You play a first game, and, of course, ‘‘he crushes you.’’ So you take back moves and try something different, and he crushes you again, ‘‘in much the same way.’’ If you are sufficiently wily, you will eventually discover a move that forces the devil to shift strategy; you still lose, but — aha! — you have your first clue.

As a group, the people drawn to mathematics tend to value certainty and logic and a neatness of outcome, so this game becomes a special kind of torture. And yet this is what any would-be mathematician must summon the courage to face down: weeks, months, years on a problem that may or may not even be possible to unlock. You find yourself sitting in a room without doors or windows, and you can shout and carry on all you want, but no one is listening.

**Within his field, **Tao is best known for a proof about a remarkable set of numbers known as the primes. The primes are the whole numbers larger than 1 that can be divided evenly by only themselves and 1. Thus, the first few primes are 2, 3, 5, 7 and 11. The number 4 is not a prime because it divides evenly by 2; the number 9 fails because it can be divided by 3. Prime numbers are fundamental building blocks in mathematics. Like the chemical elements, they combine to form a universe. To a chemist, water is two atoms of hydrogen and one of oxygen. Similarly, in mathematics, the number 12 is composed of two ‘‘atoms’’ of 2 and one ‘‘atom’’ of 3 (12 = 2 x 2 x 3).

The primes are elementary and, at the same time, mysterious. They are a result of simple logic, yet they seem to appear at random on the number line; you never know when the next one will occur. They are at once orderly and disorderly. They have been incorporated into mysticism and religious ritual and have inspired works of music and even an Italian novel, ‘‘The Solitude of Prime Numbers.’’ It is easy to see why mathematicians consider the primes to be one of the universe’s foundations. From counting, you can develop the concept of number, and then, quite naturally, the basic operations of arithmetic: addition, subtraction, multiplication and division. That is all you need to spot the primes — though, eerily, scientists have uncovered deep connections between primes and quantum mechanics that remain unexplained. Imagine that there is an advanced civilization of aliens around some distant star: They surely do not speak English, they may or may not have developed television, but we can be almost certain that their mathematicians have discovered the primes and puzzled over them.

Tao’s work is related to the twin-prime conjecture, which the French mathematician Alphonse de Polignac suggested in 1849. Go up the number line, circling the primes, and you may notice that sometimes a pair of primes is separated by just 2: 5 and 7, 11 and 13, 17 and 19. These are the ‘‘twin primes,’’ and as the journey along the number line continues, they occur less frequently: 2,237 and 2,239 are followed by 2,267 and 2,269; after 31,391 and 31,393, there isn’t another pair until you reach 31,511 and 31,513. Euclid devised a simple, beautiful proof showing that there is an infinite number of primes. But what of the twin primes? As far as you go on the number line, will there always be another set of twins? The conjecture has roundly defeated all attempts at proving it.

When mathematicians face a question they cannot answer, they sometimes devise a less stringent question, in the hope that solving it will provide insights. This is the path that Tao took in 2004, in collaboration with Ben Green of Oxford. Twins are two primes that are separated by exactly 2, but Green and Tao considered a looser definition, strings of primes separated by a constant, be it 2 or any other number. (For example, the primes 3, 7 and 11 are separated by the constant 4.) They sought to prove that no matter how long a string someone found, there would always be another longer string with a constant gap between its primes. That February, after some initial conversations, Green came to visit Tao at U.C.L.A., and in just two exhilarating months, they completed what is now known as the Green-Tao theorem. It could be a way point on the path to the twin-prime conjecture, and it forged deep connections between disparate areas of math, helping establish an interdisciplinary area called additive combinatorics. ‘‘It opened a lot of new directions in research,’’ says Izabella Laba, a University of British Columbia mathematician who has worked with Tao. ‘‘It gave a lot of people a lot of things to do.’’

This sort of collaboration has been a hallmark of Tao’s career. Most mathematicians tend to specialize, but Tao ranges widely, learning from others and then working with them to make discoveries. Markus Keel, a longtime collaborator and close friend, reaches to science fiction to explain Tao’s ability to rapidly digest and employ mathematical ideas: Seeing Tao in action, Keel told me, reminds him of the scene in ‘‘The Matrix’’ when Neo has martial arts downloaded into his brain and then, opening his eyes, declares, ‘‘I know kung fu.’’ The citation for Tao’s Fields Medal, awarded in 2006, is a litany of boundary hopping and notes particularly ‘‘beautiful work’’ on Horn’s conjecture, which Tao completed with a friend he had played foosball with in graduate school. It was a new area of mathematics for Tao, at a great remove from his known stamping grounds. ‘‘This is akin,’’ the citation read, ‘‘to a leading English-language novelist suddenly producing the definitive Russian novel.’’

The Green-Tao theorem on primes was a similar collaboration. Green is a specialist in an area called number theory, and Tao originally trained in an area called harmonic analysis. Yet, as they told me, the proof depended on the insights of many other mathematicians. In the game of devil’s chess, players have no real hope if they haven’t studied the winning games of the masters. A proof establishes facts that can be used in subsequent proofs, but it also offers a set of moves and strategies that forced the devil to submit — a devious way to pin one of his pieces or shut down a counterattack, or an endgame move that sacrifices a bishop to gain a winning position. Just as a chess player might examine variations of the Ruy Lopez and King’s Indian Defense, a mathematician might study particularly clever applications of the Chinese remainder theorem or the sieve of Eratosthenes. The wise player has a vast repertoire to draw on, and the crafty player intuits the move that suits the moment.

For their work, Tao and Green salvaged a crucial bit from an earlier proof done by others, which had been discarded as incorrect, and aimed at a different goal. Other maneuvers came from masterful proofs by Timothy Gowers of England and Endre Szemeredi of Hungary. Their work, in turn, relied on contributions from Erdos, Klaus Roth and Frank Ramsey, an Englishman who died at age 26 in 1930, and on and on, into history. Ask mathematicians about their experience of the craft, and most will talk about an intense feeling of intellectual camaraderie. ‘‘A very central part of any mathematician’s life is this sense of connection to other minds, alive today and going back to Pythagoras,’’ said Steven Strogatz, a professor of mathematics at Cornell University. ‘‘We are having this conversation with each other going over the millennia.’’

The Green-Tao theorem caught the mathematical community by surprise, because that problem was thought to be many years from succumbing to proof. On the day I visited Tao, we ate lunch on the outdoor patio of the midcentury-modern faculty center. Working on a modest plate of sushi, Tao told me that he and Green have continued to work around the margins of the twin-prime conjecture, as have others, with a lot of success recently. It is his sense, he said, that a proof is close at hand, more than a century and half after it was first articulated. ‘‘Maybe 10 years,’’ he said.

**It was dinnertime** when I headed to Tao’s home, a white-and-tan five-bedroom on the western edge of campus. Tao was originally going to take his 12-year-old son, William, to a piano lesson, but William had received a callback for a Go-Gurt commercial. (He has already been in a Honda ad, in which he played the role of ‘‘boy who sleeps contentedly in the back seat.’’) While Tao’s wife, Laura, ferried William home, their daughter, Maddy, 4, finished her meal at an island in their spacious kitchen. She took a bite of her dessert — a cronut — and then clambered down her stool and began running from room to room, arms raised, squealing with delight.

Tao has emerged as one of the field’s great bridge-builders. At the time of his Fields Medal, he had already made discoveries with more than 30 different collaborators. Since then, he has also become a prolific math blogger with a decidedly non-Gaussian ebullience: He celebrates the work of others, shares favorite tricks, documents his progress and delights at any corrections that follow in the comments. He has organized cooperative online efforts to work on problems. ‘‘Terry is what a great 21st-century mathematician looks like,’’ Jordan Ellenberg, a mathematician at the University of Wisconsin, Madison, who has collaborated with Tao, told me. He is ‘‘part of a network, always communicating, always connecting what he is doing with what other people are doing.’’

In my visit with Tao, I noticed only one way in which he conforms to the math-professor stereotype: an absent-mindedness that dates to his childhood. When he was a boy, he constantly lost books, even his book bag; he put clothes on backward or inside out, or he neglected to put on both socks. (This is why he wears Birkenstocks now. ‘‘One less step,’’ he explained.) As he showed me around the house, his gait was a bit awkward, as if, at some level, he was just not that interested in walking. I asked to see his office, and he pointed out an unremarkable chamber off a back hallway. He doesn’t get as much done there as he used to, he said; recently, he has been most productive on flights, when he has a block of hours away from email and all the people who hope for an audience with him.

After William arrived home, with Laura trailing behind, we sat down for dinner: pork chops in tomato sauce, a recipe taken from a handwritten collection, its notebook cover emblazoned with a teddy bear, that Laura received as a gift from Tao’s mother. William was gregarious. The Go-Gurt callback went well. (He eventually got the part.) William has some of his father’s natural facility for mathematics — as a sixth grader, he took an online course in precalculus — but his real passions at the moment are writing, particularly fantasy, and acting, particularly improv. He was also heavy into Minecraft, though he was annoyed because he was having trouble updating his hacks. Once, he said, he and a friend tried to hack math itself by proving that 1 equals 0, but then realized that it is forbidden to divide by 0. Tao rolled his eyes.

An effort to prove that 1 equals 0 is not likely to yield much fruit, it’s true, but the hacker’s mind-set can be extremely useful when doing math. Long ago, mathematicians invented a number that when multiplied by itself equals negative 1, an idea that seemed to break the basic rules of multiplication. It was so far outside what mathematicians were doing at the time that they called it ‘‘imaginary.’’ Yet imaginary numbers proved a powerful invention, and modern physics and engineering could not function without them.

Early encounters with math can be misleading. The subject seems to be about learning rules — how and when to apply ancient tricks to arrive at an answer. Four cookies remain in the cookie jar; the ball moves at 12.5 feet per second. Really, though, to be a mathematician is to experiment. Mathematical research is a fundamentally creative act. Lore has it that when David Hilbert, arguably the most influential mathematician of *fin de siècle* Europe, heard that a colleague had left to pursue fiction, he quipped: ‘‘He did not have enough imagination for mathematics.’’

Math traffics in abstractions — the idea, for example, that two apples and two oranges have something in common — but much of Tao’s work has a tangible aspect. He is drawn to waves of fluid or light, or things that can be counted, or geometries that you might hold in your mind. When a question does not initially appear in such a way, he strives to transform it. Early in his career, he struggled with a problem that involved waves rotating on top of one another. He wanted to come up with a moving coordinate system that would make things easier to see, something like a virtual Steadicam. So he lay down on the floor and rolled back and forth, trying to see it in his mind’s eye. ‘‘My aunt caught me doing this,’’ Tao told me, laughing, ‘‘and I couldn’t explain what I was doing.’’

Tao’s most recent work in exploding water began when a professor from Kazakhstan claimed to have completed a Navier-Stokes proof. After looking at it, Tao felt sure that the proof was incorrect, but he decided to take this intuition a step further and show that any proof using the professor’s approach was sure to fail. While he was wading through the proof, asking colleagues for help in translating the explanatory text from the original Russian, he struck upon the notion of his imaginary, self-replicating water contraption — drawing on ideas from engineering to make progress on a question in pure mathematics.

The feat is as much psychological as mathematical. Many people think that substantial progress on Navier-Stokes may be impossible, and years ago, Tao told me, he wrote a blog post concurring with this view. Now he has some small bit of hope. The twin-prime conjecture had the same feel, a sense of breaking through the wall of intimidation that has scared off many aspirants. Outside the world of mathematics, both Navier-Stokes and the twin-prime conjecture are described as problems. But for Tao and others in the field, they are more like opponents. Tao’s opponent has been known to taunt him, convincing him that he is overlooking the obvious, or to fight back, making quick escapes when none should be possible. Now the opponent appears to have revealed a weakness. But Tao said he has been here before, thinking he has found a way through the defenses, when in fact he was being led into an ambush. ‘‘You learn to get suspicious,’’ Tao said. ‘‘You learn to be on the lookout.’’

This is the thrill of it, and the dread. There is a shifting beneath the ground. The game is afoot.