Math Solver – Solve Linear and Quadratic Equations Step by Step

Every move shown, every answer proved by substitution.

100% FreeNo sign-up neededInstant results

Your equation

x² − 5x + 6 = 0

Decimals and negative coefficients are welcome. Answers that come out as fractions are shown as exact fractions first — 3/2, with the decimal 1.5 after it — never rounded silently.

🔒 Everything is calculated in your browser — your numbers never leave your device.

Advanced options — systems, inequalities, cubic equations

—

—

—

If a cubic has no integer root, the panel says so: such cubics need the cubic formula or a numerical method, not a divisor search.

The base solver handles one linear or quadratic equation. The panels below handle the three equation types it does not: two equations at once, inequalities, and cubics with integer roots.

Systems, inequalities, cubic equations are already included in the result with their default values — open Advanced options to change them.

Your solution

Roots
x = 3, x = 2
Two different real roots — the discriminant D = 1 is positive, and both roots pass the substitution check below.
Discriminant D
1
D = b² − 4ac = (−5)² − 4 × 1 × 6.
Root type
Two real roots
A positive discriminant always means two different real roots.
Substitution check
Both roots pass ✓
Each root was put back into the original equation and gave exactly 0.
Copied ✓

An answer on its own is only half the story. This solver shows every move — shifting terms across the equals sign, dividing, or working the quadratic formula — and then proves its own answer by substituting each root back into your equation. If the discriminant says the roots will be complex, it tells you before it starts.

Key takeaways

  • Every answer on this page is checked by substitution: a root that does not satisfy the original equation is not a root.
  • The discriminant forecasts the answer before the formula is applied: positive means two real roots, zero one double root, negative a complex pair.
  • Coefficients accept decimals, not fractions: type 0.5, not 1/2 — the parser rejects anything that is not digits with at most one decimal point.

The steps, the discriminant forecast — and the proof

On the left, the full working for your equation. On the right, two things most solvers skip: the discriminant, which forecasts what kind of roots to expect before any solving happens, and the substitution check, which puts each answer back into the original equation to prove it.

Step-by-step working
x² − 5x + 6 = 0
Step 1: read off a = 1, b = −5 and c = 6.
Step 2: D = b² − 4ac = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
Step 3: D is positive, so there are two different real roots, and √D = 1.
Step 4: x = (−b ± √D) / (2a) = (5 ± 1) / 2.
Step 5: x = (5 + 1) / 2 = 3, and x = (5 − 1) / 2 = 2.

Discriminant forecast

D = 1

D is positive — expect two different real roots.

D < 0
complex pair
D = 0
double root
D > 0
two real roots
Substitution check — the page verifies itself
Check x = 3: 1 × (3)² − 5 × (3) + 6 = 9 − 15 + 6 = 0 ✓
Check x = 2: 1 × (2)² − 5 × (2) + 6 = 4 − 10 + 6 = 0 ✓

Keep exploring

Equations sit at the centre of algebra — these neighbours go deeper on the pieces this solver uses.

How it works in three steps

1

Keep the scale balanced

An equation is a balance: both sides weigh the same. Every legal move — adding, subtracting, multiplying or dividing — must be applied to both sides, or the balance tips and the answer changes.

2

Isolate, or use the formula

A linear equation is solved by undoing what was done to x: move the constant away, then divide by the coefficient. A quadratic goes through the discriminant and the quadratic formula, which never misses a root.

3

Substitute back to prove it

The answer is put back into the original equation. If the two sides match — or the quadratic side adds up to exactly 0 — the solution is proven, not just claimed. This page shows that check every time.

How equations are solved, worked through

x = (−b ± √(b² − 4ac)) / (2a) — and a linear answer is x = (c − b) / a

The linear anchor: 3x + 5 = 20. Take 5 away from both sides and the equation becomes 3x = 15; divide both sides by 3 and x = 5. The proof: 3 × 5 + 5 = 20, which is exactly the right side we started with.

When the answer is a fraction: 2x = 3. There is no constant to move, so divide straight away: x = 3 / 2, written exactly as the fraction 3/2 = 1.5. This solver always shows the exact fraction first, because 1.5 is tidy here but a root like 1/3 would lose information as a rounded decimal.

The quadratic anchor: x² − 5x + 6 = 0. Here a = 1, b = −5 and c = 6, so D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. The formula gives x = (5 ± 1) / 2, which splits into x = 3 and x = 2 — and indeed 9 − 15 + 6 = 0 and 4 − 10 + 6 = 0.

A double root: x² − 4x + 4 = 0 has D = 16 − 16 = 0. With nothing under the square root, the plus and minus branches land on the same number: x = 4 / 2 = 2, twice over. The equation is really (x − 2)² = 0 in disguise.

Complex roots: x² + 2x + 5 = 0 has D = 4 − 20 = −16. No real number squares to a negative, so the roots leave the real line: x = −1 ± 2i, where i² = −1. They are still exact — substituting −1 + 2i back in gives 0 + 0i, real and imaginary parts cancelling separately.

When a is 0: a “quadratic” with a = 0 has no x² term at all, so it is a linear equation wearing a costume. The honest move — the one this solver makes — is to say so and solve it linearly, rather than divide by 2a = 0 inside the formula.

Going deeper

The equals sign is a claim that two expressions have the same value — picture the balance scale in the picture at the top of this page, with blocks stacked on both pans. If you add a block to one side only, the scale tips and the claim stops being true. That single idea generates every solving rule: to move the +5 in 3x + 5 = 20, you subtract 5 from both sides; to undo the ×3, you divide both sides by 3.

It also explains the one forbidden move: dividing both sides by zero. Division by zero is not defined, so an equation like 0x + 5 = 5 cannot be “solved” by dividing — with the x term gone, the statement is simply true for every x, and when the numbers disagree (0x + 5 = 3) it is true for none. Both states are answers in their own right, and this solver reports them plainly instead of inventing a value for x.

The formula is not a spell — it is completing the square, done once, in general. Start with ax² + bx + c = 0 and divide through by a: x² + (b/a)x = −c/a. Add (b / 2a)² to both sides so the left becomes a perfect square, (x + b / 2a)², then take square roots — remembering the ±, because both a positive and a negative number square to the same value.

Tidying up gives x = (−b ± √(b² − 4ac)) / (2a). Notice where the discriminant is born: it is the expression trapped under the square root. That is why its sign decides everything — a negative under a square root has no real answer, zero collapses the ± into a single root, and a positive gives the familiar pair.

Balanced on both sides — then proven by substitution. ⚖️

Two equations, two unknowns: substitution, elimination, Cramer

A single linear equation in two unknowns has infinitely many solutions, one for every point on its line. Two such equations usually pin down exactly one point, the intersection of the two lines, and the Advanced panel finds it by Cramer’s rule. For the default system, 2x + 3y = 8 and x − y = 1, the determinant is 2 × (−1) − 1 × 3 = −5, so x = (8 × (−1) − 1 × 3)/(−5) = (−11)/(−5) = 2.2, and y = (2 × 1 − 1 × 8)/(−5) = (−6)/(−5) = 1.2. The check is substitution, the same habit as everywhere on this page: 2 × 2.2 + 3 × 1.2 = 4.4 + 3.6 = 8.0, and 2.2 − 1.2 = 1.0, both exact. Elimination reaches the same point by hand: multiply the second equation by 3 to get 3x − 3y = 3, add it to the first to eliminate y, 5x = 11, so x = 2.2, and back-substitution gives y = 1.2. Substitution reaches it a third way: from the second equation x = 1 + y, so 2(1 + y) + 3y = 8 gives 5y = 6, y = 1.2, and x = 2.2. Three methods, one point, which is the point of having three methods: agreement is the check.

The determinant-zero case is where systems stop having a unique answer, and the panel reports it instead of dividing by zero. If the two lines are parallel but distinct, there is no solution: x + y = 2 and 2x + 2y = 5 can never hold together, because doubling the first gives 2x + 2y = 4, contradicting 5. If the two lines are identical, there are infinitely many solutions: x + y = 2 and 2x + 2y = 4 are the same line written twice, and every point on it satisfies both. The determinant distinguishes “no unique solution” from nothing else; telling the two sub-cases apart needs the check above, comparing the doubled first equation with the second. A system with a zero determinant is not broken, it is a geometric statement: the lines do not cross at a single point, and saying which of the two ways they fail to cross is part of the answer.

Inequalities: the flip rule, and interval notation

An inequality is solved like an equation until division or multiplication by a negative number, which flips the direction. The default case, 3x + 5 < 20, subtracts 5 to get 3x < 15, then divides by positive 3, direction unchanged, giving x < 5. The flip case, −2x + 4 > 10, subtracts 4 to get −2x > 6, then divides by −2, and the direction flips, giving x < −3. The flip is not a convention; it follows from multiplying an inequality by −1, which reverses order on the number line: 2 < 3 becomes −2 > −3, because −2 sits to the left of −3. Forgetting the flip is the single most common inequality error, and the panel prints a note whenever it flips, so the step is visible rather than silent. Testing a value confirms either answer: x = 0 satisfies 3x + 5 < 20 and violates −2x + 4 > 10, while x = −4 satisfies the second and violates the first.

Solution setInterval notationNumber-line reading
x < 5(−∞, 5)Everything left of 5, 5 itself excluded
x ≤ 5(−∞, 5]Everything left of 5, 5 itself included
x > −3(−3, ∞)Everything right of −3, −3 itself excluded
2 ≤ x < 7[2, 7)From 2 inclusive to 7 exclusive

Two edge cases complete the subject. When the x-coefficient is zero, the inequality stops being about x at all: 0x + 4 < 10 is true for every x, since 4 < 10 regardless of x, while 0x + 12 < 10 is false for every x, and the panel reports “all real x” or “no real x” accordingly, instead of dividing by zero. When both directions appear, as in a compound inequality like 2 ≤ x < 7, the solution is the overlap of the two conditions, written with a bracket on the included end and a parenthesis on the excluded end. Infinity always takes a parenthesis, because infinity is a direction, not a number you can reach and include. The base solver’s equation habits transfer directly: whatever is done to one side must be done to the other, and the answer is checked by testing a value, not by admiring the algebra.

Cubics by integer roots, and what the base solver does not accept

The cubic panel searches for integer roots the same way the factoring page does: any integer root of x³ + bx² + cx + d must divide d, so the candidates are d’s divisors, tested one by one. For x³ − 6x² + 11x − 6, the divisors of −6 are ±1, ±2, ±3 and ±6, and x = 1 gives 1 − 6 + 11 − 6 = 0, so (x − 1) is a factor. Synthetic division leaves x² − 5x + 6, whose roots are 2 and 3, so the full root list is 1, 2 and 3, and multiplying (x − 1)(x − 2)(x − 3) returns the original cubic. The panel repeats this search: after each root it divides the cubic down, so a double root is found twice, and it stops with an honest message when no divisor works. A cubic with no integer root still has at least one real root, but it is irrational, and finding it needs the cubic formula or a numerical method; the panel does not invent an integer root to fill the gap.

Two honest limitations of the base solver belong in this section, because they are the audit items this page was asked about and the answers are not what a wish list would want. First, coefficients accept decimals, not fractions: the parser reads an optional sign, digits and at most one decimal point, so 1/2 is rejected with the message that coefficients must be digits with at most one decimal point, and the correct entry is 0.5. A coefficient of 0.5 in a linear equation works exactly as the fraction would: (1/2)x + 1 = 2 gives x = 2, and entering a = 0.5, b = 1, c = 2 in linear mode returns that answer. Second, there is no exponent mode in the base solver, because the modes are linear (x to the first power) and quadratic (x²), and higher powers are the cubic panel’s job, not a base mode. The quadratic formula itself is the exponent story for degree two: it handles every quadratic, including the a = 0 case, which the base solver treats as a linear equation rather than an error, since ax² + bx + c = 0 with a = 0 is bx + c = 0.

Checking answers: substitution tables for every mode

Substitution is the one checking method that works for every equation type on this page, and the base solver prints it for quadratics: each root is put back into the original equation and must give exactly zero. For x² − 5x + 6 = 0 with roots 3 and 2, the checks are 9 − 15 + 6 = 0 and 4 − 10 + 6 = 0, both exact, which is why the solver reports “Both roots pass”. For the linear default, 3x + 5 = 20, the root is x = 5, and the check is 3 × 5 + 5 = 20, exact. For the system, the check is two substitutions, one per equation, as the Advanced panel prints. For an inequality, the check is a test value inside the solution set and one outside it: x = 0 satisfies 3x + 5 < 20 and x = 6 does not, which confirms x < 5 from both sides. A method that cannot be checked this way has not been finished, only performed.

The a = 0 case deserves its own paragraph because it is where solvers most often produce a confident wrong answer. In a quadratic, a = 0 turns the equation into a linear one: 0x² + 4x − 8 = 0 is 4x − 8 = 0, with the single root x = 2, and the base solver handles it by solving linearly rather than dividing by zero in the quadratic formula. If b is also zero, the equation is a statement about constants: 0x + 5 = 0 has no solution, and 0x + 0 = 0 is satisfied by every x, exactly like the a = 0 inequality case. The discriminant forecast adapts too: with a = 0 there is no parabola, so “two real roots” language stops applying, and the solver’s root-type label follows the linear result. Students who memorise “quadratics have two roots” without the a ≠ 0 condition will miscount this case every time; students who check by substitution never will, because substituting into 0x² + 4x − 8 = 0 with x = 2 gives 0 + 8 − 8 = 0, and the arithmetic does not care what the equation was called.

Entering your equation: what each box means

This solver does not read a typed-out expression. It reads coefficients: the numbers in front of x², x, and the constant term. Pick a mode first — Linear or Quadratic — and then fill every box. The linear mode solves ax + b = c, and the quadratic mode solves ax² + bx + c = 0. That distinction is the whole interface: if your equation is not already in one of those two shapes, rewrite it first. Move everything to one side for a quadratic (so the right side is 0), and collect the x terms for a linear equation (so there is exactly one x term on the left). The worked examples below show that rewriting step for each type, because it is where most wrong answers begin.

The main solver updates live as you type, and the Calculate button scrolls you to the result. The defaults are chosen so the page is already showing a correct answer when it loads: linear mode holds 3x + 5 = 20, with the root x = 5, and quadratic mode holds x² − 5x + 6 = 0, with the roots x = 3 and x = 2. Change one number at a time and watch the steps change; that is the fastest way to learn what each coefficient does. Raising a in a quadratic, for example, narrows the parabola and moves both roots, while changing c alone slides the curve up or down and can flip the discriminant from positive to negative.

Each coefficient box accepts an optional sign, digits, and at most one decimal point — 3, −5, and 0.5 are all fine. A fraction written with a slash, such as 1/2, is rejected with an explanatory message, so enter 0.5 instead; the solver still reports exact fraction answers where they exist, for example x = 1/2 for a root that is exactly one half. Coefficients may be as large as 1,000,000,000,000 in size, which covers any textbook equation, and zero is a perfectly good value in any box. An empty box, or a box holding letters or two decimal points, produces a plain-language error instead of a silent wrong answer. If a = 0 in quadratic mode, the solver does not force the quadratic formula — which would divide by 2a = 0 — it says so and solves the linear equation that remains.

The Advanced options panel works differently from the main solver: its three tools run only when you press their buttons. The system solver takes two equations, a1x + b1y = c1 and a2x + b2y = c2, and returns the single point that satisfies both, or says plainly that there is none. The inequality solver takes ax + b, a direction, and c, and returns the solution set, noting whenever it flips the direction. The cubic solver takes b, c, and d for the monic cubic x³ + bx² + cx + d = 0 — monic meaning the x³ coefficient is fixed at 1 — and looks for an integer root. A Copy button next to the main result copies the answer and its one-line explanation, so you can paste it into homework notes without retyping.

Worked examples for every mode

Linear, with the default values: 3x + 5 = 20. Move the constant: 3x = 20 − 5 = 15. Divide by the coefficient: x = 15 ÷ 3 = 5. Check: 3 × 5 + 5 = 20, which matches the right side exactly. When there is no constant to move, the first step disappears: 4x = 12 gives x = 12 ÷ 4 = 3 directly, and the solver says so rather than inventing a move. When a = 0, there is no x to isolate at all: 0x + 5 = 5 is true for every x, so the answer is infinitely many solutions, while 0x + 5 = 7 is false for every x, so there is no solution. Both cases are reported in words, not as a number, because a number would be a lie.

Quadratic, positive discriminant: x² − 5x + 6 = 0. Read off a = 1, b = −5, c = 6. Then D = b² − 4ac = 25 − 24 = 1, which is positive, so there are two different real roots. The formula gives x = (5 ± 1) ÷ 2, so x = 3 and x = 2. Both checks are exact: 9 − 15 + 6 = 0 and 4 − 10 + 6 = 0. A second positive-discriminant case shows the exact-fraction reporting: 2x² − 7x + 3 = 0 has D = 49 − 24 = 25, so x = (7 ± 5) ÷ 4, giving x = 3 and x = 1/2. The decimal 0.5 and the fraction 1/2 are the same number; the solver prints the fraction because it is exact, and it never rounds a root that can be written exactly.

Quadratic, zero and negative discriminant: x² − 6x + 9 = 0 has D = 36 − 36 = 0, so the two branches of the formula land on the same number and the single double root is x = 3. Check: 9 − 18 + 9 = 0. Contrast x² + 2x + 5 = 0, where D = 4 − 20 = −16. No real number squares to a negative discriminant, so there are no real roots; the answers are the complex conjugate pair x = −1 + 2i and x = −1 − 2i, and substituting either one gives exactly 0 + 0i. The sign of D is a forecast you can read before finishing: positive means two real roots, zero means one double root, negative means a complex pair. Guessing the root count before computing is good practice, because a mismatch between your forecast and the solver’s answer is usually a sign error in b² − 4ac.

System, with the defaults: 2x + 3y = 8 and x − y = 1. The determinant is 2 × (−1) − 1 × 3 = −5, which is not zero, so there is exactly one solution: x = 2.2 and y = 1.2. The panel prints both checks: 2 × 2.2 + 3 × 1.2 = 8.0 and 2.2 − 1.2 = 1.0. If the determinant were 0, the lines would be parallel (no solution) or identical (infinitely many), and the panel says that instead of dividing by zero. Inequality, two cases: 3x + 5 < 20 gives x < 5 with no flip, because dividing by positive 3 keeps the direction; test x = 0 works and x = 6 fails, confirming both sides of the boundary. But −2x + 4 > 10 gives −2x > 6, and dividing by −2 flips the direction to x < −3; test x = −4 works (12 > 10) and x = 0 fails (4 > 10 is false), confirming the flip. Cubic, with the defaults: x³ − 6x² + 11x − 6 = 0 factors over the integers with roots x = 1, x = 2, and x = 3 — each one makes the cubic zero. When d = 0, zero itself is a root: x³ − 5x² + 6x = 0 gives x = 0, x = 2, and x = 3. And when no divisor of d works, the panel says there is no integer root rather than inventing one.

Common mistakes when using an equation solver

The most expensive mistake is entering an equation that has not been rewritten into the solver’s shape. Typing the coefficients of 2x² = 8x − 6 as if they were already ax² + bx + c = 0 gives a wrong answer with correct-looking steps, because the solver trusts the boxes. Rewrite first: 2x² − 8x + 6 = 0, so a = 2, b = −8, c = 6, and then D = 64 − 48 = 16, with roots x = 3 and x = 1. The same trap appears in linear mode: 5x = 2x + 9 is not ax + b = c until you collect terms, giving 3x = 9 and x = 3. A solver can only be as right as the numbers you hand it, so the rewriting step is part of solving, not preparation for it.

Sign errors are the second classic failure, and they concentrate in two places: b in the discriminant, and the −b in the formula. For x² − 5x + 6 = 0, b = −5, so b² = 25 (the square removes the sign) but −b = 5 (the formula flips it). Mixing those two up — using −5 where 5 belongs — gives roots that fail substitution, which is exactly why the solver prints the check lines: a root that does not check is a wrong root, however confident the working looked. The third failure is dropping the ±: a quadratic with a positive discriminant has two roots, and answering with only the plus branch is half an answer. The fourth is the inequality flip: dividing or multiplying by a negative number without reversing the direction inverts the entire solution set, and the only reliable catch is a test value on each side of the boundary. The fifth is rounding too early: carrying 2.2 instead of an exact fraction through further steps accumulates error, so keep fractions exact until the final line. And the sixth is treating the Advanced panel like the main solver — typing numbers there and waiting for a live update that never comes, because those three tools only run on their buttons.

What this solver cannot do — honestly

This is an equation solver, not a general mathematics assistant. It has no photo or camera input, no handwriting recognition, and no AI chat: you cannot point it at a textbook page or paste a word problem and expect an answer. Word problems still need a human step — reading the story, choosing the unknown, and writing the equation — and only then does this tool take over. It does not evaluate free-form expressions either: there is no box where you type 3 + 4 × 2 and get 11, because the boxes hold coefficients, not expressions. Expression evaluation is covered in the companion guide on order of operations, and the substitution checks on this page are the one place where the solver evaluates arithmetic for you, when it puts a root back into an equation.

The equation coverage has sharp edges worth knowing before you rely on it. The cubic tool handles only monic cubics, x³ + bx² + cx + d = 0, and only finds integer roots; a cubic like 2x³ + 3x² − x + 5 = 0, or one whose roots are all irrational, is outside it, and the panel says so. Systems are limited to two linear equations in two unknowns — no three-unknown systems, no quadratics mixed in. Inequalities are single-variable and linear only. There is no graphing, no trigonometry, no logarithms, no calculus, and no geometry: no triangle, circle, or angle problem belongs here. Those limits are deliberate. A tool that says “no integer root” or “no unique solution” instead of guessing is more useful than one that prints a plausible number for a problem it never understood, and every limit on this page is stated in the same place the tool would otherwise have failed silently.

Deep dives, mode by mode: a second worked set

The first worked set on this page shows the method. This second set uses different numbers, so you can practise the same moves twice — and each mode links to a full deep-dive article.

Linear. 7x − 9 = 26. Add 9 to both sides: 7x = 35. Divide by 7: x = 5. Check: 7 × 5 − 9 = 26. Linear equations, step by step →

Quadratic. x² + 2x − 15 = 0. Here a = 1, b = 2, c = −15, so D = 2² − 4 × 1 × (−15) = 64 and √D = 8. Then x = (−2 ± 8) / 2, giving x = 3 and x = −5. Check x = 3: 9 + 6 − 15 = 0. Check x = −5: 25 − 10 − 15 = 0. Quadratic: discriminant and roots →

System. 2x + y = 7 and x − y = 2. The determinant is 2 × (−1) − 1 × 1 = −3. By Cramer, x = 3 and y = 1. Check: 2 × 3 + 1 = 7 and 3 − 1 = 2. Systems: Cramer's method →

Inequality. 4x − 8 > 12 gives 4x > 20, so x > 5. And −3x + 6 ≥ 15 gives −3x ≥ 9, so x ≤ −3 — the sign flips because you divided by −3. The boundary x = −3 checks: −3 × (−3) + 6 = 15. Inequalities: the flip rule →

Cubic. x³ − 3x² − 4x + 12 = 0. Testing x = 2: 8 − 12 − 8 + 12 = 0, so (x − 2) is a factor. What is left is x² − x − 6 = (x − 3)(x + 2), so the roots are 2, 3 and −2. Check x = −2: −8 − 12 + 8 + 12 = 0. Cubics: monic integer roots →

Fractions, as decimals. (1/2)x + 1/4 = 3 becomes 0.5x + 0.25 = 3, so 0.5x = 2.75 and x = 5.5. Check: 0.5 × 5.5 + 0.25 = 3. The solver accepts 0.5, not 1/2. Fractions as decimals →

Word problems. Four pens at the same price cost $20 in total. Let the price be p: 4p = 20, so p = $5. The solver never sees the story — you translate it into 4p = 20 first, then the solver solves that equation. Word problems into equations →

What it cannot do. The table below is the honest boundary, mode by mode. Anything marked No is refused rather than guessed — and the article beside it explains why.

FeatureSupported?
Linear equations in one unknownYes
Quadratic equationsYes
Systems of two equations, two unknownsYes
Linear inequalitiesYes
Monic cubics with integer rootsYes
AI solving, photo or camera input, an appNo
Reading word problems directlyNo
Graphing, calculus, trigonometry, geometryNo
Fraction-slash coefficients such as 1/2No — decimals only
Three unknowns, non-monic cubicsNo

What a math solver can and cannot do →

Frequently asked questions

How do you solve a linear equation step by step?

Keep the equation balanced: whatever you do to one side, do to the other. First move the constant term away from the x term — 3x + 5 = 20 becomes 3x = 15 — then divide both sides by the coefficient of x: x = 15 / 3 = 5. This solver shows both moves for your numbers, then checks the answer by substituting it back into the original equation.

What is the quadratic formula?

For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) / (2a). The ± is why a quadratic usually has two roots: one using the plus sign and one using the minus sign. The formula works for every quadratic, including ones that will not factorise neatly.

What does the discriminant tell you?

The discriminant D = b² − 4ac predicts the roots before you finish solving. If D is positive there are two different real roots; if D is exactly 0 the two roots merge into one double root; if D is negative there are no real roots and the answers are a complex conjugate pair, in the form p ± qi.

What happens if a = 0 in a quadratic equation?

The x² term vanishes, so the equation is not really a quadratic at all — it becomes the linear equation bx + c = 0, with the single solution x = −c / b (when b is not 0). This solver says so honestly and solves it as a linear equation instead of forcing the quadratic formula, which would divide by zero.

What does it mean when the roots are complex numbers?

It means the graph of the quadratic never crosses the x-axis, so no real number can make the equation zero. The roots come as a conjugate pair such as −1 + 2i and −1 − 2i, where i is the imaginary unit with i² = −1. They are still exact answers: substituting either one back gives exactly 0 + 0i, as the check on this page shows.

How can I check my answer to an equation?

Substitute it back. Replace x with your answer in the original equation and work out the left side: if it matches the right side (or gives 0 for a quadratic written as ax² + bx + c = 0), the answer is right. Every answer on this page is checked this way automatically, and the working is shown so you can follow it.

How do I solve a system of two equations?

Use substitution, elimination or Cramer’s rule; all three give the same point. For 2x + 3y = 8 and x − y = 1, the determinant is −5, so x = 2.2 and y = 1.2, and substitution checks both: 2 × 2.2 + 3 × 1.2 = 8.0 and 2.2 − 1.2 = 1.0. If the determinant is 0, the lines are parallel (no solution) or identical (infinitely many), and the Advanced panel says so instead of dividing by zero.

Why does dividing an inequality by a negative number flip it?

Because multiplying by −1 reverses order on the number line: 2 < 3 becomes −2 > −3. So −2x + 4 > 10 gives −2x > 6, and dividing by −2 flips the direction to x < −3. The Advanced panel prints a note whenever it flips, so the step is visible. Testing a value confirms the answer: x = −4 satisfies the original, x = 0 does not.

Can I enter fractions like 1/2 as coefficients?

No. The parser accepts an optional sign, digits and at most one decimal point, so 1/2 is rejected with an explanatory message. Enter the decimal instead: 0.5 works exactly as the fraction would, so (1/2)x + 1 = 2 is entered as a = 0.5, b = 1, c = 2 in linear mode, giving x = 2.

What if a cubic has no integer root?

Then it does not factor over the integers, and the Advanced panel says so rather than inventing a root. The cubic still has at least one real root, but it is irrational, and finding it needs the cubic formula or a numerical method. The same honesty applies to quadratics with a negative discriminant: the roots are complex, and the base solver reports the complex pair instead of forcing real numbers.

What is a math solver?

A math solver is a tool that takes a mathematical problem and returns the answer with its working. The solver on this page is an equation solver: you enter the coefficients of a linear equation, a quadratic equation, a pair of simultaneous equations, a linear inequality, or a monic cubic, and it returns the roots with step-by-step working and a substitution check. It is not an AI chatbot and it has no camera or photo input — it solves exactly the equation types its boxes describe, and says so when a problem falls outside them.

How do I use this math solver?

Pick Linear or Quadratic mode, type the coefficients into the boxes, and read the steps and the substitution check — the main solver updates as you type, and the Calculate button scrolls you to the result. For the Advanced options (systems, inequalities, cubics), fill the boxes and press that tool’s button. If your equation is not yet in the form ax + b = c or ax² + bx + c = 0, rewrite it first: move every term to one side for a quadratic, and collect the x terms for a linear equation.

What kinds of equations can this math solver solve?

Five kinds: linear equations ax + b = c; quadratic equations ax² + bx + c = 0, including complex roots when the discriminant is negative and the linear fallback when a = 0; systems of two linear equations in x and y; single-variable linear inequalities with any of the four directions; and monic cubics x³ + bx² + cx + d = 0 that have at least one integer root. It cannot solve word problems, free-form expressions, non-monic cubics, three-unknown systems, or any problem involving trigonometry, logarithms, calculus, or geometry.

How can I become a better math problem solver?

Practise the habits this page rewards: rewrite every equation into standard form before solving, forecast the answer (the discriminant sign for a quadratic, the rough size of a root), solve by hand first, and then use the solver’s steps to find where your working diverged. Always finish with substitution — putting the answer back into the original equation — because a checked answer is the only kind you can trust. Speed comes last: a slow correct method beats a fast method that fails its own check.

Does this math solver show its work step by step?

Yes. For each equation it shows the working in order — reading off the coefficients, the key step (the discriminant for a quadratic, the determinant for a system), the arithmetic, and a substitution check that puts each answer back into the original equation. If you only want the answer, the solution panel still shows it first; the steps underneath explain how it was reached.

Can this solver handle three unknowns?

No. It solves systems of two equations in two unknowns only. A system with three unknowns needs a third independent equation and a 3×3 method, which this solver does not offer. If you enter three unknowns, you will need to reduce the problem first or use a solver built for three variables.

Why does the solver reject a non-monic cubic like 2x³ + 3x² − x + 1 = 0?

Because its cubic method only works for monic cubics — where the x³ coefficient is 1 — with integer roots, found by testing factors of the constant term. A cubic starting with 2x³ does not fit that method, so the solver refuses it rather than guessing. Dividing the whole equation by 2 would make it monic, but the roots would then generally not be integers, so that route does not turn it into a case this method handles.

Can I type a word problem into this solver?

No. The solver reads equations, not sentences. You translate the story into an equation first — choose a variable, write the equation, then enter the coefficients — and the solver solves that equation and checks it. The word-problems article on this site shows the translation step worked through, so the solver part stays honest.

Related guides

Related calculators

Please note: This solver covers linear equations in one unknown and quadratic equations with real coefficients. Roots that are not exact fractions are shown to ten decimal places, and the substitution check shows any residual honestly rather than hiding it. Nothing you type is stored.