🧮 Algebra

📦Expanding Brackets

Open the brackets and multiply into every term — the distributive law is the only engine, the minus sign is the only trap.

(x+2)(x+3)(x+2)(x+3) looks frightening, but opening it takes just one law. Factorising packs an expression back into brackets; today we walk the other way and expand, putting every term out in the sunlight.

The distributive law: one host, every guest

Whoever stands outside a bracket must shake hands with every term inside. 3(x+4)3(x+4) means 3 times xx and 3 times 4:

a(b+c)=ab+aca(b+c) = ab + ac

3(x+4)=3x+123(x+4) = 3x + 12

As an arrow diagram: from the 3, one arrow points at xx, another at 4, and each landing spot keeps its share. Miss one arrow and the answer comes up short.

Two brackets: draw a grid

When two brackets multiply, the rule is everything times everything. Lay out (x+2)(x+3)(x+2)(x+3) as a grid:

×\timesxx+3+3
xxx2x^23x3x
+2+22x2x66

Add the four cells together:

(x+2)(x+3)=x2+3x+2x+6=x2+5x+6(x+2)(x+3) = x^2 + 3x + 2x + 6 = x^2 + 5x + 6

Some people call this FOIL — First, Outer, Inner, Last. It is the same job as the grid, wearing different words.

Signs are the disaster zone

The numbers rarely bite; the minus sign does. Two rules of engagement:

  • A minus sign in front of a bracket is a hidden 1-1 multiplying in, so every term flips: (x4)=x+4-(x-4) = -x + 4;
  • When a bracket carries its own minus, the sign travels with the number: (x2)(x+5)=x2+5x2x10=x2+3x10(x-2)(x+5) = x^2 + 5x - 2x - 10 = x^2 + 3x - 10.

A minus sign flips everyone inside

The minus in (x4)-(x-4) does not govern only the first term. It multiplies xx and also 4-4, so the result is x+4-x + 4, not x4-x - 4. Check how far the minus reaches before expanding.

Is the expansion right? Substitute a number

Expanding is easy to get wrong — and just as easy to check. Pick any xx; both sides must agree. Try x=1x = 1:

(1+2)(1+3)=3×4=1212+5×1+6=12(1+2)(1+3) = 3 \times 4 = 12 \qquad 1^2 + 5 \times 1 + 6 = 12

Both sides give 12, so the expansion holds. For extra confidence try x=2x = 2 too (both sides give 20). This is the same skill practiced in substitution.

InteractiveExpander

A secret rule hides inside the machine. Feed it numbers and guess the rule!

? ? ?

Output

The machine does not care what an expression looks like — only what comes out for the xx you feed in. (x+2)(x+3)(x+2)(x+3) and x2+5x+6x^2+5x+6 wear different faces, yet the same input produces the same output. Expanding, at heart, is rewriting the same machine.

Check yourself

Quick quiz

  1. 1. What is 3(x + 5) expanded?

  2. 2. What is −(x − 4) expanded?

  3. 3. What is (x + 2)(x + 3) expanded?