30% off your first 3 months

Get the deal

Why the quadratic formula works

by DuckyHelperNov 12, 20265 min read
Math

TL;DR:

  • The quadratic formula is what you get when you complete the square on ax² + bx + c = 0 once, with letters instead of numbers.

  • The part under the square root, b² − 4ac, tells you how many real solutions there are before you solve anything.

  • Both solutions sit the same distance either side of x = −b/(2a), the line of symmetry of the parabola.

Most people meet the quadratic formula as something to memorize: x = (−b ± √(b² − 4ac)) / (2a). It works, but it looks like it fell from the sky. It didn't. It is the result of one algebra move, completing the square, done on a general equation instead of a specific one. Once you see that move, you can rebuild the formula from scratch in a minute, and you will know why each piece is there.

The problem the formula solves

A quadratic equation has the form ax² + bx + c = 0, where a, b and c are numbers and a is not zero. If a were zero, the x² term would vanish and you would have a straight line, which you solve with ordinary rearranging.

Some quadratics factor neatly. x² − 5x + 6 = 0 becomes (x − 2)(x − 3) = 0, so x = 2 or x = 3. Many don't factor with whole numbers, and some have no real solutions at all. The formula handles every case the same way, which is why it is worth understanding rather than just trusting.

Completing the square in one paragraph

Completing the square rests on a pattern you can check by expanding: (x + k)² = x² + 2kx + k². If you have x² + 2kx and you add k², you get a perfect square. So the trick is to take half of the coefficient of x, square it, and add it to both sides. The equation stays balanced, and one side collapses into a single squared bracket that you can undo with a square root.

Try it on numbers first. For x² + 6x = 7, half of 6 is 3 and 3² is 9. Add 9 to both sides: x² + 6x + 9 = 16, which is (x + 3)² = 16. Take square roots: x + 3 = ±4, so x = 1 or x = −7. Check: 1 + 6 = 7 and 49 − 42 = 7. Both work.

Deriving the formula step by step

Now do exactly the same thing with letters. Each step below is one legal move on both sides of the equation.

  1. Start: ax² + bx + c = 0, with a ≠ 0.

  2. Make the x² coefficient 1: Divide every term by a: x² + (b/a)x + c/a = 0.

  3. Move the constant: Subtract c/a from both sides: x² + (b/a)x = −c/a.

  4. Complete the square: Half of b/a is b/(2a). Square it and add b²/(4a²) to both sides: x² + (b/a)x + b²/(4a²) = b²/(4a²) − c/a.

  5. Collapse the left side: The left side is now (x + b/(2a))². On the right, write c/a as 4ac/(4a²) so both terms share a denominator: (x + b/(2a))² = (b² − 4ac)/(4a²).

  6. Take square roots: x + b/(2a) = ±√(b² − 4ac) / (2a). The ± is there because a positive number has two square roots.

  7. Isolate x: Subtract b/(2a) from both sides: x = (−b ± √(b² − 4ac)) / (2a).

That is the whole derivation. The 2a at the bottom comes from halving the coefficient of x. The −b comes from moving that half back across. The square root comes from undoing the perfect square you built.

A small detail: In the square root step, √(4a²) is really 2|a|, the absolute value. Because the formula already has ± in front, a negative a only swaps which solution you call first. The pair of answers is the same.

What the discriminant tells you

The expression under the root, b² − 4ac, is called the discriminant. You can read it before doing any other work, and it tells you what kind of answer to expect.

Discriminant

Real solutions

Example

Positive

Two different ones

x² − 5x + 6: 25 − 24 = 1, solutions 2 and 3

Zero

One repeated one

x² − 6x + 9: 36 − 36 = 0, solution 3

Negative

None

x² + 2x + 5: 4 − 20 = −16, no real solution

The negative case makes sense if you complete the square on that last example: x² + 2x + 5 = (x + 1)² + 4. A square is never negative, so the left side is always at least 4 and can never equal zero. On a graph, the parabola never touches the x-axis.

Worked example: 2x² + 3x − 2 = 0

Read off the coefficients carefully, signs included: a = 2, b = 3, c = −2.

  1. Discriminant: b² − 4ac = 3² − 4·2·(−2) = 9 + 16 = 25. It is positive, so expect two real solutions.

  2. Square root: √25 = 5.

  3. Plug in: x = (−3 ± 5) / (2·2) = (−3 ± 5) / 4.

  4. Plus sign: x = 2/4 = 1/2. Minus sign: x = −8/4 = −2.

Now check both by substituting back, which takes ten seconds and catches most mistakes. For x = 1/2: 2·(1/4) + 3·(1/2) − 2 = 0.5 + 1.5 − 2 = 0. For x = −2: 2·4 + 3·(−2) − 2 = 8 − 6 − 2 = 0. Both are correct. As a bonus, the answers tell you the factors: (2x − 1)(x + 2), which expands back to 2x² + 3x − 2.

The symmetry hiding in the formula

Split the formula into two parts: x = −b/(2a) ± √(b² − 4ac)/(2a). The first part is the same for both answers. The second part is added once and subtracted once. So the two solutions sit the same distance either side of x = −b/(2a).

That middle value is the x-coordinate of the parabola's vertex, its turning point. In the worked example, −b/(2a) = −3/4 = −0.75, and √25/4 = 1.25. So the solutions are −0.75 + 1.25 = 0.5 and −0.75 − 1.25 = −2, matching what you found. This is a quick way to sanity-check an answer: the two solutions should average to −b/(2a).

Mistakes that cost marks

  • Dropping the sign of c. In 2x² + 3x − 2, c is −2, so −4ac becomes +16. Write the coefficients down with their signs before you start.

  • Squaring a negative b wrongly. If b = −3, then b² = 9, not −9. Put negative numbers in brackets when you square them.

  • Dividing only part of the top by 2a. The whole numerator −b ± √(b² − 4ac) is over 2a, not just the root.

  • Forgetting to check. Substituting your answers back is the fastest way to find an error, and it works for every quadratic.

If you want to watch the square being completed one line at a time on your own problem, DuckyHelper can work it out with you on its blackboard and explain each move out loud.

Frequently asked questions

Do I still need to learn factoring if the formula always works?

Yes. Factoring is faster when it works, and it shows you the structure of the expression. Use the formula when factoring with whole numbers doesn't come quickly.

Why is it 2a and not just a?

Because completing the square uses half of the coefficient of x, which is b/(2a) after dividing through by a. The 2 comes from that halving.

What do I write if the discriminant is negative?

In most algebra courses you write that there are no real solutions. Later courses introduce complex numbers, where the same formula gives two complex solutions.

Get started

DuckyHelper can
do more

It sees your screen and works in any app you use. Try it for 10 minutes, no card.

Get it for Mac, Windows or Linux

Share

Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in early access on Mac. Asking works on Mac, Windows and Linux.