Welcome to Solving Systems by Substitution! This is the very first lesson of the course, so we are starting fresh and building from the ground up. Today, we will learn how to solve a two-variable system of equations when one equation already has a variable isolated for us. By the end of this lesson, you will be able to substitute, solve, back-substitute, and verify your answer with confidence.
What Is a System of Equations?
A system of equations is a set of two or more equations that share the same variables. When we work with a two-variable system, our goal is to find a pair of values — one for each variable — that makes both equations true at the same time. We write this answer as an ordered pair(x,y).
For example, consider this system:
y=2x+1x+y=7
A solution here is a specific pair (x,y) that satisfies both equations simultaneously. Throughout this course, we will develop reliable techniques for finding that pair, starting with the most intuitive one: substitution.
The Key Idea Behind Substitution
Substitution rests on one straightforward principle: if two things are equal, one can replace the other. Think of it like a name tag at a conference. If someone's tag reads "Dr. Patel," then every time the schedule lists "Dr. Patel," you know exactly who to look for. The name and the person are interchangeable.
In a system of equations, when one equation tells us y=2x+1, it gives us a direct label for y. Anywhere we see y in the other equation, we can swap it out for 2x+1. This swap turns a two-variable equation into a single-variable equation — and single-variable equations are ones you already know how to handle.
The Substitution Process Step by Step
When one variable is already isolated, the method follows four clear steps:
Identify the equation where a variable is already by itself (for example, y=some expression).
Substitute that expression into the other equation, replacing the isolated variable.
Solve the resulting single-variable equation to find the first value.
Back-substitute the value you just found into the isolated equation to recover the second variable.
After these four steps, you have your ordered pair. But you are not truly finished until you verify the solution in both original equations, which we will cover shortly.
At a glance, the full process looks like this:
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Walking Through a Full Example
Verifying the Solution
Substitution with Negative Coefficients
Common Pitfalls to Watch For
Conclusion and Next Steps
In this lesson, you learned the substitution method for solving a two-variable system when one equation already gives you an isolated variable. The process boils down to four steps: identify the isolated expression, substitute it into the other equation, solve the resulting single-variable equation, and back-substitute to find the second value. You then verify the ordered pair in both original equations to confirm the result.
Now it is time to put these ideas to work. Head into the practice exercises next, where you will build fluency with each step — from choosing the right substitution to tackling a real-world scenario involving negative coefficients on your own.
Step 1 — Identify. The first equation already has y isolated: y=3x−2. That is our substitution expression.
Step 2 — Substitute. We replace y in the second equation with (3x−2). Notice the parentheses — they are important for keeping signs correct.
2x+(3x−2)=8
Step 3 — Solve. Combine like terms and solve for x:
5x−2=85x=10x=2
Step 4 — Back-substitute. Plug x=2 back into the first equation to find y:
y=3(2)−2=6−2=4
Our solution is the ordered pair (2,4).
Finding an answer is only half the battle. You should always plug the ordered pair back into both original equations to make sure everything checks out. This step catches arithmetic mistakes and gives you certainty.
Check in Equation 1:y=3x−2
4=3(2)−2=6−2=4✓
Check in Equation 2:2x+y=8
2(2)+4=4+4=8✓
Both equations are satisfied, so (2,4) is confirmed as the correct solution. Make it a habit to always perform this verification — it only takes a moment and can save a lot of frustration.
The same four steps work perfectly even when negative numbers appear. To see this in a practical setting, imagine two prepaid phone cards. Card A starts with a $12 balance and costs $2 per call, while Card B starts with a $17 balance and costs $3 per call. If x represents the number of calls and y represents the remaining balance, the system looks like this:
y=−2x+123x+y=17
Identify:y is already isolated in the first equation.
Substitute into the second equation, using parentheses to protect the negative sign:
3x+(−2x+12)=17
Solve:
x+12=17x=5
Back-substitute into the first equation:
y=−2(5)+12=−10+12=2
Our solution is (5,2). Let's verify:
Equation 1:−2(5)+12=2=y✓
Equation 2:3(5)+2=15+2=17✓
Everything checks out. Notice that the process did not change at all; the negative sign simply came along for the ride as long as we were careful with parentheses.
As you start practicing, keep these frequent mistakes in mind:
Substituting into the wrong equation. Always substitute into the equation that does not already have the variable isolated. Substituting back into the same equation just produces a true but useless statement like 3x−2=3x−2.
Dropping parentheses. When you replace y with an expression like 3x−2, wrapping it in parentheses ensures you handle signs and distribution correctly. Without them, 2x+3x−2 might accidentally become 2x+3x+2.
Skipping verification. It is tempting to stop once you have an ordered pair, but a quick check in both equations is the only way to be sure your arithmetic was correct.