Begin here
Algebra is a way of working with a number you do not know yet. This is the first part of a series about it.
It begins with a story from Baghdad, about 1,200 years ago. Then it shows what a variable is, and what it is doing in a math problem, one small step at a time. At the end, a practice page lets you test yourself.
Tap Read at the top of any page to hear it read aloud. The voice comes from your own phone or computer.
Baghdad, around the year 820
Around the year 820, in the city of Baghdad, a scholar named Muhammad ibn Musa al-Khwarizmi wrote a book about numbers.
Baghdad was then one of the largest cities in the world. Traders came to it from India, Persia, Africa, and the lands around the Mediterranean. The ruler, the caliph al-Ma’mun, collected books from many countries and paid scholars to study them, translate them, and write new ones. Al-Khwarizmi was one of those scholars.
His name is still with us. In Latin it was written Algoritmi, and from that we get the word algorithm, which means a set of step-by-step instructions. His books were full of step-by-step instructions, so his name became the word for them.
A book for everyday problems
Al-Khwarizmi said at the start of his book what it was for. It was for the problems people meet when they divide an inheritance, settle a lawsuit, measure a field, dig a canal, or trade goods. Everyday problems, each with a number missing.
The book’s Arabic title is long. Two words in it matter to us: al-jabr and al-muqabala. Each one names a move you can make with a problem. Our word algebra comes from the first of them.
Al-jabr: to restore
الجبر al-jabr
Al-jabr means to restore: to make something whole again. The word was used for more than math. In Spain, centuries later, an algebrista was a bonesetter, a person who put a broken bone back in place.
In al-Khwarizmi’s book, restoring is a move. When something has been taken away from one side of a problem, you give it back, to both sides, so the problem is whole again. You will make that move yourself before this part is done.
Al-muqabala: to balance
المقابلة al-muqabala
Al-muqabala means to balance: to set one thing against another and compare them. This is the second move. When both sides of a problem hold the same amount of something, you take that amount away from both. The two sides stay balanced, and the problem gets simpler.
Restore and balance. In the beginning, that was all of algebra. It is still most of what algebra is.
No letters at all
شيء shay
Here is a surprise. Al-Khwarizmi’s book has no x in it. It has no letters standing for numbers at all. Every problem is written out in words, the way you would tell it to a friend.
For the number he was looking for, the one nobody knew yet, he used an ordinary word: shay. It means the thing.
So when you meet x in a math problem, you can read it his way. x + 3 = 10 says: the thing, plus 3, is 10. What is the thing?
How the thing became x
Al-Khwarizmi’s book was translated into Latin, and shay became res, the Latin word for thing. In Italy it became cosa. For a long time, Europeans called algebra the art of the thing.
In 1637, the French thinker René Descartes began using letters from the end of the alphabet, x, y, and z, for the numbers he was looking for. Other people copied him, and the habit stuck.
That is all x is: the thing, with a shorter name. Now let’s look at what a letter does.
A letter is a box
In algebra, a letter stands for a number. It helps to picture the letter as a box with a number inside.
Choose a number for the box. Then watch what A + A becomes.
A + A means: the number in the box, plus the number in the box.
If, then
If A is 3, then A + A is 6.
If A is 5, then A + A is 10.
The box can hold any number. Whatever it holds, A + A is two of it. Two of A is written 2A. So A + A = 2A, and that stays true whatever number is in the box.
Try it. Pick a number, decide what A + A will be, then open the box.
The closed box
Close the box. Now nobody knows the number inside, not even you.
Can you still say something true about it? You can. Whatever the number is, A + A = 2A. Two of a thing is two of that thing, no matter what the thing is.
This is the main idea of algebra: you can reason about a number before you know what it is. Test it. Put a secret number in the box, and open the box afterward.
The hidden times sign
2A means 2 × A: two times the number in the box. The multiplication sign is left out. When a number and a letter are written side by side, it means multiply.
This is easy to misread. If A is 7, then 2A is 14, not 27. The 2 and the 7 are not two digits sitting next to each other. They are two numbers being multiplied.
Pick a number and watch the hidden sign appear.
Adding is not multiplying
A + A is two of A, so it is 2A.
A × A is A times A. That is written A2, A with a little 2, which you met in the Exponent Machine.
These two get mixed up all the time. The box keeps them apart. If A is 3, then A + A is 6, and A × A is 9.
The Exponent Machine is in this folder too: exponent-machine.html.
Counting things
3A means three of the thing. 2A means two of the thing. Three of a thing and two of the same thing make five of it, so 3A + 2A = 5A.
But 3A + 2B stays as it is. A and B are different things, so you cannot count them together.
One more thing that is left out, like the times sign: A by itself means 1A, one of the thing.
Two steps, in order
If A is 4, what is 3A + 2?
There are two steps, and the order matters. First the hidden times sign: 3A is 3 × 4, which is 12. Then the add: 12 + 2 is 14. Multiply before you add.
Pick a number for A, decide what 3A + 2 will be, then open the box and watch the two steps.
The two moves, on a balance
Now the two moves from al-Khwarizmi’s book, on a balance scale.
A + 3 = 10. The scale is level: the box and 3 blocks on the left weigh the same as 10 blocks on the right. Take 3 blocks from both sides, and it stays level. That is the balancing move.
The next part is all about this balance. There you will make the two moves yourself, on problems of your own.
The thing has many names
So far the box has been called A. The letter is only the name written on the box. Any letter will do. On the GED you will meet x, y, m, n, t, and others. Each one is the thing: a box with a number inside.
And it has a name. A letter used this way — standing in for a number that can change, or that you do not know yet — is called a variable. It is the word the GED uses, and the word every math book uses. From here on this site uses it too: when you read variable, picture the box.
Everything that is true of A is true of every variable. If m is 4, then m + m is 8, and 2m is 8. If y is 6, then 3y + 2 is 20.
Choose a name for the box, and a number to put inside it. Then change the name and keep the number.
From here on, the practice page uses different letters, the way the test does.
You decide
Your turn. Each problem has three answers. Two of them are traps, and the traps have names. Pick one, and the page tells you why it is right, or what the trap was. Wrong picks cost nothing: try again.
A look ahead
Here is one of the pictures from al-Khwarizmi’s book, redrawn. It solves a harder problem than any in this part: a square, plus ten times the length of its side, makes 39. You will meet problems like it much later. For now, just look.
A square with side x. Two strips, each 5 wide, along two of its sides. Together, the square and the two strips have an area of 39. One corner is missing. Restore the corner, a square 5 by 5, which is 25, and the whole shape becomes one bigger square. Its area is 39 + 25 = 64, and 8 × 8 is 64, so it is 8 on each side. So x + 5 is 8, and the thing is 3.
The picture is drawn with x at its true size, 3, so you can count the small squares: 9 in the square, 15 in each strip, 25 in the corner. The corner is bigger than the square of x. That is not a mistake. The thing turned out to be small.
Look at how calm the picture is. Nothing is guessed. One missing piece is put back, and the answer is there.
Restore and balance. The same two moves, 1,200 years on.
Where this history comes from
- Al-Khwarizmi’s book is al-Kitab al-mukhtasar fi hisab al-jabr wa-l-muqabala, “The Short Book on Calculation by Restoring and Balancing.” It was written in Baghdad around the year 820 and dedicated to the caliph al-Ma’mun. The English translation used here is Frederic Rosen’s, published in London in 1831.
- In the book, the unknown number is called shay (thing) and also jidhr (root). Its square is called mal (wealth).
- Algebrista as a word for a bonesetter appears in Cervantes, Don Quixote, Part Two (1615), chapter 15.
- René Descartes, La Géométrie (1637), uses x, y, and z for unknown quantities and a, b, and c for known ones.
- The word algorithm comes from Algoritmi, the Latin form of al-Khwarizmi’s name. His other famous book explained the numerals 0 to 9, which came from India and are the ones we use today.
- The square picture is redrawn from his solution of the problem “a square and ten roots equal thirty-nine.”