Quadratic Formula: Derivation, Discriminant and Examples
Solver AI TeamPublished Updated 12 min read
The quadratic formula solves every quadratic equation. Learn the formula, see how it's derived from completing the square, use the discriminant to predict solutions, and work through real examples.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / (2a). The ± gives two solutions. First write the equation in standard form so a, b and c are correct, including signs.
What does the discriminant tell you?
The discriminant is b² − 4ac. If it is positive, there are two real solutions. If it is zero, there is one repeated real solution. If it is negative, there are no real solutions, only two complex ones.
When should you use the quadratic formula instead of factoring?
Use factoring when the quadratic factors quickly by inspection. Use the formula when it does not, when the coefficients are large or fractional, or when you want exact irrational answers. The formula works on every quadratic.
How do you solve x² + 5x + 3 = 0 with the formula?
Here a = 1, b = 5, c = 3. The discriminant is 25 − 12 = 13, so x = (−5 ± √13) / 2. That is about −0.70 and −4.30. The solutions are irrational, so the equation does not factor over the integers.
Where does the quadratic formula come from?
It comes from completing the square on ax² + bx + c = 0. Divide by a, move the constant, add (b/2a)² to both sides, write the left side as a square, then take square roots and solve for x.
The quadratic formula is a universal tool for solving any equation of the form ax² + bx + c = 0 where a ≠ 0. The formula gives both solutions directly:
The Rule — Quadratic Formula
x = (−b ± √(b² − 4ac)) / 2a
The beauty of the quadratic formula is that it works every single time. Factoring requires you to spot integer pairs that multiply to ac and add to b — possible for some equations, frustrating for others. Completing the square always works but takes several careful steps. The quadratic formula collapses all of that into one plug-and-chug expression.
The ± symbol indicates two solutions: one using the plus sign and one using the minus sign. These are called the roots or zeros of the quadratic, and geometrically they are the x-intercepts of the parabola y = ax² + bx + c. Every standard-form quadratic produces zero, one, or two real roots depending on the sign of the expression under the radical (more on that in the discriminant section).
The Key Insight
The formula was known in essentially its modern form by mathematicians of the Islamic Golden Age in the 9th century, and the general approach — completing the square — appears in Babylonian tablets dating back nearly 4,000 years. Today it remains one of the most important formulas a math student ever memorizes, appearing in physics (projectile motion), engineering (vibration analysis), economics (revenue optimization), and computer science (root-finding algorithms).
Deriving the Quadratic Formula from Completing the Square
The quadratic formula isn't magic — it comes from completing the square applied to the general form. Understanding the derivation helps you remember the formula and recognize when it applies. Start with ax² + bx + c = 0.
Divide by a
x² + (b/a)x + (c/a) = 0. We need a leading coefficient of 1 so completing the square works cleanly.
Move the constant
x² + (b/a)x = −c/a.
Complete the square on the left
Take half of the x-coefficient: b/(2a). Square it: b²/(4a²). Add this to both sides: x² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²).
Factor the left side as a perfect square
(x + b/(2a))² = b²/(4a²) − c/a.
Combine the right side over a common denominator
(x + b/(2a))² = (b² − 4ac) / (4a²).
Take the square root of both sides
x + b/(2a) = ±√(b² − 4ac) / (2a).
Solve for x
x = −b/(2a) ± √(b² − 4ac) / (2a), which simplifies to x = (−b ± √(b² − 4ac)) / (2a). That's the quadratic formula.
The Key Insight
Every term has a clear origin: the −b/(2a) is the x-coordinate of the vertex (the axis of symmetry), and the ±√(b² − 4ac) / (2a) is how far the two roots sit on either side of that axis.
Using the Quadratic Formula Step by Step
Applying the quadratic formula is straightforward once the equation is in standard form.
Write the equation in the form ax² + bx + c = 0
Move every term to one side so the right side is zero. If terms are in a different order, rearrange them.
Identify a, b, and c
These are the coefficients including their signs. If a term is missing (for example x² − 9 = 0), the missing coefficient is zero (b = 0).
Substitute into the formula
Use parentheses around every coefficient to avoid sign mistakes: x = (−(b) ± √((b)² − 4(a)(c))) / (2(a)).
Simplify the discriminant b² − 4ac first
Calculate this single number before doing anything else; it tells you immediately what kind of answer to expect.
Take the square root
Simplify the radical if possible (factor out perfect squares).
Compute both solutions
Use the + sign for one root and the − sign for the other.
Check your answers
Substitute back into the original equation.
Quick example — solve 2x² − 7x + 3 = 0
Here a = 2, b = −7, c = 3.
Discriminant: (−7)² − 4(2)(3) = 49 − 24 = 25.
Square root: √25 = 5.
Solutions: x = (7 ± 5)/4. So x = 12/4 = 3 or x = 2/4 = 1/2.
The discriminant is the expression under the radical: Δ = b² − 4ac. Its sign tells you everything about the nature of the solutions before you even finish the formula.
Case
Condition
Result
Why
1
Δ > 0
Two distinct real solutions
The parabola crosses the x-axis twice. If Δ is also a perfect square, the solutions are rational and the quadratic factors over the integers. If not, the solutions are irrational and involve a radical.
2
Δ = 0
One repeated real solution
Sometimes called a double root. The parabola just touches the x-axis at its vertex. The single root is x = −b/(2a).
3
Δ < 0
No real solutions
The parabola doesn't cross the x-axis at all. The solutions are complex conjugates of the form x = (−b ± i√|Δ|) / (2a).
Example 1 — two real roots
For x² − 5x + 6 = 0, discriminant = 25 − 24 = 1 > 0 (perfect square), so two rational roots.
Example 2 — repeated root
For x² − 6x + 9 = 0, discriminant = 36 − 36 = 0, so one repeated root. The quadratic factors as (x − 3)² = 0, giving x = 3 (multiplicity 2).
Example 3 — no real roots
For x² + 2x + 5 = 0, discriminant = 4 − 20 = −16 < 0, so two complex solutions: x = (−2 ± 4i)/2 = −1 ± 2i.
The Takeaway
Checking the discriminant first is one of the highest-leverage habits in algebra. It tells you whether to expect clean numbers, irrational answers, or complex ones, so you can verify your work as you go.
Quadratic Formula vs Factoring vs Completing the Square
Three methods can solve a quadratic equation, and choosing the right one saves time on exams.
Factoring — fastest when it works
Factoring is fastest when it works. If you can quickly spot two numbers that multiply to ac and add to b, write the factored form and read off the roots. Factoring works only when the discriminant is a non-negative perfect square — otherwise the roots aren't rational and you'll waste time hunting for factors that don't exist.
Completing the square — for structure and conversion
Completing the square is essential when you need to convert ax² + bx + c into vertex form a(x − h)² + k — for graphing, finding the maximum or minimum, or deriving the quadratic formula itself. It's also used in calculus when integrating expressions involving x² + bx + c under a radical.
The quadratic formula — universal fallback
The quadratic formula is the universal fallback. Use it when factoring fails, when the discriminant isn't a perfect square, or when you need exact (potentially irrational or complex) roots.
Decision rule
First check the discriminant. If it's a small perfect square, try factoring. If the leading coefficient is 1 and the linear coefficient is even, completing the square gives clean intermediate steps. Otherwise, go straight to the quadratic formula.
Comparison example — solve x² + 6x + 5 = 0
By factoring: (x + 1)(x + 5) = 0, so x = −1 or x = −5.
By the quadratic formula: discriminant = 36 − 20 = 16, x = (−6 ± 4)/2 = −1, −5.
Same answer, but factoring took two steps and the formula took four.
Answerx = −1 or x = −5
When factoring fails — solve x² + 6x − 4 = 0
Factoring fails (no integer pair works), so go straight to the formula: discriminant = 36 + 16 = 52, x = (−6 ± √52)/2 = −3 ± √13. Irrational roots — factoring would have wasted time.
Answerx = −3 ± √13
Common Mistakes and How to Avoid Them
The quadratic formula is plug-and-chug, but small errors compound quickly. Here are the most common mistakes students make.
Mistake 1 — sign errors on b
If b = −7, then −b = 7, not −7. Always wrap coefficients in parentheses when substituting.
Mistake 2 — forgetting to set the equation to zero first
The formula only works when the right side is 0. For 2x² + 3x = 5, rewrite as 2x² + 3x − 5 = 0 before identifying coefficients.
Mistake 3 — squaring instead of multiplying in b² − 4ac
(−7)² = 49, not −49. The square of a negative is positive.
Mistake 4 — splitting only part of the numerator
The formula is x = (−b ± √(b² − 4ac))/(2a), with both the −b and the radical over 2a. Writing x = −b ± √(b² − 4ac)/(2a) divides only the radical part, which is wrong.
Mistake 5 — forgetting the ±
A quadratic almost always has two roots (one when the discriminant is zero, complex pairs when negative). Computing only one solution loses half the answer.
Mistake 6 — not simplifying the radical
√50 should be written as 5√2, not left as √50. Teachers expect simplified radical form.
Mistake 7 — dividing 2a only into part of the expression
Always treat the entire (−b ± √(b² − 4ac)) as a single numerator.
The Takeaway
A simple guardrail: write the formula with explicit parentheses every time, and box your discriminant calculation separately.
Worked Examples and Real-World Applications
Example 1 — irrational roots
Solve 3x² − 5x + 1 = 0.
a = 3, b = −5, c = 1.
Discriminant: (−5)² − 4(3)(1) = 25 − 12 = 13.
Since 13 isn't a perfect square, the roots are irrational: x = (5 ± √13) / 6.
Answerx ≈ 1.43 or x ≈ 0.23
Example 2 — complex roots
Solve x² + 4x + 8 = 0.
a = 1, b = 4, c = 8.
Discriminant: 16 − 32 = −16.
Two complex solutions: x = (−4 ± √(−16))/2 = (−4 ± 4i)/2 = −2 ± 2i.
Answerx = −2 ± 2i
Example 3 — projectile motion (real-world application)
A ball is thrown upward from a 6-foot platform with an initial velocity of 32 ft/s. Its height after t seconds is h(t) = −16t² + 32t + 6. When does it hit the ground?
Set h = 0: −16t² + 32t + 6 = 0, or equivalently 16t² − 32t − 6 = 0.
Using the formula with a = 16, b = −32, c = −6: discriminant = 1024 + 384 = 1408.
√1408 = 8√22 ≈ 37.5. t = (32 ± 37.5)/32.
The positive root is t ≈ 2.17 seconds. The negative root is rejected since time can't be negative.
Answert ≈ 2.17 seconds
Example 4 — revenue maximization
A company's revenue from selling x units is R(x) = −2x² + 100x. Find where revenue is zero.
Solving −2x² + 100x = 0 via the formula: a = −2, b = 100, c = 0.
So x = 0 (no units sold) or x = 50 (price drops to zero).
Answerx = 0 or x = 50
Example 5 — geometry
A rectangular garden has area 60 sq ft and perimeter 32 ft. Find the dimensions.
Let length = ℓ and width = 16 − ℓ (from perimeter). Then ℓ(16 − ℓ) = 60, or ℓ² − 16ℓ + 60 = 0.
Discriminant = 256 − 240 = 16. ℓ = (16 ± 4)/2, so ℓ = 10 or ℓ = 6.
Answer10 ft × 6 ft
The Takeaway
If you're working through quadratic problems for class — homework, AP exam prep, or SAT/ACT practice — snap them with Solver AI and get the full step-by-step formula application, discriminant analysis, and verification in seconds.