How Do You Factorise an Expression With Four Terms?

Author: codeplu.com
Last Updated: 25 Sept 2026
Est. Duration: 12 min
Skill Level: Beginner

Root Concept

Grouping works because a whole bracket can be a common factor, exactly as a number or a letter can — it is the same move applied twice.

CodePLU Goal

Upgrading Human Mental Models

Learn how to think in Workflows

Concept Playground
CodePLU logo

Concept Development By codeplu.com

Pair, factor, then factor again — match each expression to its brackets

What Do You Do When Nothing Is Shared by Everything?

ax + ay + bx + by has four terms and no factor common to all four. The first two have an a, the last two have a b, and nothing runs through the whole thing. By the method in the last tutorial it does not factorise, and yet it does — you just have to take the factor out twice rather than once.

Pair the terms up. From the first pair, ax + ay, take out the a to get a(x + y). From the second pair, bx + by, take out the b to get b(x + y). Now look at what you have written: a(x + y) + b(x + y). Both halves contain the bracket (x + y), so that bracket is itself a common factor and can come outside, leaving (a + b)(x + y).

The idea that makes it work is worth stating plainly, because it is the whole trick: a bracket can be a common factor, exactly as a number or a letter can. In the playground below you match three four-term expressions to their factorised forms, and one of the decoys is the result of pairing the terms the wrong way round.

How Does Pairing Help?

1

How do you know you paired them correctly?

The two brackets you get must be identical. That is the whole test, and it is immediate. Pair ax + ay + bx + by as it is written and you get a(x + y) + b(x + y) — the same bracket twice, so the pairing was right. Pair it as ax + bx and ay + by instead and you get x(a + b) + y(a + b), which is also the same bracket twice and also works, giving (x + y)(a + b). Both pairings succeed here, and the two answers are the same product written in a different order. If you ever take a factor from each pair and the brackets come out different, the pairing was wrong; swap which terms go together and try again rather than pressing on.

2

What happens with a minus sign in the second pair?

You may need to take out a negative factor to make the brackets match. Consider ax + ay − bx − by. The first pair gives a(x + y) as before. Taking a plain b out of the second pair gives b(−x − y), which does not match. Take out −b instead and you get −b(x + y), and now both brackets are (x + y), so the answer is (a − b)(x + y). Being willing to pull out a negative is what rescues most of the grouping questions that look as though they have failed. Check the sign work by multiplying the negative bracket back out before going further.

3

Where does grouping actually get used?

Most often on three-term expressions, which is surprising until you see it. x² + 5x + 6 has only three terms, but the middle one can be split: 5x is 3x + 2x, which turns the expression into x² + 3x + 2x + 6. Now there are four terms and grouping applies. The first pair gives x(x + 3) and the second gives 2(x + 3), so the answer is (x + 2)(x + 3). The splitting is chosen so the pairs work out, which takes practice, but the point for now is that the four-term method is not a curiosity — it is the engine behind factorising quadratics.

Real World Example

Two kinds of ticket sold at two different venues.

Where Would Four Terms Come From?

Four terms usually mean two things crossed with two other things, which is exactly the shape grouping is built for:

1

Counting the takings

ax + ay + bx + by

A festival sells tickets at two venues. At the first, a adults and b children come in on the morning session; at the second, the same a adults and b children come to the evening session. An adult ticket costs x and a child ticket costs y, the same at both. The morning takings are ax + ay and the evening takings are bx + by, so the total is ax + ay + bx + by. Four terms, and nothing is common to all four — which is exactly the situation that would stop the previous tutorial's method dead.

2

Two ways of adding it up

a(x + y) + b(x + y)

Group the terms by who bought them. The adults contributed ax + ay, which is a(x + y) — a adults, each spending x + y across the day. The children contributed bx + by, which is b(x + y) for the same reason. Written this way, the same bracket appears twice, and it means something concrete: x + y is what one person of either kind spends attending both sessions. That repeated bracket is not an accident of the algebra; it is a real quantity that turned up twice because the situation genuinely contains it.

3

Taking the bracket outside

(a + b)(x + y)

Since both halves contain x + y, that bracket comes outside, leaving (a + b)(x + y). Read it back into the situation and it says something obvious in hindsight: the total number of people, times what each of them spends across both sessions. Anybody running the festival would have said that without any algebra. The value of the factorising is that it found that description from the itemised one, and when the situation is less obvious than a ticket count, that is exactly the service you want it to perform. Finding the simple description hidden inside a messy one is most of what factorising is for.

FAQs

Final Words

Four terms with nothing shared by all of them can still factorise, by pairing. Take a factor out of each pair, and if the two brackets that appear are identical, that bracket is itself a common factor and comes outside in turn.

Identical brackets are the test, a negative factor is the usual rescue, and the same method powers factorising three-term quadratics once the middle term is split. Next comes the quickest kind of factorising — the sort you do by recognising a pattern rather than working anything out.