What Is Algebra? Letters for Numbers and the Art of the Unknown
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Arithmetic answers one question at a time: what is 7 times 8, what is 350 divided by 14. Algebra answers all such questions at once, by writing the numbers as letters and working out what must be true of them whatever they are. It is the step from a sum to a rule, and it was taken, in the form the world uses, by a scholar in Baghdad in the ninth century who wrote a book on the balancing of equations whose title gave the subject its name. The letters that frighten schoolchildren are the whole point: they are the difference between knowing an answer and knowing why.
The unknown
The oldest algebra problems are word problems. A Babylonian tablet of 1800 BC asks for the side of a square whose area plus its side is three quarters, and the scribe solves it with a recipe that is, in modern terms, the quadratic formula, without a symbol in sight. The Egyptians called the unknown quantity the heap and Diophantus of Alexandria, around 250 AD, gave it a sign and worked with it, but neither had a general method. The step that made the subject was to treat the unknown as a number that could be added to, multiplied and moved about like any other, so that a puzzle about a heap became a statement about a quantity, x, that was true and could be manipulated until x stood alone.
Al-Khwarizmi
Muhammad ibn Musa al-Khwarizmi, working in the House of Wisdom in Baghdad around 820, wrote a book on calculation by restoring and balancing, in Arabic al-jabr wa'l-muqabala, and al-jabr became algebra. Restoring meant moving a subtracted term to the other side of an equation to make it positive; balancing meant cancelling equal terms from both sides. With those two moves and a classification of the kinds of equation, he gave rules for solving anything up to a quadratic, illustrated with inheritance and land problems, all in words, since the symbols did not yet exist. His name, Latinised, became the word algorithm, and the Latin translations of his book in the twelfth century were the textbooks of European mathematics for four hundred years. The symbols came slowly:
- •The plus and minus signs, in a German arithmetic of 1489
- •The equals sign, invented by the Welshman Robert Recorde in 1557 because, he said, no two things can be more equal than a pair of parallel lines
- •Letters for unknowns and for known quantities, systematised by Francois Viete in the 1590s, which made general formulas possible
- •Descartes in 1637 fixing the convention of x, y and z for unknowns and a, b and c for constants, and the superscript for powers
What an equation is
An equation is a statement that two expressions are equal, and solving it means finding the values of the unknown for which the statement is true. The rule that governs every step is that whatever is done to one side must be done to the other, so that the balance is preserved: 3x plus 4 equals 19 is solved by subtracting 4 from both sides and dividing both by 3, and the answer, 5, is the only number that makes the original true. A linear equation has one solution; a quadratic, with an x squared, has two, which is what the Babylonian recipe finds; a cubic has three, and the general solutions of cubics and quartics were found in sixteenth-century Italy amid public contests and accusations of theft. In 1824 a young Norwegian, Niels Abel, proved that no formula of that kind exists for the quintic or beyond, and Evariste Galois, killed in a duel at twenty in 1832, explained why, founding a theory of symmetry that became the algebra of the twentieth century.
Why the letters
The gain from a letter is generality. The statement that the area of a rectangle is length times width holds for every rectangle, and writing it as A equals lw lets it be rearranged, so that l equals A over w, which is a second fact obtained for free. A formula for compound interest, for the range of a projectile or for the dose of a drug by body weight is an algebraic expression, and each captures an infinity of arithmetic in a line. Algebra is also the language in which relationships are stated so that they can be graphed, since Descartes' joining of algebra to geometry, in which an equation in x and y is a curve, is what lets a formula be drawn and a drawing be calculated. Every spreadsheet is an algebra engine, every line of computer code that assigns a value to a name is doing what Viete did, and the machine learning that recognises a face is a very large system of equations being solved for its unknowns.
Beyond numbers
In the nineteenth century mathematicians noticed that the rules of algebra could be applied to things that were not numbers at all, provided they combined in ways that obeyed similar laws: rotations, permutations, matrices, the symmetries of a crystal. Abstract algebra is the study of such systems, groups, rings and fields, and it turned out to describe the structure of particle physics, the security of encrypted messages and the error-correcting codes that let a scratched disc play. The subject that began with a Babylonian scribe's heap is now the study of structure itself, and the balancing of both sides of an equals sign is still the first thing it teaches.
Why translating words into algebra goes wrong
One of the hardest parts of algebra for learners is not solving equations but writing them. Try this: at a university there are six times as many students as professors; write an equation using S for the number of students and P for professors. Many people write 6S = P, because the words six and students sit side by side. But that would mean professors outnumber students. The correct equation is S = 6P, since you must multiply the smaller number of professors by six to match the students. Research in the early 1980s found that a surprising proportion of university science and engineering students made exactly this reversal.
The error comes from treating letters as labels, S for students the way a shopping list might say A for apples, rather than as numbers. In algebra S does not stand for students; it stands for how many students there are. A useful habit is to test an equation with made-up values before trusting it. Suppose there are 10 professors: S = 6P gives 60 students, which matches the sentence, while 6S = P would demand that 10 professors equal six times the students. Checking with small numbers catches most translation mistakes and is what experienced problem solvers do without thinking.
The one move the balance rule does not allow
The rule of doing the same thing to both sides has one exception that catches out even confident students: you may not divide by something that could be zero. Take x squared equals 5x. Dividing both sides by x gives x equals 5, which is a correct solution but not the only one, since x equals 0 also makes the original statement true: 0 squared is 0, and 5 times 0 is 0. The division silently assumed that x was not zero and so threw that answer away. The safe method is to gather everything on one side and factorise, giving x times (x minus 5) equals 0.
A product is zero only when one of its factors is zero, so both solutions appear. The same trap powers a well-known fake proof that 1 equals 2. Start with a equals b, multiply both sides by a, subtract b squared from both sides, and factorise to get (a plus b)(a minus b) equals b(a minus b). Cancel (a minus b) and you are left with a plus b equals b, so 2b equals b and 2 equals 1. The flaw is the cancelling: since a equals b, a minus b is zero, and the step quietly divided by zero, which is why algebra treats that operation as undefined.
The takeaway
Algebra is the use of symbols for unknown and general quantities so that arithmetic becomes rules that hold for every number, born in Babylonian problem recipes, named from al-Khwarizmi's ninth-century book on restoring and balancing equations, and given its symbols between the fifteenth and seventeenth centuries. An equation is solved by doing the same thing to both sides until the unknown stands alone, formulas capture infinite cases in a line, and the same rules, applied to things other than numbers, underlie modern physics and cryptography.