A quadratic equation has the form ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0. It shows up in areas of rectangles, projectile motion, profit that rises and then falls, and a large share of algebra questions on the SAT, ACT and school exams. There are three ways to solve it, and picking the right one saves time and sign errors: factoring for incomplete equations, sum and product when the roots are small integers, and the quadratic formula for everything else.

Before any arithmetic, think about what the equation means. The roots are the values of x that make the expression zero, that is, the points where the parabola y=ax2+bx+cy = ax^2 + bx + c crosses the x-axis. A parabola can cross the axis twice, touch it once, or stay entirely above or below it. Those three pictures match exactly the three cases of the discriminant below.

Incomplete equations: factor before reaching for the formula

When the x term or the constant term is missing, the formula still works, but it is wasted effort.

  • b=0b = 0: x2−9=0⇒x2=9⇒x=±3x^2 - 9 = 0 \Rightarrow x^2 = 9 \Rightarrow x = \pm 3. Don’t drop the negative root: (−3)² is also 9.
  • c=0c = 0: x2−4x=0⇒x (x−4)=0⇒x=0x^2 - 4x = 0 \Rightarrow x\,(x - 4) = 0 \Rightarrow x = 0 or x=4x = 4.

Resist dividing x2−4x=0x^2 - 4x = 0 by xx: that erases the root x=0x = 0. Dividing by something that can be zero is always risky; factoring loses nothing.

The quadratic formula

D=b2−4acx=−b±D2aD = b^2 - 4ac \qquad x = \frac{-b \pm \sqrt{D}}{2a}
Discriminant and the quadratic formula

The discriminant tells you how many real roots exist before you finish the arithmetic. Many textbooks write it as Δ\Delta or simply as b2−4acb^2 - 4ac.

Sign of DDReal rootsWhat the parabola does
D>0D > 0two, distinctcrosses the x-axis twice
D=0D = 0one (repeated)touches the x-axis at its vertex
D<0D < 0nonenever touches the x-axis

That is why it pays to compute D first: if it is negative, the answer over the reals is already “no solution”.

−4−20246−10−5051015xyx² − 2x − 8 (D > 0)x² − 4x + 4 (D = 0)x² − 4x + 7 (D < 0)
Three parabolas: the first crosses the x-axis at −2 and 4, the second touches it at x = 2, and the third never reaches it.

Worked example, step by step: x² − 2x − 8 = 0

  1. Read off the coefficients, signs included. a=1a = 1, b=−2b = -2, c=−8c = -8.
  2. Compute the discriminant. D=(−2)2−4⋅1⋅(−8)=4+32=36D = (-2)^2 - 4 \cdot 1 \cdot (-8) = 4 + 32 = 36. Since 36 > 0, there are two real roots.
  3. Take the square root. 36=6\sqrt{36} = 6.
  4. Apply the formula. x=−(−2)±62⋅1=2±62x = \dfrac{-(-2) \pm 6}{2 \cdot 1} = \dfrac{2 \pm 6}{2}.
  5. Split the two roots. x1=82=4x_1 = \dfrac{8}{2} = 4 and x2=−42=−2x_2 = \dfrac{-4}{2} = -2.

Solving x² − 2x − 8 = 0 step by step.

Check. Plug each root back into the original equation:

  • x=4x = 4: 16−8−8=016 - 8 - 8 = 0. It works.
  • x=−2x = -2: 4+4−8=04 + 4 - 8 = 0. It works.

A second check without substituting: the roots add up to 4 + (−2) = 2, which equals −b/a=2-b/a = 2, and multiply to 4 · (−2) = −8, which equals c/a=−8c/a = -8. Two independent checks agreeing is solid evidence.

One more with a ≠ 1: 2x² + 3x − 2 = 0

  1. a=2a = 2, b=3b = 3, c=−2c = -2.
  2. D=9−4⋅2⋅(−2)=9+16=25D = 9 - 4 \cdot 2 \cdot (-2) = 9 + 16 = 25.
  3. x=−3±54x = \dfrac{-3 \pm 5}{4}, so x1=12x_1 = \dfrac{1}{2} and x2=−2x_2 = -2.
  4. Check: 2⋅(12)2+3⋅12−2=12+32−2=02 \cdot \left(\tfrac{1}{2}\right)^2 + 3 \cdot \tfrac{1}{2} - 2 = \tfrac{1}{2} + \tfrac{3}{2} - 2 = 0.

Notice the denominator is 2a = 4, not 2. That is where most slips happen when a is not 1.

When D is negative: x² + 2x + 5 = 0

D=4−20=−16<0D = 4 - 20 = -16 < 0, so there is no real root: the whole parabola sits above the x-axis. Over the complex numbers the roots exist and are conjugates: x=−2±4i2=−1±2ix = \dfrac{-2 \pm 4i}{2} = -1 \pm 2i. In an Algebra 1 or 2 course, the expected answer is usually “no real solution” unless complex numbers have been covered.

Where the formula comes from

It comes from completing the square. Divide everything by aa, move c/ac/a to the other side and add (b2a)2\left(\tfrac{b}{2a}\right)^2 to both sides; the left side becomes a perfect square:

(x+b2a)2=b2−4ac4a2\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}
Completing the square in ax² + bx + c = 0

Take the square root of both sides, isolate xx and you have the formula. Knowing this helps you remember why the denominator is 2a2a and not just 2, and it explains the role of the discriminant: if the right side is negative, no real number squared gives that value.

Sum and product of the roots

x1+x2=−bax1⋅x2=cax_1 + x_2 = -\frac{b}{a} \qquad x_1 \cdot x_2 = \frac{c}{a}
Vieta's formulas: coefficients and roots

When a=1a = 1, the roots add up to −b-b and multiply to cc. In x2−7x+12=0x^2 - 7x + 12 = 0, look for two numbers with sum 7 and product 12: the pairs with product 12 are (1, 12), (2, 6) and (3, 4), and only (3, 4) adds up to 7. The roots are 3 and 4.

With a negative product, the roots have opposite signs. In x2+x−6=0x^2 + x - 6 = 0 the sum is −1 and the product is −6; the pair (2, −3) fits, so the roots are 2 and −3. If no pair jumps out within a few seconds, stop guessing and use the formula.

Common mistakes

  1. Forgetting that b carries its sign. In x2−5x+6x^2 - 5x + 6, b=−5b = -5 and −b=5-b = 5.
  2. Evaluating −52-5^2 as −25 when the discriminant needs (−5)2=25(-5)^2 = 25. Use parentheses whenever b is negative.
  3. Getting the sign of −4ac wrong. When a and c have opposite signs, −4ac is positive and D grows, as in the example above (4 + 32).
  4. Dividing only −b by 2a and forgetting that ±√D is in the numerator too.
  5. Canceling x from both sides in equations like x2=4xx^2 = 4x and losing the root zero.
  6. Skipping the check. Plugging the roots back in takes seconds and catches almost every sign error.

Frequently asked questions

Is the quadratic formula the same as "Bhaskara's formula"?

Yes. In Brazil it is named after the Indian mathematician Bhaskara II, though it was known before him. Everywhere else it is simply the quadratic formula.

What if the discriminant is negative?

There are no real roots. Over the complex numbers the roots exist and come in conjugate pairs, such as −1 ± 2i for x² + 2x + 5 = 0.

Do I need the formula for an incomplete equation?

No. If b = 0, isolate x². If c = 0, factor out x. It is faster and avoids sign errors.

When is sum and product worth it?

When a = 1 and the roots are small integers. If no obvious pair shows up in a few seconds, switch to the formula.