Two pattern formulas distilled from polynomial multiplication — and how to wield them fast, forwards.
In Lesson 7.5 you learned the all-purpose rule for multiplying expressions: every term in the first set of parentheses meets every term in the second. That rule never fails — but it does take work. This lesson is about two products that come up so often, and behave so neatly, that mathematicians long ago packaged them into formulas. Learn the pattern once, and you can skip straight to the answer.
By the end you will be able to do four things: expand (a+b)(a−b) in one step as a difference of squares; square a sum or difference with the perfect-square formula without ever dropping the middle term; see both formulas as pictures made of areas; and use them as a mental-math trick to compute things like 102×98 in your head. One steady color habit runs through the lesson: the first piece, our a, is blue; the second piece, our b, is amber; and the cross term 2ab is green.
Start with a product that looks almost like a trap: the two factors are identical except for a single sign. One is a sum, the other is the matching difference:
(a + b)(a − b)
There is nothing new to learn to expand it — just use the rule from 7.5, where every term meets every term. Each of the two terms in the first bracket multiplies each of the two terms in the second, giving four products:
(a+b)(a−b) = a·a − a·b + b·a − b·b
Now watch the middle. The first product is a²; the last is b²; and the two in the middle are −ab and +ab. Those two are the same size with opposite signs, so they cancel each other out completely — they add to zero and vanish:
a² − ab + ab − b² = a² − b²
(a + b)(a − b) = a² − b²
A sum times its matching difference equals the square of the first piece minus the square of the second. There is no middle term — it cancelled. (And the order does not matter: (a−b)(a+b) gives the very same a²−b².)
Expand (2x + 3)(2x − 3).
Check at x = 5: the factors are 13 and 7, and 13·7 = 91; the formula gives 4·25 − 9 = 100 − 9 = 91. ✓
The formula only applies when the two brackets share the same a and the same b, differing only by the sign in the middle. (x+3)(x−5) is not a difference of squares — the second pieces (3 and 5) don't match, so the middle terms won't cancel. Use the full method from 7.5 there.
Set a and b. See all four products appear, watch the −ab and +ab strike through and cancel, and confirm the numbers match exactly.
The second pattern is squaring a two-term expression — multiplying a binomial by itself. Take a sum and square it:
(a + b)² = (a + b)(a + b)
Expand it the same careful way — every term meets every term — and this time nothing cancels. The four products are a·a, a·b, b·a, and b·b:
= a² + ab + ab + b² = a² + 2ab + b²
This time the two middle products have the same sign, so instead of cancelling they combine into 2ab — twice the product of the two pieces. That middle term is the whole story of this formula, and the most common mistake in all of algebra is to forget it.
(a + b)² = a² + 2ab + b²
(a − b)² = a² − 2ab + b²
Square the first piece, square the second piece, and glue them together with twice their product in the middle. For a difference, the only thing that flips is the sign of that middle term — the last term, b², stays positive because a negative squared is positive.
(a + b)² is NOT a² + b². Squaring does not pass through a sum. You must add the middle term 2ab. Quick proof with numbers: (3 + 4)² = 7² = 49, but 3² + 4² = 9 + 16 = 25. The missing piece is exactly 2·3·4 = 24, and 25 + 24 = 49. ✓
Expand (3a − 4)².
Check at a = 2: the inside is 3·2 − 4 = 2, and 2² = 4; the formula gives 9·4 − 24·2 + 16 = 36 − 48 + 16 = 4. ✓
Choose a sum or a difference, set a and b, and watch the three-term answer build. The numeric check compares the formula against squaring the value directly.
Both formulas are really statements about area, and a picture makes them impossible to forget. The key idea, which goes all the way back to expanding products in 7.5, is that the area of a rectangle is length times width — so a product of two binomials is the area of a rectangle whose sides are those binomials.
Draw a square whose side is a + b. Its total area is (a+b)² by definition. Now cut both sides at the point where the a part ends and the b part begins. The square splits into four tiles: a big a×a square, a small b×b square in the opposite corner, and two identical a×b strips. Their areas are a², b², and two copies of ab — and two copies of ab is 2ab. The total has to equal the whole square, which is exactly the formula.
For the difference of squares, start with a square of side a and area a², then cut a small b×b square out of one corner. What remains is an L-shaped piece with area a² − b². Slice that L into two rectangles and slide one beside the other, and the two pieces fit together perfectly into a single rectangle. Its height is a − b and its width is a + b — so the same area is also (a+b)(a−b). Two names for one area is exactly the formula.
Drag the sliders for a and b. The square of side a+b re-tiles itself; the two green strips are highlighted as 2ab, and the four areas add up — both as numbers and as symbols.
Step through removing the b×b corner and folding the leftover L into an (a+b)-by-(a−b) rectangle. The area is the same at every step.
The real power of these formulas is that a and b can be anything — a variable, a number, or a whole expression. The skill is learning to spot which part is the a and which is the b, and then the formula does the rest. This even works on plain arithmetic, turning ugly multiplications into easy ones you can do in your head.
The trick for mental math is to write each number as a round number plus or minus a little, usually anchored on a nearby multiple of ten or a hundred. Then the formula collapses the work to a couple of squares and a subtraction.
Compute 102 × 98 in your head.
Compute 103² in your head.
For a number just under a round one, use the difference form: 99² = (100 − 1)² = 10000 − 200 + 1 = 9801.
Before reaching for the long method, ask two quick questions. (1) Are these the same two pieces with opposite signs? → difference of squares, answer a² − b². (2) Am I squaring a two-piece expression? → perfect square, answer a² ± 2ab + b². If neither fits, fall back on the full term-by-term rule from 7.5.
A product or a square appears. Pick which formula fits and name the round number, then reveal the slick one-line computation and check the exact answer.
Two products are worth knowing by heart. A sum times its matching difference is a difference of squares, (a+b)(a−b) = a² − b², because the two middle terms cancel. Squaring a two-term expression gives a perfect square, (a±b)² = a² ± 2ab + b² — never forget the middle term 2ab, which is twice the product. Both formulas are pictures: a square cut into four tiles, or an L cut and rearranged into a rectangle. And both turn into mental-math shortcuts once you write a number as a round number plus or minus a little.
You have spent two lessons multiplying expressions. Next, in Lesson 7.7, you will run the operation backwards and learn to divide expressions — and the difference of squares will reappear as one of the cleanest ways to split a polynomial back into factors.
Work each one out first, then open the answer to check your thinking.
Six questions to lock it in, aimed straight at the common slips. Tap the answer you think is right.
This lesson sits in the middle of the multiplying strand. If you want to revisit the all-purpose term-by-term rule that these formulas are built on, go back to Lesson 7.5 · Multiplying Expressions. When you are ready to run the operation in reverse, continue to Lesson 7.7 · Dividing Expressions, where the difference of squares returns as a factoring tool.