School math

Special products and factoring formulas

Seven formulas that save you from multiplying every term by every other term when you expand brackets. Below are the formulas themselves, examples worked line by line, a trick for mental arithmetic and the one mistake that is more common than all the others put together.

Updated
In this article

The formulas#

The square of a sum and the square of a difference:

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

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

The difference of squares:

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

The cube of a sum and the cube of a difference:

(a+b)3=a3+3a2b+3ab2+b3(a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3

(a−b)3=a3−3a2b+3ab2−b3(a-b)^3 = a^3 - 3a^2b + 3ab^2 - b^3

The sum and difference of cubes:

a3+b3=(a+b)(a2−ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2)

a3−b3=(a−b)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2)

Notice two things. In the square of a difference the last term has a plus sign: minus times minus gives plus. And in the cube formulas the second bracket has no 2 in front of the product, and the sign inside it is the opposite of the sign between the cubes.

Worked examples: expanding brackets#

First example — (x+3)2(x+3)^2.

Step 1. Write the square of the first term: x2x^2. The first term here is xx, so its square is a letter too.

Step 2. Add twice the product: 2⋅x⋅3=6x2 \cdot x \cdot 3 = 6x. The 2 comes from the formula; you do not need to look for it in the problem.

Step 3. Add the square of the second term: 32=93^2 = 9.

Answer: x2+6x+9x^2 + 6x + 9.

Second example — (2x−5)2(2x-5)^2. Here the first term is not a single letter but a product, and that is the main trap.

Step 1. The square of the first term is the square of the whole 2x2x: (2x)2=4x2(2x)^2 = 4x^2. The 2 gets squared as well, not just the letter.

Step 2. Twice the product: 2⋅2x⋅5=20x2 \cdot 2x \cdot 5 = 20x. The formula for a difference has a minus between the squares, so this term is subtracted.

Step 3. The square of the second term: 52=255^2 = 25, with a plus sign.

Answer: 4x2−20x+254x^2 - 20x + 25.

Worked example: factoring#

You need the reverse direction more often than the forward one: it simplifies fractions and solves equations. Take 49y2−1649y^2 - 16.

Step 1. Check that both terms are perfect squares: 49y2=(7y)249y^2 = (7y)^2 and 16=4216 = 4^2. There is a minus between them, so the difference of squares applies.

Step 2. Write it out by the formula: (7y−4)(7y+4)(7y-4)(7y+4).

Step 3. Check by multiplying back: 7y⋅7y=49y27y \cdot 7y = 49y^2, the middle terms −28y-28y and +28y+28y cancel, and −16-16 is left. It matches.

An important limit: a sum of squares a2+b2a^2 + b^2 does not factor over the real numbers. If there is a plus, you cannot use the difference of squares — this is not a "forgotten sign", it is a different expression.

Mental arithmetic without a calculator#

The formulas work on ordinary numbers too, if you split them into a round number and a remainder.

1012=(100+1)2=10000+200+1=10201101^2 = (100+1)^2 = 10000 + 200 + 1 = 10201.

98⋅102=(100−2)(100+2)=10000−4=999698 \cdot 102 = (100-2)(100+2) = 10000 - 4 = 9996.

412−392=(41−39)(41+39)=2⋅80=16041^2 - 39^2 = (41-39)(41+39) = 2 \cdot 80 = 160. Squaring each number separately takes about three times as long and gives the same answer: 1681−1521=1601681 - 1521 = 160.

This trick is also a good self-check. If the mental answer from the formula matches the long multiplication, you applied the formula correctly.

Where people go wrong#

First place, by a wide margin, goes to the missing middle term: writing (a+b)2=a2+b2(a+b)^2 = a^2 + b^2. You can test yourself with numbers: put a=2a=2, b=3b=3. The left side is (2+3)2=25(2+3)^2 = 25, the right side is 4+9=134 + 9 = 13. The numbers do not match, so the equation is false. Do this substitution every time you doubt a formula: it takes ten seconds and gives a clear answer.

The second mistake is the sign in the square of a difference. The last term always has a plus sign; only the middle term gets the minus.

The third is squaring only part of a term: (3x)2(3x)^2 is 9x29x^2, not 3x23x^2. This rule is covered in detail in laws of exponents.

The fourth is using a formula on something that does not fit it. Before you write the answer, say out loud what your aa is and what your bb is. If you cannot name them, it is the wrong formula.

Factoring is most often needed to simplify a fraction or solve an equation. When factoring leaves you with an equation like 5x=305x = 30, the usual rules from how to solve linear equations take over.

What to do next#

Write the seven formulas on one sheet and keep it in front of you for the first week. Every day expand five brackets and factor five expressions back, always checking by substituting a number. The topic is done when you can tell which formula an expression needs just by looking at it, and the working takes less than a minute.

Step-by-step plan

  1. Step 1 — learn the first three formulasSquare of a sum, square of a difference, difference of squares. Check each one by substituting a=2, b=3.
  2. Step 2 — expand bracketsTwenty expressions like (x+5)^2 and (3a-2)^2, each in three lines: square, twice the product, square.
  3. Step 3 — the reverse directionFactor expressions using the difference of squares and check by multiplying back.
  4. Step 4 — cubesAdd the cube formulas; tell them apart from the square ones by the powers of the terms.
  5. Step 5 — mental mathWork out 99², 102 · 98 and 51² − 49² with the formulas and compare with long multiplication.

Start learning this in your own space

The plan goes into your repository: tick off stages, keep notes — the change history shows how far you have come.

Start the plan

Check yourself

1.Work out 98 · 102 using the difference of squares

2.Expand (x + 7)² and find its value when x = 3

3.Work out 41² − 39² without squaring the numbers

Sources

Was this helpful?

More articles

School math Area and perimeter Perimeter is the length of a shape's boundary; area is the size of what is inside. That is also why the units differ: perimeter in centimetres, area in square centimetres. Below are the formulas, three worked problems and a check that catches a mixed-up formula in five seconds. School math Percentage word problems A percent is one hundredth: 1% = 0.01. Almost every school percentage problem comes down to one of three types, and each one takes a single operation — once you have worked out what the problem treats as the whole. School math Laws of exponents An exponent is shorthand for multiplying the same factor by itself. All five laws of exponents follow from that shorthand in one line, so a forgotten rule can always be rebuilt rather than guessed. School math How to solve linear equations A linear equation is one where the variable appears only to the first power — no squares, no variable in a denominator. You solve it with a single idea, the balance: whatever you do to the left side, you do to the right side, and the equation stays true. School math Systems of linear equations A system of two equations in two unknowns is solved with one idea: reduce the two unknowns to one. There are two ways to do it — solve for one variable and substitute, or add the equations so that one variable disappears. School math Fractions with unlike denominators You can only add pieces of the same size — sixths to sixths, twenty-fourths to twenty-fourths. That is why any operation on fractions with different denominators starts with a common denominator, and only then do you add the numerators.

More solutions