Solving a system of three linear equations
Number of solutions to the linear system
In this lesson we’ll look at how to solve systems of three linear equations in three variables.
If a system of three linear equations has solutions, each solution will consist of one value for each variable.
If the three equations in such a linear system are “independent of one another,” the system will have either one solution or no solutions. All the systems of three linear equations that you’ll encounter in this lesson have at most one solution.
How to solve systems of linear equations, when the system is made of three equations
Take the course
Want to learn more about Linear Algebra? I have a step-by-step course for that. :)
Solve the system of equations
Solve the system of equations.
[1] ???-x-5y+z=17???
[2] ???-5x-5y+5z=5???
[3] ???2x+5y-3z=-10???
Notice that the coefficients of ???y??? in equations [1] and [3] are ???-5??? and ???5???, respectively. If we add these two equations, the ???y??? terms will cancel (we’ll eliminate the variable ???y???) and we’ll get an equation in only the variables ???x??? and ???z???.
???(-x-5y+z)+(2x+5y-3z)=17+(-10)???
Remove parentheses and combine like terms.
???-x-5y+z+2x+5y-3z=17-10???
???-x+2x-5y+5y+z-3z=17-10???
???x-2z=7???
You might have also noticed that the coefficients of ???y??? in equations [2] and [3] are ???-5??? and ???5???, respectively, so we can add these two equations to get another equation in only the variables ???x??? and ???z???.
???(-5x-5y+5z)+(2x+5y-3z)=(5)+(-10)???
Remove parentheses and combine like terms.
???-5x-5y+5z+2x+5y-3z=5-10???
???-5x+2x-5y+5y+5z-3z=5-10???
???-3x+2z=-5???
The coefficients of ???z??? in our two new equations are ???-2??? and ???2???, respectively. If we add these two equations, we can eliminate the variable ???z???, and then solve for ???x???.
???x-2z=7???
???-3x+2z=-5???
???(x-2z)+(-3x+2z)=7+(-5)???
Remove parentheses and combine like terms.
???x-2z-3x+2z=7-5???
???x-3x-2z+2z=7-5???
???-2x=2???
???x=-1???
Choose one of the new equations, and plug in ???-1??? for ???x???, and then solve for ???z???. We’ll choose ???x-2z=7???.
???-1-2z=7???
???-2z=8???
???z=-4???
Now choose one of the three original equations, and plug in ???-1??? for ???x??? and ???-4??? for ???z???, and then solve for ???y???. We’ll choose equation [1].
[1] ???-x-5y+z=17???
???-(-1)-5y+(-4)=17???
Simplify and solve for ???y???.
???1-5y-4=17???
???-5y+1-4=17???
???-5y-3=17???
???-5y=20???
???y=-4???
The solution is ???(-1,-4,-4)??? or ???x=-1???, ???y=-4???, and ???z=-4???.
Let’s do one more.
Example
Use any method to solve the system of equations.
[1] ???3a-3b+4c=-23???
[2] ???a+2b-3c=25???
[3] ???4a-b+c=25???
None of the terms with the same variable have the same coefficient (or coefficients that are equal in absolute value but opposite in sign). So we’ll need to multiply one of the equations by some number such that by combining the resulting equation with one of the other two equations, we’ll be able to eliminate a variable. Let’s multiply equation [2] by ???3???, so we can eliminate the variable ???a??? by subtracting the resulting equation from equation [1].
???3(a+2b-3c)=3(25)???
Remove the parentheses.
[4] ???3a+6b-9c=75???
Now let’s subtract equation [4] from equation [1], which will give us an equation in only the variables ???b??? and ???c???.
[1] ???3a-3b+4c=-23???
[4] ???3a+6b-9c=75???
???(3a-3b+4c)-(3a+6b-9c)=(-23)-(75)???
Eliminate the parentheses, and then combine like terms.
???3a-3b+4c-3a-6b+9c=-23-75???
???3a-3a-3b-6b+4c+9c=-23-75???
[5] ???-9b+13c=-98???
We need to get another equation in only the variables ???b??? and ???c???. Let’s use equations [2] and [3].
This time we need to multiply equation [2] by ???4???, so we can subtract it from equation [3] and eliminate the variable ???a???.
[2] ???a+2b-3c=25???
Remove the parentheses.
???4(a+2b-3c)=4(25)???
[6] ???4a+8b-12c=100???
Now we’ll subtract equation [6] from equation [3].
[3] ???4a-b+c=25???
???(4a-b+c)-(4a+8b-12c)=(25)-(100)???
Eliminate the parentheses, and then combine like terms.
???4a-b+c-4a-8b+12c=25-100???
???4a-4a-b-8b+c+12c=25-100???
[7] ???-9b+13c=-75???
With [5] and [7], we now have a system of two equations in the variables ???b??? and ???c???.
[5] ???-9b+13c=-98???
[7] ???-9b+13c=-75???
If we subtract [7] from [5], we get
???(-9b+13c)-(-9b+13c)=-98-(-75)???
Eliminate the parentheses, and combine like terms.
???-9b+13c+9b-13c=-98+75???
???0=-23???
Isn’t that impossible?
Actually, it isn’t impossible, but if something like that happens, it means that the original system of three equations has no solution.