MathemagiciansLibraryExplorationsDeep Dives
← Mathematics · Upper Secondary
MathematicsUpper Secondary

The quadratic formula — when factorising fails

U2 — Algebra Advancing › U2.2 — Quadratic EquationsLecture 2 of 4~1860 words

An equation with no whole-number answer

Solve . Try factorising: you need two numbers with product −1 and sum 4. The only whole-number pairs with product −1 are 1 and −1, which add to 0. So factorising fails. Yet the graph clearly crosses the -axis twice. The equation has two solutions; they are just not whole numbers.

−3 −2 −1 ≈ −4.24 ≈ 0.24 y = x² + 4x − 1
The graph of y = x² + 4x − 1 crosses the x-axis twice, near −4.24 and near 0.24. The exact values are −2 − √5 and −2 + √5. No whole-number factorisation can find them.

The completing-the-square lecture actually found these: , which is zero when . It also made a promise: do the same steps with letters instead of numbers, and you get a formula for every quadratic. The last lecture promised the same thing. This lecture keeps both promises.

Completing the square, once and for all

Start with the general quadratic equation, with any numbers , and , and :

Now complete the square exactly as before, but with letters. First divide every term by , so that stands alone, and move the constant to the right:

Half of the coefficient is . Add its square to both sides. The left side becomes a perfect square:

Write the right side over one denominator, . Since :

Take the square root of both sides, remembering both signs. The square root of is (the ± covers its sign):

Subtract and put everything over . That is the famous result.

The quadratic formula

The solutions of , with , are

The ± gives two solutions: one with +, one with −.

The formula is not magic. It is completing the square, done once for every quadratic at the same time, so that you never have to do it again. Step through the derivation below at your own pace.

Step through — deriving the quadratic formula

Press Next to add one line. Read the reason before you go on.

Each line of the derivation, with the reason it is allowed.

  1. ax² + bx + c = 0: the general quadratic, with a not zero.
  2. x² + (b/a)x + c/a = 0: divide every term by a, so x² stands alone.
  3. x² + (b/a)x = −c/a: subtract c/a from both sides.
  4. x² + (b/a)x + (b/2a)² = (b/2a)² − c/a: add the square of half the x coefficient to both sides.
  5. (x + b/2a)² = b²/4a² − c/a: the left side is now a perfect square.
  6. (x + b/2a)² = (b² − 4ac)/4a²: write c/a as 4ac/4a² and combine.
  7. x + b/2a = ±√(b² − 4ac)/2a: square root both sides, keeping both signs.
  8. x = (−b ± √(b² − 4ac))/2a: subtract b/2a and combine over 2a.
Stop and think

Use the formula on . Do you get the same answers as completing the square, ?

Show the answer

Here , and . So . Now simplify the surd, as in the surds lectures: . So . The same answers, as they must be: the formula is completing the square.

What the ± is telling you

Split the formula into two parts:

The first part, , is the same for both roots. It is the -value of the vertex, the lowest (or highest) point of the graph, which the completing-the-square lecture found as "the value that makes the bracket zero". The second part is a distance. One root is that distance to the right of the vertex, and the other is the same distance to the left.

So the two roots of a quadratic always sit symmetrically on either side of the vertex. In the figure above, the vertex is at , and the roots are either side of it: at about and about . The ± is not a trick of algebra. It is the mirror symmetry of the parabola, written as a symbol.

Stop and think

What happens to the formula if ? Is that a problem?

Show the answer

The formula divides by , and dividing by zero is impossible, so the formula breaks. But if , the equation is . There is no term, so it is not a quadratic at all; it is a linear equation, with the single solution (when ). That is why the formula comes with the condition : the derivation divided by in its very first step.

Using the formula

Three habits make the formula reliable. Write down , and first, each with its sign. Work out on its own line. Then put everything together and simplify.

Worked Example 1 — A quadratic that does not factorise

Solve . Give exact answers and answers to 2 decimal places.

, , . Under the root: .

So or . No pair of whole numbers has product −7 and sum 3, so factorising could never have found these.

Worked Example 2 — A negative b

Solve .

, , . Write as its own step: . And , which is positive. Under the root: .

So or . (, so .) Check with the smaller root: .

Worked Example 3 — Rearrange, then simplify the surd

Solve . Give exact answers in their simplest form.

Rearrange to zero first: . So , , . Under the root: .

Here , and then every term was divided by 2. So or .

Worked Example 4 — When the number under the root is negative

Solve .

, , . Under the root: . No real number squares to −36, so this equation has no real solutions. That is a complete and correct answer. The graph of never reaches the -axis. Completing the square shows why: , which is always at least 9, so it can never equal 0. The next lecture is about this number under the root, , and everything it tells you.

Does the formula also work when a quadratic does factorise? It must, because it works for every quadratic. For : , which gives and , just as factorising did in the last lecture. When the number under the root is a perfect square, the quadratic factorises with whole numbers; when it is not, it does not. That is a quick test.

Try it on the last lecture's harder example, . Here , which is , a perfect square. So the formula gives , that is or . These are exactly the roots that the ac method found. The perfect square under the root is the reason the factorisation existed.

Exact answers, and which method to choose

Why do exam questions often ask for exact answers? Because a surd such as is exact, and any decimal is not. If you round early and then use the rounded value in a later calculation, the errors grow. Keep the surd form until the very last step, and round only when the question asks for decimals.

You now have three ways to solve a quadratic equation. Which should you use?

The perfect-square test above helps you decide in advance. Work out . If it is a perfect square (0, 1, 4, 9, 16, …), the quadratic factorises with whole numbers or fractions. If it is not, go straight to the formula.

Now check a student's working.

Spot the error — solving x² − 6x + 4 = 0

One line of this working is wrong. Tap the line you think is wrong. Every line has an explanation.

The working, with the mistake marked and corrected:

  • Line 1. a = 1, b = −6, c = 4. (Correct.)
  • Line 2. b² − 4ac = 36 − 16 = 20. (Correct.)
  • Line 3. x = (−6 ± √20) / 2. The mistake: −b = −(−6) = +6, so the numerator should start with 6.
  • Line 4. = −3 ± √5. (This follows from the mistake. The correct answer is (6 ± √20)/2 = 3 ± √5.)

Three classic mistakes

Trap 1 — The sign of −b

When is negative, is positive. With , the formula starts with . Write as a separate step whenever is negative.

Trap 2 — Squaring a negative b

is never negative: . On many calculators, typing −5² gives −25, because the calculator squares 5 first. Use brackets: (−5)².

Trap 3 — Dividing only part of the top by 2a

The whole of is divided by , not just the square root. Writing gives the wrong answers. Keep the long fraction line under everything.

Try it yourself

Give exact answers, simplified, and then answers to 2 decimal places.

  1. Solve .

    Hint 1

    , , . So .

    Hint 2

    , and .

    Full answer

    . So or .

  2. Solve .

    Hint 1

    .

    Hint 2

    That is , and the bottom is .

    Full answer

    . So or . (33 has no square factor other than 1, so the surd cannot be simplified.)

  3. A rectangle is 2 cm longer than it is wide, and its area is 10 cm². Find its width, exactly and to 2 decimal places.

    Hint 1

    Width , length : .

    Hint 2

    . Then .

    Full answer

    . A width must be positive, so cm. Check: .

  4. Use the formula to show that the two roots of add up to and multiply to . Check with .

    Hint 1

    Add the two roots: the ± square roots cancel.

    Hint 2

    For the product, use the difference of two squares: .

    Full answer

    Sum: , where . Product: . For , the roots add to −3 and multiply to −7: , and . This is the sum-and-product pattern from the factorising lecture, now true for every quadratic.

The bigger idea

A formula like this turns a creative task into a routine one. Factorising needs a good guess; the formula needs only careful arithmetic. That is a pattern across all of mathematics: solve a problem once in general, with letters, and every particular case is solved with it.

Look again at the part under the square root, . If it is positive, there are two solutions. If it is zero, the ± adds and subtracts nothing, so there is only one. If it is negative, there are none. That single number decides the whole story before you finish the calculation. It is called the discriminant, and it is the subject of the next lecture.

Key concepts in this lesson