| Primary source | OpenStax College Algebra 2e, Section 2.5: "Quadratic Equations" |
| Direct link | https://openstax.org/books/college-algebra-2e/pages/2-5-quadratic-equations |
| Supplementary | OpenStax Algebra and Trigonometry 2e, Section 2.5: "Quadratic Equations" |
| Supplementary link | https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-5-quadratic-equations |
Both sources are free and openly licensed. College Algebra 2e Section 2.5 begins on page 179 of the PDF.
The quadratic formula is not a memorization exercise. It is completing the square, done once in general.
Every quadratic equation $ax^2 + bx + c = 0$ can be solved by completing the square: rewrite the left side as a perfect square plus a constant, then isolate $x$. The process always works. It is just arithmetic and algebra.
The quadratic formula IS that process, carried out symbolically for arbitrary $a$, $b$, and $c$. Once someone has done that work (the derivation you will see in Section 4), the result is a single compact formula you can use forever without repeating the derivation. The formula is not separate knowledge -- it is summarized understanding.
This means: if you understand completing the square, you understand the formula. You are not memorizing a mystery; you are using a shortcut whose origin you know.
Before this lesson, make sure you can do all of the following:
If any of these is shaky, review Factoring Techniques and Linear Equations first.
Standard form. A quadratic equation in one variable has the form \[ ax^2 + bx + c = 0 \quad \text{where } a \neq 0. \]
Three solution methods.
| Method | Use when... | Outcome |
|---|---|---|
| Factoring | The quadratic factors over the integers (use for speed) | Exact solutions; fast |
| Completing the square | You need to derive the formula or understand the geometry | Always works; reveals structure |
| Quadratic formula | Factoring does not work or is not obvious | Always works; compact |
Quadratic formula. \[ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
Discriminant. The expression $\Delta = b^2 - 4ac$ controls the number of real solutions:
A quadratic equation is a polynomial equation of degree exactly 2 in one variable. After collecting all terms on one side, it can always be written as $ax^2 + bx + c = 0$ with $a \neq 0$.
| Equation | Quadratic? | Reason |
|---|---|---|
| $x^2 - 5x + 6 = 0$ | Yes | Degree 2, one variable |
| $3x^2 = 12$ | Yes | Equivalent to $3x^2 - 12 = 0$; degree 2 |
| $2x + 7 = 0$ | No | Degree 1 (linear) |
| $x^3 + x^2 = 0$ | No | Degree 3 (cubic) |
| $x^2 - 4 = 0$ | Yes | Missing middle term; $b = 0$ is allowed |
The degree of the equation is the highest power of $x$ that appears after simplification. Degree 1 is linear (one solution). Degree 2 is quadratic (zero, one, or two real solutions).
If you can factor the quadratic, factoring is the fastest method.
The Zero Product Property. If $A \cdot B = 0$, then $A = 0$ or $B = 0$ (or both).
This works because zero is the only number with the property that its product with anything is zero. If neither $A$ nor $B$ is zero, their product cannot be zero.
The method:
Example 1. Solve $x^2 - 7x + 10 = 0$.
Factor: need $p + q = -7$, $pq = 10$. Try $-2$ and $-5$: correct. \[ (x - 2)(x - 5) = 0 \] Set each factor to zero: \[ x - 2 = 0 \implies x = 2 \qquad x - 5 = 0 \implies x = 5 \]
Check: $2^2 - 7(2) + 10 = 4 - 14 + 10 = 0$. $5^2 - 7(5) + 10 = 25 - 35 + 10 = 0$. Both correct.
Example 2. Solve $6x^2 + x - 2 = 0$.
This has leading coefficient $6 \neq 1$. Use the AC method: $ac = 6(-2) = -12$. Need $mn = -12$, $m + n = 1$. Try $4$ and $-3$: $4(-3) = -12$, $4 + (-3) = 1$. Rewrite: \[ 6x^2 + 4x - 3x - 2 = (2x)(3x + 2) - 1(3x + 2) = (3x + 2)(2x - 1) \] Set each factor to zero: \[ x = -\tfrac{2}{3} \qquad x = \tfrac{1}{2} \]
Check: $6\left(\frac{1}{4}\right) + \frac{1}{2} - 2 = \frac{3}{2} + \frac{1}{2} - 2 = 0$. Correct.
Important: Move everything to one side first. Students sometimes factor $x^2 - 7x = -10$ as $x(x - 7) = -10$ and then write $x = -10$ or $x - 7 = -10$. This is wrong. The Zero Product Property requires the product to equal ZERO. Until both terms are on the same side, the property does not apply.
Example 3. Solve $x(x - 4) = 12$.
Wrong approach: write $x = 12$ or $x - 4 = 12$. The product is $12$, not $0$.
Correct approach: Expand, then move everything to one side. \[ x^2 - 4x = 12 \] \[ x^2 - 4x - 12 = 0 \] \[ (x - 6)(x + 2) = 0 \] \[ x = 6 \quad \text{or} \quad x = -2 \]
Check: $6(6-4) = 6 \cdot 2 = 12$. $(-2)(-2-4) = (-2)(-6) = 12$. Both correct.
Completing the square works for any quadratic, even those that do not factor over the integers. It also reveals the geometric meaning of the quadratic: the vertex of the corresponding parabola.
The core idea. A perfect square trinomial $x^2 + 2kx + k^2$ equals $(x + k)^2$. If you add $k^2$ to the first two terms, you complete the square.
The method (when $a = 1$):
Example 4. Solve $x^2 + 6x - 7 = 0$ by completing the square.
Step 1. Move constant: $x^2 + 6x = 7$.
Step 2. Half of 6 is 3; $3^2 = 9$.
Step 3. Add 9 to both sides: $x^2 + 6x + 9 = 16$.
Step 4. Factor the left side: $(x + 3)^2 = 16$.
Step 5. Take square roots: $x + 3 = \pm 4$.
\[ x = -3 + 4 = 1 \qquad \text{or} \qquad x = -3 - 4 = -7 \]
Check: $1^2 + 6(1) - 7 = 0$. $(-7)^2 + 6(-7) - 7 = 49 - 42 - 7 = 0$. Both correct.
Example 5. Solve $x^2 - 4x + 7 = 0$ by completing the square.
Step 1. $x^2 - 4x = -7$.
Step 2. Half of $-4$ is $-2$; $(-2)^2 = 4$.
Step 3. $x^2 - 4x + 4 = -3$.
Step 4. $(x - 2)^2 = -3$.
Step 5. $x - 2 = \pm\sqrt{-3}$.
Since $\sqrt{-3}$ is not a real number, this equation has no real solutions.
The discriminant appears here. Notice that we ended up with a negative number under the square root. Before you complete the square, you can predict this using $\Delta = b^2 - 4ac = 16 - 28 = -12 < 0$. Negative discriminant means no real solutions.
When $a \neq 1$: Divide every term by $a$ first, then complete the square.
Example 6. Solve $2x^2 + 12x + 10 = 0$.
Divide by 2: $x^2 + 6x + 5 = 0$.
Now factor: $(x+1)(x+5) = 0$, so $x = -1$ or $x = -5$.
(Completing the square would also work: move 5, halve 6 to get 3, add 9 to both sides, etc. Here factoring is faster once the leading coefficient is removed.)
Common Error -- Adding to Only One Side. When you "add $k^2$ to complete the square," you must add it to BOTH sides. Students who write $x^2 + 6x + 9 = 7$ (without adding 9 to the right) have not preserved equality.
Apply completing the square to the general equation $ax^2 + bx + c = 0$ with $a \neq 0$:
\[ ax^2 + bx + c = 0 \]
Divide by $a$:
\[ x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \]
Move the constant to the right:
\[ x^2 + \frac{b}{a}x = -\frac{c}{a} \]
Half of $\dfrac{b}{a}$ is $\dfrac{b}{2a}$; its square is $\dfrac{b^2}{4a^2}$. Add to both sides:
\[ x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = \frac{b^2}{4a^2} - \frac{c}{a} \]
Left side is a perfect square. Right side: combine using common denominator $4a^2$:
\[ \left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2} \]
Take square roots:
\[ x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a} \]
Subtract $\dfrac{b}{2a}$:
\[ \boxed{x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}} \]
This is the quadratic formula. It is exact, complete, and works for every quadratic. The derivation above is worth reading once in full so the formula never feels arbitrary.
Using the formula.
Example 7. Solve $3x^2 - 2x - 8 = 0$.
Identify: $a = 3$, $b = -2$, $c = -8$.
Compute the discriminant: $\Delta = (-2)^2 - 4(3)(-8) = 4 + 96 = 100$.
Since $\Delta > 0$, there are two real solutions.
\[ x = \frac{-(-2) \pm \sqrt{100}}{2(3)} = \frac{2 \pm 10}{6} \]
\[ x = \frac{12}{6} = 2 \qquad \text{or} \qquad x = \frac{-8}{6} = -\frac{4}{3} \]
Check: $3(4) - 2(2) - 8 = 12 - 4 - 8 = 0$. $3\left(\frac{16}{9}\right) - 2\left(-\frac{4}{3}\right) - 8 = \frac{16}{3} + \frac{8}{3} - 8 = 8 - 8 = 0$. Both correct.
Example 8. Solve $x^2 - 6x + 9 = 0$.
$a = 1$, $b = -6$, $c = 9$.
$\Delta = 36 - 36 = 0$.
\[ x = \frac{6 \pm 0}{2} = 3 \]
There is exactly one solution: $x = 3$ (a repeated root). Indeed $x^2 - 6x + 9 = (x-3)^2$, which confirms this: the square is zero only when $x = 3$.
Common Error -- Sign of $b$. The formula begins $-b$, not $b$. If $b = -2$, then $-b = 2$. Students who write $-(-2) = -2$ introduce a sign error. Write out $-b$ explicitly before substituting.
The discriminant $\Delta = b^2 - 4ac$ is a number you can compute instantly from the coefficients. Its sign tells you everything about the real solutions.
| $\Delta$ | Solutions | What this means geometrically |
|---|---|---|
| $\Delta > 0$ | Two distinct real solutions | The parabola crosses the $x$-axis at two points |
| $\Delta = 0$ | One repeated real solution | The parabola is tangent to the $x$-axis at one point |
| $\Delta < 0$ | No real solutions | The parabola does not cross the $x$-axis |
Example 9. Without solving, determine how many real solutions $5x^2 - 3x + 4 = 0$ has.
$\Delta = (-3)^2 - 4(5)(4) = 9 - 80 = -71 < 0$.
No real solutions.
Example 10. Without solving, determine how many real solutions $4x^2 - 12x + 9 = 0$ has.
$\Delta = (-12)^2 - 4(4)(9) = 144 - 144 = 0$.
Exactly one (repeated) real solution.
Why is the discriminant useful? Computing $\Delta$ takes three arithmetic operations. If $\Delta < 0$, you can stop: the equation has no real solutions. This saves time on exams and prevents students from hunting for real solutions that do not exist.
Use this decision flow:
Example 11. Solve $4x^2 - 36 = 0$.
No middle term. Factor out 4: $x^2 - 9 = 0$. Difference of squares: $(x-3)(x+3) = 0$, so $x = \pm 3$.
Alternatively: $4x^2 = 36 \implies x^2 = 9 \implies x = \pm 3$. Same answer, less work.
Example 12. Solve $x^2 + 2x - 1 = 0$.
Try to factor: need $pq = -1$, $p+q = 2$. Integer pairs of $-1$: $(1,-1)$ with sum $0$. No integer factorization.
Use the formula: $a=1$, $b=2$, $c=-1$. $\Delta = 4 + 4 = 8$. \[ x = \frac{-2 \pm \sqrt{8}}{2} = \frac{-2 \pm 2\sqrt{2}}{2} = -1 \pm \sqrt{2} \]
Many geometric and physical situations lead to quadratic equations.
A four-step word-problem process.
Example 13. A rectangular garden has perimeter 36 meters and area 80 square meters. Find its dimensions.
Let $w$ = width in meters. Since the perimeter is 36, the length is $\dfrac{36 - 2w}{2} = 18 - w$.
The area condition gives: \[ w(18 - w) = 80 \] \[ 18w - w^2 = 80 \] \[ w^2 - 18w + 80 = 0 \] \[ (w - 8)(w - 10) = 0 \] \[ w = 8 \quad \text{or} \quad w = 10 \]
Both are positive, so both are geometrically valid. If $w = 8$, then the length is $18 - 8 = 10$. If $w = 10$, then the length is $8$. These describe the same rectangle (width and length are just labels). The garden is 8 meters by 10 meters.
| Error | Example | Correction |
|---|---|---|
| Applying Zero Product Property when product is not zero | $x(x-4) = 12 \to x=12$ | First move all terms: $x^2 - 4x - 12 = 0$ |
| Adding to only one side when completing the square | $x^2 + 6x + 9 = 7$ | Must add 9 to both sides: $x^2 + 6x + 9 = 16$ |
| Sign error on $-b$ in the formula | $b = -2 \to -b = -2$ | $-b = -(-2) = 2$ |
| Forgetting the $\pm$ | $x = \frac{2 + 10}{6}$ only | Two solutions: $x = \frac{2+10}{6}$ and $x = \frac{2-10}{6}$ |
| Not simplifying the radical | $x = \frac{-2 \pm \sqrt{8}}{2}$ (left unsimplified) | $\sqrt{8} = 2\sqrt{2}$; simplify to $x = -1 \pm \sqrt{2}$ |
| Accepting extraneous roots | Checking skipped after squaring a radical | Always check solutions in the original equation |
Problem 1. Solve by factoring: $x^2 - 3x - 18 = 0$.
Need $p + q = -3$, $pq = -18$. Try $3$ and $-6$: $3 + (-6) = -3$, $3 \cdot (-6) = -18$. $\checkmark$
$(x + 3)(x - 6) = 0$
$x = -3$ or $x = 6$.
Check: $(-3)^2 - 3(-3) - 18 = 9 + 9 - 18 = 0$. $6^2 - 3(6) - 18 = 36 - 18 - 18 = 0$. $\checkmark$
Problem 2. Solve: $4x^2 = 64$.
Divide both sides by 4: $x^2 = 16$.
Take square roots: $x = \pm 4$.
Check: $4(16) = 64$. $\checkmark$ (Both $x = 4$ and $x = -4$ work by symmetry.)
Problem 3. Use the discriminant to determine the number of real solutions of $2x^2 - 3x + 5 = 0$.
$\Delta = (-3)^2 - 4(2)(5) = 9 - 40 = -31$.
$\Delta < 0$: no real solutions.
Problem 4. Solve by completing the square: $x^2 + 10x + 3 = 0$.
Move constant: $x^2 + 10x = -3$.
Half of 10 is 5; $5^2 = 25$. Add 25 to both sides:
$x^2 + 10x + 25 = 22$
$(x + 5)^2 = 22$
$x + 5 = \pm\sqrt{22}$
$x = -5 \pm \sqrt{22}$
Check (for $x = -5 + \sqrt{22}$): $(-5+\sqrt{22})^2 + 10(-5+\sqrt{22}) + 3 = 25 - 10\sqrt{22} + 22 - 50 + 10\sqrt{22} + 3 = 0$. $\checkmark$
Problem 5. Solve using the quadratic formula: $2x^2 + 5x - 12 = 0$.
$a = 2$, $b = 5$, $c = -12$.
$\Delta = 25 + 96 = 121$.
$x = \dfrac{-5 \pm 11}{4}$
$x = \dfrac{6}{4} = \dfrac{3}{2}$ or $x = \dfrac{-16}{4} = -4$.
Check: $2\left(\frac{9}{4}\right) + 5\left(\frac{3}{2}\right) - 12 = \frac{9}{2} + \frac{15}{2} - 12 = 12 - 12 = 0$. $\checkmark$
Problem 6. Solve: $x^2 + 4x + 7 = 0$.
$\Delta = 16 - 28 = -12 < 0$.
No real solutions.
The parabola $y = x^2 + 4x + 7$ lies entirely above the $x$-axis (complete the square to see its vertex is at $(-2, 3)$, which is above zero).
Problem 7. A rectangular deck has area $60$ square feet. One side is 7 feet longer than the other. Find the dimensions.
Let $w$ = shorter side. Then the longer side is $w + 7$.
$w(w + 7) = 60$
$w^2 + 7w - 60 = 0$
$\Delta = 49 + 240 = 289 = 17^2$.
$w = \dfrac{-7 \pm 17}{2}$
$w = 5$ or $w = -12$.
Discard $w = -12$ (negative length). The deck is 5 feet by 12 feet.
Check: $5 \times 12 = 60$. $12 - 5 = 7$. $\checkmark$
Problem 8. For what values of $k$ does $x^2 + kx + 9 = 0$ have exactly one real solution?
Exactly one solution occurs when $\Delta = 0$.
$\Delta = k^2 - 4(1)(9) = k^2 - 36 = 0$
$k^2 = 36$
$k = 6$ or $k = -6$.
Check $k = 6$: $x^2 + 6x + 9 = (x+3)^2 = 0$, so $x = -3$. One solution. $\checkmark$
Check $k = -6$: $x^2 - 6x + 9 = (x-3)^2 = 0$, so $x = 3$. One solution. $\checkmark$
Problem 9. Solve $\sqrt{x + 3} = x - 3$.
Domain: $x + 3 \geq 0$ requires $x \geq -3$; and the right side $x - 3$ must be non-negative, so $x \geq 3$.
Square both sides (valid only for $x \geq 3$):
$x + 3 = (x - 3)^2 = x^2 - 6x + 9$
$x^2 - 7x + 6 = 0$
$(x - 1)(x - 6) = 0$
$x = 1$ or $x = 6$.
Check $x = 1$: Left side $= \sqrt{4} = 2$. Right side $= 1 - 3 = -2$. The square root is never negative, so $x = 1$ is extraneous. Discard.
Check $x = 6$: Left side $= \sqrt{9} = 3$. Right side $= 6 - 3 = 3$. $\checkmark$
The only solution is $x = 6$.
Note: squaring both sides of an equation can introduce extraneous solutions. Always check every candidate in the original equation.
You have mastered this skill when you can do all of the following without referring to notes:
Think of a quadratic equation as a question about the height of a parabola.
The equation $ax^2 + bx + c = 0$ asks: "At what $x$-values does the parabola $y = ax^2 + bx + c$ touch the $x$-axis (where height is zero)?"
The discriminant $\Delta = b^2 - 4ac$ is the number inside the square root in the formula. If that number is negative, you would need to take the square root of a negative number, which has no real value. The parabola does not touch the axis. If it is zero, the $\pm$ adds or subtracts nothing; there is one crossing point. If it is positive, $\pm\sqrt{\Delta}$ gives two different values; two crossing points.
The three methods correspond to three different ways of locating those crossing points:
\[ \lim_{x \to 3} \frac{x^2 - 9}{x - 3} = \lim_{x \to 3} \frac{(x+3)(x-3)}{x-3} = \lim_{x \to 3} (x + 3) = 6. \]
For students who find math intimidating: You only need to memorize two things in this lesson: the quadratic formula, and the fact that you must set the equation equal to zero before factoring. Everything else is a procedure you can re-derive with a few minutes of algebra. Write the formula on a card and use it; the derivation shows you why it works, so you can trust it.
For students interested in proof: The discriminant classifies quadratics over an arbitrary field. Over the real numbers, $\Delta < 0$ means no solution. Over the complex numbers, $\sqrt{\Delta}$ is always defined, so every quadratic has exactly two complex solutions (counted with multiplicity). This is a special case of the Fundamental Theorem of Algebra.
For students interested in careers: Quadratic equations appear in projectile motion (physics), break-even analysis (business), and signal processing (the characteristic equation of a second-order system is quadratic). The quadratic formula is the last closed-form solution formula that exists; degree 5 and above have no general formula, a result proved in the nineteenth century.
For gifted and curious students: Completing the square is not just a solution technique; it is a change of coordinates. Writing $u = x + \frac{b}{2a}$ shifts the parabola so its vertex sits at the origin, where it has the form $au^2 + \text{constant}$. This same idea -- completing the square to "center" a conic -- appears in analytic geometry, multivariable calculus, and the analysis of quadratic forms in linear algebra.
Back to Precalculus Skills | Previous: Factoring Techniques | Next: Solving Inequalities