AJ Designer

Quadratic Equation Calculator

x equals negative b plus or minus the square root of b squared minus 4ac, all divided by 2a

Solution

Share:

Quadratic Formula

The quadratic formula solves any equation of the form ax² + bx + c = 0. The discriminant b² − 4ac determines whether the roots are real, repeated, or complex. Enter the three coefficients and get both solutions instantly.

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

How It Works

The quadratic formula x = (−b ± √(b² − 4ac)) / 2a solves any equation of the form ax² + bx + c = 0. First compute the discriminant b² − 4ac. A positive discriminant gives two real roots, zero gives one repeated root, and a negative discriminant gives a complex-conjugate pair. This calculator evaluates all three cases automatically and also shows the corresponding parabola so you can see whether the graph crosses, touches, or misses the x-axis.

Example Problem

Solve 2x² + 3x − 5 = 0:

  1. Identify the coefficients: a = 2, b = 3, c = −5.
  2. Compute the discriminant: b² − 4ac = 3² − 4(2)(−5) = 9 + 40 = 49.
  3. Because the discriminant is positive, expect two distinct real roots.
  4. Apply the quadratic formula: x = (−3 ± √49) / 4 = (−3 ± 7) / 4.
  5. x₁ = (−3 + 7) / 4 = 1 and x₂ = (−3 − 7) / 4 = −2.5.
  6. So the solutions are x = 1 and x = −2.5.

A positive discriminant means the parabola crosses the x-axis twice, once at each real root.

Key Concepts

A quadratic equation has the form ax² + bx + c = 0 where a ≠ 0. The discriminant (b² − 4ac) determines root type: positive gives two real roots, zero gives one repeated root, and negative gives two complex conjugate roots. The quadratic formula works universally, while factoring and completing the square are alternatives for simpler cases.

Applications

  • Physics: solving kinematic equations for time of flight, projectile range, and free-fall problems
  • Engineering: finding break-even points in cost/revenue curves and optimizing parabolic structural arches
  • Finance: solving for interest rates or time periods in compound interest equations
  • Computer graphics: calculating ray-sphere and ray-parabola intersections for rendering and collision detection
  • Algebra instruction: checking factoring or completing-the-square work against a general method that always applies

Common Mistakes

  • Setting a = 0 and expecting a quadratic solution — with a = 0 the equation becomes linear (bx + c = 0) and the quadratic formula divides by zero
  • Forgetting the ± in the formula — the quadratic always produces two solutions (which may be equal); dropping one misses a valid root
  • Misidentifying complex roots as errors — a negative discriminant does not mean 'no solution'; it means the roots are complex numbers, which are valid in many applications

Frequently Asked Questions

What does the discriminant tell you about a quadratic equation?

The discriminant b² − 4ac reveals the root type. If it is positive, there are two real roots. If zero, one repeated root. If negative, two complex conjugate roots. For 49 the roots are real and distinct.

How to solve a quadratic equation without the formula?

You can factor the expression (if the roots are rational), complete the square, or graph the parabola. The quadratic formula works for all cases, including irrational and complex roots.

What are complex roots?

Complex roots occur when the discriminant is negative. They come in conjugate pairs like 2 + 3i and 2 − 3i. The parabola does not cross the x-axis in this case.

Why can’t the coefficient a be zero?

If a = 0 the equation becomes linear (bx + c = 0), not quadratic. A quadratic must have an x² term, so a must be non-zero.

What happens when the discriminant is zero?

A zero discriminant means both formula branches give the same answer, so the quadratic has one repeated root. Graphically, the parabola touches the x-axis at exactly one point, which is also the vertex.

Can every quadratic be factored neatly?

No. Some quadratics factor cleanly over the integers, but many have irrational or complex roots. The quadratic formula works in all cases, which is why it is the most reliable universal method.

Why does the graph help when solving a quadratic?

The graph shows how the algebra connects to the parabola. Two real roots mean the curve crosses the x-axis twice, a repeated root means it just touches once, and complex roots mean the curve stays entirely above or below the axis.

Should I use the quadratic formula or factoring first?

If the coefficients are simple and the factors are easy to spot, factoring is faster. If not, the quadratic formula is usually the safest choice because it always works as long as a is not zero.

Reference: Sullivan, Michael. Algebra and Trigonometry. Pearson.

Quadratic Formula Details

The quadratic formula solves any equation of the form ax² + bx + c = 0 when a ≠ 0. The discriminant decides whether the roots are real, repeated, or complex.

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

Where:

  • a, b, and c are the coefficients from ax² + bx + c = 0
  • b² − 4ac is the discriminant
  • If the discriminant is positive, there are two real roots
  • If it is zero, there is one repeated root
  • If it is negative, the roots are complex conjugates

Worked Examples

Two Real Roots

How do you solve x² − 5x + 6 = 0?

This classic factoring-friendly quadratic is also a good quadratic-formula example because the discriminant is positive and gives two distinct real roots.

  • Discriminant = (−5)² − 4(1)(6) = 25 − 24 = 1
  • x = (5 ± √1) / 2
  • Roots: x = 3 and x = 2

Double Root

What happens for x² − 4x + 4 = 0?

When the discriminant is zero, both quadratic-formula branches collapse to the same value and the parabola just touches the x-axis.

  • Discriminant = (−4)² − 4(1)(4) = 16 − 16 = 0
  • x = (4 ± 0) / 2
  • Double root: x = 2

Complex Roots

How do you solve x² + x + 1 = 0?

A negative discriminant means the parabola never crosses the x-axis, but the quadratic formula still returns a valid complex-conjugate pair.

  • Discriminant = 1² − 4(1)(1) = 1 − 4 = −3
  • x = (−1 ± √−3) / 2
  • Roots: x = −0.5 ± 0.866025i

Related Calculators

Related Sites