Expanding Squared Brackets

Squaring a bracket is not squaring each term. Where the 2ab middle term comes from, why the first and last terms stay positive, and how to handle a coefficient.

--

Squaring a bracket does not mean squaring each term inside it.  (x+3)^2 is not  x^2 + 9 — a middle term appears, and forgetting it is the single most common error in algebra. Two identities cover every case.

Concept The two identities

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

In words: the square of the first, plus twice the product of the two, plus the square of the second.

 (a-b)^2 = a^2 - 2ab + b^2

The subtraction version differs in exactly one place — the middle term becomes negative. The first and last terms stay positive in both cases, because squaring any quantity gives a positive result.

Note Where the middle term comes from
ab ab two ab rectangles give the 2ab
A square of side  a+b splits into four pieces:  a^2 ,  b^2 , and two rectangles of area  ab . Those two rectangles are the  2ab that so often goes missing.
Example Both signs

Expand  (x+3)^2 and  (x-5)^2 .

For the first,  a = x and  b = 3 .
 (x+3)^2 = x^2 + 2(x)(3) + 3^2 = x^2 + 6x + 9
For the second,  a = x and  b = 5 , with a minus sign.
 (x-5)^2 = x^2 - 2(x)(5) + 5^2 = x^2 - 10x + 25
⟹ x² + 6x + 9 and x² − 10x + 25

Notice that  +25 is positive even though the bracket contained a minus —  (-5)^2 = 25 .

Example When the first term has a coefficient

Expand  (2x+1)^2 and  (3x-2)^2 .

Here  a = 2x , so  a^2 = (2x)^2 = 4x^2 — the coefficient is squared too.
 (2x)^2 + 2(2x)(1) + 1^2 = 4x^2 + 4x + 1
For the second,  a = 3x and  b = 2 .
 (3x)^2 - 2(3x)(2) + 2^2 = 9x^2 - 12x + 4
⟹ 4x² + 4x + 1 and 9x² − 12x + 4

Writing  (2x)^2 as  2x^2 instead of  4x^2 is a frequent slip. The whole term is squared, coefficient included.

Note Watch the signs
With a plus inside the bracket, the middle term is positive.
With a minus inside the bracket, the middle term is negative.
The first and last terms are always positive, whichever sign appears.

That is the only difference between the two identities, so there is really just one pattern to learn.

Note Mistakes to avoid
Writing  (x+3)^2 = x^2 + 9 — the  6x is missing.
Forgetting to double the product: the middle term is  2ab , not  ab .
Leaving a coefficient unsquared, as in  (2x)^2 = 2x^2 .
Making the last term negative after a subtraction;  (-b)^2 is always positive.
Applying these identities to  (a+b)(a-b) , which is a different pattern altogether.
Summary
  1. (a + b)² = a² + 2ab + b², and (a − b)² = a² − 2ab + b².
  2. Only the middle term changes sign; the first and last terms are always positive.
  3. The 2ab comes from the two identical rectangles inside the square — it is never optional.
  4. Square the whole term, coefficient included: (2x)² = 4x², not 2x².
  5. Squaring a bracket is not the same as squaring each term separately.