Algebra
How to Solve Any Quadratic Equation
Four methods, a decision tree for choosing between them, and the derivation of the quadratic formula from completing the square.
Four methods, and the honest answer about speed
Every quadratic can be written with , and all four methods below solve all of them. They differ only in how much work they cost on a given equation, so choosing well is worth real time in an exam.
The honest ranking is narrower than most textbooks suggest. Factoring is fastest when it works and a waste when it does not, and you cannot tell in advance — which is why the rule is a time limit rather than a judgement. Give yourself about ten seconds. If the factorisation has not appeared, go to the formula, because the formula would have finished by the time your third guess fails. If you want certainty rather than a time limit, the discriminant settles the question outright, as the section on it below explains.
Before any of that, there is a step zero that is not optional: get the equation into standard form, with every term on one side and zero on the other, in descending powers. Not because the methods are fussy, but because , , and are only defined relative to that arrangement, and because the zero-product property that justifies factoring needs a zero to work with.
Which method should you use?
Put it in standard form first. Now: is there a linear term — an x on its own?
Solve a quadratic problem now
First solution freeMethod 1: Factoring
Factoring rests on one fact: if a product is zero, at least one of its factors is zero. Rewrite the quadratic as a product of two linear factors, set each to zero, and read off the roots.
When , you are looking for two numbers that multiply to and add to . For those are 3 and 4, giving and roots and . The roots are the negatives of the numbers you found, which trips people up permanently until they notice why: the factor vanishes at , not .
When , the search changes: you need two numbers that multiply to and add to , then split the middle term and group.
Worked example
- 1
Compute ac and look for a pair. Six times negative six is negative thirty-six, and you need a pair that multiplies to that and adds to negative five.
- 2
Split the middle term using that pair. The order does not matter; both orderings group successfully.
- 3
Group in pairs and take out the common factor of each pair. If the brackets that remain are not identical, the pair was wrong or the grouping was.
- 4
Factor out the shared bracket.
- 5
Set each factor to zero. Check by expanding: the outer and inner products give −9x and +4x, which sum back to −5x.
Answer
Two checks cost almost nothing. The roots must sum to , and . They must multiply to , and . The four patterns worth recognising by sight are set out in factoring quadratics.
Two habits make the search much shorter. First, take out any common factor before you start: looks unpleasant until you pull out the 3 and are left with , which splits immediately. Second, use the signs to prune the list. If is positive the two numbers share a sign, and that sign matches ; if is negative they have opposite signs, and the larger in magnitude carries the sign of . That single observation halves the candidates you have to test.
Method 2: Square roots
When the equation contains no linear term, do not factor and do not reach for the formula. Isolate the square and undo it.
The is the entire content of this method, and it is omitted constantly. The equation asks which numbers square to 25, and there are two. Writing alone is not a rounding of the truth; it is half an answer.
The method extends to anything squared, not just . If the equation already contains a bracket, expanding it first is wasted work:
Substituting both back confirms them: and . Recognising this shape matters more than it first appears, because completing the square exists precisely to manufacture it out of equations that do not start with it.
An equation is in quadratic form whenever one block appears squared and unsquared, whatever that block is. Take : setting turns it into , which factors as , so or .
Four roots, and each satisfies the original: substituting gives . The error to avoid is stopping at , because every value of unpacks into two values of whenever the substitution was a square. The same trick handles equations built on , on , or on a repeated bracket.
Method 3: Completing the square
A perfect square expands as . So given , matching with 6 gives , and the missing term is . Halve the coefficient of , square it, add it: that is the entire procedure, and everything else is bookkeeping.
from which and so or . Note what happened structurally: the equation became a square-root problem, which is why method 3 is really method 2 with a setup step.
A leading coefficient other than 1 has to be removed before you halve anything, because the halving rule assumes the term is bare.
Worked example
- 1
Divide through by the leading coefficient. Do this before touching the constant, and divide every term including the one you are about to move.
- 2
Move the constant to the right-hand side, leaving only the two terms that will form the square.
- 3
Halve the coefficient of x and square it. Half of −4 is −2, and squaring removes the sign, so the term to add is 4.
- 4
Add it to both sides. The left is now a perfect square, and the bracket contains the halved coefficient, not the squared one.
- 5
Factor the left and take square roots of both sides, keeping the plus-or-minus.
- 6
Isolate x. Rationalising turned the root of five halves into root ten over two, which is the form a marker expects.
Answer
The completed form carries information the roots do not. Reversing the division shows , so the parabola has its minimum at — read straight off the brackets, with no calculus and no separate vertex formula. That is why this method survives despite being the slowest route to a root.
It keeps paying off long after this topic. Identifying a conic section starts by completing the square in and in . And in integration, an integrand such as is intractable until you rewrite the denominator as , at which point it is a standard arctangent form — a move that appears again in the guide to choosing an integration technique.
Method 4: The quadratic formula
The formula is completing the square done once, in general, so you never have to do it again:
Take . Nothing factors over the integers here, and you can know that before trying: the discriminant is , which is not a perfect square. So
The sum-and-product check from method 1 verifies that faster than substituting surds would: the roots sum to and multiply to .
Three things go wrong with the formula, all mechanical. The first is reading , , and off an equation that is not in standard form. The second is losing the sign of — for , the numerator begins , not . The third is cancelling the denominator into only part of the numerator, and it is worth seeing explicitly. From ,
because the 2 must divide both terms. Writing instead gives roughly 5.83 and 0.17 rather than 4.41 and 1.59, and substituting back catches it immediately: exactly, while the other pair misses by a wide margin. Verification habits like this are collected in how to check your own work.
Where the formula comes from
Eight lines, and worth doing once, because the structure of the formula stops being arbitrary afterwards. The in the denominator arrives when you divide by ; the arrives when you undo the halving; the discriminant appears as a numerator long before anyone takes a square root of it.
Deriving the quadratic formula by completing the square
0 of 8 stepsOne reading of the finished formula is worth carrying away. It says: start at the vertex line , then step out by the same distance in each direction. The roots are symmetric about the vertex, and the size of the step is . When that step is zero the two roots collapse into one, and when it is imaginary they leave the real line entirely.
There is a second derivation that avoids fractions entirely, and it is worth knowing because the fractions are where the first one usually goes wrong. Instead of dividing by , multiply the whole equation by :
The left-hand side is now a perfect square waiting for its constant term, in the block rather than in . Adding to both sides completes it:
and dividing by at the very end gives the formula with no fraction ever appearing mid-derivation. The choice of is not magic. It is the multiplier that turns into and into , so both terms land inside the same square, in the block .
What the discriminant predicts
The discriminant is , the thing under the root. Computing it first tells you what shape the answer will take, which is often enough to choose a method — or to answer the question outright, since plenty of exam questions ask only how many roots there are.
| Discriminant | Roots | Graph | Example |
|---|---|---|---|
| Positive and a perfect square | Two rational roots | Crosses the axis twice | x² − 5x + 6, Δ = 1, roots 2 and 3 |
| Positive, not a perfect square | Two irrational roots, a conjugate surd pair | Crosses the axis twice | x² − 4x + 1, Δ = 12, roots 2 ± √3 |
| Exactly zero | One repeated root at −b/2a | Touches the axis and turns | 4x² − 12x + 9, Δ = 0, root 3/2 |
| Negative | Two complex conjugate roots | Never meets the axis | x² + 2x + 5, Δ = −16, roots −1 ± 2i |
The first row is the practically useful one. A perfect-square discriminant is exactly the condition for a quadratic with integer coefficients to factor over the integers, so a five-second calculation tells you whether the factoring hunt can possibly succeed. For the discriminant is 17, so no integer factorisation exists and you can stop looking with confidence rather than with doubt.
A vanishing discriminant always means a perfect square in disguise. has , the formula collapses to , and the quadratic is — one root counted twice.
The negative case is a complete answer, not a dead end. For , the roots are , and substituting confirms it: , which added to and to 5 gives zero. If the question is set in the reals, “no real solutions” is the full mark answer.
The discriminant also runs in reverse, which is how a large family of exam questions is built. “Find the values of for which has a repeated root” asks you to set and solve for instead of for . Here , so , and both check out: the quadratic becomes or . Replace the equals sign with an inequality and the question becomes an inequality in , whose sign rules are covered in the inequality calculator.
Seeing it on the graph
The roots are where the parabola meets the horizontal axis, the vertex line sits midway between them, and the discriminant decides whether there are two crossings, one touch, or none.
Move a, b, and c and watch the roots
y = 1x² + 0x + -2One setting is worth trying deliberately. With the discriminant is , a perfect square, and the curve cuts the axis at and — with the vertex at , exactly halfway. Now move upward and watch the two crossings slide together, meet, and vanish: that is the discriminant passing through zero and going negative.
Flipping the sign of on its own does move the roots, which is worth seeing rather than assuming. The roots multiply to and sit either side of , so both depend on : changing to takes the discriminant from to , and two real roots become none. What leaves the roots untouched is negating , and together, because that is multiplying the whole equation by . How this connects to the broader family of shifts, stretches, and reflections is covered in function transformations at a glance.
The mistakes that cost the most, and some practice
Not rearranging into standard form. Given , the coefficients are not . Move everything to one side first: , so and , giving roots and . Every method on this page assumes standard form, and this is the error that most reliably produces a confident wrong answer.
Dividing by . Faced with , dividing both sides by gives and quietly destroys the root . Dividing by a variable is only legal when you know it is not zero, and here it plainly might be. Factor instead: keeps both roots.
Losing the negative square root. Whenever you take a square root of both sides, write the in the same movement of the pen. It is the most common single mark deduction in this topic.
Five quick ones
Answers are checked here — nothing is sent anywhere.
- 1
- 2
- 3
- 4
- 5
The quadratic formula calculator runs all four methods on the same equation side by side, and the quadratic formula guide goes further into choosing between them.