How to solve quadratic equations: 5 methods, step by step

You're staring at x² = 3x − 1 with no idea where to start. Or you started by factoring, got nowhere, and now you can't tell whether your working is wrong or the equation is. The annoying part is that quadratics hand you five methods and no rule for choosing between them, so people guess, and a wrong guess looks exactly like a hard equation. Picking the method is the whole skill, so let's do that first.
Short version: here's how to solve quadratic equations in the order that works. Get everything onto one side so the equation reads ax² + bx + c = 0, then compute D = b² − 4ac. A perfect-square D means it factors, a perfect-square side with no x term means take square roots, and everything else means completing the square or the formula. Once the method is settled, the rest is arithmetic you already know.
This guide carries one equation, x² − 3x + 1 = 0, through every method to the last step, then shows how to check both answers and what to do when your equation isn't the one in the book. It's for anyone who can follow the algebra but keeps picking the wrong route.
The three markers that pick your method
A quadratic equation is any equation you can rearrange into ax² + bx + c = 0 with a ≠ 0. Ours starts life as x² = 3x − 1, which rearranges to x² − 3x + 1 = 0, so a = 1, b = −3, c = 1 and D = 9 − 4 = 5.
Ask three questions, in this order:
Is there an x term? If not, one side is already a perfect square and the square-root property finishes it in two lines.
Is D a perfect square (0, 1, 4, 9, 16, 25, …)? If it is, the equation factors over the integers.
What sign does D have? Positive: two real roots. Zero: one repeated root. Negative: no real roots at all.
For x² − 3x + 1 = 0 there is an x term, D = 5 isn't a perfect square, and 5 is positive. So you're expecting two real roots and no integer factoring, and every method below has to live with that.
Here's the same reasoning as a table, in case your equation looks like one of these instead:
| What you see | Example | Method |
|---|---|---|
| One side a perfect square, no x term elsewhere | (x − 2)² = 4 | square-root property |
| D is a perfect square | D = 49 = 7² | factoring |
| D > 0, not a perfect square | D = 5 | completing the square, or the quadratic formula |
| D = 0 | D = 16 − 16 = 0 | one repeated root, from a perfect-square factor |
| D < 0 | D = 1 − 24 = −23 | no real roots; the parabola never crosses the axis |
| You want a picture, or the count of roots | y = x² − 3x + 1 | graphing |
The first two algebraic routes aren't rivals, by the way. The formula is completing the square done once with letters instead of numbers, which is why both hand you (3 ± √5)/2.
Get the equation into standard form first
For x² = 3x − 1, subtract 3x from both sides and add 1: x² − 3x + 1 = 0. Both terms have to cross. Stopping at x² − 3x = −1 isn't wrong, but it isn't standard form, and reading a, b and c off it is how c becomes −1 instead of +1.
For fractions, multiply every term by the common denominator. Take (1/2)x² + (2/3)x = 1: multiply by 6 and you get 3x² + 4x = 6, so 3x² + 4x − 6 = 0 with a = 3, b = 4, c = −6.
A 1/x term costs you something, so watch for it. Take x + 1/x = 3, with x ≠ 0: multiplying both sides by x gives x² + 1 = 3x, which is x² − 3x + 1 = 0 again. Multiplying by a variable can create a root the original never allowed, here x = 0, since 1/0 is undefined. That's why, whenever you've multiplied by a variable, you check each root in the original equation and not in the tidied-up one.
How to solve quadratic equations by factoring
Our equation can't factor over the integers: D = 5 isn't a perfect square, and no pair of integers multiplies to 1 and adds to −3. So this one section borrows a different equation, 2x² + 5x − 3 = 0, which does factor and has a ≠ 1 so the ac-method gets shown instead of hidden behind a = 1.
Multiply a by c: 2 × (−3) = −6.
Find two numbers that multiply to −6 and add to +5: +6 and −1.
Split the middle term: 2x² + 6x − x − 3 = 0.
Group in pairs: 2x(x + 3) − 1(x + 3) = 0.
Factor out the common bracket: (2x − 1)(x + 3) = 0.
Use the zero product property: 2x − 1 = 0 gives x = 1/2, and x + 3 = 0 gives x = −3.
The marker promised this would work: D = 25 + 24 = 49 = 7², a perfect square, and both roots came out rational. Factoring is a search, and the discriminant tells you whether the search will find anything before you spend ten minutes on it. If D isn't a perfect square, put the pen down and use the formula.
How to solve quadratic equations by completing the square
This is the slow, reliable version, and it's the one to pick when someone asks for the working rather than the answer.
Move the constant to the right: x² − 3x = −1.
Take half of b and square it: b = −3, half is −3/2, and (−3/2)² = 9/4.
Add that to both sides: x² − 3x + 9/4 = −1 + 9/4 = 5/4.
Write the left side as a square: (x − 3/2)² = 5/4.
Take the square root with ±: x − 3/2 = ±√5/2.
Add 3/2 to both sides: x = 3/2 ± √5/2 = (3 ± √5)/2 ≈ 2.618 or 0.382.
Step 4 is where signs go wrong: the number inside the bracket is half of b, so b = −3 gives x − 3/2, not x + 3/2. You can always catch it by expanding the bracket, because it has to give back the line above. And keep the ± at step 5, or you'll quietly lose a root.
The quadratic formula, on the same equation
Write the formula once:
x = (-b ± sqrt(b^2 - 4ac)) / (2a)
Substitute while keeping the signs: −b = −(−3) = 3, and b² = (−3)² = 9.
x = (3 ± sqrt(9 − 4(1)(1))) / (2 × 1).
x = (3 ± sqrt(5)) / 2.
Two roots: (3 + 2.2360679…) / 2 = 2.6180339… and (3 − 2.2360679…) / 2 = 0.3819660…
The expression under the root sign is the discriminant, so the formula tells you what kind of answer to expect while you're still writing: sqrt(5) is irrational, so both roots are irrational, and no amount of factoring would have found them. That one fact is why the formula is the safe default.
When one side is already a perfect square
3(x − 2)² = 12 is the easy case, so take it when it's offered.
Divide both sides by 3: (x − 2)² = 4.
Take the square root of both sides, with ±: x − 2 = ±2.
Solve both cases: x = 4 or x = 0.
Check both in the original: 3(4 − 2)² = 3 × 4 = 12, and 3(0 − 2)² = 3 × 4 = 12.
The rule is narrow for a reason: it needs one side to be a perfect square with no x term anywhere else, and our equation has an x term, so you can't take a root straight away. It does come back at the end of completing the square, where (x − 3/2)² = 5/4 is exactly this shape. Same property, same equation, applied to a square you had to build first.
Solving by graphing, and when a sketch is the only honest answer
Sketch y = x² − 3x + 1. The vertex sits at x = −b/(2a) = 1.5, and y there is 1.5² − 3(1.5) + 1 = 2.25 − 4.5 + 1 = −1.25, so the vertex is (1.5, −1.25). Because a > 0 the parabola opens upward, and because the vertex is below the axis it crosses the axis twice, once near 0.382 and once near 2.618.
That's the whole value of the graph: the count and the rough position. It can't produce (3 ± √5)/2, and reading 2.618 off a grid doesn't make 2.618 the answer. The sketch earns its place in two situations. When D < 0 the honest answer is "this never meets the axis", and a picture is what makes that believable. And when you only want to know how many roots the problem has before doing any algebra, one glance is enough.
What the discriminant tells you, and what it doesn't
D = b² − 4ac never gives you the roots. It tells you what kind they are, which is exactly what picks the method.
D = 5, our equation. Positive and not a perfect square: two real irrational roots, no integer factoring. Completing the square or the formula, and nothing else.
D = 0. x² − 4x + 4 = 0 gives D = 16 − 16 = 0, so (x − 2)² = 0 and x = 2. One repeated root, and the vertex sits on the axis instead of crossing it.
D < 0. 2x² + x + 3 = 0 gives D = 1 − 24 = −23, so there's no real solution. That isn't a broken equation and it isn't a failure on your part: a = 2 > 0, so the parabola opens upward with its vertex above the axis, and 2x² + x + 3 comes out positive for every real x. The two roots are complex numbers, which is a different question from a wrong answer.
D a perfect square. 2x² + 5x − 3 = 0 gives D = 49, and indeed (2x − 1)(x + 3), with roots 1/2 and −3.
How to check both answers by substituting them back
Put each root into the original equation and see whether zero comes out.
For x = (3 + √5)/2: x² = (9 + 6√5 + 5)/4 = (7 + 3√5)/2, and 3x = (9 + 3√5)/2. So x² − 3x + 1 = (7 + 3√5)/2 − (9 + 3√5)/2 + 1 = −2/2 + 1 = 0.
For x = (3 − √5)/2: x² = (9 − 6√5 + 5)/4 = (7 − 3√5)/2, and 3x = (9 − 3√5)/2. So x² − 3x + 1 = (7 − 3√5)/2 − (9 − 3√5)/2 + 1 = −2/2 + 1 = 0.
The decimal check is quicker and always slightly off: 2.618² = 6.8539, and 6.8539 − 7.854 + 1 = −0.0001. That gap is rounding, not error. It's why a rounded answer can never be checked exactly, and why an answer that fails a decimal check by a whisker proves nothing either way.
Faster than either: the two roots must add to −b/a and multiply to c/a. Here −b/a = 3, and (3 + √5)/2 + (3 − √5)/2 = 6/2 = 3. And c/a = 1, while ((3 + √5)/2) × ((3 − √5)/2) = (9 − 5)/4 = 1. Two checks, one line, both on the same pair of roots.
What a wrong answer usually means:
Only one root. You dropped the ± at the square-root step, or never set the second bracket to zero.
A sign flipped. b = −3, so −b = +3 and the formula gives (3 ± √5)/2. Writing (−3 ± √5)/2 is the commonest a/b/c slip, and substituting back catches it at once.
A root that doesn't check. Usually a, b and c came off a form that wasn't standard: from x² = 3x − 1 with c taken as −1 instead of +1.
A missing root at x = 0. Dividing both sides by x deletes it, which is how equations like 3(x − 2)² = 12 lose a genuine root.
Put your own equation in the solver, then read the steps
Worked examples stop helping the moment your equation differs from the one in the book. The math solver with steps takes your equation in the form you already have it, typed as a sentence, and works it. It's free to try with no sign-up.
Open the AI Math Solver
The whole input is one box with the placeholder Type or upload your question and one purple button, Solve Problem, which stays dimmed while the box is empty.

One box, one button: type the equation, then select Solve Problem. Type your equation as a request
Say what you want done:
Solve x^2 = 3x - 1 by completing the square. Show the discriminant.Sentences and instructions go in, so name the method you're meant to be practising. Write exponents asx^2and roots assqrt(5): plain text in, plain text back. There's no photo upload, so a picture of an equation has to be typed in.
The request names the equation, the method and the discriminant. Click Solve Problem
While the answer is being written the button reads Solving... and the card shows a spinner with the same word.
Read the [Solution] card, not just its last line
Your own request comes back in a grey bubble at the top, then the header Fusion Chat Math Solver, then the label [Solution], then the working. The middle is where you learn something, so compare it with your own attempt line by line instead of copying the last line. The copy icon takes the answer as plain text if you want it beside your working.
![The result card with the typed request in a grey bubble, the Fusion Chat Math Solver header, the [Solution] label and the worked steps, with the Enter New Problem button marked 1](https://cdn.fusionchat.ai/images/blog/how-to-solve-quadratic-equations/solution-steps-140de860-1600.webp)
The working for the reader's own equation, and Enter New Problem for the next one. Start the next equation with Enter New Problem
Enter New Problem clears the box for a fresh equation, and the re-run icon sends the same question again, which is what you want when you're reading a second time.
If you want the same treatment for other kinds of problem, more math solver guides collects them.
The takeaway
The method is chosen for you every time: rearrange, compute D, then decide. Try it on the equation your textbook's example didn't resemble, and check the answer by adding and multiplying the roots, because that one line catches almost every slip. When the middle of the algebra is where it keeps going wrong, put the equation in the solver and compare its working with yours.
Frequently asked questions
How do I solve quadratic equations by factoring?
Which of the five methods does my equation want?
When should I complete the square instead of using the formula?
What does a negative discriminant mean?
How do I check a quadratic answer?
Can I paste my own equation into the AI Math Solver?
Solve x^2 = 3x - 1 by completing the square. Show the discriminant., and click Solve Problem. The working comes back in a card labelled [Solution], so name the method you're practising in the sentence itself. Plain-text notation is what the box takes, and typed text is the only input: there's no image upload.First published · Last updated : Rewritten for readers: the short version comes first, x² − 3x + 1 = 0 is carried through every method, and the notes on tool internals are gone.

