Freeman Dyson was incapable of speaking a dull sentence. For more than 60 years, he was one of the world’s most accomplished living mathematical physicists, and in his later decades he earned a literary reputation as one of the few great scientists who wrote as clearly as he thought.

Before I first met him 16 years ago, I imagined that he would be a commanding figure with a voice to match. I was therefore surprised to shake hands with a physically small and slender man, formally dressed in a way that would have been fashionable in the 1950s. Although he had lived in the United States for more than five decades and been an American citizen since 1957, he spoke with a strong English accent, in a manner that was direct, unassuming and cautiously friendly. In his peremptory way, he told me: “I have only two talents—doing calculations and writing essays.”

In our subsequent conversations, he ventured far and wide across science, literature and politics, almost always taking a counterorthodox line, articulated with a bracing self-confidence, in language studded with aphorisms (this is partly why he was a dream interviewee). Often described as a contrarian, he preferred to think of himself as a rebel. When I put it to him that he would rather be interesting than right—a common description of him in Princeton circles—he replied “Yes, there is some truth in that.” After I quoted the late journalist Malcolm Muggeridge’s line that “Only dead fish swim with the sea,” Dyson painstakingly wrote it in a notebook, smiling broadly and muttering “I like it.”

Among Dyson’s favorite themes was the search for patterns. He loved to quote the famous maxim of the mathematician G.H. Hardy that mathematicians make enduring patterns out of ideas. For Dyson, science was about understanding the order in the natural world—the abstract patterns that underlie the workings of the universe. Even when he was considering complicated topics, he could not resist organizing them into a handful of neat categories (too neat, some would argue). Most famously, he classified leading physicists and mathematicians as either birds or frogs. For him, Einstein was the archetypal bird—flying high, surveying broad vistas out to the horizon—while Dyson regarded himself as a frog, hopping from one problem to another. He allowed few exceptions to his categories, but he did concede that his friend Richard Feynman was “a frog who wanted to be a bird.”

Dyson was born in Berkshire, England, in 1923 to well-off parents, his mother a law graduate, his father a well-known composer (later a knight). It was soon clear that Freeman was a mathematical prodigy. In later life, he recalled trying to calculate the sum of an infinite series of numbers when he was still sleeping in a cot. Dyson was only 17 years old when he began to study at Trinity College, Cambridge, where he was taught mainly 19th-century mathematics by several top-class practitioners, including Abram Besicovistch. It was Besicovistch, Dyson told me, who led him to regard mathematics as the art of problem-solving. After he graduated in 1943, he worked at the Royal Air Force’s Bomber Command, using mathematics to assist the military “to kill as many German civilians as possible,” as he later ruefully described it.

After the conflict, having understood that he was ill-equipped to shine in formidably abstract modern mathematics, he switched to theoretical physics, believing he could use his mathematical skill to address some of the challenges of making sense of a theory of electromagnetic interactions that is consistent with both quantum mechanics and Einstein’s basic theory of relativity. It was a wise move. At Birmingham University, the German-born theorist Rudolf Peierls became Dyson’s mentor. Dyson quickly became a star, and never studied for a Ph.D., a qualification that he regarded as worthwhile only for students destined to be college professors.

In the late 1940s and early 1950s, he made his most profound contribution to physics: he demonstrated that three versions of the quantum theory of electromagnetic interactions were equivalent, and that the theory could be used to make predictions of arbitrarily high accuracy. Of the four leading pioneers of this subject, only Dyson did not win a Nobel Prize, leading many of his peers to regard him as the most accomplished living theorist not to be given that honor. He denied that he was disappointed to have been passed over: “I didn’t deserve it,” he often told me.

Dyson had become “a big shot with a vengeance,” as he told his parents. He was soon bustling at the frontiers of theoretical physics with its quantum royalty, including Niels Bohr, Werner Heisenberg, Max Born and Paul Dirac. These conversations later furnished him with a rich store of anecdotes that enabled him to become an accomplished raconteur and an Olympic-class name-dropper.

By the time he was 29 years old, he had been elected Fellow of the Royal Society and had been appointed to the Faculty of the Institute for Advanced Study, recruited by its director Robert Oppenheimer. “I was thrilled to get a job at the Institute,” Dyson told me, “partly because I was not required to do any teaching.” Einstein was then an emeritus professor, but Dyson did not try to meet him and never regretted having done so. “He avoided us, and we avoided him,” he told me. Oppenheimer was “a good but undistinguished physicist,” in Dyson’s view, but had “a blind spot for mathematics” and a snobbish disdain for any physics he did not regard as fundamental. Plus, Dyson, thought, Oppenheimer was deeply unlikable: “You never knew where you were with him.” Oppenheimer made no secret of his disappointment when Dyson turned his attention away from particle physics towards other topics, less fashionable among their peers.

Dyson repeatedly demonstrated his prodigious talent for imaginative problem-solving and in a wide variety of fields, while continuing to do mathematics “as a recreation,” as he put it. Among his contributions to science, one of his favorites was the speculative idea that there might be solar systems in which a star is surrounded by a giant structure—a “Dyson Sphere”—that captures much of its power output. Using such a structure, an advanced civilization might prolong its existence in a universe heading towards heat death.

His inventiveness was underpinned by his breathtaking mathematical virtuosity and immense technical skill. Among his most impressive mathematical contributions was his work on random matrices (arrays of quantities of which at least some of the elements are random). These innovations have been successful in a wide range of topics from nuclear physics to neuroscience. Dyson’s imagination ventured far beyond physics. In the latter part of his career, he brought an unconventional perspective to the life sciences. This often landed him in trouble with leading experts, notably when he repeatedly dismissed computer models of the Earth’s climate and the growing consensus that climate change was a crisis for humanity.

Around 1970, before he was 50 years old, Dyson switched his focus from research to writing (“I just couldn’t keep up with the guys along the corridor,” he told me, modestly). In a style that was both silky and muscular, he wrote dozens of articles, many of them for the New York Review of Books, where his pieces often focused less on the books he was discussing than on his own experiences and perspectives on their subject matter.

He had no interest in writing definitive texts, but was most at home as the author of memoirs—first, the wonderfully entertaining Disturbing the Universe, published in 1979, and later the equally compelling Maker of Patterns, an autobiography told through selected letters he had written to family members (mostly his parents) over almost four decades, from 1941 to 1978. Published in 2018, its enthusiastic reception gave him enormous pleasure. It was a literary masterpiece, in my opinion, perhaps the first to be written by an author in their 90s.

I last spoke with Dyson in August 2019. He was sitting in his office, which was almost bare; almost all his books and papers had been taken away for cataloging. I feel like Ludwig Wittgenstein, he said, alluding to Dyson’s awkward visit in the late 1940s to the great philosopher’s study, where the bookshelves were “as empty as his ideas.” A few days before, Dyson had told me over lunch for the first time that he had “hated” Robert Oppenheimer. I was shocked to hear the good-natured Dyson admit to bearing a supposed friend such an intense dislike, especially as he often described even acquaintances as “friends.” To my surprise, he confirmed that “hatred” was indeed the right word, before he dropped the last zinger I was to hear him deliver: “I have spent my life befriending my enemies.”