CCalculate.Studio
education · 8 min · 최종 검토일: 2026-07-07

How the Quadratic Formula Works (and Where It Comes From)

TL;DRThe quadratic formula, x = (-b plus-or-minus the square root of b squared minus 4ac) all divided by 2a, solves any equation of the form ax^2 + bx + c = 0 and is derived by completing the square on the general quadratic. The discriminant, b^2 - 4ac, determines the nature of the roots before solving: positive gives two distinct real roots, zero gives one repeated real root, and negative gives a pair of complex conjugate roots. Worked examples for all three cases -- x^2 - 3x + 2 = 0, x^2 - 4x + 4 = 0, and x^2 + 2x + 5 = 0 -- are shown below with verified step-by-step arithmetic.

Where the quadratic formula comes from

The quadratic formula is derived from the general equation ax^2 + bx + c = 0 (with a not equal to zero) using a technique called completing the square. Dividing every term by a gives x^2 + (b/a)x + c/a = 0, then moving the constant to the other side gives x^2 + (b/a)x = -c/a. Adding (b/2a)^2 to both sides turns the left side into a perfect square: (x + b/2a)^2 = (b/2a)^2 - c/a.

Simplifying the right side over a common denominator gives (x + b/2a)^2 = (b^2 - 4ac) / (4a^2). Taking the square root of both sides (and allowing both the positive and negative root) gives x + b/2a = plus-or-minus the square root of (b^2 - 4ac) / (2a), and isolating x produces the familiar formula: x = (-b plus-or-minus the square root of b^2 - 4ac) / (2a). Every step is reversible algebra, which is why the formula works for every quadratic equation with a nonzero leading coefficient, not just ones that factor neatly.

The discriminant: what it tells you before you solve

The expression under the square root, b^2 - 4ac, is called the discriminant, and its sign alone determines what kind of roots the equation has, without needing to compute the roots themselves. A positive discriminant means the square root is a positive real number, so the plus-or-minus produces two distinct real values of x. A discriminant of exactly zero means the square root term vanishes entirely, so both the plus and minus cases collapse onto the single value x = -b / (2a).

A negative discriminant means the expression under the square root is negative, which has no real square root -- only an imaginary one, since the square root of a negative number is defined as a real number times i, where i is the imaginary unit satisfying i^2 = -1. In this case the formula still produces two answers, but they are a complex conjugate pair of the form p + qi and p - qi, rather than real numbers.

Discriminant (b^2 - 4ac)Number and type of rootsWhat the parabola does
Positive (> 0)Two distinct real rootsCrosses the x-axis at two points
Zero (= 0)One repeated real root, x = -b / (2a)Touches the x-axis at exactly one point (the vertex)
Negative (< 0)Two complex conjugate roots, p ± qiNever touches or crosses the x-axis

Worked example 1: two distinct real roots (D > 0)

Solve x^2 - 3x + 2 = 0. Here a = 1, b = -3, c = 2. The discriminant is (-3)^2 - 4(1)(2) = 9 - 8 = 1, which is positive, so two distinct real roots are expected. Applying the formula: x = (3 plus-or-minus the square root of 1) / (2 x 1) = (3 plus-or-minus 1) / 2. This gives x1 = (3 + 1) / 2 = 2 and x2 = (3 - 1) / 2 = 1.

These roots can be checked by factoring the original equation: x^2 - 3x + 2 = (x - 1)(x - 2), which is zero exactly when x = 1 or x = 2, confirming the formula's answer. A further check uses Vieta's formulas: the sum of the roots should equal -b/a = 3, and indeed 2 + 1 = 3; the product should equal c/a = 2, and indeed 2 x 1 = 2.

Worked example 2: one repeated real root (D = 0)

Solve x^2 - 4x + 4 = 0. Here a = 1, b = -4, c = 4. The discriminant is (-4)^2 - 4(1)(4) = 16 - 16 = 0, so a single repeated root is expected. Since the discriminant is zero, the formula simplifies directly to x = -b / (2a) = 4 / 2 = 2.

This equation factors as (x - 2)^2 = 0, confirming that x = 2 is the only root, counted twice (with multiplicity 2). Geometrically, the parabola y = x^2 - 4x + 4 just touches the x-axis at its vertex, (2, 0), rather than crossing through it -- the visual signature of a zero discriminant.

Worked example 3: two complex conjugate roots (D < 0)

Solve x^2 + 2x + 5 = 0. Here a = 1, b = 2, c = 5. The discriminant is 2^2 - 4(1)(5) = 4 - 20 = -16, which is negative, so no real roots exist. Applying the formula: x = (-2 plus-or-minus the square root of -16) / (2 x 1). The square root of -16 is 4i, since (4i)^2 = 16 x i^2 = 16 x (-1) = -16, so x = (-2 plus-or-minus 4i) / 2 = -1 plus-or-minus 2i.

The two roots are therefore -1 + 2i and -1 - 2i, a complex conjugate pair -- meaning they share the same real part (-1) and have opposite-signed imaginary parts. The parabola y = x^2 + 2x + 5 lies entirely above the x-axis (its minimum value, at x = -1, is 4), which is the graphical reason it never crosses the axis and therefore has no real roots.

자주 묻는 질문

What is the quadratic formula?

The quadratic formula solves any equation of the form ax^2 + bx + c = 0, where a is not zero, and states that x = (-b plus-or-minus the square root of b^2 - 4ac), all divided by 2a. It is derived by completing the square on the general quadratic equation and works for every quadratic, whether or not it factors into whole numbers.

What does the discriminant tell you?

The discriminant, b^2 - 4ac, is the expression under the square root in the quadratic formula, and its sign reveals the type of roots before solving. A positive discriminant means two distinct real roots, a discriminant of zero means one repeated real root at x = -b/(2a), and a negative discriminant means two complex conjugate roots and no real solutions.

How do you solve a quadratic equation with complex roots?

When the discriminant b^2 - 4ac is negative, take the square root of its absolute value and attach the imaginary unit i. For x^2 + 2x + 5 = 0, the discriminant is -16, and the square root of -16 is 4i, giving roots x = (-2 plus-or-minus 4i) / 2 = -1 plus-or-minus 2i -- a complex conjugate pair.

Where does the quadratic formula come from?

It comes from completing the square on the general equation ax^2 + bx + c = 0. Dividing by a, isolating the constant, and adding (b/2a)^2 to both sides turns the left-hand side into a perfect square, (x + b/2a)^2. Taking the square root of both sides and isolating x produces x = (-b plus-or-minus the square root of b^2 - 4ac) / (2a).

Can a quadratic equation have exactly one solution?

Yes, when the discriminant equals exactly zero. In that case the plus-or-minus in the formula collapses to a single value, x = -b / (2a), called a repeated root. For example, x^2 - 4x + 4 = 0 has discriminant 16 - 16 = 0 and the single repeated root x = 2, since the equation factors as (x - 2)^2 = 0.

참고 자료

  1. Weisstein, Eric W. "Quadratic Equation." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
  2. Weisstein, Eric W. "Vieta's Formulas." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
  3. Stewart J. Precalculus: Mathematics for Calculus. Cengage (derivation of the quadratic formula and the discriminant).

관련 계산기