Collecting Like Terms

Empty your shopping bag and you naturally sort as you go: the apples in one pile, the bananas in another, the tins in a third. You'd tally "5 apples and 3 bananas" — never mash them into a single number, because they're different things. Tidying up algebra works exactly the same way, and it is called collecting like terms.

Once you can write an expression in algebra, you can often make it shorter without changing its value. The trick is to collect like terms — terms built from the same letters — into one.

Two terms are like terms when they have exactly the same letter part: 3a and 5a are like (both are made of a's), and so are 2b and 7b. But 3a and 2b are unlike — different letters — and x and x^2 are unlike too, because x^2 is a different kind of thing from x.

Think of 3a as three a-tiles and 2a as two a-tiles. Put them in one pile and you have five a-tiles:

3a + 2a = 5a

Nothing magic happened — it is the same as 3 + 2 = 5, just counting a's instead of plain numbers. This is the distributive law read backwards: 3a + 2a = (3 + 2)a = 5a. The rule is simple: add the numbers in front, keep the letter the same.

Apples and bananas

Here is a tasty way to remember it. Imagine the letter a is an apple and the letter b is a banana. If you have 3 apples and someone gives you 5 more apples, you have 8 apples — that's 3a + 5a = 8a. But 3 apples and 2 bananas can't be squashed into one number: they're just "3 apples and 2 bananas", which we write 3a + 2b and leave alone. Apples only add to apples; bananas only add to bananas.

Press Refresh to gather a new pile. The apples (the a's) collect into one group and the bananas (the b's) into another — the two groups never mix.

an apple a banana Because they aren't the same thing. "How many fruit?" has an answer — five — but "five what?" doesn't. In algebra the letters are placeholders for amounts we don't know yet, and you can only count up things that are the same. So 3a + 2b is already as short as it gets: it is the final answer, not an unfinished sum.

The picture below makes it visual with algebra tiles. Tiles of the same kind slide together into one group; tiles of different kinds stay apart. Step through it.

Unlike terms stay apart

Terms only combine when their letters match exactly. You cannot add an x to a y, and you cannot add an x to an x^2 — they are different kinds of tile. So in

2x + 3y + x = 3x + 3y

the two x terms join (2x + x = 3x), but the 3y has no partner and is left as it is. A simplified expression keeps one term of each kind.

Worked examples

To simplify, hunt for terms with the same letter and add their numbers. Here are three:

The two traps when collecting like terms:

apples 3a is shorthand for a + a + a — three apples added up. That's why a + a + a simplifies straight to 3a. And a lonely a with no number really means 1a — the 1 is just invisible — so 4a + a = 4a + 1a = 5a.

See it explained

Khan Academy introduces combining like terms here: