Mathematics · Book 1 · Grades 1–9

Primary & Middle School Mathematics

Primary & Middle School Mathematics · Grades 1–9

66Algebra and Equations

Letters stand for numbers, and computing with letters proves facts about all numbers at once. This chapter practices expanding and factoring — including the three identities that will follow you through all of mathematics — and solves first-degree equations, product equations, and simple inequalities, always one justified step at a time.

66.1 Expanding

Definition 66.1 (Expanding)

Expanding means transforming a product into a sum, using distributivity:

k(a+b)=ka+kb,(a+b)(c+d)=ac+ad+bc+bd.k(a + b) = ka + kb, \qquad (a + b)(c + d) = ac + ad + bc + bd .

Example 66.2

Every term of the first bracket multiplies every term of the second:

(x+3)(2x+5)=x×2x+x×5+3×2x+3×5=2x2+5x+6x+15=2x2+11x+15.\begin{align*} (x + 3)(2x + 5) &= x \times 2x + x \times 5 + 3 \times 2x + 3 \times 5 \\ &= 2x^2 + 5x + 6x + 15 \\ &= 2x^2 + 11x + 15 . \end{align*}

Signs travel with the terms:

(3x2)(x4)=3x212x2x+8=3x214x+8.\begin{align*} (3x - 2)(x - 4) &= 3x^2 - 12x - 2x + 8 = 3x^2 - 14x + 8 . \end{align*}

Theorem 66.3 (The three identities)

For all numbers aa and bb:

(a+b)2=a2+2ab+b2,(ab)2=a22ab+b2,(a+b)(ab)=a2b2.(a+b)^2 = a^2 + 2ab + b^2, \qquad (a-b)^2 = a^2 - 2ab + b^2, \qquad (a+b)(a-b) = a^2 - b^2 .

Proof. Expand each left-hand side. For the first: (a+b)(a+b)=a2+ab+ba+b2=a2+2ab+b2(a+b)(a+b) = a^2 + ab + ba + b^2 = a^2 + 2ab + b^2. For the second, replace bb by b-b in the first. For the third: (a+b)(ab)=a2ab+bab2=a2b2(a+b)(a-b) = a^2 - ab + ba - b^2 = a^2 - b^2 (the cross terms cancel).

The identity (a+b)2 = a2 + 2ab + b2, seen as areas: the big square of side a+b is made of two squares and two equal rectangles. Forgetting the “2ab” is forgetting the two rectangles!
The identity (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2, seen as areas: the big square of side a+ba+b is made of two squares and two equal rectangles. Forgetting the “2ab2ab” is forgetting the two rectangles!

Example 66.4

(x+5)2=x2+10x+25,(3x1)2=9x26x+1,(2x+7)(2x7)=4x249.(x + 5)^2 = x^2 + 10x + 25, \qquad (3x - 1)^2 = 9x^2 - 6x + 1, \qquad (2x + 7)(2x - 7) = 4x^2 - 49 .

Mental arithmetic: 1022=(100+2)2=10000+400+4=10404102^2 = (100 + 2)^2 = 10000 + 400 + 4 = 10404, and 98×102=(1002)(100+2)=100004=999698 \times 102 = (100-2)(100+2) = 10000 - 4 = 9996.

66.2 Factoring

Method 66.5 (Factoring)

To factor an expression, try in order:

  1. common factor: ka+kb=k(a+b)ka + kb = k(a + b), where kk may itself be a bracket;
  2. difference of squares: a2b2=(a+b)(ab)a^2 - b^2 = (a+b)(a-b);
  3. perfect square: a2+2ab+b2=(a+b)2a^2 + 2ab + b^2 = (a+b)^2 (and with 2ab-2ab, (ab)2(a-b)^2).

Always check by expanding the result.

Example 66.6

Common factor: 15x2+10x=5x×3x+5x×2=5x(3x+2)15x^2 + 10x = 5x \times 3x + 5x \times 2 = 5x(3x + 2).

Common bracket:

(x+2)(x1)+(x+2)(3x+4)=(x+2)[(x1)+(3x+4)]=(x+2)(4x+3).(x+2)(x-1) + (x+2)(3x+4) = (x+2)\bigl[(x-1) + (3x+4)\bigr] = (x+2)(4x+3).

Difference of squares: x281=(x+9)(x9)x^2 - 81 = (x+9)(x-9), and

(2x+1)29=(2x+1)232=(2x+1+3)(2x+13)=(2x+4)(2x2).(2x+1)^2 - 9 = (2x+1)^2 - 3^2 = (2x+1+3)(2x+1-3) = (2x+4)(2x-2).

Each factor still has a common factor: (2x+4)(2x2)=2(x+2)×2(x1)=4(x+2)(x1)(2x+4)(2x-2) = 2(x+2) \times 2(x-1) = 4(x+2)(x-1).

66.3 Equations

Method 66.7 (First-degree equations)

To solve an equation like 5x3=2x+95x - 3 = 2x + 9:

  1. gather the xx-terms on one side, the numbers on the other, by adding the same quantity to both sides;
  2. reduce each side;
  3. divide both sides by the coefficient of xx;
  4. check the solution in the original equation.

Example 66.8

5x3=2x+95x2x=9+3(add 32x to both sides)3x=12x=4(divide by 3).\begin{align*} 5x - 3 &= 2x + 9 \\ 5x - 2x &= 9 + 3 && \text{(add $3 - 2x$ to both sides)}\\ 3x &= 12 \\ x &= 4 && \text{(divide by 3).} \end{align*}

Check: 5×43=175 \times 4 - 3 = 17 and 2×4+9=172 \times 4 + 9 = 17. The solution is 44.

With brackets, expand first: 3(x2)=x+83(x - 2) = x + 8 becomes 3x6=x+83x - 6 = x + 8, so 2x=142x = 14 and x=7x = 7.

Theorem 66.9 (Zero-product rule)

A product is zero if and only if at least one factor is zero:

A×B=0A=0  or  B=0.A \times B = 0 \quad\Longleftrightarrow\quad A = 0 \ \text{ or } \ B = 0 .

Proof. If a factor is zero the product clearly is. Conversely if AB=0A B = 0 with A0A \neq 0, dividing both sides by AA gives B=0B = 0.

Example 66.10

Solve (x3)(2x+10)=0(x - 3)(2x + 10) = 0: either x3=0x - 3 = 0 or 2x+10=02x + 10 = 0, so the solutions are 33 and 5-5.

Solve x249=0x^2 - 49 = 0: factor first, (x7)(x+7)=0(x-7)(x+7) = 0, solutions 77 and 7-7.

Solve x2=3xx^2 = 3x: never divide by xx! Move and factor: x23x=x(x3)=0x^2 - 3x = x(x - 3) = 0, solutions 00 and 33.

66.4 Inequalities

Proposition 66.11 (Rules for inequalities)

An inequality is preserved when adding the same number to both sides, and when multiplying both sides by the same positive number. Multiplying both sides by a negative number reverses the inequality sign.

Proof. If aba \leq b then ba0b - a \geq 0. Adding cc: (b+c)(a+c)=ba0(b+c) - (a+c) = b - a \geq 0, so a+cb+ca + c \leq b + c. Multiplying by c>0c > 0: bcac=(ba)c0bc - ac = (b-a)c \geq 0, so acbcac \leq bc. Multiplying by c<0c < 0: (ba)c0(b-a)c \leq 0, so acbcac \geq bc: the order is reversed.

Example 66.12

Solve 72x<157 - 2x < 15:

72x<152x<8(subtract 7)x>4(divide by 2: reverse the sign).\begin{align*} 7 - 2x &< 15 \\ -2x &< 8 && \text{(subtract 7)} \\ x &> -4 && \text{(divide by $-2$: reverse the sign).} \end{align*}

The solutions are all numbers greater than 4-4: on a number line, a hollow dot at 4-4 and shading to the right.

The solutions of 7 - 2x < 15: all x > -4 (hollow dot: -4 itself is not a solution).
The solutions of 72x<157 - 2x < 15: all x>4x > -4 (hollow dot: 4-4 itself is not a solution).

66.5 Exercises

Exercise 66.1

Expand and reduce:

4(3x2),(x+6)(x+2),(2x3)(x+5),(x1)(x9).4(3x - 2), \qquad (x + 6)(x + 2), \qquad (2x - 3)(x + 5), \qquad (x - 1)(x - 9).
Solution

Solution of Exercise 66.1.

4(3x2)=12x84(3x - 2) = 12x - 8.

(x+6)(x+2)=x2+2x+6x+12=x2+8x+12(x+6)(x+2) = x^2 + 2x + 6x + 12 = x^2 + 8x + 12.

(2x3)(x+5)=2x2+10x3x15=2x2+7x15(2x-3)(x+5) = 2x^2 + 10x - 3x - 15 = 2x^2 + 7x - 15.

(x1)(x9)=x29xx+9=x210x+9(x-1)(x-9) = x^2 - 9x - x + 9 = x^2 - 10x + 9.

Exercise 66.2

Expand using the identities:

(x+8)2,(3x4)2,(x+10)(x10),(5x+2)(5x2).(x + 8)^2, \qquad (3x - 4)^2, \qquad (x + 10)(x - 10), \qquad (5x + 2)(5x - 2).
Solution

Solution of Exercise 66.2.

(x+8)2=x2+16x+64(x+8)^2 = x^2 + 16x + 64.

(3x4)2=9x224x+16(3x-4)^2 = 9x^2 - 24x + 16.

(x+10)(x10)=x2100(x+10)(x-10) = x^2 - 100.

(5x+2)(5x2)=25x24(5x+2)(5x-2) = 25x^2 - 4.

Exercise 66.3

Compute mentally, using an identity: 1012101^2; 59259^2 (write 59=60159 = 60 - 1); 53×4753 \times 47.

Solution

Solution of Exercise 66.3.

1012=(100+1)2=10000+200+1=10201101^2 = (100+1)^2 = 10000 + 200 + 1 = 10201.

592=(601)2=3600120+1=348159^2 = (60-1)^2 = 3600 - 120 + 1 = 3481.

53×47=(50+3)(503)=25009=249153 \times 47 = (50+3)(50-3) = 2500 - 9 = 2491.

Exercise 66.4

Factor:

9x+12,x264,x2+14x+49,18x26x.9x + 12, \qquad x^2 - 64, \qquad x^2 + 14x + 49, \qquad 18x^2 - 6x .
Solution

Solution of Exercise 66.4.

9x+12=3(3x+4)9x + 12 = 3(3x + 4).

x264=(x+8)(x8)x^2 - 64 = (x+8)(x-8).

x2+14x+49=(x+7)2x^2 + 14x + 49 = (x+7)^2.

18x26x=6x(3x1)18x^2 - 6x = 6x(3x - 1).

Exercise 66.5

Solve, writing every step:

4x+7=19,6x5=2x+11,5(x3)=3x+1.4x + 7 = 19, \qquad 6x - 5 = 2x + 11, \qquad 5(x - 3) = 3x + 1 .
Solution

Solution of Exercise 66.5.

4x+7=194x + 7 = 19: 4x=124x = 12, so x=3x = 3.

6x5=2x+116x - 5 = 2x + 11: 4x=164x = 16, so x=4x = 4.

5(x3)=3x+15(x-3) = 3x + 1: 5x15=3x+15x - 15 = 3x + 1, so 2x=162x = 16 and x=8x = 8.

Exercise 66.6 ★★

Solve using the zero-product rule:

(x+4)(3x12)=0,x2121=0,(2x1)2=0,x2=8x.(x + 4)(3x - 12) = 0, \qquad x^2 - 121 = 0, \qquad (2x - 1)^2 = 0, \qquad x^2 = 8x .
Solution

Solution of Exercise 66.6.

(x+4)(3x12)=0(x+4)(3x-12) = 0: x=4x = -4 or x=4x = 4.

x2121=(x11)(x+11)=0x^2 - 121 = (x-11)(x+11) = 0: x=11x = 11 or x=11x = -11.

(2x1)2=0(2x-1)^2 = 0: the single solution x=12x = \frac12.

x2=8xx^2 = 8x: x(x8)=0x(x - 8) = 0, so x=0x = 0 or x=8x = 8.

Exercise 66.7 ★★

Factor E=(3x+2)225E = (3x + 2)^2 - 25, then solve E=0E = 0.

Solution

Solution of Exercise 66.7.

Difference of squares with a=3x+2a = 3x + 2 and b=5b = 5:

E=(3x+2)252=(3x+2+5)(3x+25)=(3x+7)(3x3).E = (3x + 2)^2 - 5^2 = (3x + 2 + 5)(3x + 2 - 5) = (3x + 7)(3x - 3).

Zero-product rule: 3x+7=03x + 7 = 0 gives x=73x = -\frac73, and 3x3=03x - 3 = 0 gives x=1x = 1.

Exercise 66.8 ★★

Solve the inequalities and represent the solutions on a number line:

3x48,52x>1,4(x+1)x5.3x - 4 \geq 8, \qquad 5 - 2x > 1, \qquad 4(x + 1) \leq x - 5 .
Solution

Solution of Exercise 66.8.

3x483x - 4 \geq 8: 3x123x \geq 12, so x4x \geq 4 (filled dot at 44, shade right).

52x>15 - 2x > 1: 2x>4-2x > -4, dividing by 2-2 reverses the sign: x<2x < 2 (hollow dot at 22, shade left).

4(x+1)x54(x+1) \leq x - 5: 4x+4x54x + 4 \leq x - 5, so 3x93x \leq -9, so x3x \leq -3 (filled dot at 3-3, shade left).

Exercise 66.9 ★★

I think of a number, multiply it by 33, add 77, and get the same result as if I had multiplied it by 55 and subtracted 99. What is my number? (Set up an equation and solve it.)

Solution

Solution of Exercise 66.9.

Let xx be the number: 3x+7=5x93x + 7 = 5x - 9. Then 16=2x16 = 2x, so x=8x = 8. Check: 3×8+7=313 \times 8 + 7 = 31 and 5×89=315 \times 8 - 9 = 31.

Exercise 66.10 ★★★

Let nn be a whole number.

  1. Expand (n+1)(n1)(n + 1)(n - 1) and deduce that the product of the two neighbors of nn is always n21n^2 - 1 (e.g. 24×26=2521=62424 \times 26 = 25^2 - 1 = 624).
  2. Show that the sum of three consecutive integers is always a multiple of 33.
Solution

Solution of Exercise 66.10.

1. (n+1)(n1)=n21(n+1)(n-1) = n^2 - 1 (third identity). The neighbors of nn are n1n - 1 and n+1n + 1, so their product is n21n^2 - 1: e.g. 24×26=6251=62424 \times 26 = 625 - 1 = 624.

2. Three consecutive integers can be written n1n - 1, nn, n+1n + 1. Their sum is

(n1)+n+(n+1)=3n,(n-1) + n + (n+1) = 3n ,

a multiple of 33 (three times the middle one).

66.6 Problem: The algebra of digits

Problem 66.1

Weekend problem — why the divisibility rules work, the 1089 trick unmasked, and mental arithmetic that looks like sorcery

Grade school taught you rules (a number is divisible by 99 when its digit sum is); magicians perform tricks (everyone ends on 10891089); markets know shortcuts (352=122535^2 = 1225, instantly). All of it is the same secret: a number with digits aa, bb, cc is the expression 100a+10b+c100a + 10b + c, and this chapter’s algebra (Theorem 66.3, expanding, factoring) can take it apart. By the end of this problem you will have proved the rules, unmasked the trick, and learned the sorcery.

Part I — Digits under the microscope.

  1. A two-digit number with tens digit aa and units digit bb is 10a+b10a + b. Expand and factor the difference between the number and its reversal, (10a+b)(10b+a)(10a + b) - (10b + a), and state the discovery. Check it on 722772 - 27.
  2. Prove the rule of nine for three-digit numbers: verify the identity

    100a+10b+c=9(11a+b)+(a+b+c),100a + 10b + c = 9\,(11a + b) + (a + b + c),

    and explain why it shows that a number and its digit sum leave the same remainder in the division by 99 — so one is divisible by 99 exactly when the other is (Proposition 64.3, now proved).

  3. Deduce the rule of three from the same identity, in one sentence.
  4. “Casting out nines”, the accountants’ check: to test 47×86=404247 \times 86 = 4\,042, replace each number by the digit sum of its digit sum: 4711247 \to 11 \to 2, 8614586 \to 14 \to 5, and 2×5=1012 \times 5 = 10 \to 1; then 40421014\,042 \to 10 \to 1: consistent. Explain why a correct product must pass the test (write 47=9k+247 = 9k + 2, 86=9l+586 = 9l + 5 and expand), and find a wrong result that the test fails to catch (why are swapped digits invisible to it?).
  5. Prove the rule of eleven for four-digit numbers: verify

    1000a+100b+10c+d=11(91a+9b+c)+(a+bc+d),1000a + 100b + 10c + d = 11\,(91a + 9b + c) + (- a + b - c + d),

    and use it to decide whether 29262\,926 is divisible by 1111.

Part II — The 1089 trick. The trick: think of a three-digit number whose first and last digits differ by at least 22; reverse it; subtract the smaller from the larger; reverse the result; add the last two numbers. The magician announces: 1089.

  1. Perform the trick on 742742 and on one number of your choice.
  2. Let the number have digits aa, bb, cc with a>ca > c. Factor the first subtraction, (100a+10b+c)(100c+10b+a)(100a + 10b + c) - (100c + 10b + a), and list all the values it can take when aca - c runs from 22 to 99.
  3. Each of those multiples of 9999 has a striking digit pattern. Writing m=acm = a - c, verify the identity

    99m=100(m1)+90+(10m),99m = 100\,(m - 1) + 90 + (10 - m),

    and read off the three digits of 99m99m.

  4. Add 99m99m to its own reversal, using question 8’s digits, and prove that the total is 10891089 — whatever mm is. The trick is dead; long live the algebra.
  5. Why did the magician require the first and last digits to differ by at least 22? Examine the cases a=ca = c and ac=1a - c = 1 (where the subtraction gives 9999, which must be written 099099 for the reversal to work), and state the small print that keeps the trick honest.

Part III — Sorcery for daily use.

  1. The birthday trick: “multiply your birth month by 55, add 77, double, add your birth day, subtract 1414.” Show that the result is always 10m+d10m + d — month and day, readable at a glance. (Try it on someone.)
  2. You redesign the trick as: “multiply the month by 55, add 99, double, add the day.” What number must the spectator now subtract at the end for the same month–day readout?
  3. The missing-digit trick: the spectator picks any number, subtracts its digit sum (question 2 says the result is always a multiple of 99 — explain why for a three-digit number), then crosses out one nonzero digit and reads you the remaining digits. Explain how you recover the crossed-out digit, and why 00 had to be excluded.
  4. Market sorcery: prove the identity (10t+5)2=100t(t+1)+25(10t + 5)^2 = 100\,t(t+1) + 25, state the rule for squaring any number ending in 55, and compute 45245^2, 85285^2 and 1052105^2 in your head.
  5. Finale, extending Exercise 66.10: prove that the sum of five consecutive integers is always a multiple of 55, but that the sum of four consecutive integers is never a multiple of 44. (Two short computations — and one moral about what algebra does to the words “always” and “never”.)
Solution

Solution of Problem 66.1.

1. (10a+b)(10b+a)=9a9b=9(ab)(10a + b) - (10b + a) = 9a - 9b = 9(a - b): the difference between a two-digit number and its reversal is always a multiple of 99. Check: 7227=45=9×572 - 27 = 45 = 9 \times 5, and ab=72=5a - b = 7 - 2 = 5.

2. Expanding the right side: 9(11a+b)+a+b+c=99a+9b+a+b+c=100a+10b+c9(11a + b) + a + b + c = 99a + 9b + a + b + c = 100a + 10b + c. So the number equals a multiple of 99 plus its digit sum: dividing by 99, both leave the same remainder. In particular remainder 00 for one means remainder 00 for the other: the rule of nine, proved.

3. 9(11a+b)9(11a + b) is also a multiple of 33, so the same identity shows number and digit sum leave the same remainder in the division by 33: the rule of three.

4. Write 47=9k+247 = 9k + 2 and 86=9l+586 = 9l + 5. Then

47×86=(9k+2)(9l+5)=9(9kl+5k+2l)+10:47 \times 86 = (9k + 2)(9l + 5) = 9\,(9kl + 5k + 2l) + 10 :

the product leaves the same remainder as 2×5=102 \times 5 = 10, namely 11. A correct result must therefore also leave remainder 11 — which 40424\,042 does. But the test only sees remainders: 40424\,042 and 44024\,402 (digits swapped) pass identically, so passing proves nothing — failing is what convicts.

5. Expanding: 11(91a+9b+c)a+bc+d=1001a+99b+11ca+bc+d=1000a+100b+10c+d11(91a + 9b + c) - a + b - c + d = 1001a + 99b + 11c - a + b - c + d = 1000a + 100b + 10c + d. So the number is divisible by 1111 exactly when its alternating sum a+bc+d-a + b - c + d is. For 29262\,926: 2+92+6=11-2 + 9 - 2 + 6 = 11, divisible by 1111: yes, 2926=11×2662\,926 = 11 \times 266.

6. 742247=495742 - 247 = 495; 495+594=1089495 + 594 = 1\,089. Any valid example lands on 10891\,089 too.

7. (100a+10b+c)(100c+10b+a)=99(ac)(100a + 10b + c) - (100c + 10b + a) = 99(a - c). For ac=2,3,,9a - c = 2, 3, \dots, 9:

198, 297, 396, 495, 594, 693, 792, 891.198,\ 297,\ 396,\ 495,\ 594,\ 693,\ 792,\ 891 .

8. 100(m1)+90+(10m)=100m100+90+10m=99m100(m - 1) + 90 + (10 - m) = 100m - 100 + 90 + 10 - m = 99m. So the three digits of 99m99m are m1m - 1, then 99, then 10m10 - m (check 495495: m=5m = 5 gives 44, 99, 55).

9. The reversal of 99m99m has digits 10m10 - m, 99, m1m - 1, so it equals 100(10m)+90+(m1)100(10 - m) + 90 + (m - 1). Adding:

100(m1+10m)+180+(10m+m1)=100×9+180+9=1089,100\,(m - 1 + 10 - m) + 180 + (10 - m + m - 1) = 100 \times 9 + 180 + 9 = 1\,089 ,

independent of mm. Whatever the starting number, the magician is safe.

10. If a=ca = c, the subtraction gives 00 and the trick dies at once. If ac=1a - c = 1, it gives 9999, which must be treated as the three-digit string 099099 (reversal 990990, 99+990=108999 + 990 = 1\,089: saved!). The small print: differences of 11 work only if the spectator writes the subtraction result with three digits, leading zero included — requiring a gap of at least 22 avoids the argument.

11. 2(5m+7)+d14=10m+14+d14=10m+d2(5m + 7) + d - 14 = 10m + 14 + d - 14 = 10m + d: the tens (and hundreds, for October–December) show the month, the units (and tens) the day.

12. 2(5m+9)+d=10m+18+d2(5m + 9) + d = 10m + 18 + d: subtract 1818.

13. By question 2, n(digit sum of n)=9(11a+b)n - (\text{digit sum of } n) = 9(11a + b) for a three-digit nn: always a multiple of 99 (similar identities work for any length). A multiple of 99 has digit sum a multiple of 99 (question 2 again), so the digits the spectator reads out must be completed to the next multiple of 99: the missing digit is that complement. Ambiguity: if the read digits already sum to a multiple of 99, the crossed digit could be 00 or 99 — excluding 00 removes the doubt.

14. (10t+5)2=100t2+100t+25=100t(t+1)+25(10t + 5)^2 = 100t^2 + 100t + 25 = 100\,t(t + 1) + 25: write t(t+1)t(t+1), then glue 2525 behind it. 45245^2: 4×5=204 \times 5 = 20, so 20252\,025. 85285^2: 8×9=728 \times 9 = 72, so 72257\,225. 1052105^2: 10×11=11010 \times 11 = 110, so 1102511\,025.

15. Five consecutive: n+(n+1)+(n+2)+(n+3)+(n+4)=5n+10=5(n+2)n + (n+1) + (n+2) + (n+3) + (n+4) = 5n + 10 = 5(n + 2): a multiple of 55, always. Four consecutive: n+(n+1)+(n+2)+(n+3)=4n+6=4(n+1)+2n + (n+1) + (n+2) + (n+3) = 4n + 6 = 4(n + 1) + 2: remainder 22 in the division by 44, never a multiple. Algebra converts “it seems to work” into always, and “I found no example” into never — two words no amount of testing can reach (Method 48.8).