Substitution Method Calculator
Solve a system of equations by isolating one variable and substituting it into the other equation — for two straight lines, for an equation already solved for a variable, or for a line crossing a parabola — each with its own visual and full step-by-step working.
Background
Substitution turns two unknowns into one. Once a variable is expressed in terms of the other — either because you solve for it, or because it was handed to you already isolated — you can drop that expression straight into the remaining equation. What's left is a single equation in a single variable, which is always easier to solve. The same trick works whether the second equation is another line or a curve like a parabola.
How to use this calculator
- Two Equations handles a standard system a₁x+b₁y=c₁, a₂x+b₂y=c₂ — the calculator isolates a variable in Equation 1 first, then substitutes.
- Already Solved handles the common textbook shortcut where one equation is handed to you as y=mx+b, ready to plug straight into the other equation.
- Line & Parabola substitutes a linear equation into a quadratic one, showing whether the two graphs cross twice, touch once, or never meet.
- Click Calculate to see the visual and the full step-by-step working for whichever mode you picked.
How substitution works
Substitution replaces one variable with an equivalent expression pulled from another equation, collapsing two unknowns into one so a single equation can be solved directly.
If a variable is already isolated (like y=mx+b), substitute immediately; otherwise solve one equation for one variable first — picking a variable with coefficient 1 keeps things fraction-free.
Once one unknown is found, plug it back into the isolated expression to recover the other unknown — this "back-substitution" step is what finishes the solution.
If substitution eliminates every variable and leaves a false statement (like 0 = 5), the system has no solution. If it leaves a true statement (like 0 = 0), every point on that line is a solution — infinitely many.
The same idea works when one equation is a curve: substituting a line into a parabola reduces the system to one quadratic equation, whose discriminant reveals two intersections, one (tangent), or none.
Formula & Equations Used
Two Equations: solving Eq. 1 for y and substituting into Eq. 2 gives x = (c₂b₁ − b₂c₁) / (a₂b₁ − b₂a₁), then y = (c₁ − a₁x) / b₁.
Already Solved: substituting y=mx+b into a₂x+b₂y=c₂ gives x = (c₂ − b₂b) / (a₂ + b₂m), then y = mx + b.
Line & Parabola: substituting y=mx+k into y=Ax²+Bx+C gives Ax² + (B−m)x + (C−k) = 0.
Discriminant: D = (B−m)² − 4A(C−k) — two real roots if D>0, one repeated (tangent) root if D=0, no real roots if D<0.
Quadratic formula: x = [−(B−m) ± √D] / (2A), then y = mx + k for each root.
Exact fractions: when a decimal solution has a clean rational form (denominator ≤ 24), the calculator also shows it as a fraction — e.g. x ≈ 2.3333 alongside x = 7/3.
Example Problems & Step-by-Step Solutions
These cover cases the Quick Examples chips above don't already demonstrate.
Example 1 — Fruit stand pricing
3 apples + 2 bananas cost \$16. An apple costs \$2 more than a banana. Find each price.
Step: Let a=apple, b=banana. a=b+2. Substitute: 3(b+2)+2b=16 → 5b=10 → b=2, a=4.
Result: Apple = \(4, banana = \)2.
Example 2 — Already-solved system
Solve y = 4x − 5 and 3x − y = 1.
Step: 3x−(4x−5)=1 → −x+5=1 → x=4. Then y=4(4)−5=11.
Result: x = 4, y = 11.
Example 3 — Skateboard ramp and rail
A ramp's height follows h = −0.5x² + 4x. A straight rail follows y = x. Where do they meet?
Step: x = −0.5x²+4x → 0.5x²−3x=0 → x(0.5x−3)=0 → x=0 or x=6.
Result: They meet at (0, 0) and (6, 6).
Example 4 — Negative solution
Solve 2x − y = 4 and x + 3y = −5.
Step: From Eq.1: y=2x−4. Substitute: x+3(2x−4)=−5 → 7x=7 → x=1. Then y=2(1)−4=−2.
Result: x = 1, y = −2.
Frequently Asked Questions
Why does substitution actually work?
An equation solved for a variable tells you that variable equals a certain expression for every point on that line or curve — swapping one for the other doesn't change what's true, it just rewrites the system with one fewer unknown.
What does it mean if substitution leads to a false statement, like 0 = 5?
It means the system has no solution — the two equations describe lines (or curves) that never meet anywhere.
What does it mean if substitution leads to a true statement, like 0 = 0?
It means the two equations describe the same line, so every point that satisfies one automatically satisfies the other — infinitely many solutions.
How many times can a line and a parabola intersect?
Up to twice. Substituting the line into the parabola always produces one quadratic equation, and a quadratic has at most two real roots — a positive discriminant gives two crossings, zero gives one tangent point, and a negative discriminant gives none.