2.1.17Algebra — Introduction & Intermediate

Quadratic formula — derivation by completing the square

2,387 words11 min readdifficulty · medium6 backlinks

The standard quadratic equation

Why these letters? Convention: aa multiplies the squared term, bb the linear term, cc is the constant. The restriction a0a \neq 0 ensures we actually have an x2x^2 term.

Derivation from first principles

Step 1: Normalize the leading coefficient

Start with: ax2+bx+c=0ax^2 + bx + c = 0

Why this step? Completing the square is easiest when the coefficient of x2x^2 is 1. We divide everything by aa: x2+bax+ca=0x^2 + \frac{b}{a}x + \frac{c}{a} = 0

What did we do? Divided both sides by aa (legal since a0a \neq 0). Now the x2x^2 term has coefficient 1.

Step 2: Isolate the terms with xx

Move the constant to the right: x2+bax=cax^2 + \frac{b}{a}x = -\frac{c}{a}

Why? We need space on the left to add the "completing the square" term.

Step 3: Complete the square

Why this magic number? Because (x+h)2=x2+2hx+h2(x + h)^2 = x^2 + 2hx + h^2. If we want the middle term to be kxkx, we need 2h=k2h = k, so h=k2h = \frac{k}{2}. Then the constant term must be h2=(k2)2h^2 = \left(\frac{k}{2}\right)^2.

In our case, k=bak = \frac{b}{a}, so we add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides: x2+bax+(b2a)2=ca+(b2a)2x^2 + \frac{b}{a}x + \left(\frac{b}{2a}\right)^2 = -\frac{c}{a} + \left(\frac{b}{2a}\right)^2

What's happening? Left side is now a perfect square: (x+b2a)2\left(x + \frac{b}{2a}\right)^2.

Step 4: Recognize the perfect square

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

How do we know? Expand (x+b2a)2=x2+2xb2a+(b2a)2=x2+bax+b24a2\left(x + \frac{b}{2a}\right)^2 = x^2 + 2 \cdot x \cdot \frac{b}{2a} + \left(\frac{b}{2a}\right)^2 = x^2 + \frac{b}{a}x + \frac{b^2}{4a^2}. ✓

Step 5: Simplify the right side

Get a common denominator: ca+b24a2=4ac4a2+b24a2=b24ac4a2-\frac{c}{a} + \frac{b^2}{4a^2} = -\frac{4ac}{4a^2} + \frac{b^2}{4a^2} = \frac{b^2 - 4ac}{4a^2}

Why combine? So we can take the square root cleanly.

Now we have: (x+b2a)2=b24ac4a2\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}

Step 6: Take square roots

x+b2a=±b24ac4a2x + \frac{b}{2a} = \pm\sqrt{\frac{b^2 - 4ac}{4a^2}}

Why ±\pm? Because if y2=ky^2 = k, then y=±ky = \pm\sqrt{k} (two solutions).

Simplify the square root: b24ac4a2=b24ac4a2=b24ac2a\sqrt{\frac{b^2 - 4ac}{4a^2}} = \frac{\sqrt{b^2 - 4ac}}{\sqrt{4a^2}} = \frac{\sqrt{b^2 - 4ac}}{2|a|}

Since we typically write the formula with 2a2a (not 2a2|a|), and the ±\pm covers both signs: x+b2a=±b24ac2ax + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}

Step 7: Solve for xx

x=b2a±b24ac2ax = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}

Combine the fractions:

What does this mean? For any quadratic ax2+bx+c=0ax^2 + bx + c = 0, plug in a,b,ca, b, c, and you get the two solutions (or one repeated solution if the discriminant is zero).

Figure — Quadratic formula — derivation by completing the square

The discriminant

Why? The discriminant is inside the square root. If it's negative, Δ\sqrt{\Delta} isn't real.

Worked examples

Identify coefficients: a=1a = 1, b=5b = -5, c=6c = 6.

Apply formula: x=(5)±(5)24(1)(6)2(1)x = \frac{-(-5) \pm \sqrt{(-5)^2 - 4(1)(6)}}{2(1)}

Why this step? Substitute directly into the quadratic formula.

x=5±25242=5±12=5±12x = \frac{5 \pm \sqrt{25 - 24}}{2} = \frac{5 \pm \sqrt{1}}{2} = \frac{5 \pm 1}{2}

Evaluate both solutions: x=5+12=3orx=512=2x = \frac{5 + 1}{2} = 3 \quad \text{or} \quad x = \frac{5 - 1}{2} = 2

Check: (3)25(3)+6=915+6=0(3)^2 - 5(3) + 6 = 9 - 15 + 6 = 0 ✓, and (2)25(2)+6=410+6=0(2)^2 - 5(2) + 6 = 4 - 10 + 6 = 0

Coefficients: a=1a = 1, b=6b = -6, c=9c = 9.

Discriminant: Δ=(6)24(1)(9)=3636=0\Delta = (-6)^2 - 4(1)(9) = 36 - 36 = 0.

Why check discriminant? Δ=0\Delta = 0 tells us there's exactly one solution (a repeated root).

Apply formula: x=(6)±02(1)=6±02=3x = \frac{-(-6) \pm \sqrt{0}}{2(1)} = \frac{6 \pm 0}{2} = 3

Notice: This is (x3)2=0(x - 3)^2 = 0, which factors perfectly.

Coefficients: a=2a = 2, b=7b = 7, c=4c = -4.

Apply formula: x=7±724(2)(4)2(2)x = \frac{-7 \pm \sqrt{7^2 - 4(2)(-4)}}{2(2)}

Why this step? Carefully handle the negative cc and the 2a2a in the denominator.

x=7±49+324=7±814=7±94x = \frac{-7 \pm \sqrt{49 + 32}}{4} = \frac{-7 \pm \sqrt{81}}{4} = \frac{-7 \pm 9}{4}

Two solutions: x=7+94=24=12orx=794=164=4x = \frac{-7 + 9}{4} = \frac{2}{4} = \frac{1}{2} \quad \text{or} \quad x = \frac{-7 - 9}{4} = \frac{-16}{4} = -4

Check: 2(12)2+7(12)4=12+724=44=02\left(\frac{1}{2}\right)^2 + 7\left(\frac{1}{2}\right) - 4 = \frac{1}{2} + \frac{7}{2} - 4 = 4 - 4 = 0

Coefficients: a=1a = 1, b=2b = 2, c=5c = 5.

Discriminant: Δ=224(1)(5)=420=16<0\Delta = 2^2 - 4(1)(5) = 4 - 20 = -16 < 0.

What does this mean? No real solutions. In complex numbers: x=2±162=2±4i2=1±2ix = \frac{-2 \pm \sqrt{-16}}{2} = \frac{-2 \pm 4i}{2} = -1 \pm 2i

Common mistakes

Why it feels right: You see 5-5 and just copy it.

The fix: The formula is b-b, not bb. Here b=5b = -5, so b=(5)=+5-b = -(-5) = +5. Always identify bb first, then negate it.

Why it feels right: The numerator gets all the attention; the denominator is easy to overlook.

The fix: Write the full formula structure first: x=numerator2ax = \frac{\text{numerator}}{2a}. The ENTIRE numerator (including the ±\pm part) is divided by 2a2a, not just part of it.

Why it feels right: "You can't take the square root of a negative number" in real numbers.

The fix: Specify "no real solutions." There ARE solutions in the complex numbers: k=ik\sqrt{-k} = i\sqrt{k}. The quadratic always has two roots (counting multiplicity) in C\mathbb{C}.

Why it feels right: Forgetting that multiplying by a negative cc introduces a sign change.

The fix: 4ac=42(4)=8(4)=+32-4ac = -4 \cdot 2 \cdot (-4) = -8 \cdot (-4) = +32. Always compute 4ac4ac first, then subtract it: 49(32)=49+32=8149 - (-32) = 49 + 32 = 81.

Connections

Or visually: the formula is a fraction with 2a2a on bottom, and on top you have "opposite of bb" plus/minus a square root containing "bb squared minus four-aa-cc."

Recall Explain to a 12-year-old

Imagine you have a mystery number xx, and someone tells you: "If you square it, multiply it by something, add another multiple of it, and add a constant, you get zero." That sounds complicated! But here's the magic trick:

We reshape the equation by completing the square—it's like rearranging puzzle pieces so they fit into a perfect square shape, like (x+something)2(x + \text{something})^2. Once we have that, we can "undo" the square by taking a square root, which is way easier than trying to guess xx.

The quadratic formula is the final answer to this puzzle. You just plug in three numbers (aa, bb, cc) from your equation, and it spits out the mystery number xx. Sometimes you get two answers (the parabola crosses the xx-axis twice), sometimes one (it just touches), and sometimes none in regular numbers (it never crosses, but you can use imaginary numbers).

The coolest part? This formula works for any quadratic, no matter how messy the numbers are!


#flashcards/maths

What is the quadratic formula?
x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} for equation ax2+bx+c=0ax^2 + bx + c = 0.
Why do we divide by aa in the first step of completing the square?
To make the coefficient of x2x^2 equal to 1, which simplifies the completing-the-square process.
What number do we add to both sides to complete the square for x2+kxx^2 + kx?
(k2)2\left(\frac{k}{2}\right)^2, because (x+k2)2=x2+kx+(k2)2(x + \frac{k}{2})^2 = x^2 + kx + (\frac{k}{2})^2.
What is the discriminant of a quadratic equation?
Δ=b24ac\Delta = b^2 - 4ac; it determines the nature of the roots.
If Δ>0\Delta > 0, what does that tell us about the roots?
Two distinct real roots (the parabola crosses the xx-axis at two points).
If Δ=0\Delta = 0, what does that tell us about the roots?
Exactly one repeated real root (the parabola touches the xx-axis at one point—the vertex).
If Δ<0\Delta < 0, what does that tell us about the roots?
No real roots; two complex conjugate roots (the parabola doesn't cross the xx-axis).
In the quadratic formula, why is there a ±\pm sign?
Because taking the square root of both sides gives two possible values: ++\sqrt{\ldots} and -\sqrt{\ldots}.
What must be true about aa in ax2+bx+c=0ax^2 + bx + c = 0?
a0a \neq 0; otherwise it's not a quadratic equation (it would be linear or constant).
If b=5b = -5 in x25x+6=0x^2 - 5x + 6 = 0, what is b-b in the quadratic formula?
b=(5)=+5-b = -(-5) = +5. Always negate bb itself, not the visible sign.

Concept Map

divide by a

move constant

add half-k squared

perfect square form

equals

common denominator

take square root with +/-

isolate x

appears in

allows dividing

Quadratic ax2+bx+c=0

x2 + b/a x + c/a = 0

x2 + b/a x = -c/a

Complete the square

add b/2a squared both sides

x + b/2a squared

b2-4ac over 4a2

x + b/2a = +/- sqrt term

Quadratic formula

Discriminant b2-4ac

a not 0 required

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho beta, yahan pe core idea ye hai ki jab humein ax2+bx+c=0ax^2 + bx + c = 0 jaise quadratic equation solve karni ho, to problem ye hoti hai ki xx do jagah aata hai — ek baar squared aur ek baar linear form mein. Isko seedha solve karna mushkil hai. To hum ek smart trick use karte hain jise completing the square kehte hain. Iska matlab hai ki hum left side ko ek perfect square, matlab (x+kuch)2(x + \text{kuch})^2 ke form mein badal dete hain. Ek baar perfect square ban gaya, to hum dono taraf square root le sakte hain aur xx ko aaram se alag kar sakte hain. Bilkul jaise ek uljhi hui knot ko suljhaana — usko ek simple loop mein reshape kar do.

Ab step-by-step derivation ka intuition ye hai: pehle hum poori equation ko aa se divide karte hain taaki x2x^2 ka coefficient 1 ban jaaye (kyunki square banana tab easy hota hai). Phir constant ko right side bhej dete hain. Uske baad wo magic number (b2a)2\left(\frac{b}{2a}\right)^2 dono taraf add karte hain — ye number randomly nahi aata, ye isliye aata hai kyunki (x+h)2=x2+2hx+h2(x+h)^2 = x^2 + 2hx + h^2, aur middle term match karane ke liye h=b2ah = \frac{b}{2a} lena padta hai. Bas isi se pura left side perfect square ban jaata hai, aur square root lekar humein wo famous quadratic formula mil jaati hai: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Ye important isliye hai kyunki ek baar formula yaad ho gaya, to tumhe kisi bhi quadratic equation ke liye completing the square baar-baar karne ki zaroorat nahi — sirf a,b,ca, b, c plug karo aur answer aa jaayega. Aur us formula ke andar jo b24acb^2 - 4ac term hai, use discriminant kehte hain — ye batata hai ki roots real honge, repeated honge ya complex. Exam mein ye directly kaam aata hai, aur samajhne ke baad tumhe rote yaad karne ki tension bhi nahi rahegi, kyunki tumhe pata hoga ye formula kahaan se aayi.

Go deeper — visual, from zero

Test yourself — Algebra — Introduction & Intermediate

Connections