Chapter 1 Everyone
What algebra is, and where it came from
Algebra is the art of reasoning about a number you do not know yet. You give it a name, write down what you know about it, and then rearrange that knowledge until the number is forced to show itself.
The word comes from Arabic. Around 820 CE, Muḥammad ibn Mūsā al-Khwārizmī, a scholar at the House of Wisdom in Baghdad, wrote The Compendious Book on Calculation by al-jabr and al-muqābala. Al-jabr means "restoring": moving a subtracted quantity to the other side, where it becomes an addition. Al-muqābala means "balancing": cancelling equal amounts from both sides. His name means "the man from Khwārizm", the ancient region of Khorezm on the lower Amu Darya river, today mostly in Uzbekistan (with part in Turkmenistan). He was probably born there around 780, although one early source links his family to a town near Baghdad. In Latin his name became Algoritmi, which gave us the word algorithm.
- c. 1800 BCE. Babylonian scribes solve quadratic problems on clay tablets. Tablet BM 13901 begins: "I added the area and the side of my square: 0;45" (that is, 3/4). Their recipe is completing the square, which you will do in Chapter 5.
- c. 1550 BCE. The Rhind papyrus from Egypt asks: "A quantity and its seventh added together give 19. What is the quantity?" The scribe guesses 7, sees that it gives 8, and scales up. This is the method of false position.
- c. 250 CE. Diophantus of Alexandria writes the Arithmetica, with the first abbreviations for unknowns and powers.
- 628. Brahmagupta in India gives rules for zero and negative numbers, and a general rule for quadratic equations.
- c. 820. Al-Khwārizmī, a scholar probably from Khorezm in today's Uzbekistan, working in Baghdad, writes the book that gives algebra its name and its method: restore and balance.
- c. 1070. Omar Khayyām solves cubic equations by intersecting conic sections (see Kepler's world).
- 1545. Gerolamo Cardano publishes the formula for cubic equations in Ars Magna, and meets square roots of negative numbers.
- 1557–1637. Notation arrives: Robert Recorde invents "=" (1557), François Viète uses letters for unknowns (1591), René Descartes writes x, y, z and x² as we do today (1637).
- 1799. Carl Friedrich Gauss proves that every polynomial equation has a solution among the complex numbers.
- 1824–1832. Niels Henrik Abel proves there is no general formula for degree five. Évariste Galois explains exactly which equations can be solved, and invents groups to do it.
- 1854–1930. Arthur Cayley defines abstract groups; Emmy Noether and others turn algebra into the study of structures: groups, rings and fields.
The same equation through 3,000 years of notation
Al-Khwārizmī's most famous example is our x² + 10x = 39. Here is roughly how it would have been written in different times. Notation was invented slowly, and every step made algebra easier.
Chapter 2 Everyone Game
The balance: al-jabr with your hands
An equation is a balance. The two sides weigh the same. Each box marked x hides the same unknown number of kilograms, and each round weight is 1 kg.
Tap a box or a weight to take it off its pan. Take something from only one side and the scale tips. Take the same thing from both sides and it stays level. When everything on both pans can be shared into equal groups, the ÷ buttons split both sides at once. Your goal is one box alone on one side: then the other side is its weight.
The two rules of algebra
Everything you just did follows two rules: do the same thing to both sides, and undo operations in reverse order. In symbols, solving 3x + 2 = x + 10 looks like this:
The balance cannot show negative numbers, but algebra can: a negative weight is a helium balloon pulling the pan up. Brahmagupta's rules of 628 CE for "debts" and "fortunes" are exactly the rules for adding and multiplying negative numbers.
Chapter 3 Everyone Game
Hidden rules: letters that stand for any number
In an equation, x is one particular number. In a rule or formula, a letter stands for every number at once. "Double it and add three" is the rule 2n + 3.
The machine below hides a rule. Feed it numbers and watch what comes out. When you think you know the rule, type it using n, for example 3n+1, n^2 or n(n+1)/2. Fewer tries means a better score.
| in, n | out |
|---|
Machine 1
Different-looking rules can be the same rule: 2(n + 1) and 2n + 2 always give the same output. Showing that two expressions are always equal is half of school algebra: expanding brackets, collecting like terms, factorising. The machine checks your rule on many inputs, so any correct form is accepted.
Chapter 4 High school
Two unknowns: chickens, rabbits and straight lines
A Chinese book of the 4th or 5th century, the Sunzi Suanjing, asks: "Pheasants and rabbits are in the same cage. There are 35 heads and 94 legs. How many of each?"
Call the number of pheasants p and rabbits r. Each fact gives one equation, and each equation is a straight line on a graph. The answer is where the two lines cross.
Elimination, 2,000 years before Gauss
To solve by algebra, make one unknown disappear. Double the heads equation: 2p + 2r = 70. Subtract it from the legs equation: 2r = 24, so r = 12 rabbits and p = 23 pheasants. The Sunzi gives a delightful version: tell every animal to lift half its legs. Pheasants then stand on one leg and rabbits on two, so there are 47 legs on the ground; take away 35 heads and the 12 left over are the rabbits.
The much older Nine Chapters on the Mathematical Art (compiled between the 10th and 2nd centuries BCE) solved systems with three and more unknowns by arranging the numbers in a grid of counting rods and subtracting columns. That is exactly the method taught today as Gaussian elimination, the workhorse of every computer that solves equations.
Chapter 5 High school
Completing the square: al-Khwārizmī's picture proof
Al-Khwārizmī did not have our symbols, so he proved his method with pictures. For "a square and ten roots equal thirty-nine", draw a square of side x and a rectangle x by 10. Together their area is 39. Now watch.
From the picture to the quadratic formula
The picture works for any x² + bx = c. Doing the same steps with letters gives the formula for every quadratic ax² + bx + c = 0:
- Divide by a and move the constant: x² + (b/a)x = −c/a.
- Cut the rectangle in half and add the missing corner, a square of side b/2a, to both sides: (x + b/2a)² = b²/4a² − c/a.
- Put the right side over one denominator: (x + b/2a)² = (b² − 4ac)/4a².
- Take square roots, which can be positive or negative, and subtract b/2a.
The number b² − 4ac is the discriminant. Positive: two solutions. Zero: one. Negative: no real solutions, because no real number squares to a negative. Al-Khwārizmī only accepted positive answers; the second solution of x² + 10x = 39, which is −13, he simply ignored.
Chapter 6 High school Game
Parabolas: seeing the solutions
Draw y = ax² + bx + c and you get a parabola. The solutions of ax² + bx + c = 0 are where it crosses the x-axis.
The game: three points are marked on the grid. Move the sliders until your parabola passes through all three. Three points always decide one parabola, just as two points decide one line.
Chapter 7 High school University
The cubic, a duel, and numbers that "cannot exist"
For 3,000 years nobody could solve cubic equations by a formula. The breakthrough came in Renaissance Italy, in a story of secrets, public contests and a broken promise.
Around 1515 Scipione del Ferro of Bologna found how to solve x³ + px = q, and told only his student Antonio Fior. In 1535 Fior challenged Niccolò Tartaglia to a public contest of thirty problems each. Tartaglia found the method just before the deadline and won every problem. Gerolamo Cardano begged for the secret, swore an oath not to publish it, and in 1545 published it anyway in Ars Magna, with credit to del Ferro and Tartaglia. Tartaglia never forgave him.
Cardano's formula
Any cubic can be shifted to the form x³ = px + q. Try x = u + v: then x³ = u³ + v³ + 3uv(u + v). This matches if 3uv = p and u³ + v³ = q. So u³ and v³ have sum q and product (p/3)³: they solve a quadratic. That gives
Now the shock. Rafael Bombelli (1572) tried x³ = 15x + 4. Clearly x = 4 works: 64 = 60 + 4. But the formula needs √Δ = √(−121). Bombelli had the "wild thought" to calculate with √−1 anyway, and found that the impossible parts cancel and leave exactly 4. Imaginary numbers were born, not from x² = −1, which people were happy to call unsolvable, but from a cubic with a perfectly real answer.
Quartic equations fell quickly: Cardano's student Lodovico Ferrari reduced them to cubics, and his method is also in Ars Magna. Then the search for the quintic formula began. It lasted 250 years and ended in Chapter 12.
Chapter 8 University
Gauss and the fundamental theorem of algebra
Fundamental theorem of algebra. Every polynomial of degree n ≥ 1 with complex coefficients has a root in the complex numbers. Consequently it factors as a(z − z1)(z − z2)⋯(z − zn): exactly n roots, counted with multiplicity.
So inventing i was enough. We never need new numbers to solve polynomial equations. D'Alembert (1746), Euler and Lagrange all attempted proofs, but each assumed somewhere that roots already exist "somewhere" and only showed they are complex. In his 1799 doctoral dissertation, at 22, Gauss criticised them all and gave a new proof. He drew the two curves where the real part and the imaginary part of p(z) are zero, and argued that they must cross. His argument used a geometric fact he did not prove; Alexander Ostrowski filled the gap in 1920. Gauss gave four proofs in all, the last for his golden jubilee in 1849.
A proof you can see: the winding number
Take a circle of radius R centred at 0 and look at where p sends it. Count how many times the image curve winds around 0.
- For a huge circle, p(z) behaves like zn, which winds around 0 exactly n times.
- For a tiny circle, the image stays close to p(0). If p(0) ≠ 0 it winds 0 times.
- As R grows smoothly, the winding number can only change when the image curve passes through 0. So for some R the curve hits 0, and there is a root on that circle.
Below, drag the roots of a polynomial. The left picture colours each point z by the direction of p(z): every colour meets at a root. The right picture shows the image of the circle. The winding number always equals the number of roots inside the circle.
Chapter 9 High school University Game
Symmetry and groups
Modern algebra studies not numbers but actions that can be combined. The simplest example: the moves that leave a triangle looking the same.
An equilateral triangle has six symmetries. Do nothing (e); rotate by 120° (r) or 240° (r²); or flip it over one of three mirror lines (s, rs, r²s). Doing one symmetry and then another always gives a symmetry. Try it: the numbers on the corners show what moved where.
What a group is
A group is a set G with a way of combining two elements, written ab, such that:
- Closure. Combining two elements of G gives an element of G.
- Associativity. (ab)c = a(bc).
- Identity. There is an e with ea = ae = a.
- Inverses. Every a has an a−1 with aa−1 = e.
The integers under addition form a group; so do the non-zero real numbers under multiplication, the hours on a clock, and the symmetries of any object. The triangle's group is called D3, and it is the smallest group where order matters: rs ≠ sr. Such groups are called non-abelian, after Abel.
Game: Cayley table sudoku
A group's whole structure fits in its Cayley table: the entry in row a and column b is ab, meaning "do a, then do b". Every element appears exactly once in each row and each column, like a sudoku (why? because ax = b has exactly one solution, x = a−1b). Fill in the blank cells. Use the triangle above to experiment.
Choose a blank cell, then pick its value.
Chapter 10 High school University Game
Permutations and the 15 puzzle
In 1880 the "15 puzzle" swept America and Europe. Sam Loyd, who falsely claimed to have invented it, later told of a $1,000 prize for one simple task: start with 14 and 15 swapped and put them in order. Nobody won. Algebra says nobody could.
A permutation is a rearrangement. Every permutation can be built from swaps of two things, and although there are many ways to do it, the number of swaps is either always even or always odd. That is the permutation's parity.
In the 15 puzzle, each slide swaps the blank with a tile, so it changes the parity of the arrangement (counting the blank as a 16th tile). It also moves the blank one square, changing the colour of its square on a chessboard pattern. These two changes always happen together, so parity of arrangement + colour of the blank's square never changes. The solved puzzle and Loyd's puzzle differ by one swap but have the blank in the same place, so no sequence of slides joins them. In 1879 Johnson and Story proved that exactly half of all arrangements can be reached.
Chapter 11 High school University Game
The Rubik's cube group
Ernő Rubik, a Hungarian professor of architecture, built the first cube in 1974. Each twist is a permutation of its 54 coloured stickers, and the set of all positions you can reach is a group.
The six basic moves turn one face a quarter turn clockwise (as you look at that face): U up, D down, L left, R right, F front, B back. A prime, as in R′, means anticlockwise: the inverse. A sequence like R U R′U′ means do them left to right.
Undoing: the socks-and-shoes rule
To undo "socks, then shoes" you take off the shoes first. In any group, (ab)−1 = b−1a−1. So the scramble R U F is undone by F′U′R′. Try the game above with that in mind.
Order: how many times until it comes back?
Repeat any sequence and the cube eventually returns to where it started, because there are only finitely many positions. The number of repeats is the order of the sequence. R has order 4. R U R′U′ has order 6. R U has order 105! The order is the least common multiple of the lengths of the sticker cycles, which the "Find its order" button computes.
Commutators and conjugates: how cubers think
A commutator [a, b] = aba−1b−1 measures how far a and b are from commuting. If two moves overlap on only a few pieces, their commutator moves only those few pieces and leaves the rest alone. That is how every solving method changes a small part of the cube without wrecking the rest. A conjugate a b a−1 does b "somewhere else": set up with a, do b, undo the set-up.
How big is the group?
The 8 corner pieces can be arranged in 8! ways and twisted in 38 ways; the 12 edges arranged in 12! ways and flipped in 212 ways. But three invariants, just like the 15 puzzle's, cut this down: the total corner twist is a multiple of 3 (divide by 3), the total edge flip is even (divide by 2), and the corner and edge permutations have the same parity (divide by 2).
That is about 43 quintillion. If you took apart a cube and put it back together at random, there is only a 1 in 12 chance it could be solved. In 2010 Tomas Rokicki, Herbert Kociemba, Morley Davidson and John Dethridge used about 35 CPU-years of computing time donated by Google to prove that every position can be solved in at most 20 moves (counting half turns as one move). This number is known as God's number.
Chapter 12 University
Galois theory: why there is no quintic formula
Formulas exist for equations of degree 2, 3 and 4. For degree 5 the search failed for 250 years. In 1824 Abel proved that no formula using +, −, ×, ÷ and roots can solve every quintic. A few years later a French teenager explained exactly which equations can be solved, and why.
Évariste Galois was born in 1811. He failed the entrance exam of the École Polytechnique twice, had two papers lost or rejected by the Paris Academy, and was jailed for his republican politics. On 30 May 1832 he was shot in a duel and died the next day, aged 20. The night before the duel he wrote a long letter to his friend Auguste Chevalier summarising his discoveries. Joseph Liouville published his work in 1846, and it changed mathematics.
Step 1: the roots know about the coefficients
If x² + bx + c = (x − r1)(x − r2), expanding gives r1 + r2 = −b and r1r2 = c. These are symmetric: swapping the roots does not change them. In general, the coefficients of a polynomial are the elementary symmetric functions of its roots (Viète's formulas), and every symmetric expression in the roots can be computed from the coefficients.
Solving an equation means going the other way: from symmetric quantities back to the individual, unsymmetric roots. Lagrange noticed in 1771 that all known formulas work by building intermediate quantities that are "partly symmetric". In the quadratic formula, √(b² − 4ac) = ±(r1 − r2) changes sign when the roots are swapped, and its square does not change at all.
Step 2: the Galois group
Galois's key idea: look at the permutations of the roots that preserve every algebraic relation between them with rational coefficients. These form a group, the Galois group of the polynomial. For x² − 2 the roots ±√2 can be swapped (every true equation about √2 stays true for −√2), so the group has 2 elements. For x⁴ − 2, the roots are ±∜2 and ±i∜2. Not all 24 permutations are allowed: the relation r1 + r3 = 0 must be kept, so opposite roots stay opposite. Only 8 permutations survive: the symmetries of a square, D4.
Step 3: radicals and solvable groups
Each time a formula takes an nth root, it breaks a little symmetry, and the piece broken off is a cyclic group (like the n rotations of an n-gon). So an equation is solvable by radicals exactly when its Galois group can be taken apart in steps
where each Gi+1 is a normal subgroup of Gi and each quotient Gi/Gi+1 is cyclic. Such groups are called solvable, a name that comes straight from this theorem.
The group of all permutations of 4 roots, S4, is solvable: S4 ▷ A4 ▷ V4 ▷ Z2 ▷ {e}. That chain is, in disguise, Ferrari's quartic formula. But S5 contains A5, the 60 rotations of the icosahedron, and A5 is simple: it has no normal subgroups at all except itself and {e}, and it is not cyclic. The chain gets stuck. So any quintic whose Galois group is S5, such as x⁵ − x − 1, cannot be solved by radicals.
Arnold's proof: watch the roots dance
In the 1960s Vladimir Arnold taught Moscow school students a topological proof of Abel's theorem. Consider x⁵ − x − c = 0. When c = 0 the roots are 0, ±1 and ±i. Now move c slowly around a loop in the complex plane and back to 0. The roots move too, and when c returns, the five roots are back in the same five places, but possibly swapped.
Any formula built from +, −, ×, ÷ must return to its starting value after a loop. A square root may come back with the opposite sign, and a cube root may come back multiplied by a cube root of unity, but a commutator of loops (a, then b, then a backwards, then b backwards) brings every single radical back to its starting value. Nesting radicals k deep, commutators of commutators nested k deep still return every formula to its start. But for the quintic, even deeply nested commutators of loops can still permute the roots, because A5 equals its own commutator subgroup. So no formula can follow the roots. Try it:
Chapter 13
Summary and further reading
| Equation | A statement that two expressions are equal; solving it means finding the values that make it true. Do the same to both sides. |
| Linear system | Several linear equations at once; solved by elimination (Nine Chapters, Gauss). Geometrically, lines or planes meeting. |
| Quadratic formula | x = (−b ± √(b² − 4ac))/2a, from completing the square |
| Cardano's formula | x³ = px + q: x = ∛(q/2 + √Δ) + ∛(q/2 − √Δ), Δ = (q/2)² − (p/3)³ |
| Fundamental theorem | Every polynomial of degree n has exactly n complex roots, counted with multiplicity (Gauss, 1799). |
| Group | A set with an associative operation, an identity and inverses. Examples: symmetries, permutations, the Rubik's cube. |
| Parity | Every permutation is even or odd; this invariant decides the 15 puzzle and part of the Rubik's cube. |
| Order of an element | Smallest k with gk = e; for a permutation, the lcm of its cycle lengths. |
| Galois group | Permutations of the roots that preserve every rational relation between them. |
| Solvable group | Can be broken down by normal subgroups into cyclic pieces. An equation is solvable by radicals exactly when its Galois group is solvable (Galois). |
| Abel–Ruffini theorem | There is no formula in radicals for the general equation of degree 5 or higher. |
Further reading
- John Derbyshire, Unknown Quantity: A Real and Imaginary History of Algebra (2006). Readable history, from Babylon to modern algebra.
- Mario Livio, The Equation That Couldn't Be Solved (2005). The quintic, Abel and Galois, and symmetry.
- David Joyner, Adventures in Group Theory: Rubik's Cube, Merlin's Machine, and Other Mathematical Toys (2nd ed., 2008).
- V. B. Alekseev, Abel's Theorem in Problems and Solutions, Based on the Lectures of Professor V. I. Arnold (2004). Arnold's proof, as a series of exercises.
- Ian Stewart, Galois Theory (4th ed., 2015). The standard undergraduate textbook, with history.
- Joseph Gallian, Contemporary Abstract Algebra. A friendly first course in groups, rings and fields.