This site is a work in progress. New lessons are added regularly. Contact us

Squares of Binomials

Learning goals

  • Expand (a+b)2(a + b)^2 as a2+2ab+b2a^2 + 2ab + b^2
  • Subtract the middle term for a difference instead
  • Show why the middle term cannot be dropped
  • Square the whole term, coefficient included
  • Read the pattern backward to spot a perfect-square trinomial

Squaring a sum

To square any quantity is to multiply it by itself, so squaring the binomial a+ba + b means forming the product (a+b)(a+b)(a + b)(a + b). There is nothing new in expanding it; it is a product of two sums, exactly the kind you learned to multiply term by term. What is worth doing once, slowly, is watching where each piece lands, because the answer has a shape that repeats for every sum you will ever square.

Why (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2#

Squaring a quantity means multiplying it by itself, so (a+b)2(a + b)^2 is shorthand for the product (a+b)(a+b)(a + b)(a + b). Expand it the way you expand any product of two sums, multiplying every term of the first factor by every term of the second:

(a+b)(a+b)=aa+ab+ba+bb.(a + b)(a + b) = a\cdot a + a\cdot b + b\cdot a + b\cdot b.

The four products are a2a^2, then abab, then baba, then b2b^2. Because the order of multiplication does not matter, abab and baba are the same quantity, so the two middle products are equal and combine into a single 2ab2ab:

a2+ab+ba+b2=a2+2ab+b2.a^2 + ab + ba + b^2 = a^2 + 2ab + b^2.

So squaring a sum gives three terms, not two. The three are the square of the first term, the square of the last term, and a middle term twice the product of the sum’s two terms. That doubled middle term is there because a sum has two matching cross-products, one from each factor, and they land on top of each other.

The picture makes the middle term impossible to miss. A square with side a+ba + b has area (a+b)2(a + b)^2. Cut it at the point where the length aa meets the length bb, in both directions. Those two cuts split the square into four regions: a square of area a2a^2, a square of area b2b^2, and two identical rectangles each of area abab. The two rectangles are exactly why the middle term is 2ab2ab and not just abab. There are genuinely two of them, one above the small square and one beside it.

Area model for the square of a sumA square of side a plus b is divided by one vertical and one horizontal cut into a square of area a squared, two equal rectangles of area a b, and a square of area b squared, showing that the whole area a plus b squared equals a squared plus two a b plus b squared.abababab(a + b)² = a² + 2ab + b²
A square of side a plus b divides into a square of area a squared, a square of area b squared, and two equal rectangles each of area a b. The two rectangles are why the middle term is twice a b.

Squaring a difference

A difference squared works in the very same way, and only one thing changes. Write (ab)2(a - b)^2 as the product (ab)(ab)(a - b)(a - b) and expand it, carrying every sign along.

Why (ab)2=a22ab+b2(a - b)^2 = a^2 - 2ab + b^2#

Write the square as a product and multiply every term of the first factor by every term of the second, keeping track of the signs:

(ab)(ab)=aaabba+bb.(a - b)(a - b) = a\cdot a - a\cdot b - b\cdot a + b\cdot b.

The first product is a2a^2, and the last is (b)(b)=b2(-b)(-b) = b^2, which is positive because a negative times a negative is positive. The two middle products are ab-ab and ba-ba, both negative, and they combine into 2ab-2ab:

a2abba+b2=a22ab+b2.a^2 - ab - ba + b^2 = a^2 - 2ab + b^2.

Only the middle term changed. Squaring a difference gives the same first square a2a^2 and the same last square b2b^2 as squaring a sum, but the middle term is now subtracted. The final term stays positive because the last term of aba - b is b-b, and squaring b-b gives +b2+b^2.

The two patterns are worth holding side by side, because they differ in exactly one place. In both, the first and last terms are the squares a2a^2 and b2b^2. The middle term is twice the product of the two terms, added when the binomial is a sum and subtracted when it is a difference.

Worked example 1 Expand (x+5)2(x + 5)^2 and (x7)2(x - 7)^2

For (x+5)2(x + 5)^2, use (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2 with a=xa = x and b=5b = 5. Square the first term, square the last term, and put twice their product in the middle:

(x+5)2=x2+2x5+52=x2+10x+25.(x + 5)^2 = x^2 + 2\cdot x\cdot 5 + 5^2 = x^2 + 10x + 25.

For (x7)2(x - 7)^2, use the difference pattern (ab)2=a22ab+b2(a - b)^2 = a^2 - 2ab + b^2 with a=xa = x and b=7b = 7. The first and last terms are still squares, and only the middle term turns negative:

(x7)2=x22x7+72=x214x+49.(x - 7)^2 = x^2 - 2\cdot x\cdot 7 + 7^2 = x^2 - 14x + 49.

Notice that the last term is +49+49 in the second one too. Squaring the 7-7 makes it positive, so a difference squared never ends in a negative constant.

Why the middle term cannot be dropped

The single most common error with these patterns is to square each piece and stop, writing (a+b)2=a2+b2(a + b)^2 = a^2 + b^2. That throws away the two cross-products entirely, and it is simply false. A quick number check settles it once and for all. Take a=3a = 3 and b=4b = 4:

(3+4)2=72=49,32+42=9+16=25.(3 + 4)^2 = 7^2 = 49, \qquad 3^2 + 4^2 = 9 + 16 = 25.

The two results are not equal, and the gap between them is 4925=2449 - 25 = 24, which is exactly the missing middle term 2ab=234=242ab = 2\cdot 3\cdot 4 = 24. Whenever aa and bb are both nonzero, squaring a sum is never the same as adding the squares. The reason is that the middle term 2ab2ab is real, and in that case it is not zero. Keep all three terms and you keep the truth.

Check your understanding

Expand (x+6)2(x + 6)^2.

Answer choices

Squaring binomials that carry coefficients

Nothing about the patterns requires aa and bb to be single letters. They can be terms with coefficients, and the rule is unchanged: square the whole term, coefficient and variable together. The trap is to square the variable but leave the coefficient behind. In (2x)2(2x)^2 the entire 2x2x is squared, so (2x)2=22x2=4x2(2x)^2 = 2^2 x^2 = 4x^2, not 2x22x^2. Once each term is squared correctly and their product is doubled for the middle, everything proceeds as before.

Worked example 2 Square (2x+3)2(2x + 3)^2 and (52x)2(5 - 2x)^2

For (2x+3)2(2x + 3)^2, take a=2xa = 2x and b=3b = 3. Square the first term, square the last term, and double their product:

(2x+3)2=(2x)2+2(2x)3+32=4x2+12x+9.(2x + 3)^2 = (2x)^2 + 2\cdot(2x)\cdot 3 + 3^2 = 4x^2 + 12x + 9.

The first term is (2x)2=4x2(2x)^2 = 4x^2, with the 22 squared as well as the xx. For (52x)2(5 - 2x)^2 the binomial is a difference, so use (ab)2=a22ab+b2(a - b)^2 = a^2 - 2ab + b^2 with a=5a = 5 and b=2xb = 2x:

(52x)2=5225(2x)+(2x)2=2520x+4x2.(5 - 2x)^2 = 5^2 - 2\cdot 5\cdot(2x) + (2x)^2 = 25 - 20x + 4x^2.

The outer terms 2525 and 4x24x^2 are squares, and the middle term 20x-20x is twice the product 52x5\cdot 2x carrying a minus sign because the binomial is a difference.

Worked example 3 Square (3x4)2(3x - 4)^2 and (2a+5b)2(2a + 5b)^2

For (3x4)2(3x - 4)^2, the difference pattern applies with a=3xa = 3x and b=4b = 4:

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

The same pattern handles two different variables, since aa and bb never had to be numbers. For (2a+5b)2(2a + 5b)^2, take the first term to be 2a2a and the last to be 5b5b:

(2a+5b)2=(2a)2+2(2a)(5b)+(5b)2=4a2+20ab+25b2.(2a + 5b)^2 = (2a)^2 + 2\cdot(2a)\cdot(5b) + (5b)^2 = 4a^2 + 20ab + 25b^2.

Each outer term is squared in full, (2a)2=4a2(2a)^2 = 4a^2 and (5b)2=25b2(5b)^2 = 25b^2, and the middle term 20ab20ab is twice their product.

Check your understanding

Expand (3x5)2(3x - 5)^2.

Answer choices

Reading the pattern backward: perfect-square trinomials

Every identity in algebra can be read in both directions. Read forward, a2+2ab+b2a^2 + 2ab + b^2 is what you get by squaring a+ba + b. Read backward, it tells you that any trinomial of that exact shape factors as a single square:

a2+2ab+b2=(a+b)2anda22ab+b2=(ab)2.a^2 + 2ab + b^2 = (a + b)^2 \qquad \text{and} \qquad a^2 - 2ab + b^2 = (a - b)^2.

A trinomial that factors this way is called a perfect-square trinomial. Recognizing one lets you factor it instantly, with no searching through factor pairs. There is a short test with three parts. The first term must be a perfect square, with some square root AA. The last term must be a perfect square, with some square root BB. And the middle term must equal 2AB2AB, up to its sign. When all three hold, the trinomial factors as (A+B)2(A + B)^2 if the middle term is positive, or (AB)2(A - B)^2 if it is negative. If the middle term does not match 2AB2AB, or if there is no middle term at all, the trinomial is not a perfect square.

Worked example 4 Factor 9x212x+49x^2 - 12x + 4

Test the two outer terms first. The first term 9x29x^2 is a perfect square, since 9x2=3x\sqrt{9x^2} = 3x, and the last term 44 is a perfect square, since 4=2\sqrt{4} = 2. Call these roots A=3xA = 3x and B=2B = 2.

Now the middle term decides everything. For a perfect square it must be twice the product of AA and BB:

2AB=2(3x)2=12x.2AB = 2\cdot(3x)\cdot 2 = 12x.

The actual middle term is 12x-12x, which is 2AB-2AB, so the sign is negative and the trinomial fits the difference pattern:

9x212x+4=(3x2)2.9x^2 - 12x + 4 = (3x - 2)^2.

Expanding (3x2)2(3x - 2)^2 back to 9x212x+49x^2 - 12x + 4 confirms the factorization.

Worked example 5 Which trinomials are perfect squares?

Run each one through the same three conditions: a perfect-square first term, a perfect-square last term, and a middle term equal to twice the product of their roots.

For 16x2+24x+916x^2 + 24x + 9, the roots of the outer terms are 16x2=4x\sqrt{16x^2} = 4x and 9=3\sqrt{9} = 3, and twice their product is 24x3=24x2\cdot 4x\cdot 3 = 24x, which matches the middle term. So it is a perfect square:

16x2+24x+9=(4x+3)2.16x^2 + 24x + 9 = (4x + 3)^2.

For 4x2+94x^2 + 9, the outer terms are perfect squares, with roots 2x2x and 33, but there is no middle term at all. A perfect square would need a middle term of 22x3=12x2\cdot 2x\cdot 3 = 12x, so without it this is not a perfect-square trinomial.

For x2+10x+20x^2 + 10x + 20, the first term is a perfect square with root xx. But the last term 2020 is not a perfect square, since 20\sqrt{20} is not a whole number. The pattern needs both outer terms to be perfect squares, so this trinomial does not fit either. Only the first of the three is a perfect square.

Check your understanding

Factor 25x2+20x+425x^2 + 20x + 4.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

Before calculators, multiplying two large numbers by hand was slow and easy to botch. Squaring one was kinder. There was only a single number to carry through the work. So people asked a strange question. Could one table of squares be made to do all the multiplying?

It could, and this lesson holds the reason. Square a sum, square a difference, and subtract the second result from the first. The outer squares cancel each other. All that survives is the two middle terms. Together they come to four times the product of the original numbers.

In 18171817 a French table-maker named Antoine Voisin published a book of quarter squares. Each entry was one quarter of a square number. To multiply two numbers, a clerk added them and looked the total up. Then he subtracted them and looked that difference up. Taking one entry from the other gave the product. Nothing was ever multiplied. Tables like his were still being reprinted a century later, and the same shortcut was eventually built into electronic multipliers.

So the middle term is not a nuisance to be remembered. It is the only part of the pattern that knows anything about the product. Each outer square depends on one of the numbers alone. Drop it, as almost every beginner does, and you throw away the piece the whole trick rests on.