Skip to content
LoveToCalc

Identity — what does that mean?

Square of a difference

The same multiplication as squaring a sum, with a minus in the middle and a plus at the end.

In Swedish: Kvadraten på en differens

(a−b)²=a²−2ab+b²

a
First term
b
Second term
A square with side a. Cutting a strip of width b off the bottom and another off the right side leaves the shaded square with side a − b. The small corner square b² is part of both strips, so taking both strips off takes it off twice.
Show why the formula is true
  1. A square is the factor multiplied by itself.

    (a−b)²=(a−b)(a−b)

  2. Multiply every term in the first bracket by every term in the second.

    (a−b)(a−b)=a²−ab−ba+b²

  3. The two middle terms are the same product, so together they are twice it.

    a²−ab−ba+b²=a²−2ab+b²

Practice questions

Work out

(70−1)²

The rule

Three terms, as for the square of a sum. The only thing that changes is the sign in front of the middle term:

Expression Expanded
(a + b)² a² + 2ab + b²
(a − b)² a² − 2ab + b²

The last term is positive in both: b² comes from (−b) · (−b), and a negative times a negative is positive.

Why it looks like that

Write the square as a multiplication and multiply it out:

(a − b)² = (a − b)(a − b) = a² − ab − ba + b²

The two middle terms are the same number, −ab and −ba, so together they make −2ab:

(a − b)² = a² − 2ab + b²

The proof above is shown on the page as a chain of equalities: square, multiply out, collect. Each step is a rule of algebra. No equation is being solved, so nothing is subtracted from both sides.

Worked examples

(x − 5)² is x² − 2 · x · 5 + 5² = x² − 10x + 25.

(3y − 4)² is (3y)² − 2 · 3y · 4 + 4² = 9y² − 24y + 16. Note that the whole of 3y is squared, not just y.

97² without a calculator: write it as (100 − 3)² = 10,000 − 600 + 9 = 9,409.

Common mistakes

Common questions

How is this different from the difference of squares? That rule is about a sum times its own difference, (a + b)(a − b), where the middle terms cancel completely and the result has no middle term at all. Here the same bracket is multiplied by itself, so the middle terms reinforce each other instead. See difference of squares.

Does it hold for every number? Yes. It is an identity, not an equation to solve: true for every pair of numbers, negatives and decimals included, so this page shows a proof rather than a calculator card.

Can I use it backwards? Yes, and that is where it earns its keep. Seeing x² − 10x + 25 you can recognise (x − 5)². The check is that the middle term should be twice the product of x and 5: 2 · x · 5 = 10x.

Last reviewed October 6, 2026 ·How pages are reviewed

Ready-made worksheets with this formula

Sheets that ask this formula, with their answer keys. Open one to see the questions or print it.

High school

AlgebraAll formulas