The quadratic formula solves every quadratic equation \(ax^2 + bx + c = 0\) with \(a \neq 0\): \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\). The expression under the square root, \(b^2 - 4ac\), is the discriminant: if it is positive there are two real solutions, if it is zero there is one, and if it is negative there are none. By the end of this lesson you will be able to put any quadratic into standard form, pick the fastest method (factoring, square roots, completing the square or the formula), simplify radical answers, read the number of roots from the discriminant and the graph, and set up and solve word problems about heights and areas.
What is a quadratic equation in standard form?
The condition \(a \neq 0\) matters: without the \(x^2\) term the equation is linear, not quadratic. The numbers \(b\) and \(c\) may be zero, and every coefficient can be negative or a fraction.
Before you use any formula, move everything to one side so that the other side is \(0\), and read off \(a\), \(b\) and \(c\) together with their signs. For example,
so \(a = 3\), \(b = -5\) and \(c = -2\). Writing \(b = 5\) here is the single most common source of wrong answers.
Why do we care about the right-hand side being zero? Because a product equals zero only when one of its factors is zero, and because the solutions of \(ax^2 + bx + c = 0\) are exactly the x-intercepts of the parabola \(y = ax^2 + bx + c\). Both ideas come back again and again below.
What is the quadratic formula?
Try it on \(3x^2 - 5x - 2 = 0\) from above. First \(b^2 - 4ac = (-5)^2 - 4 \cdot 3 \cdot (-2) = 25 + 24 = 49\), and \(\sqrt{49} = 7\). Then
which gives \(x = \frac{12}{6} = 2\) or \(x = \frac{-2}{6} = -\frac{1}{3}\). Notice two details: \(-b\) is \(+5\) because \(b\) itself is negative, and the fraction bar sits under the whole numerator \(-b \pm \sqrt{\ldots}\), not just under the square root.
Where does the quadratic formula come from?
The formula is nothing more than completing the square done once, in general, so you never have to do it again. Start with \(ax^2 + bx + c = 0\) and divide by \(a\):
Half of the coefficient of \(x\) is \(\frac{b}{2a}\). Add its square to both sides, so that the left side becomes a perfect square:
If \(b^2 - 4ac \geq 0\), take square roots of both sides. The square root of the denominator is \(2|a|\), but the \(\pm\) in front already covers both signs, so we may write \(2a\):
That last step also explains the discriminant: the square of a real number is never negative, so when \(b^2 - 4ac < 0\) the equation \(\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}\) has no real solution at all.
Sum and product of the roots (Vieta's formulas)
Add the two roots from the formula and the square roots cancel; multiply them and you get a difference of squares. The result, known as Vieta's formulas, is
For \(3x^2 - 5x - 2 = 0\): \(2 + \left(-\frac{1}{3}\right) = \frac{5}{3} = -\frac{-5}{3}\) and \(2 \cdot \left(-\frac{1}{3}\right) = -\frac{2}{3} = \frac{-2}{3}\). Both match, which is a quick way to check your answers. Vieta's formulas also let you compute expressions such as \(x_1^2 + x_2^2 = (x_1 + x_2)^2 - 2x_1x_2\) without finding the roots, a favorite exam twist. When \(a = 1\), they say the roots multiply to \(c\) and add up to \(-b\), which is exactly what you look for when you factor.
What does the discriminant tell you?
Because \(D\) sits under the square root, its sign decides everything:
- \(D > 0\): \(\sqrt{D}\) is a positive number, so "plus" and "minus" give two different real roots;
- \(D = 0\): \(\sqrt{D} = 0\), both signs give the same number \(x = -\frac{b}{2a}\), so there is one real root (a repeated or double root);
- \(D < 0\): there is no real square root of a negative number, so there are no real roots.
How the discriminant shows up on the graph
The roots are the x-intercepts of the parabola \(y = ax^2 + bx + c\). So two, one or no real roots means the parabola crosses the x-axis twice, touches it at its vertex, or misses it completely. The figure shows three parabolas that differ only in \(c\), so they are the same curve shifted up.
For \(y = x^2 - 2x - 3\) we get \(D = (-2)^2 - 4 \cdot 1 \cdot (-3) = 16\), and the roots are \(\frac{2 \pm 4}{2}\), that is \(-1\) and \(3\). For \(y = x^2 - 2x + 1 = (x - 1)^2\) we get \(D = 4 - 4 = 0\) and the single root \(1\). For \(y = x^2 - 2x + 3\) we get \(D = 4 - 12 = -8\), and indeed the graph stays above the axis, with its lowest point at height \(2\).
Perfect-square discriminant means the quadratic factors
If \(a\), \(b\) and \(c\) are integers and \(D\) is a perfect square (\(0, 1, 4, 9, 16, \ldots\)), the roots are rational and the quadratic factors over the integers. For \(3x^2 - 5x - 2\), \(D = 49 = 7^2\), and indeed \(3x^2 - 5x - 2 = (3x + 1)(x - 2)\). If \(D\) is positive but not a perfect square, the roots are irrational and you will not find a nice factorization, so go straight to the formula.
What if the discriminant is negative? Complex roots in Algebra 2
In Algebra 1 and on most GCSE papers, \(D < 0\) simply means "no real solutions". In Algebra 2, Precalculus and A-level Further Maths you meet the imaginary unit \(i\) with \(i^2 = -1\), and then the formula still works: \(\sqrt{D} = i\sqrt{-D}\). The two roots are complex conjugates \(p + qi\) and \(p - qi\). Example 12 below shows the calculation.
How do you solve a quadratic equation step by step?
- Expand brackets, clear fractions and move every term to one side to get \(ax^2 + bx + c = 0\).
- If all coefficients share a factor, divide it out; if \(a < 0\), you may multiply by \(-1\).
- Read \(a\), \(b\) and \(c\) with their signs.
- Compute \(D = b^2 - 4ac\). If \(D < 0\), stop: no real solutions.
- Choose a method (see below) and solve.
- Simplify the answer: reduce radicals and fractions.
- Check with Vieta's formulas or by plugging back in, and in word problems reject answers that make no physical sense.
Factor, complete the square or use the formula?
All methods give the same roots, so pick the one that is fastest for the equation in front of you.
- No constant term (\(c = 0\)): factor out \(x\). For \(x^2 + 7x = 0\), \(x(x + 7) = 0\), so \(x = 0\) or \(x = -7\).
- No \(x\) term (\(b = 0\)): isolate \(x^2\) and take both square roots. For \(2x^2 - 18 = 0\), \(x^2 = 9\), so \(x = \pm 3\).
- Small integer coefficients and a perfect-square \(D\): factor. Look for two numbers whose product is \(c\) and whose sum is \(b\) (when \(a = 1\)).
- \(a = 1\) and \(b\) even: completing the square is quick and gives the vertex form for free.
- Anything else (awkward numbers, fractions, decimals, irrational roots): use the quadratic formula. It never fails.
How do you simplify radical answers?
Exact answers are usually expected in simplest radical form. Two moves do the job. First, pull the largest perfect square out of the root: \(\sqrt{72} = \sqrt{36 \cdot 2} = 6\sqrt{2}\), \(\sqrt{48} = 4\sqrt{3}\), \(\sqrt{20} = 2\sqrt{5}\). Second, divide every term of the numerator and the denominator by their common factor.
Take \(x^2 - 6x + 4 = 0\). Here \(D = 36 - 16 = 20\), so
What is vertex form, and why is the vertex at x = −b/(2a)?
Completing the square in general turns standard form into vertex form:
Comparing with \(y = a(x - h)^2 + k\), the vertex is \((h, k)\) with
The vertical line \(x = h\) is the axis of symmetry, and the roots sit symmetrically on either side of it, at \(h \pm \frac{\sqrt{D}}{2a}\). That is just the quadratic formula split into two pieces: \(\frac{-b}{2a}\) is the midpoint and \(\frac{\sqrt{D}}{2a}\) is the half-distance between the roots. It also explains why \(D = 0\) puts the only root exactly at the vertex.
For \(y = x^2 - 6x + 5\): \(h = \frac{6}{2} = 3\), \(k = 9 - 18 + 5 = -4\), so \(y = (x - 3)^2 - 4\). With \(D = 36 - 20 = 16\) the roots are \(3 \pm \frac{4}{2}\), that is \(1\) and \(5\).
A second check with \(a \neq 1\): for \(y = 2x^2 - 8x + 5\), \(h = \frac{8}{4} = 2\) and \(k = 2 \cdot 4 - 16 + 5 = -3\). The shortcut agrees: \(D = 64 - 40 = 24\) and \(-\frac{D}{4a} = -\frac{24}{8} = -3\). The vertex is \((2, -3)\), and the roots are \(2 \pm \frac{\sqrt{24}}{4} = 2 \pm \frac{\sqrt{6}}{2}\).
Worked examples: quadratic equations from easy to exam level
Example 1: Solve by factoring
Solve \(x^2 - 2x - 15 = 0\).
Solution. We need two numbers with product \(-15\) and sum \(-2\): they are \(-5\) and \(3\). So \((x - 5)(x + 3) = 0\), which means \(x - 5 = 0\) or \(x + 3 = 0\). Check with Vieta: \(5 + (-3) = 2 = -b\) and \(5 \cdot (-3) = -15 = c\).
Answer: \(x = 5\) or \(x = -3\).
Example 2: A missing constant term
Solve \(4x^2 = 9x\).
Solution. It is tempting to divide both sides by \(x\), but that throws away the solution \(x = 0\). Move everything to one side instead: \(4x^2 - 9x = 0\), then factor out \(x\): \(x(4x - 9) = 0\). So \(x = 0\) or \(4x = 9\).
Answer: \(x = 0\) or \(x = \frac{9}{4}\).
Example 3: The quadratic formula with rational roots
Solve \(2x^2 + 5x - 12 = 0\).
Solution. Here \(a = 2\), \(b = 5\), \(c = -12\). The discriminant is \(D = 25 - 4 \cdot 2 \cdot (-12) = 25 + 96 = 121 = 11^2\). Then
so \(x = \frac{6}{4} = \frac{3}{2}\) or \(x = \frac{-16}{4} = -4\). Since \(D\) is a perfect square, the quadratic also factors: \(2x^2 + 5x - 12 = (2x - 3)(x + 4)\).
Answer: \(x = \frac{3}{2}\) or \(x = -4\).
Example 4: Irrational roots in simplest radical form
Solve \(2x^2 + 4x - 3 = 0\). Give exact answers and decimals to three places.
Solution. \(D = 16 - 4 \cdot 2 \cdot (-3) = 16 + 24 = 40\), and \(\sqrt{40} = 2\sqrt{10}\). So
With \(\sqrt{10} \approx 3.1623\), the roots are about \(0.581\) and \(-2.581\). Vieta check: the sum is \(\frac{-4}{2} = -2\) and \(0.581 + (-2.581) = -2\).
Answer: \(x = \frac{-2 + \sqrt{10}}{2} \approx 0.581\) or \(x = \frac{-2 - \sqrt{10}}{2} \approx -2.581\).
Example 5: Number of real solutions without solving
How many real solutions does each equation have? (a) \(4x^2 - 20x + 25 = 0\), (b) \(2x^2 + 3x + 4 = 0\), (c) \(x^2 + 7x + 1 = 0\).
Solution. (a) \(D = 400 - 4 \cdot 4 \cdot 25 = 400 - 400 = 0\): one repeated root, \(x = \frac{20}{8} = \frac{5}{2}\); in fact \(4x^2 - 20x + 25 = (2x - 5)^2\). (b) \(D = 9 - 32 = -23 < 0\): no real roots. (c) \(D = 49 - 4 = 45 > 0\): two real roots, irrational because \(45\) is not a perfect square.
Answer: (a) one, (b) none, (c) two.
Example 6: Completing the square
Solve \(x^2 + 8x + 3 = 0\) by completing the square.
Solution. Move the constant: \(x^2 + 8x = -3\). Half of \(8\) is \(4\) and \(4^2 = 16\); the picture below shows why exactly \(16\) is missing. Add \(16\) to both sides:
Take both square roots: \(x + 4 = \pm\sqrt{13}\). As a bonus, the vertex form is \(y = (x + 4)^2 - 13\), so the parabola's vertex is \((-4, -13)\).
Answer: \(x = -4 \pm \sqrt{13}\), that is about \(-0.394\) and \(-7.606\).
Example 7: Get to standard form first
Solve \(x(x - 4) = 2(x + 4)\).
Solution. The right side is not zero, so the zero-product rule does not apply yet. Expand: \(x^2 - 4x = 2x + 8\), hence \(x^2 - 6x - 8 = 0\). Now \(D = 36 + 32 = 68\) and \(\sqrt{68} = 2\sqrt{17}\), so
Answer: \(x = 3 + \sqrt{17} \approx 7.123\) or \(x = 3 - \sqrt{17} \approx -1.123\).
Example 8: Clearing fractions
Solve \(\frac{1}{2}x^2 + \frac{2}{3}x - 1 = 0\).
Solution. Multiply every term by the common denominator \(6\): \(3x^2 + 4x - 6 = 0\). Then \(D = 16 + 72 = 88\) and \(\sqrt{88} = 2\sqrt{22}\):
Answer: \(x = \frac{-2 + \sqrt{22}}{3} \approx 0.897\) or \(x = \frac{-2 - \sqrt{22}}{3} \approx -2.230\).
Example 9: Projectile height (word problem)
A ball is hit upward from a height of \(6\) ft with a speed of \(48\) ft/s. Its height after \(t\) seconds is \(h(t) = -16t^2 + 48t + 6\) feet. (a) What is the maximum height, and when is it reached? (b) When is the ball \(38\) ft above the ground? (c) When does it land?
Solution. (a) The top is the vertex: \(t = -\frac{b}{2a} = -\frac{48}{2 \cdot (-16)} = 1.5\) s, and \(h(1.5) = -16 \cdot 2.25 + 72 + 6 = 42\) ft.
(b) Solve \(-16t^2 + 48t + 6 = 38\), that is \(-16t^2 + 48t - 32 = 0\). Divide by \(-16\): \(t^2 - 3t + 2 = 0\), so \((t - 1)(t - 2) = 0\). The ball passes \(38\) ft twice, on the way up and on the way down, which the graph below makes obvious.
(c) Solve \(-16t^2 + 48t + 6 = 0\). Divide by \(-2\): \(8t^2 - 24t - 3 = 0\). Then \(D = 576 + 96 = 672 = 16 \cdot 42\), so \(\sqrt{D} = 4\sqrt{42}\) and
The minus sign gives \(t \approx -0.12\), a time before the ball was hit, so we reject it.
In metric units (common in the UK and the IB) the same model reads \(h(t) = -4.9t^2 + v_0t + h_0\) with meters and meters per second; the method does not change.
Answer: (a) \(42\) ft at \(t = 1.5\) s; (b) at \(t = 1\) s and \(t = 2\) s; (c) at \(t = \frac{6 + \sqrt{42}}{4} \approx 3.12\) s.
Example 10: Area of a picture frame (word problem)
A \(30\) cm by \(20\) cm photo is surrounded by a frame of uniform width. The photo and frame together cover \(816\) cm². How wide is the frame?
Solution. Let the width be \(x\) cm. The outer rectangle is \((30 + 2x)\) by \((20 + 2x)\), because the frame adds \(x\) on both sides.
So \((30 + 2x)(20 + 2x) = 816\). Expand: \(600 + 100x + 4x^2 = 816\), so \(4x^2 + 100x - 216 = 0\), and dividing by \(4\) gives \(x^2 + 25x - 54 = 0\). The discriminant \(D = 625 + 216 = 841 = 29^2\) is a perfect square, so it factors: \((x + 27)(x - 2) = 0\). A width cannot be \(-27\), so \(x = 2\). Check: \(34 \cdot 24 = 816\).
Answer: The frame is \(2\) cm wide.
Example 11: A parameter in the equation (exam level)
Consider \(2x^2 - 4x + m = 0\). (a) For which values of \(m\) does it have two different real roots? (b) If \(3\) is one root, find \(m\) and the other root.
Solution. (a) We need \(D > 0\): \(D = 16 - 8m > 0\), so \(m < 2\).
(b) Plug in \(x = 3\): \(18 - 12 + m = 0\), so \(m = -6\). Now use Vieta's product: \(3 \cdot x_2 = \frac{c}{a} = \frac{-6}{2} = -3\), so \(x_2 = -1\). Check with the sum: \(3 + (-1) = 2 = -\frac{-4}{2}\). And \(m = -6\) does satisfy \(m < 2\), as it must.
Answer: (a) \(m < 2\); (b) \(m = -6\) and the other root is \(-1\).
Example 12: Complex roots (Algebra 2)
Solve \(x^2 - 4x + 13 = 0\) over the complex numbers.
Solution. \(D = 16 - 52 = -36 < 0\), so there are no real roots and the parabola \(y = x^2 - 4x + 13\) lies entirely above the x-axis (its vertex is \((2, 9)\)). Over the complex numbers, \(\sqrt{-36} = 6i\), so
Vieta still holds: \((2 + 3i) + (2 - 3i) = 4 = -b\) and \((2 + 3i)(2 - 3i) = 4 + 9 = 13 = c\).
Answer: \(x = 2 + 3i\) or \(x = 2 - 3i\).
Common mistakes with the quadratic formula
- Dropping the sign of \(b\). If \(b = -5\), then \(-b = 5\) and \(b^2 = 25\). On a calculator, type \((-5)^2\), not \(-5^2\), which gives \(-25\).
- Losing a minus in \(-4ac\). When \(a\) and \(c\) have opposite signs, \(-4ac\) is positive: for \(a = 3\), \(c = -2\) it is \(+24\).
- A short fraction bar. The \(2a\) divides the whole numerator \(-b \pm \sqrt{D}\), not just the root.
- Using the formula before reaching standard form. In \(x(x - 4) = 2(x + 4)\), \(c\) is not \(2\); rearrange first, as in Example 7.
- Dividing by \(x\). Dividing \(4x^2 = 9x\) by \(x\) loses the root \(0\). Factor instead.
- Zero-product rule with a nonzero right side. \((x - 1)(x + 2) = 4\) does not mean \(x - 1 = 4\). Expand, rearrange, then solve.
- Canceling only one term when simplifying \(\frac{6 \pm 2\sqrt{5}}{2}\).
- Forgetting the negative square root. When \(b = 0\) or after completing the square, \(x^2 = 9\) gives \(x = 3\) or \(x = -3\); writing only \(x = 3\) loses half of the answer.
- Keeping impossible answers in word problems. Negative times and lengths are rejected, but say why.
FAQ about quadratic equations
Does the quadratic formula always work?
Yes, for every equation \(ax^2 + bx + c = 0\) with \(a \neq 0\). If \(a = 0\) the equation is linear and the formula would divide by zero. The formula is sometimes slower than factoring, but it is never wrong.
How can I memorize the quadratic formula?
Say it out loud as one sentence: "x equals negative b, plus or minus the square root of b squared minus four a c, all over two a." Many US students sing exactly those words to the tune of "Pop Goes the Weasel". Two habits keep the memory honest. First, test it on an equation whose roots you already know: \(x^2 - 5x + 6 = (x - 2)(x - 3)\), and the formula gives \(\frac{5 \pm \sqrt{25 - 24}}{2} = \frac{5 \pm 1}{2}\), that is \(3\) and \(2\). Second, remember where it comes from: if you ever blank in a test, complete the square on \(ax^2 + bx + c = 0\) as shown above and the formula reappears. Neither the SAT reference sheet nor UK GCSE papers give it to you, so it is worth knowing by heart.
Is it "discriminant", "D" or "Δ"?
They all mean \(b^2 - 4ac\). US textbooks usually just say "the discriminant" (some abbreviate it to \(D\)), UK books mostly write \(b^2 - 4ac\) in full, and IB materials use \(\Delta\). Some books also use the words zeros, roots, solutions and x-intercepts almost interchangeably: zeros and x-intercepts belong to the function \(y = ax^2 + bx + c\), roots and solutions to the equation \(ax^2 + bx + c = 0\), and their x-values are the same.
When should I give decimals and when exact answers?
If the question says "exact" or "simplest radical form", leave square roots in, as in Example 4. In word problems with units, give a sensible decimal, but keep the exact value until the last step so rounding errors do not pile up.
Can other equations turn into quadratics?
Often. Equations like \(x^4 - 5x^2 + 4 = 0\) become quadratics after substituting \(u = x^2\), and an equation such as \(2\sin^2 x - \sin x - 1 = 0\) is a quadratic in \(\sin x\) (try this trigonometry problem). Finding where a line meets a parabola also leads to a quadratic: substitute the line into the parabola, exactly as in the substitution method from the lesson on solving systems of equations.
Where do quadratics appear in geometry?
Whenever two unknown lengths are linked by the Pythagorean theorem, for instance a rectangle whose length is \(4\) more than its width and whose diagonal is known. The right-triangle side of that story is in the lesson on SOHCAHTOA and right-triangle trigonometry.
Cheat sheet
- Standard form: \(ax^2 + bx + c = 0\), \(a \neq 0\); read \(a\), \(b\), \(c\) with signs.
- Quadratic formula: \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\).
- Discriminant \(D = b^2 - 4ac\): \(D > 0\) two real roots, \(D = 0\) one repeated root, \(D < 0\) no real roots (two complex roots).
- Perfect-square \(D\) with integer coefficients: the quadratic factors.
- \(c = 0\): factor out \(x\). \(b = 0\): isolate \(x^2\) and use \(\pm\).
- Completing the square: add \(\left(\frac{b}{2}\right)^2\) to \(x^2 + bx\) to get \(\left(x + \frac{b}{2}\right)^2\).
- Vertex: \(\left(-\frac{b}{2a}, -\frac{D}{4a}\right)\); vertex form \(y = a(x - h)^2 + k\).
- Vieta: \(x_1 + x_2 = -\frac{b}{a}\), \(x_1 x_2 = \frac{c}{a}\).
- Simplify radicals: \(\sqrt{72} = 6\sqrt{2}\); divide every term by the common factor.
- Word problems: define the variable, build the equation, solve, reject impossible roots, answer with units.
Practice
Ready to try it yourself? Each problem has a hint, an answer checker and a full solution.
- Larger root of a quadratic by factoring
- Value of the discriminant and number of solutions
- Quadratic formula: larger root in exact form
- Completing the square: find q
- Width of a rectangular patio from its diagonal
- How long a thrown ball stays above 12 m
- Repeated root: find k
- Sum of squares of the roots with Vieta's formulas
For all ten problems in one place, open the quadratic equations practice problems hub.