Expanding and Factorising

Change the brackets and watch the rectangle. The four pieces are the four terms, and switching to factorising asks the same question from the other side.

Loading interactive simulation...

The four letters of FOIL are four rectangles 🖖

Put a rectangle with sides x + 2 and x + 3 next to the expansion. It splits into four pieces because each side splits into two: x², two strips of 3x and 2x, and a 6 in the corner. Those four areas are the four terms, and their total is the total area — which is what "multiplying out" means. The order you visit them in does not matter, which is why every mnemonic for this works and why none of them is necessary. Drag a coefficient negative and one strip moves outside the block and goes hatched: a negative area is a subtraction, and the picture keeps working, which is more than can be said for the mnemonic.

Factorising is the same picture, and that is why it is harder 🖖

Switch to Factorise and the question turns around: here is the area, what were the sides? Nothing new is involved. What changed is that expanding is a calculation and factorising is a search — the four pieces are given as a total and you have to find an arrangement that is a rectangle. That asymmetry is why one direction is taught as a procedure and the other as a knack, and it is the same asymmetry that makes multiplying two primes easy and factoring their product the basis of RSA.

One test says whether the search is worth starting 🖖

Before hunting for factors, compute b² − 4ac. If it is a perfect square the trinomial factorises over the integers, and if it is not, no arrangement exists and no amount of trying will find one. Press One that will not: x² + x + 1 has a discriminant of −3, and the rectangle simply is not there. This is the same discriminant that decides how many roots a quadratic has, which is not a coincidence — the sides of the rectangle are the roots in disguise, and asking for integer sides is asking for rational roots. Sweeping every trinomial with a between 1 and 8 and b, c between −12 and 12 gives 733 with a square discriminant, and all 733 factorise.

Problems solved in full

  1. Factorising 6x² + 5x − 4 to say if it works 7 steps

    Factorise 6x² + 5x − 4, and say in advance whether it was going to work.

    1. Compute the discriminant first. It costs one line and it decides whether there is anything to find.

    2. One hundred and twenty-one is 11², so a factorisation over the integers exists. Now the search is worth doing.

    3. The roots follow from the same number, and because the discriminant is a perfect square they are rational.

    4. A root of 1/2 means a factor of (2x − 1); a root of −4/3 means a factor of (3x + 4). Clearing each denominator is what turns a root into a bracket.

    5. Multiply back, always. The two middle strips are 8x and −3x, and they combine to the 5x that was asked for.

    6. Now change the constant to −5 and repeat the first step. The discriminant becomes 25 + 120 = 145, which is not a perfect square, so there is no rectangle with integer sides and no point searching for one.

    7. Which is where the tool stops and a distinction begins. 6x² + 5x − 5 factorises perfectly well over the real numbers, into brackets containing √145. "Does not factorise" always means "not over the numbers we agreed to use", and the agreement is usually left unsaid.

    Answer

    (2x − 1)(3x + 4), and the discriminant of 121 = 11² said so before any searching. Change the −4 to a −5 and the discriminant becomes 145, not a square, and the same trinomial stops factorising over the integers while remaining perfectly factorable over the reals.

  2. The difference of two squares, and the number 8,051 7 steps

    Expand (x − 5)(x + 5) and say why the middle term disappears. Then multiply 95 × 105 in your head, and decide whether the same picture can take a plain number apart.

    1. The four pieces of the rectangle, in reading order: the corner carrying x², the two strips, and the constant corner.

    2. The two strips are 5x and −5x. They cancel, and the trinomial the panel prints has no middle term at all.

    3. The discriminant card reads 100, a perfect square, so brackets with whole numbers in them exist. Here we already know they do, having built them.

    4. The cancellation was not luck. Give the two constants opposite signs and the strips are the same rectangle counted twice, once added and once taken away, whatever numbers you choose.

    5. Nothing in that argument needs x to be a letter. Put 100 into it and a multiplication becomes a subtraction.

    6. Any two numbers can be written as a midpoint and a gap either side, so this works on any pair whose average is easy.

    7. Read backwards it does the harder job. To factorise 8,051, hunt for a square that beats it by another square: 90² is the first that does, and the two brackets are the factors. This is Fermat’s method, and it is quick exactly when the two factors sit close together, as 83 and 97 do.

    Answer

    x² − 25, and 95 × 105 = 9,975. The middle term goes because the two strips are equal and opposite, which leaves q² as the only thing standing. Run the identity backwards and it factorises numbers rather than expressions: 8,051 = 90² − 7² = 83 × 97.

Learning path

Beyond the quadratic

Leads to Quadratic solver the product form.

Example problems

  • (x + 2)(x + 3) - Four pieces: x², 3x, 2x and 6. The two middle strips are what become the 5x, and seeing them as separate rectangles is why the middle term is a sum rather than a mystery.
  • A harder one - (2x − 1)(3x + 4) has a negative side, so one strip is drawn outside the block and hatched. Its area is −3x, and a negative area is exactly what a subtraction is in this picture.
  • Difference of squares - (x − 5)(x + 5) gives 5x and −5x, which cancel. The rectangle has two strips of equal size and opposite sign, and that is the whole of the difference of two squares.
  • One that will not - x² + x + 1 has discriminant −3. No rectangle with integer sides has that area, and no amount of trying will find one — the discriminant said so before the search began.