Algebra Play

Chapter 6 · Mathematics · Class 8 30 min read

Why This Matters

Have you ever seen someone do a “magic” number trick? They say: “Think of any number. Don’t tell me. Double it. Add four. Halve it. Take away the number you started with.” Then they grin and announce: “Your answer is 2.”

And it always is. Every time. For any number you pick.

It feels like mind-reading. But it isn’t magic at all. It is algebra quietly doing its job behind the curtain.

In Class 6 and 7 you used algebra to stand in for unknown numbers. Now we get to play with it. We will pull these tricks apart and see the gears inside. We will learn why they always work, not just that they work. Once you see how the machine runs, you can build your own tricks to amaze your friends.

This is also the deeper point of algebra. A single letter, like x, can stand for every number at once. So when we prove something with x, we have proved it for the whole infinite list of numbers in one short line. That power shows up everywhere in maths, science, and beyond.

The Big Idea

A number trick uses a hidden number you never tell anyone. If we call that hidden number x and follow the steps, the x carries through the whole chain. At the end, the x either cancels out (so the answer is fixed) or it can be pulled back out (so we can find it). Letters turn a “magic” trick into something we can fully explain. The same letters let us form equations and solve them, fill number pyramids and grids, and prove that a trick must work for every number, not just the ones we tested.

Let’s Break It Down

The ‘Think of a Number’ trick, traced with a letter

Let us take the trick from the start, step by step. We will do it two ways at once: with a real number, say 7, and with the letter x standing for “whatever you chose”.

  1. Think of a number. Real: 7. Letter: x.
  2. Double it. Real: 14. Letter: 2x.
  3. Add four. Real: 18. Letter: 2x + 4.
  4. Divide by two. Real: 9. Letter: x + 2. (Half of 2x is x; half of 4 is 2.)
  5. Subtract the starting number. Real: 9 − 7 = 2. Letter: (x + 2) − x = 2.

Look at the last line. The x and the −x cancel. They wipe each other out. What is left is just 2.

That is the whole secret. The answer does not depend on x at all, because the x disappears. So whatever you start with, you land on 2. The picture below traces both columns side by side so you can watch the x vanish.

The five-step think of a number trick traced with the number 7 in one column and the letter x in another. Both columns end at 2. In the last step, (x + 2) minus x cancels to leave 2.
Figure 6.1 — The think-of-a-number trick, traced two ways. The left blue column starts with the real number 7 and works down: 7, then 14, then 18, then 9, then 9 minus 7 equals 2. The right purple column does the very same steps with the letter x: x, then 2x, then 2x + 4, then x + 2, then (x + 2) minus x. In the final row the x and the minus x cancel each other, leaving just 2. The yellow box at the bottom states the secret: because the x cancels out, the starting number never matters and the answer is always 2.
Concept check

In the last step we work out (x + 2) − x. Why does the answer not depend on x?

Now you can see how to change the trick. The “add four” step became ”+ 2” after halving, and that 2 is the final answer. Want the answer to be 3 instead? Then you need ”+ 3” to survive at the end, so add six instead of four (because half of 6 is 3). Want the answer to be 5? Add ten. You are in control once you see the algebra.

Forming an expression — the recipe view

Each instruction in the trick adds one more layer to an expression. “Double it” multiplied by 2. “Add four” added 4. Step by step, the expression 2x + 4 is built up.

An expression is just a recipe written in symbols. It does not have an equals sign yet. It is waiting for you to put in a value for x. Figure 6.2 shows this building-up as a tree you read from the bottom to the top.

An expression tree. At the bottom is x. An arrow times 2 leads up to 2x. An arrow plus 4 leads up to 2x plus 4. A value column on the right checks with x equals 7, showing 14 then 18.
Figure 6.2 — How the expression 2x + 4 is built one step at a time. Read the tree from the bottom up. The bottom purple block is x, the number you thought of. The red arrow labelled times 2 takes you up to the blue block 2x. The next arrow, labelled plus 4, takes you up to the green block 2x + 4, the finished expression. The column on the right checks the same recipe with x equal to 7: x is 7, then 2 times 7 is 14, then 14 plus 4 is 18. The dashed lines join each tree block to its value, showing the letter version and the number version always agree.

Reading it as a recipe makes algebra less scary. 2x + 4 simply means: “take your number, double it, then add four.” Nothing more.

Forming and solving an equation

So far we only built expressions. The fun jumps up when we get an equation — an expression set equal to something.

Here is a small puzzle. “I doubled a number and added four, and got ten. What was my number?” In symbols: 2x + 4 = 10.

Now we must solve it. Solving means finding the value of x that makes both sides truly equal.

The safest way to picture this is a balance scale. The equals sign means the two sides weigh the same — the scale is level. The golden rule is simple: whatever you do to one side, do exactly the same to the other side. Then the scale stays level and the equation stays true.

Let us see this on the scale before we write the steps.

A balance scale solving 2x plus 4 equals 10 in three stages. First two x-boxes and four units balance ten units. Then four units are removed from both sides. Then both sides are halved, leaving one x-box equal to three units, so x equals 3.
Figure 6.3 — Solving 2x + 4 = 10 by keeping the scale level. In panel (a) the left pan holds two x-boxes and four unit weights, the right pan holds ten unit weights, and the beam is level — this is 2x + 4 = 10. In panel (b) we take four units off both pans at once. The left now has 2x, the right has 6 units, and the scale is still level: 2x = 6. In panel (c) we split each side into two equal halves, leaving one x-box against three units: x = 3. The blue box states the one golden rule — do the same thing to both pans — and the legend explains that a purple box is x and a yellow circle is a single unit of 1.

Now the same thing written as steps.

Solving 2x + 4 = 10

I doubled a number and added 4, and the result was 10. Find the number. (Solve 2x + 4 = 10.)

Notice the order. To free x, we peeled off the steps in reverse. The expression added 4 last, so we removed 4 first. The expression doubled first, so we undid the doubling last. Solving an equation is like untying a knot — you undo the last loop first.

Number pyramids

Here is a different playground for the same idea. In a number pyramid, each block is the sum of the two blocks directly below it. So if the bottom two blocks are 4 and 9, the block above them is 4 + 9 = 13.

Filling a pyramid upward is easy — you just add. The puzzle gets interesting when you know the top but not the bottom. Then algebra rescues you: put a letter in an empty block, use the “sum of the two below” rule to write equations, and solve.

Figure 6.4 shows both the general rule and a real pyramid solved this way.

Two number pyramids. The left one is general with bottom a, b, c, middle a plus b and b plus c, top a plus 2b plus c. The right one has top 60, bottom 12, c, 8, and is solved to give c equals 20, a equals 32, b equals 28.
Figure 6.4 — Number pyramids solved with algebra. Panel (a) shows the rule in letters: a bottom row of a, b, c gives a middle row of a + b and b + c, and a top of a + 2b + c — each block is the sum of the two below it. Panel (b) is a real pyramid. The top is 60 and the bottom blocks are 12, an unknown c, and 8. Writing the rule as equations a + b = 60, 12 + c = a and c + 8 = b, then adding the last two, gives 20 + 2c = 60, so c = 20. From there a = 32 and b = 28, and the whole pyramid is filled. The yellow strip notes that one unknown letter was enough to unlock everything.

Let us walk through that solve carefully.

Filling a pyramid with one unknown

A 3-row pyramid has top block 60. Its bottom blocks are 12, then an empty block, then 8. The two middle blocks are also empty. Fill it in.

There is also a lovely pattern hiding here. For the simplest pyramid, the bottom blocks a and b give a top of a + b. For a 3-row pyramid with bottom a, b, c, the top is a + 2b + c — the middle block is counted twice. Knowing the pattern lets you find the top without building the whole pyramid.

The calendar grid trick

Open any month on a calendar. Ask a friend to pick a 2 × 2 square of four dates and tell you only their sum. From that one number, you can name all four dates. How?

Look at how the four numbers relate. If the top-left date is a, then the date to its right is a + 1 (the next day). The date directly below is a + 7 (one week later). The bottom-right is a + 8. So the grid is a, a + 1, a + 7, a + 8 — every box is written in terms of one letter.

Add them up: a + (a + 1) + (a + 7) + (a + 8) = 4a + 16. So the friend’s sum is always 4a + 16.

Cracking the calendar grid

A friend picks a 2 × 2 grid of dates and says the four dates add to 36. Find the four dates.

The trick feels like magic to your friend, but you simply solved 4a + 16 = 36. Change the shape of the grid and you get a different expression — and a new trick of your own.

Decoding the date trick

Some tricks hide two numbers, not one, yet algebra still untangles them. Here is the classic “guess my date” trick. Tell a friend:

  • Multiply the month by 5. Add 6. Multiply by 4. Add 9. Multiply by 5. Finally, add the day. Tell me the result.

From that one number you announce their exact date. Let us see why, with the month as M and the day as D.

Following the steps: 5M, then 5M + 6, then 20M + 24, then 20M + 33, then 100M + 165, then finally 100M + 165 + D.

Notice that every step except the last only touches M. So the leftover 165 is the same every single time. Strip it off and the rest falls apart neatly. Figure 6.5 shows the full reveal for the answer 291.

The date trick explained. The steps in algebra build up to 100M plus 165 plus D. With the answer 291, subtracting the fixed 165 gives 100M plus D equals 126. Since the day is at most 31, the last two digits 26 are the day and the 1 in front is the month, giving 26 January.
Figure 6.5 — Decoding the date trick. The left ladder tracks each step in algebra, starting from 5M and ending at 100M + 165 + D, with the friend's answer shown as 291. The right box does the undoing: 291 = 100M + 165 + D, so subtracting the fixed 165 gives 100M + D = 126. Because the day D is at most 31 it needs only two digits, so in 126 the last two digits are the day (26) and the digit in front is the month (1). The green bar reads off the date: 26 January. The yellow footer explains why it works — every step but the last only changes M, so 165 is always the same leftover to strip away.
Concept check

A friend follows the date steps and reports 1390. The fixed leftover is 165. What date did they pick?

Why divisibility tricks work

Now a trick that always lands on a multiple of 9. Pick any 2-digit number with two different digits — say 47. Reverse the digits to get 74. Subtract the smaller from the bigger: 74 − 47 = 27. Divide by 9: you get 3, with no remainder. It works for any such number. Why?

The key idea is how a 2-digit number is really built. The number “ab” is not a times b. It means 10a + b — that is, the tens digit counts for ten each, plus the ones digit. So 47 is 10 × 4 + 7. Figure 6.6 uses this to crack the trick.

Why the reverse-digits difference is divisible by 9. The number ab equals 10a plus b (example 47). Reversed, ba equals 10b plus a (example 74). The difference is 9b minus 9a, which equals 9 times b minus a. Example 74 minus 47 equals 27 equals 9 times 3.
Figure 6.6 — Why reversing the digits and subtracting always gives a multiple of 9. The top rows show that a 2-digit number ab equals 10a + b, and its reverse ba equals 10b + a, with the worked example 47 and 74 in blue beside them. The white box takes the difference: (10b + a) minus (10a + b) simplifies to 9b minus 9a, which factors to 9 times the quantity b minus a. The example confirms it: 74 minus 47 is 27, and 27 is 9 times 3. The yellow conclusion box notes that because the result is always 9 times a whole number, it is always divisible by 9, whatever number you start with.

Read the working: the difference is 9b − 9a = 9(b − a). That is 9 multiplied by a whole number. Anything that is 9 times a whole number is divisible by 9. So there can never be a remainder. The algebra proves it for every 2-digit number in one short line — something no amount of testing single examples could ever fully guarantee.

Inventing your own trick

Now you are ready to be the magician. To build a “think of a number” trick, chain together steps and make sure the x behaves the way you want.

  • To make the answer always the same, design the steps so the x cancels at the end (like our +x and −x). The leftover constant is your answer.
  • To make a trick where you can guess the number back, keep the x alive but tucked inside, then undo each step in reverse to recover it.
Inventing a trick that always gives 5

Design a think-of-a-number trick whose answer is always 5, then check it with algebra.

Common Mistakes

These are the slips students make most often with algebra play. Read them once and you will sidestep them.

⚠️ Common mistake
What students think

In a 2-digit number written 'ab', the value is a times b.

Why it seems right

When two letters sit side by side in algebra, like ab, it usually means 'a times b' — so it feels natural to read the digit pair the same way.

What actually happens

A 2-digit number 'ab' means 10a + b, not a × b. The first digit is in the tens place, so it counts ten each. For example 47 is 10×4 + 7 = 47, not 4 × 7 = 28. This place-value meaning is what makes the reverse-digit trick work.

⚠️ Common mistake
What students think

To solve 2x + 4 = 10, you can subtract 4 from just the left side.

Why it seems right

Students focus on getting x alone and forget the right side, since the +4 they want to remove is only written on the left.

What actually happens

Whatever you do to one side, you must do to the other, or the scale tips and the equation is no longer true. Subtract 4 from both sides: 2x + 4 − 4 = 10 − 4, giving 2x = 6. Then divide both sides by 2 to get x = 3.

⚠️ Common mistake
What students think

A number trick only works for the small numbers you tested it on.

Why it seems right

We usually trust a pattern after checking a few cases, so it seems safe to assume the trick might fail for some big or unusual number we did not try.

What actually happens

Testing examples can only suggest a pattern, never prove it. Algebra proves it for every number at once. When (x + 2) − x gives 2, or the difference gives 9(b − a), the letter stands for any number, so the result holds for all of them — no exceptions.

Quick Check

Try these. Each one checks an idea from the chapter.

In the trick 'think of x, double it, add 4, halve it, subtract your number', what is the final result?

What is the correct first step to solve 3x + 5 = 20?

The 2-digit number with tens digit a and ones digit b has what value?

In a number pyramid, what goes in a block?

Practice Problems

Try each one yourself first. Only then tap to see the full solution.

Easy

easy

Solve the equation x + 7 = 12.

easy

A friend thinks of a number, doubles it, and adds 5. The result is 17. What number did they think of?

Medium

medium

A 2 × 2 calendar grid of dates adds up to 60. Find the four dates. (The grid is a, a+1, a+7, a+8.)

medium

A 3-row pyramid has top block 50. Its bottom blocks are 5, then an empty block, then 9. Find the empty bottom block and fill the pyramid.

medium

Show that for any 2-digit number, reversing the digits and subtracting the smaller from the bigger always gives a multiple of 9. Use the number 62 to check.

Challenge

challenge

Invent a 'think of a number' trick whose answer is always 10, and prove with algebra that it works.

challenge

A mother is 5 times her daughter's age. In 6 years, the mother will be 3 times her daughter's age. How old is the daughter now?

Summary

  • A ‘think of a number’ trick works because the steps make the hidden number x cancel out (so the answer is fixed) or let us pull it back out. Algebra reveals the secret.
  • An expression like 2x + 4 is a recipe in symbols, built one step at a time. It has no equals sign yet.
  • An equation sets an expression equal to something. To solve it, picture a balance scale and do the same thing to both sides until the letter stands alone — peeling off the steps in reverse order.
  • In a number pyramid, each block is the sum of the two below it. Putting a letter in an empty block turns the puzzle into equations you can solve.
  • The calendar grid and date tricks write every box in terms of one or two letters, so one reported number is enough to find them all.
  • A 2-digit number “ab” means 10a + b, not a × b. This place value is why reversing digits and subtracting always gives 9(a − b) — a multiple of 9.
  • Above all: algebra proves a trick works for every number at once, where testing examples never can. That is its real power.

What’s Next

You have seen how a single letter can stand for every number at once, explain “magic” tricks, and prove statements for all numbers in one line. That habit of using letters to capture a whole pattern is the heart of algebra.

Next we turn that power onto shapes and space. The next chapter is Area. There you will measure the space inside flat figures — rectangles, triangles, and more — and you will see algebra return to give you neat formulas for them. See you there!

Frequently Asked Questions

Why does a think-of-a-number trick always give the same answer?

Because when you call the starting number x and follow each step, the x cancels out by the end. The steps are built so the unknown disappears and only a fixed number is left. So whatever number you start with, you reach the same final value.

What does it mean to solve an equation?

It means finding the value of the unknown letter that makes both sides equal. You picture the equation as a balanced scale and do the same thing to both sides — subtract the same amount, or divide both sides equally — until the letter stands alone.

Why is the reverse-the-digits difference always divisible by 9?

Write the number as 10a + b and the reversed number as 10b + a. Their difference is 9b minus 9a, which is 9 times the quantity b minus a. That is always 9 times a whole number, so it is always divisible by 9.

How does algebra help with number pyramids?

Put a letter in each empty bottom block. Because every block is the sum of the two below it, the rule gives you equations. You solve those equations to find the letters, then fill the whole pyramid.

Can I invent my own number trick?

Yes. Build a chain of steps using a letter x, choosing operations that finally cancel the x or hide a value inside a fixed number. Check with algebra that the x behaves as you want, then test it on a few real numbers.