Topic · Algebra

Quadratic Equations

A quadratic equation is one where the unknown is squared — like $x^2 = 9$, or $2x^2 - 5x + 3 = 0$, or the equation a falling rock satisfies in mid-air. The defining trait is structural: somewhere in the equation sits an $x^2$ term, and no higher power. Graphed, every quadratic traces a parabola — the bowl-shaped curve that shows up wherever something accelerates uniformly, arcs through gravity, or optimizes a quadratic cost. And unlike most equations, they have a closed-form solution — the quadratic formula — derived from a single technique called completing the square.

What you'll leave with

  • What a quadratic equation is and the standard form $ax^2 + bx + c = 0$.
  • Three solution methods: factoring, completing the square, and the quadratic formula.
  • A derivation of the quadratic formula from completing the square — so the formula stops being magic.
  • The discriminant $b^2 - 4ac$ and what its sign tells you about the number of real solutions.
  • The geometric meaning: quadratics are parabolas, and the solutions are where the parabola crosses the x-axis.
  • An interactive playground for tuning $a$, $b$, $c$ and watching the discriminant, roots, and parabola move in lockstep.

1. What a quadratic is

Quadratic equation

An equation that can be written in the form $ax^2 + bx + c = 0$, where $a$, $b$, $c$ are constants and $a \neq 0$. (If $a = 0$, the equation is no longer quadratic — it's linear.) The exponent $2$ is the defining feature; "quadratic" comes from the Latin quadratus, meaning "square."

Three coefficients: $a$ (leading), $b$ (middle), $c$ (constant). Each can be positive, negative, or zero, with the lone constraint that $a \neq 0$. The form is called standard form.

Most quadratic equations have either two real solutions, one real solution, or zero real solutions — never three, never infinitely many. This is true of any polynomial equation of degree $n$: it has at most $n$ real solutions, and exactly $n$ complex solutions counted with multiplicity (the Fundamental Theorem of Algebra).

2. Solving by factoring

If a quadratic factors nicely, the fastest path to the solutions is the zero-product property:

If $A \cdot B = 0$, then $A = 0$ or $B = 0$ (or both).

This property is special to multiplication by zero, and it's what makes factoring useful. If we can rewrite $ax^2 + bx + c$ as a product $(x - r_1)(x - r_2)$ multiplied by some constant, then the equation $= 0$ is satisfied precisely when one of the factors is zero — that is, when $x = r_1$ or $x = r_2$.

Example: solve $x^2 - 5x + 6 = 0$.

Factor: $x^2 - 5x + 6 = (x - 2)(x - 3)$. (Two numbers multiplying to $6$, adding to $-5$: $-2$ and $-3$.)

Apply zero product property: $(x - 2)(x - 3) = 0 \Rightarrow x - 2 = 0$ or $x - 3 = 0$, so $x = 2$ or $x = 3$.

Both work — substitute back: $4 - 10 + 6 = 0$ ✓ and $9 - 15 + 6 = 0$ ✓.

Not every quadratic factors over the integers

$x^2 - 2 = 0$ has solutions $x = \pm\sqrt{2}$ — irrational, not integer. Factoring won't find them by inspection. When factoring fails, switch to completing the square or the quadratic formula.

3. Completing the square

The technique that works even when factoring doesn't — and the engine behind the quadratic formula. The idea: rewrite the quadratic as a perfect square plus a constant, then isolate the square and take the square root.

Solve $x^2 + 6x - 7 = 0$:

Step 1. Move the constant to the other side:

$$ x^2 + 6x = 7. $$

Step 2. Take half the middle coefficient ($\tfrac{6}{2} = 3$), square it ($9$), and add to both sides:

$$ x^2 + 6x + 9 = 7 + 9 = 16. $$

Step 3. The left side is now a perfect square trinomial:

$$ (x + 3)^2 = 16. $$

Step 4. Take the square root of both sides — remembering both signs:

$$ x + 3 = \pm 4. $$

Step 5. Solve for $x$:

$$ x = -3 + 4 = 1 \quad \text{or} \quad x = -3 - 4 = -7. $$

The trick is in step 2: completing the square literally means turning a partial $x^2 + bx$ into a complete perfect-square trinomial by adding the right constant. The constant is $\left(\tfrac{b}{2}\right)^2$.

Why "half, then square"

A perfect-square trinomial has the form $(x + k)^2 = x^2 + 2kx + k^2$. If you want $x^2 + bx$ to fit this template, the middle term forces $2k = b$, so $k = \tfrac{b}{2}$, and the constant you need to add is $k^2 = \left(\tfrac{b}{2}\right)^2$. Half the coefficient, then square.

4. The quadratic formula

Apply completing the square to the general quadratic $ax^2 + bx + c = 0$ — once — and you get a formula that solves any quadratic at all.

Starting from $ax^2 + bx + c = 0$:

Divide everything by $a$:

$$ x^2 + \frac{b}{a}x + \frac{c}{a} = 0. $$

Move the constant:

$$ x^2 + \frac{b}{a}x = -\frac{c}{a}. $$

Complete the square. Half of $\tfrac{b}{a}$ is $\tfrac{b}{2a}$; its square is $\tfrac{b^2}{4a^2}$. Add to both sides:

$$ x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = -\frac{c}{a} + \frac{b^2}{4a^2}. $$

The left side is now $\left(x + \tfrac{b}{2a}\right)^2$. The right side simplifies to $\tfrac{b^2 - 4ac}{4a^2}$:

$$ \left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}. $$

Take the square root:

$$ x + \frac{b}{2a} = \pm \frac{\sqrt{b^2 - 4ac}}{2a}. $$

Solve for $x$:

$$ \boxed{x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}. $$

That's the quadratic formula. Memorize it, but more importantly remember it came out of completing the square — so if you ever forget the formula, you can rederive it in a minute.

5. The discriminant

The expression under the square root, $b^2 - 4ac$, is called the discriminant. Its sign tells you what kind of solutions the equation has, without your ever computing them:

Discriminant $b^2 - 4ac$Number of real solutionsWhat the graph does
Positive ($> 0$)Two distinct real solutionsParabola crosses the x-axis at two points.
Zero ($= 0$)One real solution (a "double root")Parabola just touches the x-axis once at its vertex.
Negative ($< 0$)No real solutions (two complex)Parabola never crosses the x-axis.

The discriminant lets you preview the answer. If a textbook problem yields a negative discriminant, either the problem expects complex solutions or you've made an arithmetic mistake.

6. Playground: tune $ax^2 + bx + c$

Drag the three sliders. The equation, the discriminant, the roots, and the parabola all update together. Try sliding $a$ through zero, watch the curve flatten into a line; flip $a$ negative to invert the parabola; pull $c$ up or down to shift the graph vertically and watch the roots appear or vanish as the discriminant changes sign.

y = 1.0x² + (-2.0)x + (-3.0)
D = b² − 4ac = 16.00 roots: x = 3.00, −1.00
Two real roots
a is near zero — the curve is effectively linear; treating a as 0.01 to keep it quadratic.
1.0
-2.0
-3.0
x y
Try it

Start at the defaults and slowly raise $c$ from $-3$ toward $+2$. Watch the parabola climb. The two root markers slide toward each other, meet on the vertex when $D = 0$, then vanish as $D$ goes negative — and the "Two real roots" label cycles through "One" and "None" in lockstep. That is the discriminant doing its job, geometrically.

7. The graph: parabolas

The graph of $y = ax^2 + bx + c$ is a parabola. The solutions of the equation $ax^2 + bx + c = 0$ are the x-coordinates where the parabola crosses the x-axis — its roots or zeros.

D > 0: two roots D = 0: one root D < 0: no real roots

Key features of $y = ax^2 + bx + c$:

  • If $a > 0$, the parabola opens upward (a "smile"); if $a < 0$, it opens downward (a "frown"). The magnitude of $a$ controls how narrow or wide it is.
  • The vertex — the lowest or highest point — sits at $x = -\tfrac{b}{2a}$. This is the symmetry axis of the parabola.
  • The y-intercept is $c$ (set $x = 0$).
  • The x-intercepts (if they exist) are the solutions of $ax^2 + bx + c = 0$ — the quadratic formula's two answers.

Vertex form and the axis of symmetry

Standard form $y = ax^2 + bx + c$ tells you the coefficients at a glance. Vertex form tells you where the parabola sits:

$$ y = a(x - h)^2 + k, $$

where $(h, k)$ is the vertex and the line $x = h$ is the parabola's axis of symmetry — a vertical mirror through which the left and right halves are reflections. Completing the square on standard form converts it to vertex form; matching the result gives the bridge formulas:

$$ h = -\frac{b}{2a}, \qquad k = c - \frac{b^2}{4a}. $$

So the vertex's x-coordinate is always $-\tfrac{b}{2a}$, and its y-coordinate is what you get when you plug that $x$ back into the equation. The roots — when they exist — are symmetric about $x = h$.

Quadratics in the wild: projectile motion

Throw a ball straight up with initial velocity $v_0$ from initial height $h_0$. Under constant gravity $g$, its height $t$ seconds later is

$$ h(t) = -\tfrac{1}{2} g t^2 + v_0 t + h_0. $$

That is a quadratic in $t$ with $a = -\tfrac{1}{2}g$ (negative, so the parabola opens downward — gravity pulls the curve back down). Two natural questions both reduce to a quadratic:

  • When does it hit the ground? Solve $h(t) = 0$ — the positive root is the landing time.
  • How high does it go? Evaluate $h$ at the vertex $t = -\tfrac{v_0}{2 \cdot (-g/2)} = \tfrac{v_0}{g}$. The peak is the vertex's $k$-value.

The discriminant has a physical reading too: $D < 0$ would mean the ball never reaches a given target height. Quadratics aren't just abstract algebra — they are the natural language of anything under uniform acceleration.

8. Common pitfalls

Losing one of the two solutions

Quadratics typically have two solutions. Taking a square root introduces the $\pm$ — both must be kept until you check which fit the context. $(x - 3)^2 = 25$ implies $x - 3 = \pm 5$, so $x = 8$ or $x = -2$. Solving for only one is the single most common quadratic mistake.

Sign errors in the quadratic formula

$b$ in the formula is the actual coefficient, sign included. In $x^2 - 5x + 6$, $b = -5$, not $5$. So $-b = +5$ goes on top. This is one place where parenthesizing the substitution helps: $-(-5) = +5$.

Forgetting to bring the equation to standard form first

$x^2 = 4x + 5$ isn't ready for the quadratic formula. Subtract everything to one side: $x^2 - 4x - 5 = 0$. Now $a = 1$, $b = -4$, $c = -5$ — and the formula gives $x = 5$ or $x = -1$.

Misreading the discriminant

$b^2 - 4ac$ is one expression. People sometimes compute "$b^2 - 4$ then divide by $ac$." Watch the grouping. The standard parsing matches the formula: square $b$, then subtract $4$ times $a$ times $c$.

9. Worked examples

Example 1 · Solve $x^2 - 7x + 12 = 0$ by factoring

Two numbers multiplying to $12$ and adding to $-7$: $-3$ and $-4$.

$$ x^2 - 7x + 12 = (x - 3)(x - 4) = 0. $$

By the zero-product property: $x = 3$ or $x = 4$.

Example 2 · Solve $x^2 + 4x - 5 = 0$ by completing the square

Move the constant: $x^2 + 4x = 5$. Half of $4$ squared is $4$; add to both sides:

$$ x^2 + 4x + 4 = 9, $$ $$ (x + 2)^2 = 9, $$ $$ x + 2 = \pm 3, $$ $$ x = 1 \text{ or } x = -5. $$
Example 3 · Solve $2x^2 + 5x - 3 = 0$ using the quadratic formula

$a = 2$, $b = 5$, $c = -3$. Discriminant: $b^2 - 4ac = 25 + 24 = 49$.

$$ x = \frac{-5 \pm \sqrt{49}}{4} = \frac{-5 \pm 7}{4}. $$

Two solutions: $x = \tfrac{2}{4} = \tfrac{1}{2}$ or $x = \tfrac{-12}{4} = -3$.

Example 4 · What does $x^2 + 4x + 5 = 0$ look like?

$a = 1$, $b = 4$, $c = 5$. Discriminant: $16 - 20 = -4 < 0$.

The discriminant is negative, so the equation has no real solutions. The parabola $y = x^2 + 4x + 5$ never crosses the x-axis.

(Its lowest point is at $x = -2$, where $y = 4 - 8 + 5 = 1$ — a minimum value of $1$, above the axis.)

Example 5 · Solve $x^2 - 2x = 3$

Bring to standard form: $x^2 - 2x - 3 = 0$.

Factor: need two numbers multiplying to $-3$ and adding to $-2$: $-3$ and $1$.

$$ (x - 3)(x + 1) = 0 \;\Longrightarrow\; x = 3 \text{ or } x = -1. $$

Check: $3^2 - 2 \cdot 3 = 9 - 6 = 3$ ✓; $(-1)^2 - 2 \cdot (-1) = 1 + 2 = 3$ ✓.

Sources & further reading

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 1
0 correct