Skip to content

Quadratic Formula Derivation

Derive the quadratic formula by completing the square, following each transformation in a Pele flowchart.

Follow the derivation

Follow the arrows, then match each stage to the equations below. Zoom or expand the diagram to inspect it.

Quadratic formula derivation diagram
Rendering diagram…

Why each step works

  1. Start with the general equation

    ax2+bx+c=0,a≠0ax^2+bx+c=0,\qquad a\ne0

    The leading coefficient must be nonzero. Otherwise, the equation is not quadratic.

  2. Multiply both sides

    4a2x2+4abx+4ac=04a^2x^2+4abx+4ac=0

    Multiplying by four times the leading coefficient prepares the first two terms for a perfect square.

  3. Move the constant term

    4a2x2+4abx=−4ac4a^2x^2+4abx=-4ac

    Subtract the constant term from both sides.

  4. Complete the square

    4a2x2+4abx+b2=b2−4ac4a^2x^2+4abx+b^2=b^2-4ac

    Add the square of the linear coefficient to both sides. The left side now has the three terms of a perfect square.

  5. Recognize the perfect square

    (2ax+b)2=b2−4ac(2ax+b)^2=b^2-4ac

    Expanding the square recovers the previous line. This is the key transformation: the unknown now appears inside a single squared expression.

  6. Take both roots and isolate the unknown

    2ax+b=±b2−4ac⟹x=−b±b2−4ac2a2ax+b=\pm\sqrt{b^2-4ac}\qquad\Longrightarrow\qquad x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

    Include both signs, subtract the linear coefficient, and divide by twice the leading coefficient. This gives every root, including a repeated root when the square root is zero.

What the discriminant tells us

For real coefficients, the expression under the square root is the discriminant, Δ=b2−4ac\Delta=b^2-4ac. Its sign determines the kind of roots.

  • Δ>0\Delta>0: two distinct real roots, because the positive and negative square roots give different answers.
  • Δ=0\Delta=0: one repeated real root, x=−b2ax=-\frac{b}{2a}.
  • Δ<0\Delta<0: no real roots; over the complex numbers, the roots form a conjugate pair.

What a quadratic function tells us

The coefficients reveal the roots, symmetry, shape, and behavior of the entire parabola.

Consider f(x)=ax2+bx+cf(x)=ax^2+bx+c, with real coefficients and a≠0a\ne0. Write the discriminant as Δ=b2−4ac\Delta=b^2-4ac, the vertex as (h,k)(h,k), and the two roots as r1,r2r_1,r_2, counting a repeated root twice.

A root is an input where f(x)=0f(x)=0. The vertex is the turning point; the axis of symmetry is the vertical line through it.

Unless a comparison is shown, the illustrations use f(x)=x2−4x+3f(x)=x^2-4x+3, with roots r1=3, r2=1r_1=3,\ r_2=1 and vertex (2,−1)(2,-1).

Properties of a quadratic function with real coefficients
Leading coefficientExpression
a≠0a\ne0
What it tells usDetermines opening direction and vertical scale. Positive opens upward; negative opens downward. With the vertex held fixed, a larger absolute value makes the parabola narrower.Visual intuition

a=1, 2, −1a=1,\ 2,\ -1

Compare opening and width at the same vertex.

Linear coefficientExpression
f′(0)=bf'(0)=b
What it tells usGives the tangent slope at the vertical axis. Together with the leading coefficient, it determines the horizontal position of the vertex; it is not itself a horizontal shift.Visual intuition

b=2,b=−2b=2,\qquad b=-2

Opposite tangent slopes at the same vertical intercept: positive for the solid curve, negative for the dashed curve.

Constant and vertical interceptExpression
f(0)=c(0,c)\begin{gathered}f(0)=c\\(0,c)\end{gathered}
What it tells usThe constant is the height where the graph meets the vertical axis. Changing only this coefficient translates the graph vertically.Visual intuition

c=1,c=3c=1,\qquad c=3

Only the vertical position changes: the solid curve has the lower intercept, the dashed curve the higher one.

DiscriminantExpression
Δ=b2−4ac\Delta=b^2-4ac
What it tells usPositive means two distinct real roots, zero means a repeated real root, and negative means two nonreal complex conjugate roots.Visual intuition

Δ>0Δ=0Δ<0\begin{gathered}\Delta>0\\\Delta=0\\\Delta<0\end{gathered}

Cross twice, touch once, or miss the horizontal axis.

First rootExpression
r1=−b+Δ2ar_1=\frac{-b+\sqrt{\Delta}}{2a}
What it tells usOne input that makes the function zero. This label does not necessarily identify the smaller root.Visual intuition

r1=3r_1=3

The plus-square-root expression gives the right root in this example.

Second rootExpression
r2=−b−Δ2ar_2=\frac{-b-\sqrt{\Delta}}{2a}
What it tells usThe other root, counting multiplicity. When the discriminant is zero, both root expressions give the same value.Visual intuition

r2=1r_2=1

The minus-square-root expression gives the left root in this example.

Horizontal interceptsExpression
(r1,0), (r2,0)Δ≥0\begin{gathered}(r_1,0),\ (r_2,0)\\\Delta\ge0\end{gathered}
What it tells usReal roots give the horizontal intercepts. A repeated root touches the axis at the vertex; distinct roots cross it. Nonreal roots are not points on the real graph.Visual intuition

(1,0),(3,0)(1,0),\quad(3,0)

Both marked points have zero height.

Sum of the rootsExpression
r1+r2=−bar_1+r_2=-\frac{b}{a}
What it tells usVieta’s first relation gives the sum without calculating either root. It also holds for complex roots.Visual intuition

1+3=41+3=4

Add the two example root values as successive steps.

Product of the rootsExpression
r1r2=car_1r_2=\frac{c}{a}
What it tells usVieta’s second relation gives the product. For real roots, a negative product means opposite signs; a positive product means the same sign, determined by their sum. A zero product means at least one root is zero.Visual intuition

1×3=31\times3=3

For these positive roots, their product is a rectangle’s area.

Mean of the roots and axis of symmetryExpression
h=r1+r22h=−b2ax=h\begin{gathered}h=\frac{r_1+r_2}{2}\\h=-\frac{b}{2a}\\x=h\end{gathered}
What it tells usThe axis passes halfway between real roots. When the roots are nonreal, their algebraic mean still gives the real axis of symmetry.Visual intuition

h=1+32=2h=\frac{1+3}{2}=2

The symmetry axis lies halfway between the roots.

Distance between real rootsExpression
∣r1−r2∣=Δ∣a∣Δ≥0\begin{gathered}|r_1-r_2|=\frac{\sqrt{\Delta}}{|a|}\\\Delta\ge0\end{gathered}
What it tells usMeasures the horizontal separation of the intercepts. Half this distance is the distance from the axis of symmetry to either real root.Visual intuition

∣3−1∣=2|3-1|=2

The two equal halves span the distance between the roots.

Vertex or turning pointExpression
h=−b2ak=c−b24ak=−Δ4a\begin{gathered}h=-\frac{b}{2a}\\k=c-\frac{b^2}{4a}\\k=-\frac{\Delta}{4a}\end{gathered}
What it tells usThe symmetric turning point is the global minimum when the graph opens upward and the global maximum when it opens downward.Visual intuition

(h,k)=(2,−1)(h,k)=(2,-1)

The lowest point gives the horizontal and vertical coordinates of the vertex.

Vertex formExpression
f(x)=a(x−h)2+kf(x)=a(x-h)^2+k
What it tells usMakes the vertex, opening direction, and vertical scale visible directly. Completing the square converts the original expression into this form.Visual intuition

x2↓(x−2)2−1\begin{gathered}x^2\\\downarrow\\(x-2)^2-1\end{gathered}

Translate the reference parabola right, then down.

Factored formExpression
f(x)=a(x−r1)(x−r2)f(x)=a(x-r_1)(x-r_2)
What it tells usMakes the roots visible. This factorization exists over the complex numbers; it uses real linear factors only when the discriminant is nonnegative.Visual intuition

(x−1)(x−3)=0(x-1)(x-3)=0

Either factor becoming zero places a root on the axis.

Reflection and symmetric pointsExpression
f(h+t)=f(h−t)(x,y)↕(2h−x,y)\begin{gathered}f(h+t)=f(h-t)\\[6pt](x,y)\\\updownarrow\\(2h-x,y)\end{gathered}
What it tells usPoints equally far from the axis have the same height. Reflecting any point on the graph across the axis gives another point on the graph.Visual intuition

f(0)=f(4)=3f(0)=f(4)=3

Equal horizontal offsets from the axis give equal heights.

Slope at any inputExpression
f′(x)=2ax+bf′(x)=2a(x−h)f′(h)=0\begin{gathered}f'(x)=2ax+b\\f'(x)=2a(x-h)\\f'(h)=0\end{gathered}
What it tells usThe slope changes linearly and is zero at the vertex. Its sign tells whether the graph is rising or falling.Visual intuition

f′(1)=−2f′(2)=0f′(3)=2\begin{gathered}f'(1)=-2\\f'(2)=0\\f'(3)=2\end{gathered}

Tangents fall, flatten, and rise as the input increases.

Second derivative and concavityExpression
f′′(x)=2af''(x)=2a
What it tells usThe second derivative is constant: positive gives concave up, negative gives concave down. A quadratic has no inflection point.Visual intuition

f′′>0,f′′<0f''>0,\qquad f''<0

The solid curve bends upward; the dashed curve bends downward. Their second derivatives have opposite signs.

Increasing and decreasing intervalsExpression
a>0: {↘x<h↗x>ha<0: {↗x<h↘x>h\begin{gathered}a>0:\ \begin{cases}\searrow&x<h\\\nearrow&x>h\end{cases}\\[6pt]a<0:\ \begin{cases}\nearrow&x<h\\\searrow&x>h\end{cases}\end{gathered}
What it tells usThe vertex separates the two monotonic branches. Restricting the function to either branch makes it one-to-one.Visual intuition

x<2: ↘x>2: ↗\begin{gathered}x<2:\ \searrow\\x>2:\ \nearrow\end{gathered}

Follow both branches from left to right: down to the vertex, then up.

Domain and rangeExpression
dom⁡f=Rrange⁡f={[k,∞)a>0(−∞,k]a<0\begin{gathered}\operatorname{dom}f=\mathbb{R}\\\operatorname{range}f=\\\begin{cases}[k,\infty)&a>0\\(-\infty,k]&a<0\end{cases}\end{gathered}
What it tells usEvery real input is allowed. The vertex height sets the lowest or highest possible output.Visual intuition

x∈R,f(x)≥−1x\in\mathbb R,\qquad f(x)\ge-1

Horizontal inputs extend both ways; outputs stop at the minimum.

Sign between and outside distinct real rootsExpression
α=min⁡(r1,r2)β=max⁡(r1,r2)Δ>0\begin{gathered}\alpha=\min(r_1,r_2)\\\beta=\max(r_1,r_2)\\\Delta>0\end{gathered}
What it tells usOutside the two roots, the function has the same sign as the leading coefficient. Between the roots, it has the opposite sign. At each root, it is zero.Visual intuition

+∣1−∣3++\quad\big|_{1}\quad-\quad\big|_{3}\quad+

An upward-opening example is positive outside its roots and negative between them.

Sign with a repeated root or no real rootsExpression
Δ=0:f(x)=a(x−h)2Δ<0:sgn⁡f(x)=sgn⁡a\begin{gathered}\Delta=0:\\f(x)=a(x-h)^2\\[6pt]\Delta<0:\\\operatorname{sgn}f(x)=\operatorname{sgn}a\end{gathered}
What it tells usWith a repeated root, the function has the leading coefficient’s sign everywhere except at the vertex, where it is zero. With no real roots, it always has that sign and never reaches zero.Visual intuition

(x−2)2(x−2)2+1\begin{gathered}(x-2)^2\\(x-2)^2+1\end{gathered}

The solid curve touches zero; the dashed curve stays strictly positive.

End behaviorExpression
lim⁡x→±∞f(x)={+∞a>0−∞a<0\lim_{x\to\pm\infty}f(x)=\begin{cases}+\infty&a>0\\-\infty&a<0\end{cases}
What it tells usBoth ends point in the same direction because the squared term dominates for large positive or negative inputs.Visual intuition

a>0: ↖ ↗a<0: ↙ ↘\begin{gathered}a>0:\ \nwarrow\ \nearrow\\a<0:\ \swarrow\ \searrow\end{gathered}

Both ends rise together or fall together.

Try an example

For x2−5x+6=0x^2-5x+6=0, substitute a=1, b=−5, c=6a=1,\ b=-5,\ c=6 into the formula.

x=5±25−242=5±12⟹x=2 or x=3x=\frac{5\pm\sqrt{25-24}}{2}=\frac{5\pm1}{2}\quad\Longrightarrow\quad x=2\ \text{or}\ x=3

Check by factoring: (x−2)(x−3)=0(x-2)(x-3)=0 gives the same roots.