Paul's Online Notes
Paul's Online Notes
Home / Algebra / Systems of Equations / Linear Systems with Three Variables
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

Section 7.2 : Linear Systems with Three Variables

This is going to be a fairly short section in the sense that it’s really only going to consist of a couple of examples to illustrate how to take the methods from the previous section and use them to solve a linear system with three equations and three variables.

So, let’s get started with an example.

Example 1 Solve the following system of equations. \[\begin{align*}x - 2y + 3z & = 7\\ 2x + y + z & = 4\\ - 3x + 2y - 2z & = - 10\end{align*}\]
Show Solution

We are going to try and find values of \(x\), \(y\), and a \(z\) that will satisfy all three equations at the same time. We are going to use elimination to eliminate one of the variables from one of the equations and two of the variables from another of the equations. The reason for doing this will be apparent once we’ve actually done it.

The elimination method in this case will work a little differently than with two equations. As with two equations we will multiply as many equations as we need to so that if we start adding pairs of equations we can eliminate one of the variables.

In this case it looks like if we multiply the second equation by 2 it will be fairly simple to eliminate the \(y\) term from the second and third equation by adding the first equation to both of them. So, let’s first multiply the second equation by two.

\[\begin{align*} x-2y+3z & =7 & \underrightarrow{\text{same}}\hspace{0.1in} & & x-2y+3z & =7 \\ 2x+y+z & =4 & \underrightarrow{\times \,\,2}\hspace{0.1in} & & 4x+2y+2z & =8 \\ -3x+2y-2z & =-10 & \underrightarrow{\text{same}}\hspace{0.1in} & & -3x+2y-2z & =-10 \\ \end{align*}\]

Now, with this new system we will replace the second equation with the sum of the first and second equations and we will replace the third equation with the sum of the first and third equations.

Here is the resulting system of equations.

\[\begin{align*}x - 2y + 3z & = 7\\ 5x\,\,\,\,\,\,\,\,\,\,\,\, + 5z & = 15\\ - 2x\,\,\,\,\,\,\,\,\,\,\,\,\,\, + z & = - 3\end{align*}\]

So, we’ve eliminated one of the variables from two of the equations. We now need to eliminate either \(x\) or \(z\) from either the second or third equations. Again, we will use elimination to do this. In this case we will multiply the third equation by -5 since this will allow us to eliminate \(z\) from this equation by adding the second onto is.

\[\begin{align*} x-2y+3z & =7 & \underrightarrow{\text{same}} \hspace{0.1in} & & x-2y+3z & =7 \\ 5x\,\,\,\,\,\,\,\,\,\,\,\,+5z & =15 & \underrightarrow{\text{same}} \hspace{0.1in} & & 5x\,\,\,\,\,\,\,\,\,\,\,\,+5z & =15 \\ -2x\,\,\,\,\,\,\,\,\,\,\,\,\,\,+z & =-3 & \underrightarrow{\times \,\,-5} \hspace{0.1in} & & 10x\,\,\,\,\,\,\,\,\,\,\,\,-5z & =15 \\ \end{align*}\]

Now, replace the third equation with the sum of the second and third equation.

\[\begin{align*}x - 2y + 3z & = 7\\ 5x\,\,\,\,\,\,\,\,\,\,\,\, + 5z & = 15\\ 15x\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, & = 30\end{align*}\]

Now, at this point notice that the third equation can be quickly solved to find that \(x = 2\). Once we know this we can plug this into the second equation and that will give us an equation that we can solve for \(z\) as follows.

\[\begin{align*}5\left( 2 \right) + 5z & = 15\\ 10 + 5z & = 15\\ 5z & = 5\\ z & = 1\end{align*}\]

Finally, we can substitute both \(x\) and \(z\) into the first equation which we can use to solve for \(y\). Here is that work.

\[\begin{align*}2 - 2y + 3\left( 1 \right) & = 7\\ - 2y + 5 & = 7\\- 2y & = 2\\ y & = - 1\end{align*}\]

So, the solution to this system is \(x = 2\), \(y = - 1\) and \(z = 1\).

That was a fair amount of work and in this case there was even less work than normal because in each case we only had to multiply a single equation to allow us to eliminate variables.

In the next section we’ll be looking at a third method for solving systems that is basically a shorthand method for what we did in the previous example. The work using that method will be messy as well, but it will be slightly easier to do once you get the hang of it.

In the previous example all we did was use the method of elimination until we could start solving for the variables and then just back substitute known values of variables into previous equations to find the remaining unknown variables.

Not every linear system with three equations and three variables uses the elimination method exclusively so let’s take a look at another example where the substitution method is used, at least partially.

Example 2 Solve the following system of equations. \[\begin{align*}2x - 4y + 5z & = - 33\\ 4x - y & = - 5\\ - 2x + 2y - 3z & = 19\end{align*}\]
Show Solution

Before we get started on the solution process do not get excited about the fact that the second equation only has two variables in it. That is a fairly common occurrence when we have more than two equations in the system.

In fact, we’re going to take advantage of the fact that it only has two variables and one of them, the \(y\), has a coefficient of -1. This equation is easily solved for \(y\) to get,

\[y = 4x + 5\]

We can then substitute this into the first and third equation as follows,

\[\begin{align*}2x - 4\left( {4x + 5} \right) + 5z & = - 33\\- 2x + 2\left( {4x + 5} \right) - 3z & = 19\end{align*}\]

Now, if you think about it, this is just a system of two linear equations with two variables (\(x\) and \(z\)) and we know how to solve these kinds of systems from our work in the previous section.

First, we’ll need to do a little simplification of the system.

\[\begin{array}{*{20}{c}}{2x - 16x - 20 + 5z = - 33}\\{ - 2x + 8x + 10 - 3z = 19}\end{array}\hspace{0.25in} \to \hspace{0.25in}\begin{array}{*{20}{c}}{ - 14x + 5z = - 13}\\{6x - 3z = 9}\end{array}\]

The simplified version looks just like the systems we were solving in the previous section. Well, it’s almost the same. The variables this time are \(x\) and \(z\) instead of \(x\) and \(y\), but that really isn’t a difference. The work of solving this will be the same.

We can use either the method of substitution or the method of elimination to solve this new system of two linear equations.

If we wanted to use the method of substitution we could easily solve the second equation for \(z\) (you do see why it would be easiest to solve the second equation for \(z\) right?) and substitute that into the first equation. This would allow us to find \(x\) and we could then find both \(z\) and \(y\).

However, to make the point that often we use both methods in solving systems of three linear equations let’s use the method of elimination to solve the system of two equations. We’ll just need to multiply the first equation by 3 and the second by 5. Doing this gives,

\[\begin{align*} -14x+5z & =-13 & \underrightarrow{\times \,\,3}\hspace{0.5in} & -42x+15z=-39 \\ 6x-3z & =9 & \underrightarrow{\times \,\,5}\hspace{0.5in} & \underline{\hspace{0.25in}30x-15z=45} \\ & & & \hspace{0.5in} -12x=6 \\ \end{align*}\]

We can now easily solve for \(x\) to get \(x = - \frac{1}{2}\). The coefficients on the second equation are smaller so let’s plug this into that equation and solve for \(z\). Here is that work.

\[\begin{align*}6\left( { - \frac{1}{2}} \right) - 3z & = 9\\ - 3 - 3z & = 9\\ - 3z & = 12\\ z & = - 4\end{align*}\]

Finally, we need to determine the value of \(y\). This is very easy to do. Recall in the first step we used substitution and in that step we used the following equation.

\[y = 4x + 5\]

Since we know the value of \(x\) all we need to do is plug that into this equation and get the value of \(y\).

\[y = 4\left( { - \frac{1}{2}} \right) + 5 = 3\]

Note that in many cases where we used substitution on the very first step the equation you’ll have at this step will contain both \(x\)’s and \(z\)’s and so you will need both values to get the third variable.

Okay, to finish this example up here is the solution : \(x = - \frac{1}{2}\), \(y = 3\) and \(z = - 4\).

As we’ve seen with the two examples above there are a variety of paths that we could choose to take when solving a system of three linear equations with three variables. That will always be the case. There is no one true path for solving these. However, having said that there is often a path that will allow you to avoid some of the mess that can arise in solving these types of systems. Once you work enough of these types of problems you’ll start to get a feel for a “good” path through the solution process that will (hopefully) avoid some of the mess.

Interpretation of solutions in these cases is a little harder in some senses. All three of these equations in the examples above are equations of planes in three dimensional space and solution to this systems in the examples above is the one point that all three of the planes have in common.

Note as well that it is completely possible to have no solutions to these systems or infinitely many solutions as we saw in the previous section with systems of two equations. We will look at these cases once we have the next section out of the way.