Skip to content
LoveToCalc

Identity — what does that mean?

Square of a sum

The square of a sum is each term squared plus twice their product — and the middle term is the one that gets dropped.

In Swedish: Kvadreringsregeln

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

a
First term
b
Second term
A square with side a + b, cut by two lines into four pieces. The two shaded squares have the areas a² and b²; the two plain rectangles are a by b each, which is the 2ab in the middle.
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

(50+2)²

Why there are three terms

Squaring a sum means multiplying the bracket by itself. When every term in the first bracket meets every term in the second, you get four products:

The two in the middle are the same product, so together they make 2ab, leaving a² + 2ab + b². The proof above this text walks through those steps, which is why the rule is an identity rather than a theorem: it follows from a chain of equalities, with no new assumption anywhere.

Geometrically it is a square of side a + b, which splits into four pieces: two squares, a² and b², and two equal rectangles of area ab each. The doubled product is those two rectangles.

Worked examples

Expanding. (x + 4)² = x² + 8x + 16.

Mental arithmetic. 103² = (100 + 3)² = 10,000 + 2 · 100 · 3 + 9 = 10,000 + 600 + 9 = 10,609.

The other way round. x² + 10x + 25 is a square, because 25 = 5² and 10x = 2 · x · 5, so the expression is (x + 5)². Recognising that pattern backwards is what completing the square rests on — and with it the quadratic formula.

The sister rules

Rule Written out
Square of a sum (a + b)² = a² + 2ab + b²
Square of a difference (a − b)² = a² − 2ab + b²
Difference of two squares (a + b)(a − b) = a² − b²

The second is the first with b replaced by −b: the squares are unaffected, but the middle term changes sign. The third is the only one of the three where the middle terms cancel instead of adding up.

Common mistakes

Questions people ask

Does the rule hold for every number? Yes. It follows from the ordinary laws of arithmetic and holds for positive numbers, negative numbers, fractions and expressions containing variables.

What about (a + b + c)²? Same principle: every term meets every term. You get a² + b² + c² + 2ab + 2ac + 2bc — the squares plus twice the product of each pair.

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