Skip to the page
Home Campus
Start free

Difference of Two Squares

The identity (a+b)(a−b)=a2−b2:(a + b)(a - b) = a^2 - b^2\text{:} why the middle terms cancel, what it looks like as an area, how to expand with it, and how it turns 103×97103 \times 97 or 20222−202122022^2 - 2021^2 into easy sums.

Before you start

In lesson 3.5 you met the perfect squares (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2 and (a−b)2=a2−2ab+b2.(a - b)^2 = a^2 - 2ab + b^2\text{.} This lesson multiplies the two different brackets, (a+b)(a + b) and (a−b)(a - b), together.

The Identity

Expand (a+b)(a−b)(a + b)(a - b), each term by each term:

(a+b)(a−b)=a2−ab+ba−b2=a2−ab+ab−b2=a2−b2(a + b)(a - b) = a^2 - ab + ba - b^2 = a^2 - ab + ab - b^2 = a^2 - b^2

The two middle terms, −ab-ab and +ab+ab, are opposites, so they cancel. In the frame they lie on one diagonal:

×aa−b-b
aaa2a^2−ab-ab
+b+b+ab+ab−b2-b^2

a2−ab+ab−b2=a2−b2a^2 - ab + ab - b^2 = a^2 - b^2

The difference of two squares

(a+b)(a−b)=a2−b2(a + b)(a - b) = a^2 - b^2

The sum of two terms times their difference is the square of the first term minus the square of the second. The order of the brackets does not matter: (a−b)(a+b)=a2−b2(a - b)(a + b) = a^2 - b^2 too.

It is an identity: true for all values of aa and bb, and for any terms in their place.

Seeing It as an Area

Take aa greater than bb. (i) Start with a square of side aa and mark a square of side bb in one corner. (ii) Remove the small square: the L-shape that is left has area a2−b2a^2 - b^2. Cut it along the dashed line into piece 1, aa long and (a−b)(a - b) high, and piece 2, (a−b)(a - b) long and bb high. (iii) Turn piece 2 on its side and put it at the end of piece 1. Together they make a rectangle (a+b)(a + b) long and (a−b)(a - b) high.

Three pictures with a = 5 and b = 2 units. (i) A square of side a with a square of side b, marked b squared, in its bottom right corner. (ii) The L-shape left when the small square is removed, its corner dashed. A dashed cut divides it into piece 1, a long and a minus b high, on top, and piece 2, a minus b long and b high, below. (iii) Piece 1 and piece 2, turned, side by side: a rectangle a plus b long and a minus b high.b²aab(i)12aa − bba − b(ii)12aba + ba − b(iii)

Nothing was added or lost in moving the pieces, so the areas are equal: a2−b2=(a+b)(a−b).a^2 - b^2 = (a + b)(a - b)\text{.}

Expanding with the Identity

Check that the two brackets have the same two terms, one with ++ and one with −- between them. Then the answer is (first term)2^2 minus (second term)2^2, with no middle term.

Example 1: One letter, either order

Expand (a) (x+5)(x−5)(x + 5)(x - 5); (b) (5y−4)(5y+4)(5y - 4)(5y + 4).

Solution

(a) First term xx, second term 55: x2−52=x2−25x^2 - 5^2 = x^2 - 25.

In full: x2−5x+5x−25=x2−25.x^2 - 5x + 5x - 25 = x^2 - 25\text{.} The identity skips the cancelling terms.

(b) The minus bracket is written first, which does not matter: (5y)2−42=25y2−16.(5y)^2 - 4^2 = 25y^2 - 16\text{.}

(a) x2−25x^2 - 25; (b) 25y2−1625y^2 - 16

Example 2: Coefficients and two letters

Expand (a) (2x+7y)(2x−7y)(2x + 7y)(2x - 7y); (b) (6b−a)(6b+a)(6b - a)(6b + a).

Solution

(a) The first term is 2x2x and the second is 7y7y: (2x)2−(7y)2=4x2−49y2.(2x)^2 - (7y)^2 = 4x^2 - 49y^2\text{.}

(b) The first term is 6b6b and the second is aa: (6b)2−a2=36b2−a2.(6b)^2 - a^2 = 36b^2 - a^2\text{.}

(a) 4x2−49y24x^2 - 49y^2; (b) 36b2−a236b^2 - a^2

Example 3: A fraction

Expand (4a−72b)(4a+72b).(4a - \frac{7}{2}b)(4a + \frac{7}{2}b)\text{.}

Solution

The first term is 4a4a and the second is 72b\frac{7}{2}b.

(4a)2−(72b)2=16a2−494b2(4a)^2 - (\frac{7}{2}b)^2 = 16a^2 - \frac{49}{4}b^2

16a2−494b216a^2 - \frac{49}{4}b^2

Example 4: Terms with powers, and the number first

Expand (a) (x2+3)(x2−3)(x^2 + 3)(x^2 - 3); (b) (ab+c)(ab−c)(ab + c)(ab - c); (c) (5+x)(5−x)(5 + x)(5 - x).

Solution

(a) The first term is x2x^2: (x2)2−32=x4−9(x^2)^2 - 3^2 = x^4 - 9, since x2×x2=x×x×x×x=x4.x^2 \times x^2 = x \times x \times x \times x = x^4\text{.}

(b) The first term is abab: (ab)2−c2=a2b2−c2.(ab)^2 - c^2 = a^2b^2 - c^2\text{.}

(c) The first term is 55 and the second is xx: 52−x2=25−x25^2 - x^2 = 25 - x^2.

(a) x4−9x^4 - 9; (b) a2b2−c2a^2b^2 - c^2; (c) 25−x225 - x^2

Example 5: When it is not a difference of two squares

Expand (x−5)(5−x)(x - 5)(5 - x).

Solution

The brackets have the same numbers, but they are not the sum and the difference of the same two terms: 5−x=−(x−5)5 - x = -(x - 5). So the identity does not apply.

Expand in full: 5x−x2−25+5x=−x2+10x−25.5x - x^2 - 25 + 5x = -x^2 + 10x - 25\text{.}

This is −(x−5)2-(x - 5)^2: the product of (x−5)(x - 5) and its negative.

(x−5)(5−x)=−x2+10x−25(x - 5)(5 - x) = -x^2 + 10x - 25

Example 6: With a perfect square

Simplify (x+3)2−(x+3)(x−3).(x + 3)^2 - (x + 3)(x - 3)\text{.}

Solution

(x+3)2=x2+6x+9(x + 3)^2 = x^2 + 6x + 9 and (x+3)(x−3)=x2−9.(x + 3)(x - 3) = x^2 - 9\text{.}

(x2+6x+9)−(x2−9)=x2+6x+9−x2+9=6x+18(x^2 + 6x + 9) - (x^2 - 9) = x^2 + 6x + 9 - x^2 + 9 = 6x + 18

6x+186x + 18

Example 7: Spot the error

Ravi wrote (x+4)(x−4)=x2−8x−16.(x + 4)(x - 4) = x^2 - 8x - 16\text{.} Check with x=1x = 1, then correct it.

Solution

(5)(−3)=−15(5)(-3) = -15, but 1−8−16=−231 - 8 - 16 = -23. Wrong.

The middle terms −4x-4x and +4x+4x cancel; there is no −8x-8x. Correct: x2−16x^2 - 16, and 1−16=−151 - 16 = -15. ✓

(x+4)(x−4)=x2−16(x + 4)(x - 4) = x^2 - 16

Number Work

Two numbers the same distance either side of a round number can be multiplied with the identity. And because the identity works both ways, a2−b2a^2 - b^2 can be worked out as (a+b)(a−b)(a + b)(a - b).

Example 8: Products near a round number

Without a calculator, find (a) 103×97103 \times 97; (b) 51×4951 \times 49.

Solution

(a) 103×97=(100+3)(100−3)=1002−32=10 000−9=9991103 \times 97 = (100 + 3)(100 - 3) = 100^2 - 3^2 = 10\,000 - 9 = 9991

(b) 51×49=(50+1)(50−1)=2500−1=249951 \times 49 = (50 + 1)(50 - 1) = 2500 - 1 = 2499

(a) 99919991; (b) 24992499

Example 9: Differences of squares of numbers

Without a calculator, find (a) 652−35265^2 - 35^2; (b) 20222−202122022^2 - 2021^2.

Solution

(a) 652−352=(65+35)(65−35)=100×30=300065^2 - 35^2 = (65 + 35)(65 - 35) = 100 \times 30 = 3000

(b) 20222−20212=(2022+2021)(2022−2021)=4043×1=40432022^2 - 2021^2 = (2022 + 2021)(2022 - 2021) = 4043 \times 1 = 4043

(a) 30003000; (b) 40434043

Consecutive squares

In the same way, n2−(n−1)2=(n+n−1)(n−n+1)=2n−1.n^2 - (n - 1)^2 = (n + n - 1)(n - n + 1) = 2n - 1\text{.} So two consecutive squares always differ by an odd number: 102−92=1910^2 - 9^2 = 19, 502−492=9950^2 - 49^2 = 99, 1002−992=199100^2 - 99^2 = 199.

Common Mistakes

  • Writing a middle term: (x+4)(x−4)=x2−16,(x + 4)(x - 4) = x^2 - 16\text{,} not x2−8x−16x^2 - 8x - 16.
  • Squaring only the letter: (3x+2)(3x−2)=9x2−4,(3x + 2)(3x - 2) = 9x^2 - 4\text{,} not 3x2−43x^2 - 4.
  • A plus sign in the answer: (y−6)(y+6)=y2−36,(y - 6)(y + 6) = y^2 - 36\text{,} not y2+36y^2 + 36.
  • Using the identity when the brackets are not a sum and difference of the same terms: (x−5)(5−x)(x - 5)(5 - x) is −x2+10x−25-x^2 + 10x - 25.
  • Confusing (a+b)(a−b)=a2−b2(a + b)(a - b) = a^2 - b^2 with (a−b)2=a2−2ab+b2.(a - b)^2 = a^2 - 2ab + b^2\text{.}

Practice

Try each question before you open its solution.

Question 1

Expand (a) (x+3)(x−3)(x + 3)(x - 3); (b) (y−8)(y+8)(y - 8)(y + 8); (c) (2p+1)(2p−1)(2p + 1)(2p - 1).

ShowHide solution

(a) x2−32=x2−9x^2 - 3^2 = x^2 - 9

(b) y2−82=y2−64y^2 - 8^2 = y^2 - 64

(c) (2p)2−12=4p2−1(2p)^2 - 1^2 = 4p^2 - 1

(a) x2−9x^2 - 9; (b) y2−64y^2 - 64; (c) 4p2−14p^2 - 1

Question 2

Expand (a) (3a+5b)(3a−5b)(3a + 5b)(3a - 5b); (b) (7m−n)(7m+n)(7m - n)(7m + n).

ShowHide solution

(a) (3a)2−(5b)2=9a2−25b2(3a)^2 - (5b)^2 = 9a^2 - 25b^2

(b) (7m)2−n2=49m2−n2(7m)^2 - n^2 = 49m^2 - n^2

(a) 9a2−25b29a^2 - 25b^2; (b) 49m2−n249m^2 - n^2

Question 3

Expand (a) (x+12)(x−12);(x + \frac{1}{2})(x - \frac{1}{2})\text{;} (b) (23y−3)(23y+3).(\frac{2}{3}y - 3)(\frac{2}{3}y + 3)\text{.}

ShowHide solution

(a) x2−(12)2=x2−14x^2 - (\frac{1}{2})^2 = x^2 - \frac{1}{4}

(b) (23y)2−32=49y2−9(\frac{2}{3}y)^2 - 3^2 = \frac{4}{9}y^2 - 9

(a) x2−14x^2 - \frac{1}{4}; (b) 49y2−9\frac{4}{9}y^2 - 9

Question 4

Expand (a) (y2+5)(y2−5)(y^2 + 5)(y^2 - 5); (b) (2xy−1)(2xy+1)(2xy - 1)(2xy + 1).

ShowHide solution

(a) (y2)2−52=y4−25(y^2)^2 - 5^2 = y^4 - 25

(b) (2xy)2−12=4x2y2−1(2xy)^2 - 1^2 = 4x^2y^2 - 1

(a) y4−25y^4 - 25; (b) 4x2y2−14x^2y^2 - 1

Question 5

Expand (a) (6−x)(6+x)(6 - x)(6 + x); (b) (1+3k)(1−3k)(1 + 3k)(1 - 3k).

ShowHide solution

(a) 62−x2=36−x26^2 - x^2 = 36 - x^2

(b) 12−(3k)2=1−9k21^2 - (3k)^2 = 1 - 9k^2

(a) 36−x236 - x^2; (b) 1−9k21 - 9k^2

Question 6

Which of these products is a difference of two squares? Expand both. (a) (x+2)(2−x)(x + 2)(2 - x); (b) (x−3)(3−x)(x - 3)(3 - x)

ShowHide solution

(a) (x+2)(2−x)=(2+x)(2−x):(x + 2)(2 - x) = (2 + x)(2 - x)\text{:} the sum and the difference of 22 and xx. So it is 4−x24 - x^2.

(b) 3−x=−(x−3)3 - x = -(x - 3), so this is not a sum times a difference. In full: 3x−x2−9+3x=−x2+6x−9.3x - x^2 - 9 + 3x = -x^2 + 6x - 9\text{.}

(a) is a difference of two squares: 4−x24 - x^2. (b) is not: −x2+6x−9-x^2 + 6x - 9.

Question 7

Simplify (a) (x+4)2−(x+4)(x−4);(x + 4)^2 - (x + 4)(x - 4)\text{;} (b) (2x−1)(2x+1)−(2x−1)2.(2x - 1)(2x + 1) - (2x - 1)^2\text{.}

ShowHide solution

(a) (x2+8x+16)−(x2−16)=8x+32(x^2 + 8x + 16) - (x^2 - 16) = 8x + 32

(b) (4x2−1)−(4x2−4x+1)=4x2−1−4x2+4x−1=4x−2(4x^2 - 1) - (4x^2 - 4x + 1) = 4x^2 - 1 - 4x^2 + 4x - 1 = 4x - 2

(a) 8x+328x + 32; (b) 4x−24x - 2

Question 8

Without a calculator, find (a) 102×98102 \times 98; (b) 45×3545 \times 35; (c) 9.8×10.29.8 \times 10.2.

ShowHide solution

(a) (100+2)(100−2)=10 000−4=9996(100 + 2)(100 - 2) = 10\,000 - 4 = 9996

(b) (40+5)(40−5)=1600−25=1575(40 + 5)(40 - 5) = 1600 - 25 = 1575

(c) (10−0.2)(10+0.2)=100−0.04=99.96(10 - 0.2)(10 + 0.2) = 100 - 0.04 = 99.96

(a) 99969996; (b) 15751575; (c) 99.9699.96

Question 9

Without a calculator, find (a) 752−25275^2 - 25^2; (b) 10012−99921001^2 - 999^2; (c) 402−39240^2 - 39^2.

ShowHide solution

(a) (75+25)(75−25)=100×50=5000(75 + 25)(75 - 25) = 100 \times 50 = 5000

(b) (1001+999)(1001−999)=2000×2=4000(1001 + 999)(1001 - 999) = 2000 \times 2 = 4000

(c) (40+39)(40−39)=79×1=79(40 + 39)(40 - 39) = 79 \times 1 = 79

(a) 50005000; (b) 40004000; (c) 7979

Question 10

A square card has sides of xx cm. A square of side 33 cm is cut from one corner. (a) Write the area left as a difference of two squares. (b) Show that it equals (x+3)(x−3)(x + 3)(x - 3). (c) Find the area left when x=13x = 13, in two ways.

ShowHide solution

(a) x2−32=x2−9x^2 - 3^2 = x^2 - 9 cm².

(b) (x+3)(x−3)=x2−3x+3x−9=x2−9.(x + 3)(x - 3) = x^2 - 3x + 3x - 9 = x^2 - 9\text{.} ✓

(c) 132−9=169−9=160,13^2 - 9 = 169 - 9 = 160\text{,} and (13+3)(13−3)=16×10=160.(13 + 3)(13 - 3) = 16 \times 10 = 160\text{.}

(a) (x2−9)(x^2 - 9) cm²; (c) 160160 cm²

Question 11

A square plot has sides of (x+2)(x + 2) m. A rectangular plot is (x+4)(x + 4) m long and xx m wide. Show that the square plot is always 44 m² larger.

ShowHide solution

The rectangle’s sides are 22 m more and 22 m less than (x+2)(x + 2): x+4=(x+2)+2x + 4 = (x + 2) + 2 and x=(x+2)−2x = (x + 2) - 2.

So its area is ((x+2)+2)((x+2)−2)=(x+2)2−4,((x + 2) + 2)((x + 2) - 2) = (x + 2)^2 - 4\text{,} by the difference of two squares.

The square’s area is (x+2)2(x + 2)^2, which is 44 m² more. Check with x=3x = 3: 52=255^2 = 25 and 7×3=217 \times 3 = 21; 25−21=425 - 21 = 4. ✓

The square plot is 44 m² larger for every value of xx.

Question 12

Each line has one mistake. Find it and correct it. (a) (5x+3)(5x−3)=5x2−9;(5x + 3)(5x - 3) = 5x^2 - 9\text{;} (b) (k−7)(k+7)=k2+49;(k - 7)(k + 7) = k^2 + 49\text{;} (c) (a+b)(a−b)=a2−2ab−b2(a + b)(a - b) = a^2 - 2ab - b^2

ShowHide solution

(a) The first term must be squared whole: (5x)2=25x2(5x)^2 = 25x^2. Correct: 25x2−925x^2 - 9.

(b) The last term is (+7)×(−7)=−49.(+7) \times (-7) = -49\text{.} Correct: k2−49k^2 - 49.

(c) The middle terms −ab-ab and +ab+ab cancel. Correct: a2−b2a^2 - b^2. Check with a=3a = 3, b=1b = 1: (4)(2)=8=9−1(4)(2) = 8 = 9 - 1. ✓

(a) 25x2−925x^2 - 9; (b) k2−49k^2 - 49; (c) a2−b2a^2 - b^2

Key Points

  • (a+b)(a−b)=a2−b2,(a + b)(a - b) = a^2 - b^2\text{,} in either order of brackets; the middle terms cancel.
  • As an area: the L-shape a2−b2a^2 - b^2 cut and moved makes a rectangle (a+b)(a + b) by (a−b)(a - b).
  • Square the whole of each term: (2x+7y)(2x−7y)=4x2−49y2.(2x + 7y)(2x - 7y) = 4x^2 - 49y^2\text{.}
  • The brackets must be the sum and the difference of the same two terms; (x−5)(5−x)(x - 5)(5 - x) is not.
  • Number work: 103×97=1002−32,103 \times 97 = 100^2 - 3^2\text{,} and 652−352=100×30.65^2 - 35^2 = 100 \times 30\text{.}
  • n2n^2 and (n−1)2(n - 1)^2 differ by 2n−12n - 1, an odd number.

‹ 3.5 Perfect Squares 3.7 Factorising Using the Identities ›

All Secondary 2 (Grade 8) lessons

Home Campus has lessons, practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 2 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.