Twice the sum of squares

You already know two facts by heart: (a+b)2=a2+2ab+b2(a+b)^2 = a^2+2ab+b^2 and (a−b)2=a2−2ab+b2(a-b)^2 = a^2-2ab+b^2. Most students stop there, treating them as two separate formulas to memorise. But identities are not meant to sit in isolation — they are meant to be combined. Add these two together and something clean falls out: the 2ab2ab terms, being opposite in sign, cancel completely, leaving (a+b)2+(a−b)2=2(a2+b2)(a+b)^2+(a-b)^2 = 2(a^2+b^2), "twice the sum of squares." Subtract instead of add, and a different clean result appears: 4ab4ab. This short topic is really a lesson in algebraic reuse — showing that once a few identities are trusted, new ones can be built from them without ever re-expanding brackets from scratch. It matters beyond this one chapter: exams routinely reward students who spot that a question is really asking for a combination of known results, not a fresh derivation, and this is the smallest, cleanest example of that habit you will meet.

The core insight

Adding (a+b)2(a+b)^2 and (a−b)2(a-b)^2 cancels the cross term 2ab2ab and leaves exactly 2(a2+b2)2(a^2+b^2), while subtracting them cancels the squared terms and leaves exactly 4ab4ab.

The core idea

Start from what is already proved. The two standard identities, both derived earlier from the distributive law, are the only raw material needed here:

(a+b)2=a2+2ab+b2...(i)(a+b)^2 = a^2 + 2ab + b^2 \qquad \text{...(i)}
(a−b)2=a2−2ab+b2...(ii)(a-b)^2 = a^2 - 2ab + b^2 \qquad \text{...(ii)}

where: aa and bb are any two real numbers (or algebraic terms), and 2ab2ab is the "cross term" that distinguishes the sum-square from the difference-square.

Add them. Because (i) has +2ab+2ab and (ii) has −2ab-2ab, adding the two equations makes that term vanish, and the two a2a^2's and two b2b^2's combine:

(a+b)2+(a−b)2=2a2+2b2=2(a2+b2)(a+b)^2 + (a-b)^2 = 2a^2 + 2b^2 = 2(a^2+b^2)

where: the right side is read as "twice the sum of the squares of aa and bb" — the phrase that names this whole topic.

Subtract them. Subtracting (ii) from (i) does the opposite: the a2a^2 and b2b^2 terms cancel (they are identical in both), and the cross terms combine instead of cancel, since −(−2ab)=+2ab-(-2ab)=+2ab:

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

Why this matters beyond the algebra. These two combined identities let you move between three different pairs of quantities — {a+b, a−b}\{a+b,\,a-b\}, {a2+b2, ab}\{a^2+b^2,\,ab\}, and {a, b}\{a,\,b\} themselves — without ever expanding a bracket by hand. If a question gives you a+ba+b and a−ba-b but hides aa and bb, you can still recover a2+b2a^2+b^2 (halve the sum of the two squares) and abab (quarter the difference of the two squares).

Why the cancellation is not a coincidence. Look again at where the 2ab2ab term comes from: it appears in (a+b)2(a+b)^2 because the cross terms ab+baab+ba from multiplying out (a+b)(a+b)(a+b)(a+b) point in the "same direction," and in (a−b)2(a-b)^2 because the cross terms −ab−ba-ab-ba from (a−b)(a−b)(a-b)(a-b) point in the "opposite direction." Adding two things pointing in opposite directions is exactly what makes them cancel — the algebra is simply restating, in symbols, the everyday idea that +2ab+2ab and −2ab-2ab undo each other. Seeing this reason, rather than just memorising the outcome, is what lets you predict in advance that adding will kill the cross term and subtracting will kill the squares, without having to expand anything to check.

Figure
Two squares of side a plus b and a minus b sit side by side and their combined area equals twice the sum of a square of side a and a square of side b
(a+b)^2 + (a-b)^2 = 2(a^2+b^2) side (a+b) area (a+b)^2 side (a-b) area (a-b)^2 + = side a side b two copies of (a-square + b-square) The 2ab cross terms of the two left squares cancel, leaving exactly double the sum of squares
Derivation ADeriving twice the sum of squares by adding two known identities

The goal is to show, using only the distributive law already established for (a+b)2(a+b)^2 and (a−b)2(a-b)^2, that adding these two familiar expansions eliminates the cross term entirely and produces a brand-new identity, (a+b)2+(a−b)2=2(a2+b2)(a+b)^2+(a-b)^2 = 2(a^2+b^2), that holds for every real value of aa and bb without any further multiplication being needed.

Step 1. Write down the two known identities exactly as previously derived: (a+b)2=a2+2ab+b2(a+b)^2 = a^2+2ab+b^2 and (a−b)2=a2−2ab+b2(a-b)^2 = a^2-2ab+b^2. Both are already proved from (x+y)(x+y)(x+y)(x+y)-style expansion, so they can be treated as trusted building blocks rather than re-derived.

Step 2. Add the left-hand sides and the right-hand sides separately, since adding equal quantities on each side of two true equations keeps the equation true: (a+b)2+(a−b)2=(a2+2ab+b2)+(a2−2ab+b2)(a+b)^2+(a-b)^2 = (a^2+2ab+b^2)+(a^2-2ab+b^2).

Step 3. Group like terms on the right: the two a2a^2 terms give 2a22a^2, the two b2b^2 terms give 2b22b^2, and the cross terms +2ab+2ab and −2ab-2ab cancel exactly, leaving 2a2+2b22a^2+2b^2.

Step 4. Factor out the common 22: 2a2+2b2=2(a2+b2)2a^2+2b^2 = 2(a^2+b^2). This gives the final identity, (a+b)2+(a−b)2=2(a2+b2)(a+b)^2+(a-b)^2 = 2(a^2+b^2), true for all a,ba,b, and the cancellation in Step 3 is exactly why it is faster than expanding the left side term by term.

Step 5. Note what makes this a genuine identity rather than a one-off calculation: nothing in Steps 1 to 4 used a specific numerical value of aa or bb. Every step is a rearrangement of symbols that holds for any real numbers substituted in, which is why the result can be trusted and reused for every future value of aa and bb, not just checked case by case.

Worked example

Verify (a+b)2+(a−b)2=2(a2+b2)(a+b)^2+(a-b)^2 = 2(a^2+b^2) for a=6a=6, b=4b=4, then use the identity in reverse to recover a2+b2a^2+b^2 from only a+ba+b and a−ba-b.

Step 1. Compute the left side directly: a+b=10a+b=10 and a−b=2a-b=2, so (a+b)2+(a−b)2=102+22=100+4=104(a+b)^2+(a-b)^2 = 10^2+2^2 = 100+4 = 104.

Step 2. Compute the right side directly: a2=36a^2=36 and b2=16b^2=16, so 2(a2+b2)=2(36+16)=2(52)=1042(a^2+b^2) = 2(36+16) = 2(52) = 104.

Step 3. Both sides equal 104104, confirming the identity for this pair of values.

Step 4. Now use the identity in reverse. Suppose only a+b=10a+b=10 and a−b=2a-b=2 were known, with aa and bb themselves hidden. Then a2+b2=(a+b)2+(a−b)22=100+42=52a^2+b^2 = \dfrac{(a+b)^2+(a-b)^2}{2} = \dfrac{100+4}{2} = 52, which matches the direct value 36+16=5236+16=52. The identity holds, and a2+b2=52a^2+b^2=52 can be found without ever computing aa or bb separately.

Competitive stretch

A square garden of side (x+y)(x+y) metres and a smaller square garden of side (x−y)(x-y) metres are built side by side. Show that their combined area equals twice the sum of an xx-side square and a yy-side square.

Step 1. Area of the larger garden is (x+y)2(x+y)^2, and area of the smaller garden is (x−y)2(x-y)^2, so the combined area is (x+y)2+(x−y)2(x+y)^2+(x-y)^2.

Step 2. By the identity just derived, this equals 2(x2+y2)2(x^2+y^2) directly, with no need to expand either bracket.

Step 3. Interpret the result: 2(x2+y2)2(x^2+y^2) is exactly twice the combined area of a square of side xx (area x2x^2) and a square of side yy (area y2y^2). So the two gardens together always cover the same ground as two copies of an xx-square plus a yy-square, for any x>y>0x>y>0 — the identity re-read geometrically, using the same cancellation applied to areas instead of bare numbers.

Common traps

  • Re-expanding from scratch. Since (a+b)2(a+b)^2 and (a−b)2(a-b)^2 are already known, adding them directly (letting 2ab2ab cancel) is faster and less error-prone than expanding (a+b)2+(a−b)2(a+b)^2+(a-b)^2 term by term from the original brackets.
  • Mixing up "sum" and "difference" results. Adding gives 2(a2+b2)2(a^2+b^2), with no abab term. Subtracting gives 4ab4ab, with no squared terms at all. Confusing which operation produces which result is a common slip.
  • Losing a sign when subtracting. (a−b)2(a-b)^2 already contains −2ab-2ab, so subtracting the whole expression turns that term into −(−2ab)=+2ab-(-2ab)=+2ab; dropping the sign flip is a frequent error.
  • Assuming order matters. Since both identities involve squaring, 2(a2+b2)2(a^2+b^2) is unchanged if aa and bb are swapped, even though (a−b)2≠(b−a)(a-b)^2\ne(b-a)'s appearance might suggest otherwise — in fact (a−b)2=(b−a)2(a-b)^2=(b-a)^2 because squaring removes the sign.
  • Forgetting the reverse direction. Many questions do not ask you to verify the identity at all — they give a+ba+b and a−ba-b and ask for a2+b2a^2+b^2 or abab directly. Trying to first solve for aa and bb individually before squaring wastes time; halving or quartering the combined identities is faster.

Ask the tutor: if you would like to see how combining (a+b)2(a+b)^2 with abab (instead of (a−b)2(a-b)^2) also gives a2+b2a^2+b^2, or how this same combining habit extends to cube identities in later classes, ask the AI tutor to work through those with you step by step.

Why do the 2ab terms cancel when adding but not when subtracting?

Because (a+b)2(a+b)^2 contains +2ab+2ab and (a−b)2(a-b)^2 contains −2ab-2ab. Adding the two expressions means adding +2ab+2ab and −2ab-2ab, which sum to zero — they cancel. Subtracting means computing +2ab+2ab minus (−2ab)(-2ab), which is +2ab−(−2ab)=4ab+2ab-(-2ab)=4ab — the cross terms combine instead of cancelling. The squared terms behave the opposite way: a2a^2 and b2b^2 are identical in both identities (no sign difference between them), so they double on adding, and being identical is exactly why they cancel to zero when one is subtracted from the other. Working out which terms match and which are opposite in sign, before adding or subtracting, is the whole trick.

Do I need to memorise 2(a^2+b^2) and 4ab as separate formulas?

It helps to recognise them on sight, but you do not need rote memorisation if you remember the two source identities and know whether to add or subtract. In an exam, writing out (a+b)2=a2+2ab+b2(a+b)^2=a^2+2ab+b^2 and (a−b)2=a2−2ab+b2(a-b)^2=a^2-2ab+b^2 on rough work and then combining them line by line takes only a few seconds, and it avoids the risk of misremembering a compressed formula under pressure. Once you have derived it once carefully, though, most students find the result sticks naturally, simply from having reasoned through the cancellation.

Can this trick be extended to other combinations of a and b?

Yes — the same habit of combining known identities generalises well beyond this one pair. For instance, (a+b)2(a+b)^2 and abab together let you find a2+b2a^2+b^2 without ever bringing in a difference-square at all, since a2+b2=(a+b)2−2aba^2+b^2=(a+b)^2-2ab. Later, in higher classes, you will meet similar combined identities for cubes, such as a3+b3=(a+b)3−3ab(a+b)a^3+b^3=(a+b)^3-3ab(a+b). The core lesson here — that proved identities can be added, subtracted, or otherwise combined to reach new true statements, faster than expanding from scratch — is used repeatedly throughout algebra, not just for these two identities.

Before this

Where this leads