Three ways to solve a quadratic, and when each one is quickest

Every method gives the same answers. The skill is picking the one that gets you there with the least arithmetic, and knowing how to check the result.

A quadratic equation is anything that can be rearranged into ax² + bx + c = 0 with a ≠ 0. It has at most two solutions, called roots. The first job is always the same: get everything onto one side, equal to zero, with the x² term first.

Don't divide by x

Faced with x² = 5x, it's tempting to divide both sides by x and get x = 5. That throws away the other root, x = 0. Rearrange to x² − 5x = 0, factorise to x(x − 5) = 0, and both appear.

Method 1: factorising

Best when the numbers are small whole numbers and the equation factorises "nicely". It's the fastest method when it works.

Worked example

Solve x² − 5x + 6 = 0.

Find two numbers that multiply to c = 6 and add to b = −5. Trying pairs that multiply to 6: (1, 6), (2, 3), (−1, −6), (−2, −3). Only −2 and −3 add to −5.

(x − 2)(x − 3) = 0 so x = 2 or x = 3

If two things multiply to zero, one of them must be zero. That's the whole idea.

When a isn't 1, look for factors of a × c instead. For 2x² − 7x + 3 = 0, a × c = 6, and the pair that adds to −7 is −1 and −6. Split the middle term and group:

2x² − x − 6x + 3 = 0 x(2x − 1) − 3(2x − 1) = 0 (2x − 1)(x − 3) = 0 so x = ½ or x = 3

The 10-second test: will it factorise?

Work out the discriminant b² − 4ac. With whole-number coefficients, the quadratic factorises into whole-number brackets only if the discriminant is a perfect square (0, 1, 4, 9, 16, …). For 2x² − 7x + 3, that's 49 − 24 = 25 = 5², so yes. For x² + 4x − 3, it's 16 + 12 = 28, not a square, so don't waste time hunting for factors: go straight to the formula.

Method 2: completing the square

Best when a = 1 and b is even, and essential when you also want the vertex (the turning point) of the graph.

Worked example

Solve x² + 6x − 7 = 0.

Half of b is 3. Since (x + 3)² = x² + 6x + 9, rewrite x² + 6x as (x + 3)² − 9:

(x + 3)² − 9 − 7 = 0 (x + 3)² = 16 x + 3 = ±4 x = 1 or x = −7

As a bonus, (x + 3)² − 16 tells you the vertex of y = x² + 6x − 7 is at (−3, −16).

If a isn't 1, divide through by a first. Completing the square on the general equation is exactly how the quadratic formula is derived, which is shown on the quadratic solver page.

Method 3: the quadratic formula

x = ( −b ± √(b² − 4ac) ) / 2a

It always works, which makes it the right choice for awkward coefficients, decimals, or when the discriminant isn't a perfect square.

Worked example

Solve 3x² + 4x − 2 = 0. Here a = 3, b = 4, c = −2.

b² − 4ac = 16 − 4(3)(−2) = 16 + 24 = 40 x = (−4 ± √40) / 6 x = (−4 ± 6.3246) / 6 x = 0.3874 or x = −1.7208

In exact form, √40 = 2√10, so x = (−2 ± √10) / 3.

Check it with full working.

Open in the solver

What the discriminant tells you

b² − 4acRootsGraph
PositiveTwo different real rootsCrosses the x-axis twice
ZeroOne repeated root, x = −b/2aTouches the x-axis at the vertex
NegativeNo real roots (two complex roots)Never meets the x-axis

Exam questions often ask "for what values of k does this have two real roots?" That's just the inequality b² − 4ac > 0 with k inside a, b or c.

Checking your answer in 20 seconds

For ax² + bx + c = 0, the two roots always satisfy:

x₁ + x₂ = −b / a x₁ × x₂ = c / a

For 3x² + 4x − 2: the sum should be −4/3 = −1.3333 and the product −2/3 = −0.6667. Our roots: 0.3874 + (−1.7208) = −1.3334 and 0.3874 × (−1.7208) = −0.6666. Both match to within rounding of the last digit.

The other check is to substitute a root back into the original equation; it should come out as (very nearly) zero.

Which method should you use?

  • Small whole numbers, perfect-square discriminant → factorise.
  • a = 1, even b, or you need the vertex → complete the square.
  • Anything else → the formula.
  • No c term (like 4x² − 12x = 0) → take out the common factor: 4x(x − 3) = 0.
  • No b term (like x² − 20 = 0) → rearrange and square-root: x = ±√20 = ±4.472. Don't forget the ±.

A real problem

A rectangular garden has a perimeter of 30 m and an area of 50 m². What are its sides?

If one side is x, the other is 15 − x (half the perimeter minus x). So x(15 − x) = 50, which rearranges to x² − 15x + 50 = 0. Numbers that multiply to 50 and add to −15: −5 and −10. So the garden is 5 m by 10 m. Both roots give the same rectangle, just turned round.