Solving by Substitution

Solving by Substitution solves a system of equations by replacing one variable with its equivalent expression, turning two equations into one.

{y=mx+ba2x+b2y=c2\begin{cases} y = mx + b \\ a_2x + b_2y = c_2 \end{cases}

Solve a problem with Solving by Substitution

Type the problem. The solver will use Solving by Substitution where Solving by Substitution is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Solving by Substitution takes
mm
bb
a2a_2
b2b_2
c2c_2
xx
yy
Solving by Substitution
SymbolMeaning
mmThe slope of the line in the first equation—how steeply it rises or falls. Reading mm as the yy-intercept bb causes you to swap which coefficient applies to xx.
bbThe yy-intercept, the value of yy when x=0x = 0. Confusing bb with mm reverses which term controls the steepness.
a2a_2The coefficient of xx in the second equation—the number being multiplied by xx. Treating a2a_2 as a variable instead of a constant derails the setup.
b2b_2The coefficient of yy in the second equation—the number being multiplied by yy. Misreading b2b_2 as the variable bb from the first equation causes sign and substitution errors.
c2c_2The constant on the right side of the second equation—the total the two terms on the left must equal. Omitting c2c_2 during setup leads to an equation not equivalent to the original.
xxThe independent variable, often representing horizontal position or time. Solving for xx means finding the specific value(s) that make both equations true simultaneously.
yyThe dependent variable, often representing vertical position or a response value. In substitution, you typically replace yy with the expression mx+bmx + b from the first equation.

When to use it

Use this method when one equation is already solved for one variable, or can be rearranged easily to do so.

Level

Usually taught in: Algebra I · Appears on: SAT

Worked examples

1. Substitute into a standard form equation

Problem

Solve the system: y=2x+1y = 2x + 1 and 3x+y=113x + y = 11.
  1. 3x+(2x+1)=113x + (2x + 1) = 11

    Substitute y=2x+1y = 2x + 1 from the first equation into the second equation.

  2. 5x+1=115x + 1 = 11

    Combine like terms: 2x+3x=5x2x + 3x = 5x.

  3. 5x=105x = 10

    Subtract 1 from both sides.

  4. x=2x = 2

    Divide both sides by 5.

  5. y=2(2)+1=5y = 2(2) + 1 = 5

    Substitute x=2x = 2 back into the first equation to find yy.

Answer: x=2,y=5x = 2, \, y = 5

Since the first equation is already solved for yy, we can directly substitute its expression into the second equation, eliminating yy and leaving one equation in xx. Once we find xx, we substitute back to find yy.

2. Substitute with negative coefficients

Problem

Solve the system: y=x+3y = -x + 3 and 2x+3y=12x + 3y = 1.
  1. 2x+3(x+3)=12x + 3(-x + 3) = 1

    Substitute y=x+3y = -x + 3 into the second equation.

  2. 2x3x+9=12x - 3x + 9 = 1

    Distribute the 3: 3(x)=3x3 \cdot (-x) = -3x and 33=93 \cdot 3 = 9.

  3. x+9=1-x + 9 = 1

    Combine like terms: 2x3x=x2x - 3x = -x.

  4. x=8-x = -8

    Subtract 9 from both sides.

  5. x=8x = 8

    Divide both sides by 1-1.

  6. y=8+3=5y = -8 + 3 = -5

    Substitute x=8x = 8 back into the first equation.

Answer: x=8,y=5x = 8, \, y = -5

This example requires careful handling of negative signs during distribution. When you substitute an expression with a leading negative (like x+3-x + 3), always use parentheses to ensure the coefficient outside is distributed correctly to all terms.

3. Find driving times on a road trip

Problem

You drive 250 miles total: part of the way at 50 mph and the rest at 60 mph. The whole trip takes 4.5 hours. Let xx be the time (in hours) at 50 mph and yy be the time at 60 mph. The time equation is y=4.5xy = 4.5 - x and the distance equation is 50x+60y=25050x + 60y = 250. How long did you drive at each speed?
  1. 50x+60(4.5x)=25050x + 60(4.5 - x) = 250

    Substitute y=4.5xy = 4.5 - x from the time equation into the distance equation.

  2. 50x+27060x=25050x + 270 - 60x = 250

    Distribute: 604.5=27060 \cdot 4.5 = 270 and 60(x)=60x60 \cdot (-x) = -60x.

  3. 10x+270=250-10x + 270 = 250

    Combine like terms: 50x60x=10x50x - 60x = -10x.

  4. 10x=20-10x = -20

    Subtract 270 from both sides.

  5. x=2x = 2

    Divide both sides by 10-10.

  6. y=4.52=2.5y = 4.5 - 2 = 2.5

    Substitute x=2x = 2 back into the time equation.

Answer: x=2 hours (at 50 mph),y=2.5 hours (at 60 mph)x = 2 \text{ hours (at 50 mph)}, \, y = 2.5 \text{ hours (at 60 mph)}

Real-world problems often naturally give you one equation solved for one variable, making substitution the most efficient method. Here, the time relationship is already solved for yy, so we skip straight to substituting into the distance equation.

Common mistakes

Where Solving by Substitution usually goes wrong
Answer came out wrong
Stopping after finding x=2x = 2 without computing yy.
Always substitute your solution back into one of the original equations to find the other variable: y=2(2)+1=5y = 2(2) + 1 = 5.
Substituting y=x+3y = -x + 3 into 2x+3y=12x + 3y = 1 and writing 2x+3x+3=12x + 3 - x + 3 = 1, skipping parentheses and distribution.
Always use parentheses: 2x+3(x+3)=12x3x+9=12x + 3(-x + 3) = 1 \Rightarrow 2x - 3x + 9 = 1.
Rearranging an equation to solve for a variable but then forgetting to use the solved form during substitution.
Always complete the rearrangement step first: solve 3x+y=113x + y = 11 for yy to get y=3x+11y = -3x + 11, then substitute this expression.
The mistakeWhy it is wrongThe fix
Stopping after finding x=2x = 2 without computing yy.A system's solution must specify all variables; an incomplete answer leaves the problem unsolved.Always substitute your solution back into one of the original equations to find the other variable: y=2(2)+1=5y = 2(2) + 1 = 5.
Substituting y=x+3y = -x + 3 into 2x+3y=12x + 3y = 1 and writing 2x+3x+3=12x + 3 - x + 3 = 1, skipping parentheses and distribution.Without parentheses, the coefficient 3 is not distributed across all terms in the substituted expression; you lose the factor of 3 on the x-x term.Always use parentheses: 2x+3(x+3)=12x3x+9=12x + 3(-x + 3) = 1 \Rightarrow 2x - 3x + 9 = 1.
Rearranging an equation to solve for a variable but then forgetting to use the solved form during substitution.Substituting an unsolved equation (like 3x+y=113x + y = 11) into another equation doesn't work; you need the explicit expression (like y=3x+11y = -3x + 11).Always complete the rearrangement step first: solve 3x+y=113x + y = 11 for yy to get y=3x+11y = -3x + 11, then substitute this expression.

Tips and when to use something else

  • Use substitution when one equation is already solved for a variable—it saves you an extra rearrangement step.
  • Always use parentheses when substituting a multi-term expression, even if it looks redundant; they prevent sign and distribution errors.
  • If both equations are in standard form (ax+by=cax + by = c), try Solving by Elimination instead—it often avoids fractions and is faster.
  • Substitute your solution (x,y)(x, y) back into both original equations to verify; a wrong solution fails at least one check.

Frequently asked questions

Can you use substitution if neither equation is already solved for a variable?
Yes, but you'll need to solve one equation for a variable first. Choose the variable with coefficient 1 or –1 to minimize fractions. For example, from 2x+y=102x + y = 10, solving for yy gives y=2x+10y = -2x + 10, which you can then substitute into the other equation.
What does it mean if I get 0=00 = 0 when I substitute?
This means the two equations represent the same line, and there are infinitely many solutions. Any (x,y)(x, y) on that line satisfies both equations. This happens when you multiply one equation by a constant to get the other.
What's the difference between substitution and elimination?
Substitution replaces one variable with its equivalent expression, turning two equations into one. Elimination uses addition or subtraction to cancel a variable. Choose substitution when a variable is already isolated (or easily isolated); choose elimination when the coefficients allow quick cancellation.
Do I have to substitute into the same equation I solved for?
No—you substitute the solved expression into the other equation. If you substitute into the same equation, you just get a tautology (x=xx = x) and learn nothing new.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18