Quadratics

The Quadratic Formula

The quadratic formula, x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, gives both solutions of any equation ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0. Put the equation in that form, read off aa, bb and cc with their signs, substitute, and simplify.

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Try it with your numbers

Show every step

Memorizing the formula takes a minute. Using it without losing a sign is the real skill, so this page covers the idea behind it, the traps that cost points, and a ten-second way to check every answer.

Where does the quadratic formula come from?

The formula is completing the square done once, with letters instead of numbers, so that nobody has to do it again. Start with ax2+bx+c=0ax^2 + bx + c = 0 and divide by aa:

x2+bax=−cax^2 + \frac{b}{a}x = -\frac{c}{a}

Half of the xx coefficient is b2a\frac{b}{2a}. Add its square to both sides and the left side becomes a perfect square:

(x+b2a)2=b24a2−ca=b2−4ac4a2\left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a} = \frac{b^2 - 4ac}{4a^2}

Take the square root of both sides, keep both signs, and subtract b2a\frac{b}{2a}. The full line-by-line version is in Deriving the Quadratic Formula.

The shape of the answer holds one clean idea. Written as x=−b2a±b2−4ac2ax = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}, it says the solutions sit at a center point, −b2a-\frac{b}{2a}, plus or minus a distance. The ±\pm is not decoration. It appears because squaring erases signs, so undoing a square must put both back. The 2a2a in the denominator comes from 4a2\sqrt{4a^2}.

Quick check

To complete the square on x2+6x=7x^2 + 6x = 7, what number do you add to both sides?

How to use the quadratic formula step by step

Four moves handle almost every problem:

  1. Rewrite the equation so one side is 00, matching standard form.
  2. Read aa, bb and cc, including their signs.
  3. Compute b2−4acb^2 - 4ac on its own line.
  4. Substitute, simplify, and split the ±\pm into two answers.

Example 1. Solve 2x2=7x−32x^2 = 7x - 3. The equation is not in standard form yet, so subtract 7x7x and add 33 on both sides:

2x2−7x+3=02x^2 - 7x + 3 = 0

Now a=2a = 2, b=−7b = -7, c=3c = 3. The discriminant is

b2−4ac=(−7)2−4(2)(3)=49−24=25b^2 - 4ac = (-7)^2 - 4(2)(3) = 49 - 24 = 25

Then

x=−(−7)±252(2)=7±54x = \frac{-(-7) \pm \sqrt{25}}{2(2)} = \frac{7 \pm 5}{4}

so x=124=3x = \frac{12}{4} = 3 or x=24=12x = \frac{2}{4} = \frac{1}{2}. Check the second one: 2(14)−7(12)+3=0.5−3.5+3=02\left(\frac14\right) - 7\left(\frac12\right) + 3 = 0.5 - 3.5 + 3 = 0.

The trap that costs most students points is the sign of bb. When b=−7b = -7, the opening −b-b is +7+7, and b2b^2 must be written (−7)2(-7)^2 so it comes out as 4949, not −49-49. Calculators make this worse: typing −72-7^2 often returns −49-49.

Two bars, one rule

The fraction bar covers the entire numerator, and 2a2a is the entire denominator. Never divide only the square root by 2a2a.

Quadratic formula with fractions and messy coefficients

Clear the fractions before substituting. Multiply every term by the least common denominator and the equation keeps the same solutions, but aa, bb and cc become whole numbers. The same trick works for decimals: multiply by 1010 or 100100. If aa is negative, multiplying the whole equation by −1-1 also removes a layer of sign risk.

Example 2. Solve 12x2+23x−1=0\frac{1}{2}x^2 + \frac{2}{3}x - 1 = 0. The least common denominator is 66:

3x2+4x−6=03x^2 + 4x - 6 = 0

So a=3a = 3, b=4b = 4, c=−6c = -6, and

b2−4ac=16−4(3)(−6)=16+72=88b^2 - 4ac = 16 - 4(3)(-6) = 16 + 72 = 88

Since 88=4⋅2288 = 4 \cdot 22, the root simplifies to 88=222\sqrt{88} = 2\sqrt{22}. Then

x=−4±2226=−2±223x = \frac{-4 \pm 2\sqrt{22}}{6} = \frac{-2 \pm \sqrt{22}}{3}

The simplification divides every term in the numerator and the denominator by 22. You may only cancel a factor that appears in all of them. Turning −4+2226\frac{-4 + 2\sqrt{22}}{6} into −4+223-4 + \frac{\sqrt{22}}{3} is wrong, because the −4-4 was left behind. As decimals, 22≈4.690\sqrt{22} \approx 4.690, so x≈0.897x \approx 0.897 or x≈−2.230x \approx -2.230.

A zero coefficient is not a problem. For x2−9=0x^2 - 9 = 0, b=0b = 0 and c=−9c = -9, and the formula still returns ±3\pm 3.

What the discriminant tells you before you solve

The expression under the square root, b2−4acb^2 - 4ac, is the discriminant. Its sign tells you what kind of answers are coming before any square root is taken.

Discriminant Solutions Graph
Positive Two real solutions Crosses the xx-axis twice
Zero One repeated real solution, x=−b2ax = -\frac{b}{2a} Touches the xx-axis at the vertex
Negative Two complex solutions Never reaches the xx-axis

There is a bonus layer. When aa, bb and cc are integers and the discriminant is a perfect square (like the 2525 in Example 1), the roots are rational and the quadratic factors over the integers. If it is positive but not a perfect square (like the 8888 above), the roots are irrational and factoring will not find them.

A negative discriminant does not mean “no answer.” It means no real answer. Take x2+2x+5=0x^2 + 2x + 5 = 0: the discriminant is 4−20=−164 - 20 = -16, and −16=4i\sqrt{-16} = 4i, so

x=−2±4i2=−1±2ix = \frac{-2 \pm 4i}{2} = -1 \pm 2i

Whether to stop at “no real solutions” or continue to complex numbers depends on your course. Algebra 1 usually stops. Algebra 2 and beyond continue.

Quick check

How many real solutions does 4x2−12x+9=04x^2 - 12x + 9 = 0 have?

How to check quadratic formula answers in ten seconds

Plugging each root back into the equation works, but it is slow and a messy radical makes it error-prone. A faster check uses two facts that follow from the formula. For ax2+bx+c=0ax^2 + bx + c = 0, the two roots satisfy:

x1+x2=−bax1x2=cax_1 + x_2 = -\frac{b}{a} \qquad x_1 x_2 = \frac{c}{a}

The ±\pm terms cancel when the roots are added, which leaves −2b2a\frac{-2b}{2a}. Multiplying gives a difference of squares, which collapses to 4ac4a2\frac{4ac}{4a^2}.

Test Example 1: the roots 33 and 12\frac12 add to 72\frac72, and −ba=72-\frac{b}{a} = \frac{7}{2}. They multiply to 32\frac32, and ca=32\frac{c}{a} = \frac{3}{2}. Both match. Test Example 2: the roots −2±223\frac{-2 \pm \sqrt{22}}{3} add to −43-\frac43, which equals −43-\frac{4}{3}. Their product is 4−229=−2\frac{4 - 22}{9} = -2, which equals −63\frac{-6}{3}. Both match again.

The two tests also diagnose the mistake. If the sum is wrong, suspect the sign of bb or the denominator 2a2a. If the sum is right but the product is wrong, the error is almost always in the discriminant, usually a mishandled −4ac-4ac when cc or aa is negative.

Try this: Solve x2−3x−10=0x^2 - 3x - 10 = 0 with the formula, then confirm that your two roots add to 33 and multiply to −10-10 before moving on.

Quadratic formula vs. factoring: which should you use?

Factoring is faster when integer factors jump out. The formula is faster when they do not. Instead of guessing, compute the discriminant first. A perfect square tells you the factoring will work, so either route is clean. Anything else tells you to skip the guessing and use the formula. Solving quadratics by factoring covers the other side of that decision.

Some forms deserve neither. An equation like x2=12x^2 = 12 has no xx term, and the square root method finishes it in one line. The formula’s cousin, completing the square, wins when you need vertex form rather than just the roots.

Even-bb shortcut

If b=2kb = 2k, use x=−k±k2−acax = \frac{-k \pm \sqrt{k^2 - ac}}{a}. For x2+8x+3=0x^2 + 8x + 3 = 0, k=4k = 4 and x=−4±13x = -4 \pm \sqrt{13}.

The formula fails in exactly one situation inside quadratics: a=0a = 0. Then the equation is linear, and the denominator 2a2a becomes zero. It also reaches further than it looks. An equation such as x4−5x2+4=0x^4 - 5x^2 + 4 = 0 is a quadratic in u=x2u = x^2. The formula gives u=5±32u = \frac{5 \pm 3}{2}, so u=4u = 4 or u=1u = 1, and therefore x=±2x = \pm 2 or x=±1x = \pm 1. Beyond that, the limits are real: formulas exist for degrees 3 and 4, but none exists for general degree 5 and higher.

Quadratic formula and the vertex of a parabola

Number line showing roots ½ and 3 equally far from the parabola axis at 1.75
For 2x² − 7x + 3, the center −b/2a = 1.75 plus or minus √25/4 = 1.25 gives the roots ½ and 3.

Split the formula at the ±\pm and it shows the geometry of the graph. The term −b2a-\frac{b}{2a} is the xx-coordinate of the vertex, which also gives the axis of symmetry. The term b2−4ac2a\frac{\sqrt{b^2 - 4ac}}{2a} is how far each xx-intercept sits from that axis. So the roots are always mirror images, and the discriminant controls the distance between them.

Use Example 1’s parabola, y=2x2−7x+3y = 2x^2 - 7x + 3. The axis is x=74x = \frac{7}{4}, and the roots 33 and 12\frac12 average to 3.52=1.75\frac{3.5}{2} = 1.75, the same number. For the vertex height, substitute x=74x = \frac74:

y=2⋅4916−494+3=498−988+248=−258y = 2\cdot\frac{49}{16} - \frac{49}{4} + 3 = \frac{49}{8} - \frac{98}{8} + \frac{24}{8} = -\frac{25}{8}

There is a shortcut: the vertex height is −b2−4ac4a-\frac{b^2 - 4ac}{4a}, which here is −254⋅2=−258-\frac{25}{4 \cdot 2} = -\frac{25}{8}. The same discriminant that predicted the roots also gives the depth of the vertex. For more on this, see finding the vertex of a parabola.

Quick check

A parabola y=x2−10x+21y = x^2 - 10x + 21 crosses the xx-axis at x=3x = 3 and x=7x = 7. What is its axis of symmetry?

Where the quadratic formula is used in real life

Any situation where something is multiplied by itself or by a related quantity produces a quadratic: projectile height, area with a fixed perimeter, and profit when price changes demand. In each case, the question “when does this reach zero?” or “when does it equal this target?” becomes a quadratic equation.

Example 3. A ball is thrown upward from a platform, and its height in feet after tt seconds is h=−16t2+32t+48h = -16t^2 + 32t + 48. When does it hit the ground? Set h=0h = 0, so a=−16a = -16, b=32b = 32, c=48c = 48:

b2−4ac=322−4(−16)(48)=1024+3072=4096=642b^2 - 4ac = 32^2 - 4(-16)(48) = 1024 + 3072 = 4096 = 64^2

t=−32±642(−16)=−32±64−32t = \frac{-32 \pm 64}{2(-16)} = \frac{-32 \pm 64}{-32}

The two results are t=32−32=−1t = \frac{32}{-32} = -1 and t=−96−32=3t = \frac{-96}{-32} = 3. A negative time happened before the throw, so reject it. The ball lands at t=3t = 3 seconds. Check: −16(9)+32(3)+48=−144+96+48=0-16(9) + 32(3) + 48 = -144 + 96 + 48 = 0.

Notice the lesson inside the algebra: both roots are valid mathematics, but only one answers the question. Always read the answer back against the context. More setups of this kind are in quadratic word problems, and Quadratic Formula Practice Problems lets you drill every case from this page, from clean integers to complex roots.

Practice problems

0 of 5 solved

  1. Solve x2+5x+6=0x^2 + 5x + 6 = 0.

  2. Solve 2x2−3x−2=02x^2 - 3x - 2 = 0.

  3. Solve x2−6x+4=0x^2 - 6x + 4 = 0. Give exact answers.

  4. Solve x2−2x+10=0x^2 - 2x + 10 = 0 over the complex numbers.

  5. Solve 3x2=2x+73x^2 = 2x + 7. Give exact answers.

Common questions

What is the quadratic formula?

The quadratic formula is x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. It gives the solutions of any equation written as ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0. Substitute aa, bb and cc with their signs, then simplify.

Why does the quadratic formula have a plus or minus sign?

The formula comes from taking a square root, and every positive number has two square roots, one positive and one negative. The ±\pm keeps both. That is why most quadratics have two solutions.

Does the quadratic formula work for every quadratic equation?

Yes, as long as a≠0a \neq 0. It handles equations that factor, equations with irrational answers, and equations with complex answers. If a=0a = 0, the equation is linear and the formula would divide by zero.

What do you do if the discriminant is negative?

The equation has no real solutions, because the square root of a negative number is not real. In courses that include complex numbers, write −n=in\sqrt{-n} = i\sqrt{n} and give two complex solutions, such as 1±3i1 \pm 3i.

When should you use the quadratic formula instead of factoring?

Use the formula when factors are not obvious within a few seconds, when the coefficients are fractions or decimals, or when the answers are irrational. Computing b2−4acb^2 - 4ac first helps: if it is a perfect square and the coefficients are integers, the equation factors.

What if b or c is zero in the quadratic formula?

The formula still works. If b=0b = 0, the −b-b term vanishes, and if c=0c = 0, one root is always 00. In both cases the square root method or factoring out xx is usually quicker.

Up next