letx=

Algebra

Difference of two squares

Any square minus another square factorises into a sum times a difference.

a2−b2=(a+b)(a−b)

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

aba + ba − b
  • The L-shape has area a² − b² = 55. Cut off the strip on the right and turn it: it becomes a (a + b) × (a − b) rectangle = 55.

What the symbols mean

P
the value of a2−b2
a
the first number (or expression)
b
the second number (or expression)

When to use it

Use it to factorise expressions like x2−49 or 9y2−4, to simplify fractions, to solve equations such as x2−16=0, and for quick mental arithmetic: 472−432 is just 90×4. There is no matching rule for a *sum* of two squares over the real numbers.

Worked example

Work out 47² − 43² without a calculator (a = 47, b = 43).

  1. Start from the formula.

    P=(a+b)⁢(a−b)
  2. Substitute a = 47, b = 43 and work it out.

    P=(47+43)·(47−43)
    =90·4
    =360
  3. Check by squaring first: 472−432=2209−1849=360. Same answer, harder arithmetic.

Answer 47² − 43² = 360

Why it works

Multiply out the right side: (a+b)(a−b)=a2−ab+ab−b2=a2−b2. The middle terms cancel. The graph shows it as a picture: an L-shaped piece of area a2−b2 rearranges into an (a+b)×(a−b) rectangle.

Common mistakes

  • Trying to factorise a2+b2 the same way. (a+b)(a+b) is a2+2ab+b2.
  • Missing the squares: 9y2−4 is (3y)2−22=(3y+2)(3y−2), not (9y+4)(9y−4).
  • Not factorising fully: x4−16=(x2+4)(x2−4)=(x2+4)(x+2)(x−2).