Expanding products and combining like terms

Two brackets sitting side by side, like (x+5)(x+3)(x+5)(x+3), look harmless until you have to multiply them out. Every term in the first bracket must meet every term in the second, and once the dust settles some of those products turn out to be twins that can be merged into one. Expanding products and combining like terms is the two-step skill that turns a product of binomials into its shortest, fully simplified form: first distribute so nothing is left un-multiplied, then tidy up by adding together any terms that share the same letters raised to the same powers. This is the central skill of the Class 8 chapter We Distribute, Yet Things Multiply. It extends the distributive law for a monomial times a bracket to the full binomial-times-binomial case, and it is the skill every later identity and factorisation problem in the chapter quietly depends on.

The core insight

Expanding (a+b)(c+d)(a+b)(c+d) means distributing twice to get all four pairwise products ac+ad+bc+bdac+ad+bc+bd, and simplifying means combining any of those products that are like terms — same letters, same powers — into a single term.

The core idea

Distribute the second bracket over both terms of the first. To multiply (a+b)(a+b) and (c+d)(c+d), treat (c+d)(c+d) as a single block and distribute it across aa and bb separately, then distribute again inside each piece:

(a+b)(c+d)=a(c+d)+b(c+d)=ac+ad+bc+bd(a+b)(c+d) = a(c+d) + b(c+d) = ac + ad + bc + bd

where: aa and bb are the two terms of the first bracket, cc and dd are the two terms of the second bracket, and ac,ad,bc,bdac, ad, bc, bd are the four pairwise products that always result from multiplying two binomials.

FOIL is a memory aid, not a new rule. Multiply the First terms, the Outer terms, the Inner terms, and the Last terms, then add all four products. It is just a name for applying x(y+z)=xy+xzx(y+z) = xy+xz twice in a row — the picture below shows why the four products cover the whole rectangle with no gaps and no overlaps.

Like terms have identical letter-power combinations. Two terms can be combined only if they carry exactly the same letters raised to exactly the same powers; their numerical coefficients may differ. For example, 3xy3xy and −7xy-7xy are like terms, but 3xy3xy and 3x2y3x^2y are not, because the power of xx differs. To combine like terms, add or subtract their coefficients and keep the letter part unchanged:

3xy+(−7xy)=(3−7)xy=−4xy3xy + (-7xy) = (3-7)xy = -4xy

Whether products merge depends on the letters involved. Multiplying two binomials always produces exactly four term-by-term products, because each of the two terms in the first bracket pairs with each of the two terms in the second. Whether those four collapse to three terms, stay as four, or (in special identities met later in the chapter) collapse further depends entirely on whether the Outer and Inner products happen to share the same letters. If the two binomials involve completely different letters, such as (x+3)(y+5)(x+3)(y+5), none of the four products can ever combine, and the expanded answer stays a genuine four-term expression.

Figure
An area model rectangle for x plus 5 times x plus 3 split into four smaller rectangles labelled x squared, 3x, 5x and 15, showing the four FOIL products as regions of one big rectangle
Area model for (x + 5)(x + 3) — four products, one rectangle x squared 3x 5x 15 x 3 x 5 Outer and Inner (3x and 5x) share the same letter and power — they combine. First (x squared) and Last (15) have nothing to combine with.
Derivation AThe general binomial product

This derivation shows exactly why multiplying two binomials always produces four term-by-term products before any simplification, and why treating one bracket as a single quantity while distributing is enough to justify the FOIL pattern that students are taught to apply by rote — the goal is to see the rule as two ordinary applications of the distributive law rather than as a separate law to memorise.

Step 1. Treat the second bracket (c+d)(c+d) as one quantity, call it M=c+dM = c+d, and distribute MM over the two terms of the first bracket using the ordinary distributive law x(p+q)=xp+xqx(p+q) = xp+xq with x=Mx=M, p=ap=a, q=bq=b: (a+b)M=aM+bM(a+b)M = aM + bM. Substituting back, (a+b)(c+d)=a(c+d)+b(c+d)(a+b)(c+d) = a(c+d) + b(c+d).

Step 2. Distribute again inside each piece, this time treating aa and bb as the multipliers. For the first piece, a(c+d)=ac+ada(c+d) = ac + ad by the distributive law applied to aa. For the second piece, b(c+d)=bc+bdb(c+d) = bc + bd by the same law applied to bb.

Step 3. Add the two expanded pieces together to get the full expansion: (a+b)(c+d)=ac+ad+bc+bd(a+b)(c+d) = ac + ad + bc + bd. This is exactly four terms because each application of the distributive law in Step 1 produced two terms, and each of those was expanded into two more terms in Step 2, giving 2×2=42 \times 2 = 4 products in total — one for every pairing of a term from the first bracket with a term from the second.

Step 4. Check the formula against numbers instead of letters. Let a=xa=x, b=5b=5, c=xc=x, d=3d=3, matching the worked example below. The formula gives ac+ad+bc+bd=x⋅x+x⋅3+5⋅x+5⋅3=x2+3x+5x+15ac+ad+bc+bd = x\cdot x + x\cdot 3 + 5\cdot x + 5\cdot 3 = x^2 + 3x + 5x + 15, which is exactly the four FOIL products found by direct multiplication — confirming the general result holds for this specific case before any like terms are combined.

Worked example

Expand and simplify (x+5)(x+3)(x+5)(x+3).

Step 1. Apply the general formula ac+ad+bc+bdac+ad+bc+bd with a=xa=x, b=5b=5, c=xc=x, d=3d=3: First x×x=x2x\times x = x^2, Outer x×3=3xx\times 3 = 3x, Inner 5×x=5x5\times x = 5x, Last 5×3=155\times 3 = 15.

Step 2. Write all four products together: x2+3x+5x+15x^2 + 3x + 5x + 15.

Step 3. Identify like terms: 3x3x and 5x5x are like terms, since both carry the letter xx raised to power 11; x2x^2 and 1515 have nothing else in the expression to combine with.

Step 4. Combine the like terms by adding their coefficients: 3x+5x=(3+5)x=8x3x + 5x = (3+5)x = 8x, giving the final simplified expansion x2+8x+15x^2 + 8x + 15.

Answer: (x+5)(x+3)=x2+8x+15(x+5)(x+3) = x^2 + 8x + 15.

Competitive stretch

Expand and simplify (2p−3q)(p+4q)(2p-3q)(p+4q), where the negative sign inside a bracket needs careful sign-tracking.

Step 1. Apply the distributive law twice: First 2p×p=2p22p\times p = 2p^2, Outer 2p×4q=8pq2p\times 4q = 8pq, Inner (−3q)×p=−3pq(-3q)\times p = -3pq, Last (−3q)×4q=−12q2(-3q)\times 4q = -12q^2.

Step 2. Write all four products: 2p2+8pq−3pq−12q22p^2 + 8pq - 3pq - 12q^2.

Step 3. Identify like terms: 8pq8pq and −3pq-3pq share the letters pp and qq, each to power 11, so they combine to 8pq−3pq=5pq8pq - 3pq = 5pq.

Step 4. Final simplified expression: 2p2+5pq−12q22p^2 + 5pq - 12q^2. Notice this has three terms, even though the expansion started with four products — one Outer-Inner pair merged.

Common traps

  • Skipping one of the four FOIL products, most often the Inner product, leaving a three-term answer that is missing a middle term.
  • Combining unlike terms by mistake, such as adding x2x^2 and 8x8x as if they were the same kind of term — only identical letter-and-power combinations may be merged.
  • Sign errors during Outer or Inner steps when a bracket contains a subtraction, for instance forgetting that (−3q)×p(-3q)\times p gives a negative product.
  • Stopping after expansion without combining like terms, leaving an unfinished answer like x2+3x+5x+15x^2+3x+5x+15 that is correct but not fully simplified.

Ask the tutor: if an expansion is not matching the expected answer, ask the AI tutor to check your FOIL step by step and pinpoint exactly where a sign or a term went missing.

Why do we always get exactly four products when multiplying two binomials?

Because each of the two terms in the first bracket has to be multiplied by each of the two terms in the second bracket, and there are 2×2=42\times2=4 such pairings. The derivation above shows this formally: distributing the whole second bracket over the first bracket's two terms gives two pieces, and expanding each piece gives two more terms, for four in total. Whether those four later combine into fewer terms depends only on whether any of them happen to be like terms.

How do I know which terms are like terms after expanding?

Compare the letters and their powers, not the coefficients. Two terms are like terms only if they contain exactly the same letters, each raised to exactly the same power — 3xy3xy and −7xy-7xy qualify, but 3xy3xy and 3x2y3x^2y do not, since the power of xx is different. A quick habit that helps: underline the letter part of each term in the expanded expression first, then only combine terms whose underlined parts are identical.

I keep forgetting the negative sign when one bracket has a subtraction — how do I avoid that?

Rewrite the subtraction as adding a negative before you distribute, so (2p−3q)(2p-3q) becomes (2p+(−3q))(2p+(-3q)) in your working. Then every FOIL product is a straightforward multiplication, and the sign travels automatically with the term — for example Inner becomes (−3q)×p=−3pq(-3q)\times p = -3pq instead of a mental subtraction you might get backwards. Writing the sign explicitly during Step 1, before combining anything, catches most sign slips before they reach the final answer.

Before this

Where this leads