Summary: An equation can only be solved when it contains a single variable. Systems of equations contain multiple equations of multiple variables. The only way to solve for all variables is to reduce multiple equations of multiple variables into single equations of single variables. When coefficients are simple, the substitution method and the method of elimination are equally helpful in solving systems of two linear equations in two variables. By focusing on the substitution method, you will be better prepared for solving systems of nonlinear equations!
Ready for practice problems? Click here.
Systems of linear equations are valid anytime we are dealing with simple constraints (restrictions) on sets of two or more unknowns (“variables”). There are myriad examples of systems of linear equations in physics and engineering, but you’ll start with simple scenarios in terms of two variables. Sometimes the two linear equations will be given, and sometimes you’ll have to translate verbal statements into equations. The latter is a tougher skill, and so our first example is a very common type of systems of equations word problem.
Example 1: Two numbers sum to 60, and their difference is 25. What are the two numbers?
We first need to translate these pieces of information (our constraints) into equations to actually create our system! Let’s call one unknown number x, and the other unknown number y. Knowing that “sum” means addition and “difference” means subtraction, we can translate these constraints into two equations*:
Great, there’s our system! Now, how do we solve it?
An equation can only be solved when it has a single variable, such as just x or just y. Unfortunately for us, each equation has both x and y. Everything that comes next revolves around the answer to the question: How can we reduce our two equations with two variables into one equation with one variable that can actually be solved?
With this directive in mind, we’ll likely hit on one of the two ways of solving a system of linear equations: The substitution method or the method of elimination.
The substitution method always works, no matter how awful your system of equations looks, so we’ll start there. In this method, we rearrange one equation (your choice, but I suggest choosing the easier one!) to solve for one variable in terms of the other variable. Then, we substitute (“plug in”) this relationship into the remaining equation, which reduces the remaining equation down to one variable. From there, we simplify and solve!
Let’s go back to our system of equations and apply the substitution method. Each equation is pretty equally simple, so you could easily rearrange either one. I’ll choose to rearrange the first equation to solve for y in terms of x:
Then I substitute this relationship for y in the second equation, simplify, and solve for x:
Now that we have solved for x, we can most easily go back to our relationship for y in terms of x and substitute our newfound value of x:
Voila! Our numbers are 35 and 25.
This same system can also be easily solved by the method of elimination. Instead of doing the work to solve for one variable in one equation and substituting it into the other equation, we take advantages of similarities between the two equations to add them and thereby easily cancel one of the two variables.
Let’s go back to our example. Each of the equations has very simple coefficients, which makes using the method of elimination easier I take advantage of the fact that y will cancel if I add the two equations (making sure that the variables are lined up first!):
Now I have a very simple equation that I can solve for x:
Lo and behold, it’s the same value for x that I found via the substitution method! Again, I can substitute this value for x into either equation (it doesn’t really make a difference this time) and solve for y. I will substitute into the first equation:
*Would it have mattered if I had reversed the second equation and instead written it as y – x = 10? Not at all! We would have found that y = 35 and x = 25 in this case, but the way we named our two unknown numbers in the first place was arbitrary. It doesn’t matter what we name them, so long as we come up with the two correct numbers!
That example had very straightforward coefficients. What about an example that doesn’t?
Substitution method: When solving for one variable in terms of another variable, my aim is to take the easiest route. I choose the simplest-looking equation and isolate the easier-looking variable. In this particular system, the second equation has simpler coefficients (since they are all even, versus the first equation where one coefficient is even and the others are odd), and the smallest coefficient is in front of x. Therefore, I will rearrange this equation to solve for x:
Now, I can substitute this relationship for x into the first equation, and solve for y!
Now that we’ve solved for y, we can go back to our relationship for x in terms of y and substitute our value for y:
Success! Our numbers are x = 3 and y = 1! We could also express this solution as a point: (3, 1)
Method of elimination: The method of elimination will work just as easily as the substitution method. As before, I make sure that my variables are lined up before proceeding. While no coefficients perfect match up, I notice that I could easily cancel the y terms by multiplying the first equation by 2 and adding it to the second equation:
Now we can solve this simple equation for x:
Substitute this value for x into either of the original equations and rearrange to solve for y. I’ll plug it into the first equation because it’s a tiny bit simpler:
Once again, we find that x = 3 and y = 1!
Now it’s time for you to put these methods to the test!
Solve the following system of linear equations, using both the substitution method and the method of elimination for each problem. After solving each problem, think about which method was easier, and why that might be the case.
This system is most easily solved by substitution, since we can easily rearrange the first equation to solve for x:
It’s not as easy to solve for either variable and use substitution here, but elimination will work well! We can easily multiple the second equation by 2 and add it to the first equation to eliminate x:
We finish up by plugging this value for y into either equation to solve for x. I think the first equation is a bit easier because we don’t have to deal with negatives, and so I’ll solve for x in that equation:
Again, it’s not easy to solve for either variable and use substitution here, but elimination will work well! It is easiest to eliminate x, as we can multiply the first equation by -4 and dd it to the second equation:
We finish up by plugging this value for y into either equation to solve for x. I think the first equation is easier because it has a smaller leading coefficient, and so I’ll solve for x in that equation:
Fractions make this system more difficult. To take care of that, I will start by multiplying the first equation by 2, and the second equation by 9 (the least common denominator). This takes away the fractions! Much better! This problem could be solved fairly easily using the method of elimination, but some of the coefficients would get quite big. Instead, since all three coefficients in the first equation are multiples of 3, I will rearrange the first equation to solve for y: Now I will substitute that expression for y into the second equation, and rearrange to solve for x: Now that I know the value of x, I can plug it into the equation for y:
Uh oh, this one looks difficult. The variables aren’t lined up, and none of the coefficients are very nice!
I’m going to use the method of elimination to eliminate x, because the x‘s have the simplest coefficients. First off, I’ll have to line up the equations:
Better, but this time, I’ll have to multiply each equation by a constant. I will multiply the first equation by 2 and the second equation by -3, and then add them: