← mapAlgebra Core

Quadratic Equations

⚗ Dr. Möbius, from the lab

Here is the quadratic formula. You've seen it. You've probably memorized it without knowing where the hell it comes from. That ends today. We are going to DERIVE this formula from scratch — by completing the square — and you are going to understand why every single symbol is there. A formula without provenance is just a superstition.

THE BIG IDEA

Every quadratic equation can be solved by completing the square; the quadratic formula is this process done once, in general, for all time.

The square-root method

The simplest quadratic: (xh)2=k(x - h)^2 = k. If k0k \ge 0: xh=±k    x=h±k.x - h = \pm\sqrt{k} \implies x = h \pm \sqrt{k}.

Two solutions (or one if k=0k = 0, or none if k<0k < 0). Example: (x3)2=16    x3=±4    x=7(x-3)^2 = 16 \implies x-3 = \pm 4 \implies x = 7 or x=1x = -1.

Completing the square: the geometric picture

To solve x2+6x+5=0x^2 + 6x + 5 = 0, move the constant: x2+6x=5x^2 + 6x = -5.

The left side is "almost" a perfect square. Geometrically: imagine a square of side xx plus two rectangles of dimensions x×3x \times 3 (half of 6) attached to its right and bottom. To complete the square, you need the small 3×33 \times 3 corner piece:

x2+6x+9=5+9    (x+3)2=4.x^2 + 6x + 9 = -5 + 9 \implies (x+3)^2 = 4.

We added (62)2=9\left(\frac{6}{2}\right)^2 = 9 to both sides. Then: x+3=±2    x=1 or x=5.x+3 = \pm 2 \implies x = -1 \text{ or } x = -5.

The key insight: you added the same number to both sides, which is legal; you chose WHICH number to add so that the left side became a perfect square. This is not magic. It is the most elegant use of the balance-beam principle in all of elementary algebra.

Deriving the quadratic formula

This is the main event. We solve the general equation ax2+bx+c=0ax^2 + bx + c = 0 with a0a \ne 0 by completing the square. Every step must be justified.

Step 1. Divide by aa (legal since a0a \ne 0): x2+bax+ca=0.x^2 + \frac{b}{a}x + \frac{c}{a} = 0.

Step 2. Move the constant: x2+bax=ca.x^2 + \frac{b}{a}x = -\frac{c}{a}.

Step 3. Add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides: x2+bax+b24a2=ca+b24a2.x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = -\frac{c}{a} + \frac{b^2}{4a^2}.

Step 4. The left side is now a perfect square: (x+b2a)2=b24a2ca=b24ac4a2.\left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a} = \frac{b^2 - 4ac}{4a^2}.

Step 5. Apply the square-root method: x+b2a=±b24ac2a.x + \frac{b}{2a} = \pm \frac{\sqrt{b^2 - 4ac}}{2|a|}.

Since 2a=2a2|a| = 2a when a>0a > 0 and 2a=2a2|a| = -2a when a<0a < 0, and the ±\pm absorbs the sign, we write: x+b2a=±b24ac2a.x + \frac{b}{2a} = \pm \frac{\sqrt{b^2 - 4ac}}{2a}.

Step 6. Subtract b2a\frac{b}{2a}: x=b±b24ac2a.\boxed{x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.}

This is the quadratic formula. It was not handed down from the sky; it is completing the square, done once for all quadratics.

The discriminant

The expression Δ=b24ac\Delta = b^2 - 4ac is the discriminant. It lives under the square root and determines the character of the solutions:

  • Δ>0\Delta > 0: two distinct real roots.
  • Δ=0\Delta = 0: exactly one real root (the vertex touches the xx-axis).
  • Δ<0\Delta < 0: no real roots. The square root of a negative number is not real. (The solutions exist as complex numbers — but that is a story for another stratum.)
parabola lab — y = ax² + bx + c
vertex (0, -4)b²−4ac = 16roots -2, 2

Drag the sliders for aa, bb, cc and watch the discriminant live — when the parabola dips below the xx-axis, the discriminant turns negative. The discriminant is the algebraic detector for what you see geometrically.

When to use which method

  • Factoring: use it when the polynomial factors nicely (integer or simple rational roots). Check with the discriminant: Δ\Delta is a perfect square iff factoring over Z\mathbb{Z} is possible.
  • Completing the square: use it when you want vertex form, or when understanding is required over speed.
  • Quadratic formula: use it when factoring is ugly or you need exact irrational roots.

The formula always works. Factoring is faster when it works.

🔬 SPECIMENS (worked examples)

Worked example 1 — completing the square

Solve x2+4x1=0x^2 + 4x - 1 = 0 by completing the square.

Move the constant: x2+4x=1x^2 + 4x = 1.

Add (42)2=4\left(\frac{4}{2}\right)^2 = 4 to both sides: x2+4x+4=5x^2 + 4x + 4 = 5.

Factor the left: (x+2)2=5(x+2)^2 = 5.

Square root: x+2=±5x + 2 = \pm\sqrt{5}.

Solution: x=2±5x = -2 \pm \sqrt{5}.

Check x=2+5x = -2 + \sqrt{5}: ((2+5)+2)2=(5)2=5=1+4((-2+\sqrt{5})+2)^2 = (\sqrt{5})^2 = 5 = 1 + 4. And (2+5)2+4(2+5)1=(445+5)+(8+45)1=9181+(45+45)=0(-2+\sqrt{5})^2 + 4(-2+\sqrt{5}) - 1 = (4-4\sqrt{5}+5) + (-8+4\sqrt{5}) - 1 = 9-1-8-1+(-4\sqrt{5}+4\sqrt{5}) = 0. Confirmed.

Worked example 2 — the quadratic formula, from scratch

Solve 3x25x2=03x^2 - 5x - 2 = 0 using the quadratic formula.

Identify: a=3a = 3, b=5b = -5, c=2c = -2.

Discriminant: Δ=(5)24(3)(2)=25+24=49>0\Delta = (-5)^2 - 4(3)(-2) = 25 + 24 = 49 > 0. Two real roots (and 4949 is a perfect square — this will also factor).

x=(5)±492(3)=5±76.x = \frac{-(-5) \pm \sqrt{49}}{2(3)} = \frac{5 \pm 7}{6}.

Two roots: x=5+76=126=2x = \frac{5+7}{6} = \frac{12}{6} = 2 and x=576=26=13x = \frac{5-7}{6} = \frac{-2}{6} = -\frac{1}{3}.

Check x=2x = 2: 3(4)5(2)2=12102=03(4) - 5(2) - 2 = 12-10-2 = 0. Yes. Check x=1/3x = -1/3: 3(1/9)5(1/3)2=1/3+5/32=6/32=03(1/9) - 5(-1/3) - 2 = 1/3 + 5/3 - 2 = 6/3 - 2 = 0. Yes. Both confirmed.

Worked example 3 — the discriminant as a predictor

Without solving, determine how many real solutions 5x23x+2=05x^2 - 3x + 2 = 0 has. Then state what this means geometrically.

Identify: a=5a = 5, b=3b = -3, c=2c = 2.

Δ=(3)24(5)(2)=940=31<0\Delta = (-3)^2 - 4(5)(2) = 9 - 40 = -31 < 0.

Conclusion: no real solutions.

Geometric meaning: the parabola y=5x23x+2y = 5x^2 - 3x + 2 opens upward (since a=5>0a = 5 > 0) and its vertex is above the xx-axis — the parabola never touches the xx-axis. The vertex yy-coordinate is cb24a=2920=3120>0c - \frac{b^2}{4a} = 2 - \frac{9}{20} = \frac{31}{20} > 0, confirming it sits entirely above the axis.

Two solutions would have been two xx-intercepts; one solution would be a tangent touch; zero real solutions is the parabola floating above (or below) the axis entirely.

☠ KNOWN HAZARDS

  • Forgetting the ±\pm. (x2)2=9(x-2)^2 = 9 gives x2=3x-2 = 3 AND x2=3x-2 = -3, i.e., x=5x = 5 and x=1x = -1. Writing only the positive root loses half the answer.

  • Completing the square with a1a \ne 1. If the leading coefficient is not 1, divide through first. Completing the square on 3x2+6x3x^2+6x directly and adding (62)2=9(\frac{6}{2})^2=9 to both sides is wrong — you needed to work with x2+2xx^2+2x first.

  • Sign in the formula. The formula has b-b on top, not +b+b. Forgetting the sign on bb is the most common arithmetic error when applying the formula.

  • Declaring Δ<0\Delta < 0 means "no solution". It means no REAL solution. Over the complexes, there are always two solutions (counted with multiplicity). The complex story is real and coming; don't write off the problem entirely.

TL;DR

  • (xh)2=k(x-h)^2 = k gives x=h±kx = h \pm \sqrt{k} directly. This is the base case.

  • Completing the square: add (b2)2\left(\frac{b}{2}\right)^2 to both sides to make a perfect-square trinomial. This is the geometric picture, literally.

  • The quadratic formula x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2-4ac}}{2a} is completing the square done once in full generality.

  • Discriminant Δ=b24ac\Delta = b^2-4ac: positive gives two roots, zero gives one root, negative gives no real roots.

  • Choose your method: factor when Δ\Delta is a perfect square; use the formula otherwise.

unlocks