Why Does The Quadratic Formula Work?

Algebra · Where the Formula Comes From

The quadratic formula is the result of completing the square for a general quadratic equation. Its structure is easier to remember when each term has a reason to be there.

Quick answer

For ax² + bx + c = 0 with a ≠ 0, divide by a, move the constant, and add (b/2a)² to both sides. The left becomes the perfect square (x + b/2a)². Taking both square-root branches and isolating x gives x = (−b ± √(b² − 4ac))/(2a).

The quantity b² − 4ac is the discriminant. OpenStax derives the formula by completing the square.

Why Does Completing The Square Help?

A quadratic contains x², so ordinary linear-equation operations alone do not isolate x. Completing the square rewrites the x² and x terms as one squared expression. For x² + 6x, split 6x into two copies of 3x.

They fit alongside an x-by-x square, leaving a 3-by-3 corner. Adding the corner gives x² + 6x + 9 = (x + 3)². The identity follows by expansion as well: (x + 3)² = x² + 3x + 3x + 9.

Completing x Squared Plus Six x With a Nine-Unit CornerAn x by x square, two x by 3 rectangles, and a 3 by 3 corner form a larger square with side x plus 3. Their areas total x squared plus 6x plus 9, equal to open parenthesis x plus 3 close parenthesis squared.The Missing Corner Is 3 × 3x²3x3x9x² + 6x + 9= (x + 3)²The new square has side x + 3.
The area picture shows the identity when the lengths are nonnegative. Algebraic expansion proves the identity for every real x.

How Does The General Quadratic Formula Follow?

Begin with ax² + bx + c = 0 and require a ≠ 0. Divide the whole equation by a: x² + (b/a)x + c/a = 0. Move the constant: x² + (b/a)x = −c/a.

Half the coefficient of x is b/(2a), so add its square to both sides. The left factors into a perfect square:

(x + b/(2a))² = b²/(4a²) − c/a = (b² − 4ac)/(4a²).

Multiply both sides by 4a² to avoid ambiguity about the sign of a: (2ax + b)² = b² − 4ac. Take both square-root branches, 2ax + b = ±√(b² − 4ac), and solve for x. This produces x = (−b ± √(b² − 4ac))/(2a).

The ± is essential because two different numbers can have the same square. Over the real numbers, the square-root step requires b² − 4ac ≥ 0; a negative value leads to complex roots instead.

This derivation explains why the denominator is 2a, why the numerator includes −b, and why the discriminant sits inside a square root. For a different task, rewriting a particular quadratic into vertex form, use the Completing the Square Calculator.

What Does The Derivation Look Like With Numbers?

Take x² + 6x + 5 = 0. Move 5: x² + 6x = −5. Half of 6 is 3; add 3² = 9 to both sides.

Then (x + 3)² = 4, so x + 3 = 2 or x + 3 = −2. The roots are x = −1 and x = −5. Substitute either value into x² + 6x + 5 and the result is zero.

The same equation has a = 1, b = 6, c = 5. Its discriminant is 6² − 4(1)(5) = 16. The formula gives x = (−6 ± 4)/2, again producing −1 and −5.

In this easy example, factoring also works: (x + 1)(x + 5) = 0. The formula is useful when the factors are not obvious; the derivation explains why the general method works.

What Does The Discriminant Reveal?

The discriminant D = b² − 4ac is the number obtained before taking the square root. Its sign controls the number of real x-intercepts of the parabola y = ax² + bx + c. If D is positive, the formula yields two distinct real roots.

If D is zero, both branches coincide at one repeated real root. If D is negative, there are no real roots; over complex numbers the two roots form a conjugate pair when a, b, and c are real. The OpenStax discriminant table makes the same distinction.

DiscriminantRoots Over the RealsParabola and x-Axis
D > 0Two distinct real rootsCrosses twice
D = 0One repeated real rootTouches once
D < 0No real roots; two complex rootsDoes not meet the x-axis

Why Must You Identify The Signed Coefficients First?

The formula uses coefficients from ax² + bx + c = 0. Move all terms to one side before reading a, b, and c. A term’s sign belongs to its coefficient.

For 2x² = 5x + 3, the standard form is 2x² − 5x − 3 = 0. Therefore a = 2, b = −5, and c = −3. Substituting b = 5 would describe a different equation.

The discriminant is (−5)² − 4(2)(−3) = 49. The formula gives x = (5 ±7)/4, so the roots are 3 and −1/2. Substitution gives 18 = 18 and 1/2 = 1/2 in the original equation.

A missing term still has a coefficient. For 3x² − 12 = 0, b is zero rather than unknown. The formula gives x = ±2, agreeing with the simpler square-root method.

Does The Formula Work When a Is Negative?

Yes. The formula requires a to be nonzero, not positive. A negative a changes the signs and graph direction, but the derivation still uses valid algebra.

For −x² + 5x − 6 = 0, the coefficients are −1, 5, and −6. The discriminant is 25 − 24 = 1. The formula gives (−5 ±1)/(−2), producing 2 and 3.

Multiplying the original equation by −1 gives x² − 5x + 6 = 0. That equation has the same roots because the multiplier is nonzero. It may be easier to read, but changing every coefficient is necessary.

How Do Three Simple Equations Show The Discriminant Cases?

The equations x² − 1 = 0, x² = 0, and x² + 1 = 0 provide a direct comparison. Their discriminants are 4, 0, and −4. The coefficient of x² is 1 in each case.

The first equation has roots −1 and 1. The second has the repeated root 0. The third has no real roots, but over complex numbers its roots are i and −i, where i² = −1.

Three Discriminant Casesx squared minus one has discriminant four and roots negative one and one. x squared has discriminant zero and repeated root zero. x squared plus one has discriminant negative four and no real roots.x² − 1 = 0D = 4: roots −1 and 1x² = 0D = 0: repeated root 0x² + 1 = 0D = −4: no real roots
These are algebraic examples, not measurements or sampled data.

Can You Check Roots Without Repeating The Formula?

Substitution is the strongest direct check for each proposed root. Two additional checks compare the sum and product of the roots with the coefficients. They can reveal a copied sign error quickly.

For ax² + bx + c = 0, the root sum is −b/a and the root product is c/a. These relations follow by expanding a(x − r₁)(x − r₂). They apply to repeated and complex roots as well.

For 2x² − 5x − 3 = 0, the roots 3 and −1/2 add to 5/2 and multiply to −3/2. Those values agree with −b/a and c/a. A wrong sign on either candidate usually breaks one or both checks.

Passing one check is not enough to prove a pair correct. Two wrong values might share the required sum. Substitute each value and use the coefficient relationships as extra diagnostics.

When Should You Keep An Exact Radical Answer?

Keep a radical when the discriminant is positive but not a perfect square. For x² − 2 = 0, the roots are ±√2. Decimal values such as ±1.4142 are approximations.

Exact forms preserve the algebraic relationship to the equation. A rounded candidate may leave a small nonzero substitution result even though the exact root works. Round only after finishing the calculation unless the task specifies another procedure.

A perfect-square discriminant produces rational roots when the coefficients are integers. The roots need not be integers, as 3 and −1/2 show. Do not confuse a rational answer with a whole-number answer.

Practice Connecting The Formula To The Equation

For x² − 4x + 3 = 0, identify all three coefficients before calculating. Find the discriminant, then compare the two formula branches. Check the result with substitution or factorization.

Here a = 1, b = −4, and c = 3, so D = 4. The roots are (4 ±2)/2, giving 3 and 1. Expanding (x − 3)(x − 1) returns the original polynomial.

FAQs About The Quadratic Formula

Is Factoring Better Than The Formula?

Factoring is often faster when the factors are obvious. The quadratic formula is a general method for every quadratic with a nonzero leading coefficient. Both methods must give the same solution set when used correctly.

Why Is There A Repeated Root When The Discriminant Is Zero?

The square-root term is zero, so adding and subtracting it produce the same value. The two branches meet at −b/(2a). Repeated describes its algebraic multiplicity, not two different numerical answers.

When Should You Check The Method Or The Answer?

The formula assumes a ≠ 0. If a = 0, the x² term disappears and the equation is linear; use the Equation Solver instead. First move every term to one side so the other side equals zero, then copy the signed coefficients correctly.

The formula produces candidate roots; substitute each into the original equation, particularly if you rearranged it or later rounded a decimal result.

Keep exact radical expressions during algebra whenever possible. A decimal approximation may make substitution appear slightly nonzero because of rounding. If a word problem imposes a domain, such as a positive length or nonnegative time, a mathematically valid root may still be unusable for that situation.

The formula solves the equation; interpreting the answer requires the original context.

Related But Different: The Quadratic Formula Calculator computes roots from entered coefficients. This article explains the identity behind that calculation, rather than repeating the tool’s input instructions.

Compare The Derivation With A Calculation

Try another set of a, b, and c, then compare its roots and discriminant with your own work.

Open the Quadratic Formula CalculatorBrowse Algebra Tools
Mathematics references