Skip to the page
Home Campus
Start free

Factorising by Grouping

How to factorise four terms such as ax+bx+kay+kbyax + bx + kay + kby into two brackets: taking out a bracket as a common factor, choosing the pairs, and dealing with minus signs.

Before you start

In Secondary 1 you factorised by taking out the highest common factor (HCF) of the terms: 6x+9=3(2x+3)6x + 9 = 3(2x + 3) and 5ab−10a=5a(b−2).5ab - 10a = 5a(b - 2)\text{.}

In this lesson the common factor can be a whole bracket.

A Bracket as a Common Factor

In 3(x+2)+y(x+2)3(x + 2) + y(x + 2) both terms contain the bracket (x+2)(x + 2). Treat it like a single letter BB: 3B+yB=B(3+y)3B + yB = B(3 + y). So 3(x+2)+y(x+2)=(x+2)(3+y).3(x + 2) + y(x + 2) = (x + 2)(3 + y)\text{.}

Example 1: Taking out a common bracket

Factorise (a) a(c+d)+b(c+d)a(c + d) + b(c + d); (b) 2x(y−5)−3(y−5);2x(y - 5) - 3(y - 5)\text{;} (c) c(a+b)+d(b+a)c(a + b) + d(b + a).

Solution

(a) The common factor is (c+d)(c + d): (c+d)(a+b)(c + d)(a + b), which we may write (a+b)(c+d)(a + b)(c + d).

(b) The common factor is (y−5)(y - 5). What is left is 2x2x from the first term and −3-3 from the second: (y−5)(2x−3)(y - 5)(2x - 3).

Check: (y−5)(2x−3)=2xy−3y−10x+15,(y - 5)(2x - 3) = 2xy - 3y - 10x + 15\text{,} and 2x(y−5)−3(y−5)=2xy−10x−3y+15.2x(y - 5) - 3(y - 5) = 2xy - 10x - 3y + 15\text{.} ✓

(c) b+a=a+bb + a = a + b, so the two brackets are the same: (a+b)(c+d)(a + b)(c + d).

(a) (a+b)(c+d)(a + b)(c + d); (b) (y−5)(2x−3)(y - 5)(2x - 3); (c) (a+b)(c+d)(a + b)(c + d)

Factorising by Grouping

When you expand (a+b)(c+d)(a + b)(c + d), the step in the middle is a(c+d)+b(c+d)a(c + d) + b(c + d):

(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

Factorising runs the same steps backwards. This is called factorisation by grouping, because the four terms are first put into two groups.

Factorisation by grouping

1. Group the four terms into two pairs so that the two terms of each pair have a common factor.

2. Take out the common factor of each pair. The two brackets left must be the same.

3. Take out that common bracket.

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

Check the answer by expanding it.

Example 2: The first two and the last two

Factorise xy+3y+2x+6xy + 3y + 2x + 6.

Solution

Group: (xy+3y)+(2x+6)(xy + 3y) + (2x + 6)

Take out each common factor: y(x+3)+2(x+3)y(x + 3) + 2(x + 3)

Take out the common bracket: (x+3)(y+2)(x + 3)(y + 2)

Check: (x+3)(y+2)=xy+2x+3y+6.(x + 3)(y + 2) = xy + 2x + 3y + 6\text{.} ✓

(x+3)(y+2)(x + 3)(y + 2)

Example 3: The form ax+bx+kay+kbyax + bx + kay + kby

Factorise (a) 2ax+2bx+3ay+3by;2ax + 2bx + 3ay + 3by\text{;} (b) 3x+6y+2xz+4yz3x + 6y + 2xz + 4yz.

Solution

(a) (2ax+2bx)+(3ay+3by)=2x(a+b)+3y(a+b)=(a+b)(2x+3y)(2ax + 2bx) + (3ay + 3by) = 2x(a + b) + 3y(a + b) = (a + b)(2x + 3y)

Check: (a+b)(2x+3y)=2ax+3ay+2bx+3by.(a + b)(2x + 3y) = 2ax + 3ay + 2bx + 3by\text{.} ✓

(b) (3x+6y)+(2xz+4yz)=3(x+2y)+2z(x+2y)=(x+2y)(3+2z)(3x + 6y) + (2xz + 4yz) = 3(x + 2y) + 2z(x + 2y) = (x + 2y)(3 + 2z)

(a) (a+b)(2x+3y)(a + b)(2x + 3y); (b) (x+2y)(3+2z)(x + 2y)(3 + 2z)

The Frame View

The multiplication frame shows the same idea. Place the four terms in the four cells so that each row has a common factor and each column has a common factor. The common factor of each row goes on its left, and the common factor of each column goes on top. The headers are then the two brackets.

Example 4: An arrangement that works, and one that does not

Use a frame to factorise 3x+6y+2xz+4yz3x + 6y + 2xz + 4yz. Then explain why the arrangement with 3x3x and 4yz4yz in the top row does not work.

Solution

Put 3x3x and 2xz2xz in the top row (common factor xx), and 6y6y and 4yz4yz in the bottom row (common factor 2y2y). Then the first column 3x3x, 6y6y has common factor 33, and the second column 2xz2xz, 4yz4yz has common factor 2z2z:

×33+2z+2z
xx3x3x+2xz+2xz
+2y+2y+6y+6y+4yz+4yz

3x+2xz+6y+4yz=(x+2y)(3+2z)3x + 2xz + 6y + 4yz = (x + 2y)(3 + 2z)

Each cell is its row times its column, so the frame is right.

Now put 3x3x and 4yz4yz in the top row:

×  
 3x3x+4yz+4yz
 +6y+6y+2xz+2xz

3x3x and 4yz4yz have no common factor except 11, so there is nothing useful to write on the left of the top row. This arrangement does not work. Each row and each column must have a common factor; here the top row does not.

3x+6y+2xz+4yz=(x+2y)(3+2z)3x + 6y + 2xz + 4yz = (x + 2y)(3 + 2z)

When the First Pairing Fails

The terms are not always written in a helpful order. If the first two terms have no common factor, do not give up: choose different pairs. The order in which the terms are written does not matter: choose pairs that each share a factor and leave the same bracket.

Example 5: Re-pairing

Factorise (a) ac+bd+ad+bcac + bd + ad + bc; (b) xy+12+3x+4yxy + 12 + 3x + 4y.

Solution

(a) acac and bdbd have no common factor, so the pair (ac+bd)(ac + bd) is no use. Pair acac with adad (common factor aa) and bcbc with bdbd (common factor bb):

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

(b) xyxy and 1212 have no common factor. Pair xyxy with 3x3x and 4y4y with 1212:

(xy+3x)+(4y+12)=x(y+3)+4(y+3)=(y+3)(x+4)(xy + 3x) + (4y + 12) = x(y + 3) + 4(y + 3) = (y + 3)(x + 4)

Check: (y+3)(x+4)=xy+4y+3x+12.(y + 3)(x + 4) = xy + 4y + 3x + 12\text{.} ✓

(a) (a+b)(c+d)(a + b)(c + d); (b) (y+3)(x+4)(y + 3)(x + 4)

Minus Signs

When the second pair begins with a minus sign, take out a negative common factor, so that the bracket left matches the first one. Taking out −b-b from −bx+by-bx + by gives −b(x−y)-b(x - y): the sign inside the bracket changes.

Example 6: A negative factor from the second pair

Factorise ax−ay−bx+byax - ay - bx + by.

Solution

(ax−ay)+(−bx+by)(ax - ay) + (-bx + by)

=a(x−y)−b(x−y),= a(x - y) - b(x - y)\text{,} since −b×x=−bx-b \times x = -bx and −b×(−y)=+by-b \times (-y) = +by.

=(x−y)(a−b)= (x - y)(a - b)

Check: (x−y)(a−b)=ax−bx−ay+by.(x - y)(a - b) = ax - bx - ay + by\text{.} ✓

(a−b)(x−y)(a - b)(x - y)

Example 7: A factor of −1-1

Factorise xy−2x−y+2xy - 2x - y + 2.

Solution

(xy−2x)+(−y+2)(xy - 2x) + (-y + 2)

=x(y−2)−1(y−2).= x(y - 2) - 1(y - 2)\text{.} The second pair has only the common factor −1-1; write it so that the bracket matches.

=(y−2)(x−1)= (y - 2)(x - 1)

Check: (x−1)(y−2)=xy−2x−y+2.(x - 1)(y - 2) = xy - 2x - y + 2\text{.} ✓

(x−1)(y−2)(x - 1)(y - 2)

A Common Factor First, and Terms with Squares

Example 8: Take out the common factor of all four terms first

Factorise 6ax+6bx+12ay+12by.6ax + 6bx + 12ay + 12by\text{.}

Solution

All four terms have the common factor 66: 6(ax+bx+2ay+2by).6(ax + bx + 2ay + 2by)\text{.}

Group inside the bracket: 6[x(a+b)+2y(a+b)]=6(a+b)(x+2y).6[x(a + b) + 2y(a + b)] = 6(a + b)(x + 2y)\text{.}

6(a+b)(x+2y)6(a + b)(x + 2y)

Example 9: Terms with squares

Factorise (a) x2+3x+xy+3yx^2 + 3x + xy + 3y; (b) x3+2x2+3x+6x^3 + 2x^2 + 3x + 6.

Solution

(a) (x2+3x)+(xy+3y)=x(x+3)+y(x+3)=(x+3)(x+y)(x^2 + 3x) + (xy + 3y) = x(x + 3) + y(x + 3) = (x + 3)(x + y)

(b) (x3+2x2)+(3x+6)=x2(x+2)+3(x+2)=(x+2)(x2+3),(x^3 + 2x^2) + (3x + 6) = x^2(x + 2) + 3(x + 2) = (x + 2)(x^2 + 3)\text{,} since x3=x2×xx^3 = x^2 \times x.

(a) (x+3)(x+y)(x + 3)(x + y); (b) (x+2)(x2+3)(x + 2)(x^2 + 3)

Grouping to Calculate

Example 10: A quick sum

Without a calculator, find 37×13+37×7+63×13+63×7.37 \times 13 + 37 \times 7 + 63 \times 13 + 63 \times 7\text{.}

Solution

Group the first two and the last two: 37(13+7)+63(13+7)37(13 + 7) + 63(13 + 7)

=(37+63)(13+7)=100×20=2000= (37 + 63)(13 + 7) = 100 \times 20 = 2000

20002000

Common Mistakes

  • Stopping half way: y(x+3)+2(x+3)y(x + 3) + 2(x + 3) is not factorised. It is still a sum; take out (x+3)(x + 3).
  • Pairing terms with no common factor, such as (ac+bd)(ac + bd). Choose pairs that share a factor.
  • Not changing the sign inside the bracket: −bx+by=−b(x−y),-bx + by = -b(x - y)\text{,} not −b(x+y)-b(x + y).
  • Forgetting the 11: x(y−2)−(y−2)=(y−2)(x−1),x(y - 2) - (y - 2) = (y - 2)(x - 1)\text{,} not (y−2)x(y - 2)x.
  • Leaving a common factor of all four terms inside: 6ax+6bx+12ay+12by=6(a+b)(x+2y).6ax + 6bx + 12ay + 12by = 6(a + b)(x + 2y)\text{.}

Practice

Try each question before you open its solution. Check each answer by expanding it.

Question 1

Factorise (a) 5(x−4)+y(x−4)5(x - 4) + y(x - 4); (b) 2a(b+3)−(b+3)2a(b + 3) - (b + 3); (c) p(q−r)+2(r−q)p(q - r) + 2(r - q).

ShowHide solution

(a) (x−4)(5+y)(x - 4)(5 + y)

(b) −(b+3)=−1(b+3):-(b + 3) = -1(b + 3)\text{:} (b+3)(2a−1)(b + 3)(2a - 1)

(c) r−q=−(q−r)r - q = -(q - r), so 2(r−q)=−2(q−r).2(r - q) = -2(q - r)\text{.} Then p(q−r)−2(q−r)=(q−r)(p−2).p(q - r) - 2(q - r) = (q - r)(p - 2)\text{.}

(a) (x−4)(5+y)(x - 4)(5 + y); (b) (b+3)(2a−1)(b + 3)(2a - 1); (c) (q−r)(p−2)(q - r)(p - 2)

Question 2

Factorise (a) xy+5x+4y+20xy + 5x + 4y + 20; (b) 6mn+8m+9n+126mn + 8m + 9n + 12.

ShowHide solution

(a) x(y+5)+4(y+5)=(y+5)(x+4)x(y + 5) + 4(y + 5) = (y + 5)(x + 4)

(b) 2m(3n+4)+3(3n+4)=(3n+4)(2m+3)2m(3n + 4) + 3(3n + 4) = (3n + 4)(2m + 3)

(a) (x+4)(y+5)(x + 4)(y + 5); (b) (2m+3)(3n+4)(2m + 3)(3n + 4)

Question 3

Factorise (a) 5ax+5bx+2ay+2by;5ax + 5bx + 2ay + 2by\text{;} (b) ap+bp+4aq+4bqap + bp + 4aq + 4bq.

ShowHide solution

(a) 5x(a+b)+2y(a+b)=(a+b)(5x+2y)5x(a + b) + 2y(a + b) = (a + b)(5x + 2y)

(b) p(a+b)+4q(a+b)=(a+b)(p+4q)p(a + b) + 4q(a + b) = (a + b)(p + 4q)

(a) (a+b)(5x+2y)(a + b)(5x + 2y); (b) (a+b)(p+4q)(a + b)(p + 4q)

Question 4

Factorise 2a+4b+3ac+6bc2a + 4b + 3ac + 6bc using a multiplication frame.

ShowHide solution

Top row 2a2a and 3ac3ac (common factor aa); bottom row 4b4b and 6bc6bc (common factor 2b2b). Columns: 2a2a, 4b4b have common factor 22; 3ac3ac, 6bc6bc have common factor 3c3c.

×22+3c+3c
aa2a2a+3ac+3ac
+2b+2b+4b+4b+6bc+6bc

2a+3ac+4b+6bc=(a+2b)(2+3c)2a + 3ac + 4b + 6bc = (a + 2b)(2 + 3c)

(a+2b)(2+3c)(a + 2b)(2 + 3c)

Question 5

Factorise (a) 3x+2y+6+xy3x + 2y + 6 + xy; (b) pq+6+2p+3qpq + 6 + 2p + 3q.

ShowHide solution

(a) 3x3x and 2y2y share no factor. Pair xyxy with 3x3x, and 2y2y with 66: x(y+3)+2(y+3)=(y+3)(x+2).x(y + 3) + 2(y + 3) = (y + 3)(x + 2)\text{.}

(b) Pair pqpq with 2p2p, and 3q3q with 66: p(q+2)+3(q+2)=(q+2)(p+3).p(q + 2) + 3(q + 2) = (q + 2)(p + 3)\text{.}

(a) (x+2)(y+3)(x + 2)(y + 3); (b) (p+3)(q+2)(p + 3)(q + 2)

Question 6

Factorise (a) px−py−qx+qypx - py - qx + qy; (b) ab−3a−2b+6ab - 3a - 2b + 6; (c) xy−x−y+1xy - x - y + 1.

ShowHide solution

(a) p(x−y)−q(x−y)=(x−y)(p−q)p(x - y) - q(x - y) = (x - y)(p - q)

(b) a(b−3)−2(b−3)=(b−3)(a−2),a(b - 3) - 2(b - 3) = (b - 3)(a - 2)\text{,} since −2×(−3)=+6-2 \times (-3) = +6.

(c) x(y−1)−1(y−1)=(y−1)(x−1)x(y - 1) - 1(y - 1) = (y - 1)(x - 1)

(a) (p−q)(x−y)(p - q)(x - y); (b) (a−2)(b−3)(a - 2)(b - 3); (c) (x−1)(y−1)(x - 1)(y - 1)

Question 7

Factorise 2xy−6x−y+32xy - 6x - y + 3.

ShowHide solution

2x(y−3)−1(y−3)=(y−3)(2x−1)2x(y - 3) - 1(y - 3) = (y - 3)(2x - 1)

Check: (2x−1)(y−3)=2xy−6x−y+3.(2x - 1)(y - 3) = 2xy - 6x - y + 3\text{.} ✓

(2x−1)(y−3)(2x - 1)(y - 3)

Question 8

Factorise (a) 4ax+4ay+8bx+8by;4ax + 4ay + 8bx + 8by\text{;} (b) 3pr−3ps+6qr−6qs.3pr - 3ps + 6qr - 6qs\text{.}

ShowHide solution

(a) 4(ax+ay+2bx+2by)=4[a(x+y)+2b(x+y)]=4(x+y)(a+2b)4(ax + ay + 2bx + 2by) = 4[a(x + y) + 2b(x + y)] = 4(x + y)(a + 2b)

(b) 3(pr−ps+2qr−2qs)=3[p(r−s)+2q(r−s)]=3(r−s)(p+2q)3(pr - ps + 2qr - 2qs) = 3[p(r - s) + 2q(r - s)] = 3(r - s)(p + 2q)

(a) 4(a+2b)(x+y)4(a + 2b)(x + y); (b) 3(p+2q)(r−s)3(p + 2q)(r - s)

Question 9

Factorise (a) a2+2a+ab+2ba^2 + 2a + ab + 2b; (b) x3−4x2+2x−8x^3 - 4x^2 + 2x - 8.

ShowHide solution

(a) a(a+2)+b(a+2)=(a+2)(a+b)a(a + 2) + b(a + 2) = (a + 2)(a + b)

(b) x2(x−4)+2(x−4)=(x−4)(x2+2)x^2(x - 4) + 2(x - 4) = (x - 4)(x^2 + 2)

(a) (a+2)(a+b)(a + 2)(a + b); (b) (x−4)(x2+2)(x - 4)(x^2 + 2)

Question 10

Without a calculator, find 15×23+15×17+85×23+85×17.15 \times 23 + 15 \times 17 + 85 \times 23 + 85 \times 17\text{.}

ShowHide solution

15(23+17)+85(23+17)=(15+85)(23+17)=100×40=400015(23 + 17) + 85(23 + 17) = (15 + 85)(23 + 17) = 100 \times 40 = 4000

40004000

Question 11

A rectangle has an area of (xy+4x+3y+12)(xy + 4x + 3y + 12) cm². Its length and breadth are expressions of the form (x+p)(x + p) cm and (y+q)(y + q) cm. Find them, and check with x=2x = 2 and y=5y = 5.

ShowHide solution

xy+4x+3y+12=x(y+4)+3(y+4)=(x+3)(y+4)xy + 4x + 3y + 12 = x(y + 4) + 3(y + 4) = (x + 3)(y + 4)

With x=2x = 2, y=5y = 5: the area is 10+8+15+12=45,10 + 8 + 15 + 12 = 45\text{,} and (2+3)(5+4)=5×9=45.(2 + 3)(5 + 4) = 5 \times 9 = 45\text{.} ✓

The sides are (x+3)(x + 3) cm and (y+4)(y + 4) cm.

Question 12

Mei wrote 3px−3py−2qx+2qy=3p(x−y)−2q(x+y)3px - 3py - 2qx + 2qy = 3p(x - y) - 2q(x + y) and said it cannot be factorised further. Find her mistake and finish the factorisation.

ShowHide solution

−2q(x+y)=−2qx−2qy,-2q(x + y) = -2qx - 2qy\text{,} but the last two terms are −2qx+2qy-2qx + 2qy. Taking out −2q-2q changes the sign inside: −2qx+2qy=−2q(x−y).-2qx + 2qy = -2q(x - y)\text{.}

So 3p(x−y)−2q(x−y)=(x−y)(3p−2q).3p(x - y) - 2q(x - y) = (x - y)(3p - 2q)\text{.}

Check: (x−y)(3p−2q)=3px−2qx−3py+2qy.(x - y)(3p - 2q) = 3px - 2qx - 3py + 2qy\text{.} ✓

(x−y)(3p−2q)(x - y)(3p - 2q)

Key Points

  • A bracket can be a common factor: a(c+d)+b(c+d)=(a+b)(c+d).a(c + d) + b(c + d) = (a + b)(c + d)\text{.}
  • Factorise four terms by grouping them into two pairs, each with a common factor; the two brackets left must match.
  • If the first pairing has no common factor, pair the terms differently.
  • Take out a negative factor from a pair that starts with a minus: −bx+by=−b(x−y).-bx + by = -b(x - y)\text{.}
  • Take out a common factor of all four terms first.
  • Check by expanding.

‹ 3.7 Factorising Using the Identities 3.9 Factorising x² + bx + c When c Is Positive ›

All Secondary 2 (Grade 8) lessons

Home Campus has lessons, practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 2 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.