Mathematics June 2026 7 min read
The “Useless” Math That Now Guards Every Secret on Earth
G. H. Hardy prized number theory precisely because no one could use it. He died in 1947 certain it would never serve war or commerce. Thirty years later it became the cryptography guarding nearly every secret on earth.
Cambridge, the late 1930s. A man in his sixties refuses to own a watch, will not catch his face in a mirror, carries an umbrella under a clear sky to trick the weather into staying fine, and writes, with something close to a sneer, that the mathematics he loves has never done and never will do the smallest harm to the world. Godfrey Harold Hardy meant it as praise. The purest of subjects, he argued, were beautiful precisely because they were good for nothing. Usefulness was a stain that lesser work wore. He spent a long career keeping his own hands clean of it.
The boast lives in A Mathematician’s Apology, the slim book he published in 1940, near the end, when, as his friend C. P. Snow later put it in the foreword, the creative power had gone and Hardy knew it. It is a melancholy performance dressed as defiance. He splits mathematics into the trivial-and-useful and the deep-and-useless, and plants his flag in the second territory. Real mathematics, he insists, has no effect on war. A number theorist could sleep soundly, his conscience as untroubled as his arithmetic, having built nothing a general or a banker could ever pick up and wield.
The pride of the useless
It is worth pausing on how strange this pride is. Most disciplines apologize for being useless; Hardy weaponized it. The aesthetic behind it was real and exacting. He ranked theorems the way a critic ranks sonnets, prizing economy, inevitability, and a kind of austere surprise. Euclid’s proof that the primes never run out, the Pythagorean proof that the square root of two cannot be written as a fraction: these he held up as permanent, the marble of the mind. But the aesthetic carried a moral charge. To be useful was to be conscripted. He had watched mathematics drafted into ballistics during the First World War, and he wanted no part of a beauty that could be melted down for ordnance.
There was vanity in it, and Hardy half-knew. The Apology is honest about the smallness of its own consolations, a man explaining, at the close, why the life he chose was worth choosing. But the central claim he advanced without irony: the deeper the theorem, the further it stood from the marketplace and the magazine of war. Number theory was his exhibit A. Primes, factorization, the distribution of those stubborn indivisible integers, what could be more gloriously remote from human use than asking which numbers refuse to be broken apart?
What the primes became
Now the turn, and it is a cruel one. In 1977, three decades after Hardy died in 1947, Ronald Rivest, Adi Shamir, and Leonard Adleman published the RSA cryptosystem at MIT. Its entire security rests on one fact from the most useless corner of Hardy’s garden: multiplying two large primes is easy, and recovering them from the product is, for numbers of a few hundred digits, effectively impossible with the machines we have. The asymmetry Hardy admired as pure ornament became a lock. Factoring, the schoolchild’s curiosity, turned out to be among the hardest doors in the world to pick.
“I have never done anything useful.”— G. H. Hardy, A Mathematician’s Apology (1940)
Read that line now and it scans as prophecy in reverse. The theory of numbers serves every purpose, warlike and otherwise. Every time a browser shows a padlock, every encrypted message, every signed software update, every bank transfer and intercepted cable rides on the difficulty of problems Hardy chose precisely because no one could think of a use for them. The Diffie-Hellman key exchange of 1976 leans on the discrete logarithm; elliptic-curve cryptography, now the quiet workhorse inside billions of phones, draws on arithmetic geometry that would have struck Hardy as the purest of the pure. His useless garden became the perimeter fence of the digital world.
The indecency of usefulness
What do we make of a man so completely, so instructively wrong? The easy reading is that he was naive, that no mathematics is safe from application, that the wall he built between beauty and use was always going to fall. True enough, and the history is littered with such collapses. Riemann’s geometry idled for fifty years until Einstein needed it; Boole’s algebra waited almost a century for the logic gate; matrix mechanics, group theory, the lot. Pure thought has a long habit of arriving early to a party no one has yet announced. Hardy of all people, who proved theorems with Srinivasa Ramanujan whose uses he never imagined, might have suspected the pattern.
But the harder reading is the one Hardy half-saw and could not bear to finish. His instinct was not foolish; it was tragic. He sensed, correctly, that to make a thing useful is to hand it over, to surrender control of what it becomes and whom it serves. The same prime-factoring asymmetry that shields a dissident’s messages also hides a ransom demand; the same elliptic curve that secures a vaccine record also armors a black market. Usefulness is not a virtue a theorem possesses. It is a relation the world imposes, after the fact, without the mathematician’s consent and usually after his death.
Usefulness is not a virtue a theorem holds; it is a fate.
So the indecency Hardy felt was real; he only misnamed it. He thought uselessness kept his work innocent. What it actually kept was his work free, free for a while of the demand that it justify itself by serving. The cruelty is that freedom and innocence are not the same thing, and time dissolves the difference between them. Every beautiful useless idea is a deferred application waiting for its century. Hardy’s garden was not a refuge from the world; it was the world’s future, growing quietly, mislabeled as ornamental.
He died believing he had built nothing that could be picked up and wielded, and in that one conviction sits the whole comedy and grief of pure inquiry. The number theorist who took fierce pride in serving no one now serves, anonymously and without rest, nearly everyone alive. His Apology was meant to defend a useless life. It stands instead as the most eloquent confession we have of how little any of us governs the uses our beauty is put to, and of how the world will always, in the end, find the lock that fits a key we cut for no reason at all.