CalcKit CalcKit
My Calculators
Sign in Sign up

Quadratic Equation Solver

Table of Contents

Quadratic equation definition

A quadratic equation is an equation in which the unknown, x, appears squared, and no higher. Every quadratic equation can be rearranged into the standard form:

a * x² + b * x + c = 0

where a, b and c are known numbers and a is not zero (otherwise it would be a linear equation). The name comes from the Latin quadratus, square.

A quadratic equation has at most two real solutions, also called roots. They describe anything that follows a parabola: the path of a thrown ball, the area of a rectangle with a fixed perimeter, or the stopping distance of a car.

Parts of a quadratic equation

You enter the coefficients a, b and c, and the tool shows the two solutions, x1 and x2. On the way, it calculates the discriminant in the background, which decides how many solutions there are.

Coefficients (a, b, c)

The three coefficients define the equation:

  • a multiplies x², and can't be 0. When it is positive the parabola opens upwards, and when it is negative, downwards.
  • b multiplies x. It can be 0, as in x² - 9 = 0.
  • c is the constant term, the number on its own. It can be 0 too, as in x² - 4x = 0.

Discriminant

The discriminant (D) is the part of the quadratic formula under the square root:

D = b² - 4 * a * c

This tool works it out first, without showing it, because its sign decides which solutions there are:

  • D > 0: two different real solutions.
  • D = 0: one real solution (a double root), where the parabola just touches the x-axis.
  • D < 0: no real solutions, since the square root of a negative number isn't real, so both solution fields stay empty.

Solutions (x1, x2)

The solutions (or roots) are the values of x that make the equation true. They come from the quadratic formula:

  • x1 = (-b + √D) / (2 * a)
  • x2 = (-b - √D) / (2 * a)

When D = 0, both give the same value, x = -b / (2 * a), which this tool shows as x1.

The two solutions always add up to -b / a, and multiply to c / a (Vieta's formulas).

How to solve a quadratic equation

Example: solve x² - 5x + 6 = 0, where a = 1, b = -5 and c = 6.

  1. The discriminant. It is positive, so there are two solutions:

    D = (-5)² - 4 × 1 × 6 = 25 - 24 = 1

  2. The quadratic formula.

    x1 = (5 + √1) / 2 = 3 and x2 = (5 - √1) / 2 = 2

  3. Check. Both make the equation true:

    3² - 5 × 3 + 6 = 0 and 2² - 5 × 2 + 6 = 0

Some equations can be solved faster by hand:

  • Factoring: x² - 5x + 6 = (x - 2) * (x - 3), so x = 2 or x = 3. It is quick when the roots are whole numbers.
  • Square roots: when b = 0, as in x² - 9 = 0, rearrange to x² = 9, so x = 3 or x = -3.

The quadratic formula always works, which is why this tool uses it.

The graph of a quadratic equation

The graph of y = a * x² + b * x + c is a parabola, a U-shaped curve, and the solutions are where it crosses the x-axis:

  • It crosses twice when D > 0, touches once when D = 0, and never meets the x-axis when D < 0.
  • Its turning point, the vertex, is at x = -b / (2 * a), exactly halfway between the two roots.

You can draw any parabola, and see its roots, with the Grapher.

Frequently asked questions

How do you solve a quadratic equation?

Use the quadratic formula, x = (-b ± √(b² - 4 * a * c)) / (2 * a). Work out the discriminant first: if it is negative, there are no real solutions.

What is the discriminant?

The discriminant, b² - 4 * a * c, is the expression under the square root in the quadratic formula. When it is positive there are two real solutions, when it is zero one, and when it is negative none.

Can a quadratic equation have no solution?

It has no real solution when the discriminant is negative, as in x² + 1 = 0. It then has two complex solutions, x = i and x = -i, where i is the square root of -1.

What is the difference between a quadratic and a linear equation?

A linear equation has x only to the first power and exactly one solution. A quadratic equation has x², which gives it up to two solutions and makes its graph a parabola instead of a straight line.