Galois, the night before the duel: the math of symmetry
On 29 May 1832, Galois scribbled down his ideas, knowing he might not live past dawn. They solved a 300-year-old problem and now protect Wi-Fi and fix QR codes.

Mục lục
The night of 29 May 1832
Paris, the night of 29 May 1832. A 20-year-old sits writing by candlelight. The next morning he will stand twenty-five paces from another man, each holding a pistol. He knows he may not survive the morning.
Yet most of what he wrote that last night was not farewell letters. It was mathematics.
The young man was Évariste Galois. He wrote a long letter to his close friend Auguste Chevalier, summarizing what he had discovered over the past few years. He went over his manuscripts, correcting here, adding a note there. In the margin of one page he wrote: “There is something to complete in this proof. I do not have the time.”[1]
On the morning of 30 May, Galois was shot in the abdomen. He passed away the next day, 31 May 1832, aged 20.
Fourteen years later, when those hastily written pages were finally printed, mathematicians realized they answered a question that had defeated them for three centuries. More than that, they opened an entirely new way of thinking about mathematics: the study of symmetry. Today that way of thinking is in the Rubik’s cube, in particle physics, and in the encryption algorithm protecting your Wi-Fi password.
This is the fourth article in a series on mathematicians. By the end you will see what that three-century question was, and why an idea born on the night before he passed away is now in every phone.
A three-century question
At school, everyone learns the formula for the roots of the quadratic equation :
The formula uses only addition, subtraction, multiplication, division and roots applied to the coefficients. We say the quadratic is solvable by radicals. The idea is very old: the Babylonians solved equivalent problems almost four thousand years ago.
The cubic is much harder. Only in the 16th century did Italian mathematicians find a formula, after a story full of disputes, secrecy and public challenges. In 1545, Gerolamo Cardano published the formula for the cubic, and his student Lodovico Ferrari found one for the quartic. Both formulas are long and messy, but still use only addition, subtraction, multiplication, division and roots.
Everyone assumed the next step was the quintic. For nearly three hundred years, Europe’s greatest minds tried to find a formula for equations of degree five. Nobody succeeded.
In the early 19th century the answer began to emerge, and it was a surprising one: there is no formula. In 1824 the young Norwegian mathematician Niels Henrik Abel proved that no general formula using radicals exists for every quintic equation. Abel passed away from tuberculosis in 1829, at only 26.
But Abel’s proof left a bigger question. Some specific quintic equations can still be solved by radicals; for example has the root . So which equations can be solved, and which cannot? Is there a way to look at an equation and know right away?
Galois answered that question.
A life full of rejections
Évariste Galois was born in 1811 in Bourg-la-Reine, near Paris. His father was the town’s mayor. Only at 15 did Galois truly encounter mathematics, and he was immediately absorbed. He read the works of Lagrange and Legendre like novels, and all but neglected every other subject.
But Galois’s life was a series of rejections[1]:
- He sat the entrance exam for the École Polytechnique, the most prestigious mathematical school in France, twice, and failed both times. The second attempt came just weeks after his father took his own life after being slandered by political opponents.
- In 1829 he sent his first results to the Academy of Sciences, via Augustin-Louis Cauchy. The manuscript was not published.
- In 1830 he submitted an entry for the Academy’s Grand Prize. It went to Joseph Fourier, the Academy’s secretary. Fourier passed away a few weeks later, and the manuscript was lost.
- In 1831, at the invitation of Siméon Denis Poisson, he sent a rewritten version. That July, Poisson reported that the argument was “neither sufficiently clear nor sufficiently developed to allow us to judge its rigour”, and recommended against publication.
During the same years, Galois threw himself into politics. He was an ardent republican in a France that had just been through the revolution of 1830. He was expelled from the École Normale for writing a letter attacking its director, was arrested twice, and spent months in prison.
Then came the duel. To this day nobody knows for certain the cause, or who the opponent was. One theory involves a woman; another holds it was a political plot. According to accounts, his last words to his younger brother Alfred were: “Don’t cry, Alfred! I need all my courage to leave this world at twenty.”
The idea: look at the symmetry of the roots
Galois did not try to find a formula. He asked a completely different question: in what ways can the roots of an equation swap places without anyone noticing?
An easy example. The equation has two roots, and . These two roots are “alike” in a deep sense. Every algebraic relation with rational coefficients that one root satisfies, the other satisfies too. For example, its square is 2. If someone secretly swapped the two roots, no rational equation could detect it. We say that swap is a symmetry of the equation.
Think of a square. You can rotate it by 90°, 180° or 270°, or flip it across four axes, and it looks exactly the same. Counting “do nothing”, a square has exactly 8 symmetries. A non-square rectangle has only 4. A lopsided triangle has just 1. The number of symmetries, and how they combine with each other, says a great deal about a shape.
Galois did the same with the roots of an equation. The set of all the “undetectable” swaps forms a structure he called a group (groupe). He was the first to use the word in today’s mathematical sense. Today it is called the Galois group of the equation.
His key discovery: an equation is solvable by radicals if and only if its symmetry group can be “taken apart” into a chain of simple pieces, in a precise mathematical sense. Such groups are now called solvable groups. The name says it all.
For equations of degree two, three and four, the symmetry groups can always be taken apart, so there is always a formula. For the “general” quintic, the symmetry group contains all permutations of the five roots, and that group cannot be taken apart in the required way. So there is no general formula. Abel’s theorem now had a deeper explanation. Galois did not just say “there is no formula”; he showed why, and gave a way to test each specific equation.
Fourteen years of silence
After Galois passed away, his brother Alfred and his friend Chevalier copied out the manuscripts and sent them to leading mathematicians, as the last letter had asked: to give their opinion “not on the truth, but on the importance” of the theorems.
Nobody replied.
Only in 1843 did the mathematician Joseph Liouville read the manuscripts carefully and recognize their value. In 1846 he printed Galois’s works in the mathematics journal he edited[3]. Over the following decades, group theory gradually became one of the pillars of modern mathematics.
Where is the idea today?
The quintic question itself hardly interests anyone today: computers find approximate roots of any equation in an instant. What remains are two much larger legacies: group theory, the mathematics of symmetry, and Galois fields.
The Rubik’s cube and crystals
The Rubik’s cube is a miniature “Galois group” you can hold in your hand. Each turn is a rearrangement of the little squares. Combining turns is “multiplying” elements of the group. The 3×3 cube has about 43 quintillion different states (43,252,003,274,489,856,000). Algorithms for solving the cube, including the proofs that every state can be solved in at most 20 turns, rest on group theory.
In nature, scientists use group theory to classify crystals. Every repeating arrangement of atoms in three-dimensional space falls into exactly 230 symmetry types, a number computed with group theory. In particle physics, the Standard Model describing nature’s particles and forces is also built in the language of symmetry groups.
Your Wi-Fi password
Galois also studied a strange kind of “number system”: finite sets of numbers in which you can still add, subtract, multiply and divide as with ordinary numbers, and every result stays inside the set. Today they are called finite fields, or Galois fields, written , the G standing for Galois.
The Galois field has exactly 256 elements, a perfect fit for the 256 values of a byte in a computer. This is not just a fun coincidence; it is useful. AES, the encryption standard chosen by the US government in 2001 that now protects most Wi-Fi connections, HTTPS websites and the data on your phone, scrambles data using multiplication in [4]. Every time you type your Wi-Fi password, your phone performs millions of calculations in the “number system” of a young man who passed away in 1832.

QR codes that still scan when scratched
You may have noticed: a QR code that is dirty, torn at a corner, or has a logo printed over its middle still scans fine. The reason is that a QR code carries extra “redundant” data for error correction, computed with Reed–Solomon codes. Reed–Solomon codes are built on arithmetic in the Galois field . The same kind of code lets a scratched CD still play music, and lets space probes send pictures back to Earth across billions of kilometers of noise.
Multiply in a Galois field yourself
The Python below implements addition and multiplication in exactly as in the AES standard. Each number from 0 to 255 is treated as a polynomial of degree at most 7 with coefficients 0 or 1 (its 8 bits). Addition is bitwise addition without carry. Multiplication multiplies the two polynomials, then takes the remainder on division by a fixed polynomial of degree 8. The code checks an example from the AES standard document, checks that every nonzero number has an inverse, and draws Figure 1. You need numpy and matplotlib.
import matplotlib.pyplot as pltimport numpy as np
plt.rcParams.update({"figure.facecolor": "#16181c", "text.color": "#d4d7dc", "axes.labelcolor": "#a4a9b2", "xtick.color": "#878d97", "ytick.color": "#878d97", "font.size": 12})
AES_POLY = 0x11B # x^8 + x^4 + x^3 + x + 1: the irreducible polynomial used by the AES standard
def gf_add(a: int, b: int) -> int: """Addition in GF(2^8): add bit by bit, without carry (XOR).""" return a ^ b
def gf_mul(a: int, b: int) -> int: """Multiplication in GF(2^8): multiply 0/1 polynomials, then take the remainder modulo AES_POLY.""" result = 0 while b: if b & 1: result ^= a a <<= 1 if a & 0x100: # degree above 7: subtract (XOR) the irreducible polynomial a ^= AES_POLY b >>= 1 return result
print("57 · 83 =", hex(gf_mul(0x57, 0x83)), "(example in the AES standard: c1)")print("57 + 83 =", hex(gf_add(0x57, 0x83)))
# Every nonzero number has exactly one inverse: that is what makes GF(2^8) a "field".table = np.array([[gf_mul(a, b) for b in range(256)] for a in range(256)])inverses = [b for a in range(1, 256) for b in range(1, 256) if table[a, b] == 1]print("Nonzero elements with an inverse:", len(inverses), "/ 255")print("Every row is a permutation of 0..255:", all(len(set(row)) == 256 for row in table[1:]))
fig, ax = plt.subplots(figsize=(7, 6.4))ax.imshow(table, cmap="cividis", interpolation="nearest")ax.set_xlabel("b")ax.set_ylabel("a")ax.set_title("Multiplication table a · b in the AES Galois field GF(2⁸)", color="#d4d7dc", fontsize=12)fig.savefig("gf256-en.png", dpi=150, bbox_inches="tight")57 · 83 = 0xc1 (example in the AES standard: c1)57 + 83 = 0xd4Nonzero elements with an inverse: 255 / 255Every row is a permutation of 0..255: TrueThe first line matches the example in the AES standard exactly: . The third line is the small miracle of Galois fields: in a system of only 256 numbers, every nonzero number can be “divided by”, just like the real numbers.
Back to the last night
Galois knew nothing of Rubik’s cubes, QR codes or Wi-Fi passwords. He only wanted to know why the quintic has no formula. To answer, he had to stop looking at the numbers themselves and start looking at how they swap places. That was the move from “computation” to “structure”, one of the most important shifts in the history of mathematics.
The reviewers of his day were not entirely wrong to complain that he was hard to follow. Galois wrote in haste, skipped steps, and was far ahead of his time. But the line “I do not have the time” in the margin of his manuscript still makes readers stop today. A twenty-year-old, on the night before he passed away, still worried that one of his proofs was missing a step.
This is the last of the first four articles in the series on mathematicians, after Pascal and Fermat, Euler and Gauss.
Tài liệu tham khảo
- [1]J. J. O'Connor and E. F. Robertson. Évariste Galois (1811–1832), biography. MacTutor History of Mathematics, University of St Andrews.
- [2]Peter M. Neumann (editor and translator). The Mathematical Writings of Évariste Galois. European Mathematical Society, 2011.
- [3]Évariste Galois; edited by Joseph Liouville. Œuvres mathématiques d’Évariste Galois. Journal de Mathématiques pures et appliquées, 11, 381–444, 1846.
- [4]FIPS 197: Advanced Encryption Standard (AES). National Institute of Standards and Technology, 2001.
- [5]Évariste Galois. Wikipedia.


