Product of two binomials

Multiplying two binomials by hand — say (x+9)(x−4)(x+9)(x-4) — looks like it needs the full distributive law every time — four separate multiplications, then careful sign bookkeeping. It does not. Because both brackets share the same variable xx and differ only in their constant, the product always collapses into the same three-term shape: x2x^2, a middle term built from the sum of the two constants, and a last term built from their product. Spot that shape once and you can write the expanded form of (x+a)(x+b)(x+a)(x+b) in a single line, skip the intermediate distributive steps, and even multiply awkward-looking numbers like 103×98103\times98 in your head. This article rebuilds the identity from the distributive law, works it forward on two full examples, and flags the sign slips that cost the most marks in the Class 8 Algebraic Identities chapter.

The core insight

For a common variable xx and any constants a,ba,b, (x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab — the middle coefficient is the sum of aa and bb, the last term is their product, with signs carried throughout.

The core idea

Every product of two binomials with a shared bare-xx term and different constants follows one pattern, and it is worth seeing exactly why.

Start from the distributive law. Multiplying two brackets always means every term in the first hits every term in the second: (x+a)(x+b)=x(x+b)+a(x+b)=x2+bx+ax+ab(x+a)(x+b)=x(x+b)+a(x+b)=x^2+bx+ax+ab. Nothing here is special to this identity yet — it is the ordinary rule from Algebraic Expressions, applied twice.

Combine the like terms. The two middle pieces, bxbx and axax, both contain xx to the first power, so they merge into a single term:

(x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab

where: xx is the variable common to both brackets, aa and bb are the two constants (each may be positive or negative), (a+b)(a+b) is their sum, and abab is their product.

Read it in words, not just symbols. The answer is always three terms: x2x^2, then xx multiplied by the sum of the two constants, then the plain product of the two constants. Because aa and bb can be any signed numbers, this single identity covers every sign combination — you never need a separate rule for (x−a)(x−b)(x-a)(x-b) or (x+a)(x−b)(x+a)(x-b); you just substitute the correct signed values.

It contains the earlier identities as special cases. Set a=ba=b and (x+a)(x+b)(x+a)(x+b) becomes (x+a)2=x2+2ax+a2(x+a)^2=x^2+2ax+a^2, matching the square-of-a-binomial identity exactly. Set b=−ab=-a and it becomes (x+a)(x−a)=x2−a2(x+a)(x-a)=x^2-a^2, the difference-of-squares identity. So (x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab is the most general of the three, not a fourth unrelated rule to memorise separately.

It also points forward to factorisation. Later, in the Factorisation chapter, this identity is run in reverse: given a monic trinomial such as x2+7x+12x^2+7x+12, you search for two numbers whose sum is 77 and whose product is 1212 — here 33 and 44 — and rewrite the trinomial as (x+3)(x+4)(x+3)(x+4). That reverse process, often called splitting the middle term, is really this same identity read backwards, so getting comfortable computing a+ba+b and abab confidently now makes the later factorising step far less mysterious. The area diagram below shows why the four distributive pieces really do collapse to three terms: two of the four rectangles have the same "width times xx" shape and stack into one middle strip.

Figure
A square of side x split by one horizontal and one vertical cut into four regions x squared, bx, ax and ab, showing the two middle regions combine into one strip
Area model of (x + a)(x + b) x² bx ax ab x b x a bx and ax sit side by side — together they are the one middle term (a+b)x
Derivation Aof (x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab

The goal is to expand the general product (x+a)(x+b)(x+a)(x+b), where aa and bb are any two constants that may be positive, negative, equal, or opposites of each other, using nothing beyond the distributive law already known from Algebraic Expressions, and to end with a single reusable rule that names the middle coefficient and the constant term directly in terms of aa and bb.

Step 1. Treat (x+b)(x+b) as a single block and distribute the first bracket over it: (x+a)(x+b)=x⋅(x+b)+a⋅(x+b)(x+a)(x+b)=x\cdot(x+b)+a\cdot(x+b). This is exactly the same move used for (x+a)2(x+a)^2 and (x+a)(x−a)(x+a)(x-a) earlier in the chapter — nothing new is assumed here.

Step 2. Distribute each piece fully: x⋅(x+b)=x2+bxx\cdot(x+b)=x^2+bx and a⋅(x+b)=ax+aba\cdot(x+b)=ax+ab. Adding these gives (x+a)(x+b)=x2+bx+ax+ab(x+a)(x+b)=x^2+bx+ax+ab, four separate terms with no simplification yet.

Step 3. Combine the like terms. bxbx and axax are both first-degree terms in xx, so bx+ax=(a+b)xbx+ax=(a+b)x. Substituting back gives the closed form (x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab — the middle coefficient is the sum a+ba+b, and the constant term is the product abab.

Step 4. Sanity-check with numbers. Let a=2,b=5a=2,b=5. Direct expansion: (x+2)(x+5)=x2+5x+2x+10=x2+7x+10(x+2)(x+5)=x^2+5x+2x+10=x^2+7x+10. The identity: a+b=7a+b=7, ab=10ab=10, giving x2+7x+10x^2+7x+10 — the two methods agree, confirming the rule.

Step 5. Check that a mixed-sign case behaves the same way. Let a=6,b=−3a=6,b=-3. Direct expansion: (x+6)(x−3)=x2−3x+6x−18=x2+3x−18(x+6)(x-3)=x^2-3x+6x-18=x^2+3x-18. The identity: a+b=6+(−3)=3a+b=6+(-3)=3 and ab=6×(−3)=−18ab=6\times(-3)=-18, giving x2+3x−18x^2+3x-18 — again a match, confirming the rule holds regardless of the signs carried by aa and bb, not just when both constants are positive.

Worked example

Expand (x+9)(x−4)(x+9)(x-4), and use the identity to compute 103×98103\times98 mentally.

Step 1. Identify aa and bb with their signs. Here a=9a=9 and b=−4b=-4 (the minus sign travels with the 44).

Step 2. Compute the sum and product needed by the identity: a+b=9+(−4)=5a+b=9+(-4)=5 and ab=9×(−4)=−36ab=9\times(-4)=-36.

Step 3. Substitute into (x+a)(x+b)=x2+(a+b)x+ab(x+a)(x+b)=x^2+(a+b)x+ab: (x+9)(x−4)=x2+5x−36(x+9)(x-4)=x^2+5x-36.

Step 4. Check by full distributive expansion: (x+9)(x−4)=x(x−4)+9(x−4)=x2−4x+9x−36=x2+5x−36(x+9)(x-4)=x(x-4)+9(x-4)=x^2-4x+9x-36=x^2+5x-36. Both methods agree: (x+9)(x−4)=x2+5x−36(x+9)(x-4)=x^2+5x-36.

Competitive stretch

Step 1. Write 103=100+3103=100+3 and 98=100−298=100-2, so 103×98=(100+3)(100−2)103\times98=(100+3)(100-2), matching the form (x+a)(x+b)(x+a)(x+b) with x=100x=100, a=3a=3, b=−2b=-2.

Step 2. Compute a+b=3+(−2)=1a+b=3+(-2)=1 and ab=3×(−2)=−6ab=3\times(-2)=-6.

Step 3. Apply the identity: 103×98=1002+1(100)+(−6)=10000+100−6103\times98=100^2+1(100)+(-6)=10000+100-6. Final answer: 103×98=10094103\times98=10094, found without any long multiplication, and the same trick handles any pair of numbers close to a round base — for instance 198×203198\times203 becomes (200−2)(200+3)(200-2)(200+3), so x=200x=200, a=−2a=-2, b=3b=3, giving 2002+1(200)−6=40194200^2+1(200)-6=40194, all worked out mentally once the pattern is familiar.

Common traps

  • Forgetting to carry the sign of aa or bb into both the sum (a+b)(a+b) and the product abab — in (x−6)(x−11)(x-6)(x-11) both constants are negative, so the sum is negative but the product is positive; treating either one as if the numbers were positive gives a wrong middle or last term.
  • Confusing this identity with (a+b)2(a+b)^2: here aa and bb are usually different numbers, so the middle term is (a+b)x(a+b)x, not 2ax2ax, and there is no requirement that a=ba=b. Writing 2ax2ax out of habit when the two constants are actually unequal is one of the most frequent slips in this chapter.
  • Trying to apply the shortcut directly to brackets like (2x+3)(2x+5)(2x+3)(2x+5), where the coefficient of xx is not 11 — the identity as stated only works for a bare xx in each bracket; other coefficients need full distributive expansion, since the neat "sum and product" shortcut relies on the x2x^2 term coming from x×xx\times x with no extra coefficient attached.
  • Sign arithmetic slips such as (−6)×(−11)=−66(-6)\times(-11)=-66 instead of the correct +66+66 — a very common error when both constants are negative. Double-check any product of two negative numbers by remembering the rule "same signs multiply to a positive result" before writing down the constant term.

Ask the tutor: Want a few extra practice pairs — including tricky sign mixes like (x−8)(x+3)(x-8)(x+3) — with the tutor walking through each a+ba+b and abab step by step?

Why does the middle term become (a+b)x instead of just staying as two separate terms?

Because bxbx and axax are like terms — both are a number multiplied by the same power of xx (namely x1x^1) — so ordinary algebra lets you add their coefficients: bx+ax=(b+a)x=(a+b)xbx+ax=(b+a)x=(a+b)x. This is the same rule you use to simplify 3x+5x=8x3x+5x=8x; nothing about binomial multiplication changes it. If the two brackets used different variables, such as (x+a)(y+b)(x+a)(y+b), the cross terms would not combine, and you would keep all four terms separately.

How is this different from the (x+a) squared identity I already learned?

(x+a)2(x+a)^2 is the special case of this identity where the two brackets are identical, so a=ba=b. Substituting a=ba=b into x2+(a+b)x+abx^2+(a+b)x+ab gives x2+2ax+a2x^2+2ax+a^2, exactly the square-of-a-binomial result. The identity here is more general because aa and bb are allowed to be any two different constants — you compute their sum and product separately rather than relying on one repeated value, so it covers cases the squared identity cannot, like (x+9)(x−4)(x+9)(x-4).

Can I use this identity when the constants are fractions or decimals, not just whole numbers?

Yes — the derivation never assumes aa and bb are integers, only that they are constants. So (x+2.5)(x−1.5)(x+2.5)(x-1.5) works exactly the same way: a+b=2.5+(−1.5)=1a+b=2.5+(-1.5)=1 and ab=2.5×(−1.5)=−3.75ab=2.5\times(-1.5)=-3.75, giving x2+x−3.75x^2+x-3.75. The only extra care needed is doing the sum and product arithmetic correctly with fractions or decimals, since the sign and combination rules themselves do not change.

Before this

Where this leads