Learn
Lesson · Quadratics and Complex Numbers · Solving quadratics

The Quadratic Formula

Completing the square on ax² + bx + c = 0 with letters instead of numbers produces one formula that solves every quadratic. Deriving it once is worth more than memorising it, because the derivation is what shows why standard form is required and why the sign of b has to be carried.

ax² + bx + c = 0, a ≠ 0 standard form, signs included -b ± √(b² - 4ac) x = ------------------ both signs, one denominator 2a
One formula, for every quadratic

Core ideas

What this lesson establishes

The formula is a theorem with a proof you can carry out yourself, and the proof is “Completing the Square” done with letters.

1

Standard form is part of the formula

a, b and c are the coefficients of ax² + bx + c = 0. 3x² = 5x - 2 has b = -5 and c = 2, and neither can be read until the rearrangement is done. Reading them off the equation as printed is the commonest way to get a wrong answer out of a right formula.

2

The signs belong to the coefficients

If b = -7 then -b = 7 and b² = 49. Both of those catch people, and they catch them in opposite directions: one drops a sign that should survive, the other keeps a sign that should not.

3

It finishes, and it says when there is nothing to find

If b² - 4ac is negative the formula asks for the square root of a negative number, and no real number supplies one. That is not a breakdown — it is the formula reporting that there is no real solution, which “The Discriminant” learns to read off before any work is done.

The material

Deriving the formula once

The proof, the one subtlety inside it, and how to use the result without manufacturing sign errors.

“Completing the Square” completes the square on any particular quadratic. Doing it on ax² + bx + c = 0, with letters in place of numbers, does it for all of them at once and leaves a formula behind.

Theorem · The quadratic formula

Let a, b and c be real with a ≠ 0. If b² - 4ac ≥ 0, the real solutions of ax² + bx + c = 0 are exactly x = (-b + √(b² - 4ac))/(2a) and x = (-b - √(b² - 4ac))/(2a). If b² - 4ac < 0 there are no real solutions.

Divide through by a, which is allowed because a ≠ 0: x² + (b/a)x + c/a = 0. Move the constant across: x² + (b/a)x = -c/a.

Half the coefficient of x is b/(2a), and its square is b²/(4a²). Add that to both sides: x² + (b/a)x + b²/(4a²) = -c/a + b²/(4a²).

The left side is now (x + b/(2a))². On the right, put both terms over 4a²: since -c/a = -4ac/(4a²), the right side is (b² - 4ac)/(4a²).

4a² is positive, so the right side has the same sign as b² - 4ac. By the square root property there is a real solution exactly when b² - 4ac ≥ 0, and then x + b/(2a) = ±√(b² - 4ac) / √(4a²).

Now √(4a²) = 2|a|, not 2a, because a square root is never negative. But the numerator already carries a ±, so the two numbers produced by dividing by 2|a| are the same two numbers produced by dividing by 2a — listed in the other order when a is negative. Writing 2a is therefore safe, and it is what keeps the formula short.

Subtracting b/(2a) gives x = -b/(2a) ± √(b² - 4ac)/(2a), and the two terms share a denominator: x = (-b ± √(b² - 4ac))/(2a).

□

The quantity b² - 4ac appeared without being asked for, and it decides everything about the answer. “The Discriminant” is about that quantity alone.

Using it

Three things are worth doing in a fixed order every single time: rearrange into standard form, write a, b and c down with their signs, and compute b² - 4ac on its own line before substituting anything else.

2x² - 7x + 3 = 0 a = 2, b = -7, c = 3 b² - 4ac = (-7)² - 4(2)(3) = 49 - 24 = 25 7 ± √25 7 ± 5 x = -------- = ------- → x = 12/4 = 3 or x = 2/4 = 1/2 4 4

-b was -(-7) = 7, and b² was (-7)² = 49. Writing b = -7 on its own line first is what makes both of those automatic rather than remembered.

This one can be checked independently, because it happens to factor: 2x² - 7x + 3 = (2x - 1)(x - 3), giving x = 1/2 and x = 3. Two methods, computed separately, agreeing.

Simplifying the result

The formula frequently hands back an unreduced fraction, and the reduction has to divide every term of the numerator, not the convenient one:

x² + 4x + 1 = 0 a = 1, b = 4, c = 1 b² - 4ac = 16 - 4(1)(1) = 12 -4 ± √12 -4 ± 2√3 x = --------- = ---------- = -2 ± √3 divide BOTH terms by 2 2 2 not -4 ± √3, and not -2 ± 2√3

√12 = 2√3 by Rational and Radical Expressions, and then the 2 underneath divides into -4 and into 2√3 alike. Cancelling from one term only produces a number that is not a solution: substituting -4 + √3 into x² + 4x + 1 gives 4 - 4√3, which is not 0.

A negative leading coefficient

a may be negative and the formula does not mind. -x² + 5x - 6 = 0 has a = -1, b = 5, c = -6, so b² - 4ac = 25 - 4(-1)(-6) = 25 - 24 = 1 and x = (-5 ± 1)/(-2), giving x = 2 and x = 3. Multiplying the equation through by -1 first gives x² - 5x + 6 = 0 and the same two solutions with far less sign handling, which is a free simplification worth taking.

Example · When the formula is the wrong tool

x² - 9 = 0 has b = 0, and the formula gives x = ±√36 / 2 = ±3. Correct, and slower than the square root property, which reads x² = 9 and stops.

The formula always works. It is not always the shortest route, and one line of “The Discriminant” usually tells you which route to take.

Interactive

The quadratic formula

Substituted, and checked against the other methods

Quadratic
the curverootsvertex

Method

Applying the quadratic formula

The first two steps hold the errors; the last two are arithmetic.

1

Rearrange into ax² + bx + c = 0

Every term on one side in descending powers, zero on the other. Nothing can be read off the equation until this is done.

2

Write a, b and c with their signs, on their own line

3x² - 5x - 2 = 0 gives a = 3, b = -5, c = -2. That line costs three seconds and removes the two commonest errors in the course.

3

Compute b² - 4ac next, with brackets

(-5)² - 4(3)(-2) = 25 + 24 = 49. Brackets round a negative coefficient cost nothing. If the result is negative, stop: there is no real solution.

4

Substitute, simplify the radical, then divide every term

√49 = 7, so x = (5 ± 7)/6, which is 2 or -1/3. When the radical does not reduce to an integer, cancel only by a factor that divides the whole numerator.

Coefficients and roots

Score 0 / 0

The formula three times

One that also factors, one that does not, and one with a negative leading coefficient.

A. 2x² - 7x + 3 = 0 a = 2, b = -7, c = 3 b² - 4ac = (-7)² - 4(2)(3) = 49 - 24 = 25 x = (7 ± 5) / 4 x = 12/4 = 3 or x = 2/4 = 1/2 check by factoring: (2x - 1)(x - 3) = 2x² - 7x + 3 B. x² + 4x + 1 = 0 a = 1, b = 4, c = 1 b² - 4ac = 16 - 4(1)(1) = 12 x = (-4 ± √12)/2 = (-4 ± 2√3)/2 = -2 ± √3 check x = -2 + √3: (-2 + √3)² = 4 - 4√3 + 3 = 7 - 4√3 4(-2 + √3) = -8 + 4√3 (7 - 4√3) + (-8 + 4√3) + 1 = 0 C. -x² + 5x - 6 = 0 a = -1, b = 5, c = -6 b² - 4ac = 25 - 4(-1)(-6) = 25 - 24 = 1 x = (-5 ± 1) / (-2) x = (-4)/(-2) = 2 or x = (-6)/(-2) = 3 check -(4) + 10 - 6 = 0 -(9) + 15 - 6 = 0

In C the term -4ac was -4(-1)(-6), a product of three negative factors and therefore negative: -24. That single sign is the difference between b² - 4ac = 1 and b² - 4ac = 49, and between the answers 2 and 3 and the answers -1 and 6.

B is the case the formula exists for. x² + 4x + 1 has no integer factorisation, the answers are irrational, and completing the square would have produced them in about the same number of lines — which is precisely what the derivation predicts, since the formula is that completion, already done.

For a faded formula pass, solve 3x² + 2x - 7 = 0. The supplied coefficient line is a = 3, b = 2, c = -7. Compute D with the sign of c visible, substitute, simplify the radical and divide the whole numerator. Check against x = (-1 ± √22)/3; a denominator of 6 left in the final form means the common factor in the numerator was not removed.

Common mistakes

1
Reading a, b and c before reaching standard form3x² = 5x + 2 has b = -5 and c = -2. Nothing may be substituted until every term is on one side, and the signs that change while crossing are exactly the ones that matter.
2
Writing b² as a negative numberIf b = -7 then b² = 49. Read without brackets, -7² means -(7²) and gives -49, which turns b² - 4ac = 25 into -73 and converts two real solutions into none. Brackets round a negative b settle it.
3
Dividing only part of the numerator by 2a(-4 ± 2√3)/2 is -2 ± √3. Writing -4 ± √3 leaves every answer two out: substituting -4 + √3 into x² + 4x + 1 gives 4 - 4√3, not 0.

Check your understanding

✓
Finish when you can derive the formula, not only quote it.

Take ax² + bx + c = 0 and complete the square on it from memory, reaching the formula in six or seven lines. Then use it with a, b and c written out separately every time, and reduce the result by dividing the whole numerator.

Note: The formula is the last of the four solution methods, and it subsumes the others rather than replacing them: factoring is faster when it works, and the square root property is faster when b = 0. What the formula adds is a guarantee that no quadratic on this course can go unfinished — and the quantity b² - 4ac that fell out of the derivation is the whole of “The Discriminant”.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.