We've updated our

TEXT

# Solve Systems of Three Equations in Three Variables

### Learning Outcomes

• Determine whether an ordered triple is a solution to a system of three equations.
• Use back substitution to find a solution to a system of three equations.
• Write the equations for a system given a scenario, and solve.
In order to solve systems of equations in three variables, known as three-by-three systems, the primary goal is to eliminate one variable at a time to achieve back-substitution. A solution to a system of three equations in three variables $\left(x,y,z\right),\text{}$ is called an ordered triple. To find a solution, we can perform the following operations:
1. Interchange the order of any two equations.
2. Multiply both sides of an equation by a nonzero constant.
3. Add a nonzero multiple of one equation to another equation.
Graphically, the ordered triple defines the point that is the intersection of three planes in space. You can visualize such an intersection by imagining any corner in a rectangular room. A corner is defined by three planes: two adjoining walls and the floor (or ceiling). Any point where two walls and the floor meet represents the intersection of three planes.

### A General Note: Number of Possible Solutions

The planes illustrate possible solution scenarios for three-by-three systems.
• Systems that have a single solution are those which, after elimination, result in a solution set consisting of an ordered triple $\left\{\left(x,y,z\right)\right\}$. Graphically, the ordered triple defines a point that is the intersection of three planes in space.
• Systems that have an infinite number of solutions are those which, after elimination, result in an expression that is always true, such as $0=0$. Graphically, an infinite number of solutions represents a line or coincident plane that serves as the intersection of three planes in space.
• Systems that have no solution are those that, after elimination, result in a statement that is a contradiction, such as $3=0$. Graphically, a system with no solution is represented by three planes with no point in common.
(a)Three planes intersect at a single point, representing a three-by-three system with a single solution. (b) Three planes intersect in a line, representing a three-by-three system with infinite solutions.

### Example: Determining Whether an Ordered Triple Is a Solution to a System

Determine whether the ordered triple $\left(3,-2,1\right)$ is a solution to the system.

$\begin{array}{l}\text{ }x+y+z=2\hfill \\ 6x - 4y+5z=31\hfill \\ 5x+2y+2z=13\hfill \end{array}$

Answer: We will check each equation by substituting in the values of the ordered triple for $x,y$, and $z$.

\begin{align} x+y+z=2\\ \left(3\right)+\left(-2\right)+\left(1\right)=2\\ \text{True}\end{align}\hspace{5mm} \hspace{5mm}\begin{align} 6x - 4y+5z=31\\ 6\left(3\right)-4\left(-2\right)+5\left(1\right)=31\\ 18+8+5=31\\ \text{True}\end{align}\hspace{5mm} \hspace{5mm}\begin{align}5x+2y+2z=13\\ 5\left(3\right)+2\left(-2\right)+2\left(1\right)=13\\ 15 - 4+2=13\\ \text{True}\end{align}

The ordered triple $\left(3,-2,1\right)$ is indeed a solution to the system.

### How To: Given a linear system of three equations, solve for three unknowns.

1. Pick any pair of equations and solve for one variable.
2. Pick another pair of equations and solve for the same variable.
3. You have created a system of two equations in two unknowns. Solve the resulting two-by-two system.
4. Back-substitute known variables into any one of the original equations and solve for the missing variable.

### tip for success

Work through the following examples on paper in the order given. They slowly build up the technique of solving a three-by-three system in stages. Then you will have an opportunity to practice the 4-step process given in the How To box above.
Solving a system with three variables is very similar to solving one with two variables. It is important to keep track of your work as the addition of one more equation creates more steps in the solution process. We'll take the steps slowly in the following few examples. First, we'll look just at the last step in the process: back-substitution. Then, we'll look at an example that requires the addition (elimination) method to reach the first solution. Then we'll see some video examples that illustrate some of the different kinds of situations you may encounter when solving three-by-three systems. Finally, you'll have the opportunity to practice applying the complete process. In the example that follows, we will solve the system by using back-substitution.

### Example

Solve the given system. [latex-display]\displaystyle\begin{cases}x-\dfrac{1}{3}y+\dfrac{1}{2}z=1\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,y-\dfrac{1}{2}z=4\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,z=-1\end{cases}[/latex-display]

Answer: The third equation states that $z = −1$, so we substitute this into the second equation to obtain a solution for $y$. [latex-display]\begin{array}{l}y-\dfrac{1}{2}(-1)=4\\y+\dfrac{1}{2}=4\\y=4-\dfrac{1}{2}\\y=\dfrac{8}{2}-\dfrac{1}{2}\\y=\dfrac{7}{2}\end{array}[/latex-display] Now we have two of our solutions, and we can substitute them both into the first equation to solve for $x$. [latex-display]\begin{array}{l}x-\dfrac{1}{3}\left(\dfrac{7}{2}\right)+\dfrac{1}{2}\left(-1\right)=1\\x-\dfrac{7}{6}-\dfrac{1}{2}=1\\x-\dfrac{7}{6}-\dfrac{3}{6}=1\\x-\dfrac{10}{6}=1\\x=1+\dfrac{10}{6}\\x=\dfrac{6}{6}+\dfrac{10}{6}\\x=\dfrac{16}{6}=\dfrac{8}{3}\end{array}[/latex-display] Now we have our ordered triple; remember to place each variable solution in order. [latex-display](x,y,z)=\left(\dfrac{8}{3},\dfrac{7}{2},-1\right)[/latex-display] Analysis of the Solution: Each of the lines in the system above represents a plane (think about a sheet of paper). If you imagine three sheets of notebook paper each representing a portion of these planes, you will start to see the complexities involved in how three such planes can intersect. Below is a sketch of the three planes. It turns out that any two of these planes intersect in a line, so our intersection point is where all three of these lines meet.

Three planes intersecting.

In the following video, we show another example of using back-substitution to solve a system in three variables. https://youtu.be/HHIjTChrIxE In the next example we'll need to use the addition method (elimination) to find our first solution.

### Example

Find a solution to the following system:
$\begin{array}{lll}x-y+z=5\,\,\,\,(1)\\-2y+z=6\,\,\,\,(2)\\2y-2z=-12\,\,\,\,(3)\end{array}$

Answer: We labeled the equations this time to be able to keep track of things a little more easily. The most obvious first step here is to eliminate $y$ by adding equations (2) and (3).

$\begin{array}{lll}\,\,\,\,\,\,\,\,\,-2y+z=6\,\,\,\,(2)\\\underline{\,\,\,\,2y-2z=-12}\,\,\,\,(3)\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,-z=-6\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,z=6\end{array}$
Now we can substitute the value for $z$ that we obtained into equation $(2)$.

$\begin{array}{rrr}-2y+(6)=6\\-2y=6-6\\-2y=0\\\,\,\,\,y=0\end{array}$

Be careful here not to get confused with a solution of $y = 0$ and an inconsistent solution.  It is ok for variables to equal $0$. Now we can substitute $z = 6$ and $y = 0$ back into the first equation.

$\begin{array}{rrr}x-y+z=5\\x-0+6=5\\x+6=5\\x=5-6\\x=-1\end{array}$

[latex-display](x,y,z)=(-1,0,6)[/latex-display]

Watch the following videos for more examples of the algebra you may encounter when solving systems with three variables. https://youtu.be/r6htz3gaHZ0 https://youtu.be/3RbVSvvRyeI Now, try the example and problems that follow to see if the process is becoming familiar to you. Solving three-by-three systems involves both creativity and careful, well-organized work. It will take some practice before it begins to feel natural.

### Example: Solving a System of Three Equations in Three Variables by Elimination

Find a solution to the following system:

\begin{align}x - 2y+3z=9& &\text{(1)} \\ -x+3y-z=-6& &\text{(2)} \\ 2x - 5y+5z=17& &\text{(3)} \end{align}

Answer: There will always be several choices as to where to begin, but the most obvious first step here is to eliminate $x$ by adding equations (1) and (2).

\begin{align}x - 2y+3z&=9\\ -x+3y-z&=-6 \\ \hline y+2z&=3 \end{align}$\hspace{5mm}\begin{gathered}\text{(1})\\ \text{(2)}\\ \text{(4)}\end{gathered}$

The second step is multiplying equation (1) by $-2$ and adding the result to equation (3). These two steps will eliminate the variable $x$.

\begin{align}−2x+4y−6z&=−18 \\ 2x−5y+5z&=17 \\ \hline −y−z&=−1\end{align}\hspace{5mm}\begin{align}&\text{(2) multiplied by }−2\\&\left(3\right)\\&(5)\end{align}

In equations (4) and (5), we have created a new two-by-two system. We can solve for $z$ by adding the two equations.

\begin{align}y+2z&=3 \\ -y-z&=-1 \\ \hline z&=2 \end{align}\hspace{5mm}\begin{align}(4)\\(5)\\(6)\end{align}

Choosing one equation from each new system, we obtain the upper triangular form:

\begin{align}x - 2y+3z&=9 && \left(1\right) \\ y+2z&=3 && \left(4\right) \\ z&=2 && \left(6\right) \end{align}

Next, we back-substitute $z=2$ into equation (4) and solve for $y$.

\begin{align}y+2\left(2\right)&=3 \\ y+4&=3 \\ y&=-1 \end{align}

Finally, we can back-substitute $z=2$ and $y=-1$ into equation (1). This will yield the solution for $x$.

\begin{align} x - 2\left(-1\right)+3\left(2\right)&=9\\ x+2+6&=9\\ x&=1\end{align}

The solution is the ordered triple $\left(1,-1,2\right)$.

### Try It

Solve the system of equations in three variables.

$\begin{array}{l}2x+y - 2z=-1\hfill \\ 3x - 3y-z=5\hfill \\ x - 2y+3z=6\hfill \end{array}$

[embed]
In the following video, you will see a visual representation of the three possible outcomes for solutions to a system of equations in three variables. There is also a worked example of solving a system using elimination. https://youtu.be/wIE8KSpb-E8

## Applications of Systems of Three Equations in Three Variables

Now we are ready to handle the problem we encountered as we began this section by using what we know about linear equations to translate the situation into a system of three equations. Then, we'll use our new understanding of three-by-three systems to find the solution.

### Tip for success

Applications of three-by-three systems are complicated. Work through each of the examples below perhaps more than once or twice. Don't be discouraged if you don't understand the process right away. It will take time and practice to become familiar with it.

### Example: Solving a Real-World Problem Using a System of Three Equations in Three Variables

In the problem posed at the beginning of the section, John invested his inheritance of $12,000 in three different funds: part in a money-market fund paying 3% interest annually; part in municipal bonds paying 4% annually; and the rest in mutual funds paying 7% annually. John invested$4,000 more in mutual funds than he invested in municipal bonds. The total interest earned in one year was 670. How much did he invest in each type of fund? Answer: To solve this problem, we use all of the information given and set up three equations. First, we assign a variable to each of the three investment amounts: \begin{align}&x=\text{amount invested in money-market fund} \\ &y=\text{amount invested in municipal bonds} \\ z&=\text{amount invested in mutual funds} \end{align} The first equation indicates that the sum of the three principal amounts is12,000.

$x+y+z=12{,}000$

We form the second equation according to the information that John invested $4,000 more in mutual funds than he invested in municipal bonds. $z=y+4{,}000$ The third equation shows that the total amount of interest earned from each fund equals$670.

$0.03x+0.04y+0.07z=670$

Then, we write the three equations as a system.

\begin{align}x+y+z=12{,}000 \\ -y+z=4{,}000 \\ 0.03x+0.04y+0.07z=670 \end{align}

To make the calculations simpler, we can multiply the third equation by 100. Thus,

\begin{align}x+y+z=12{,}000 \hspace{5mm} \left(1\right) \\ -y+z=4{,}000 \hspace{5mm} \left(2\right) \\ 3x+4y+7z=67{,}000 \hspace{5mm} \left(3\right) \end{align}

Step 1. Interchange equation (2) and equation (3) so that the two equations with three variables will line up.

\begin{align}x+y+z=12{,}000\hfill \\ 3x+4y +7z=67{,}000 \\ -y+z=4{,}000 \end{align}

Step 2. Multiply equation (1) by $-3$ and add to equation (2). Write the result as row 2.

\begin{align}x+y+z=12{,}000 \\ y+4z=31{,}000 \\ -y+z=4{,}000 \end{align}

Step 3. Add equation (2) to equation (3) and write the result as equation (3).

\begin{align}x+y+z=12{,}000 \\ y+4z=31{,}000 \\ 5z=35{,}000 \end{align}

Step 4. Solve for $z$ in equation (3). Back-substitute that value in equation (2) and solve for $y$. Then, back-substitute the values for $z$ and $y$ into equation (1) and solve for $x$.

\begin{align}&5z=35{,}000 \\ &z=7{,}000 \\ \\ &y+4\left(7{,}000\right)=31{,}000 \\ &y=3{,}000 \\ \\ &x+3{,}000+7{,}000=12{,}000 \\ &x=2{,}000 \end{align}

John invested $2,000 in a money-market fund,$3,000 in municipal bonds, and \$7,000 in mutual funds.

### Try It

[embed]
Systems of three equations in three variables apply to other types of real-world situations as well. In this example, we will write three equations that model sales at an art fair to learn how many prints should be sold to break even for the cost of the booth rental.

### Example

Andrea sells photographs at art fairs. She prices the photos according to size: small photos cost $10$, medium photos cost $15$, and large photos cost $40$. She usually sells as many small photos as medium and large photos combined. She also sells twice as many medium photos as large. A booth at the art fair costs $300$. If her sales go as usual, how many of each size photo must she sell to pay for the booth?

Answer: To set up the system, first choose the variables. In this case the unknown values are the number of small, medium, and large photos. S = number of small photos sold M = number of medium photos sold L = number of large photos sold The total of her sales must be $300$ to pay for the booth. We can find the total by multiplying the cost for each size by the number of that size sold. $10$S = money received for small photos $15$M = money received for medium photos $40$L = money received for large photos

Total Sales:$10$S +$15$M +$40$L =$300$

The number of small photos is the same as the total of medium and large photos combined.

S = M + L

She sells twice as many medium photos as large photos.

M =$2$L

To make things easier, rewrite the equations to be in the same format, with all variables on the left side of the equal sign and only a constant number on the right.

$\begin{cases}10S+15M+40L=300\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,S–M–L=0\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,M–2L=0\end{cases}$

Now solve the system. Step 1: First choose two equations and eliminate a variable. Since one equation has no S variable, it may be helpful to use the other two equations and eliminate the S variable from them. Multiply both sides of the second equation by $−10$.

$\begin{array}{l}-10(S–M–L)=-10(0)\\-10s+10M+10L=0\end{array}$

Now add this modified equation with the first equation in the original list of equation.

$\begin{array}{ccc}10S+15M+40L=300\\\underline{+(-10s+10M+10L=0)}\\25M+50L=300\end{array}$

Step 2: The other equation for our two-variable system will be the remaining equation (that has no S variable). Eliminate a second variable using the equation from step $1$. While you could multiply the third of the original equations by $25$ to eliminate L, the numbers will stay nicer if you divide the resulting equation from step $1$ by $25$. Do not forget to be careful of the signs! Divide first:

$\begin{array}{ccc}\dfrac{25}{25}M+\dfrac{50}{25}L=\dfrac{300}{25}\\M+2L=12\end{array}$

Now eliminate L by adding M-2L=0 to this new equation.

$\begin{array}{l}M+2L=12\\\underline{M–2L=0}\\2M=12\\M=\dfrac{12}{2}=6\end{array}$

Step 3: Use M=$6$ and one of the equations containing just two variables to solve for the second variable.  It is best to use one of the original equation in case an error was made in multiplication.

$\begin{array}{ccc}M-2L=0\\6-2L=0\\-2L=-6\\L=3\end{array}$

Step 4: Use the two found values and one of the original equations to solve for the third variable.

$\begin{array}{ccc}S–M–L=0\\S-6-3=0\\S-9=0\\S=9\end{array}$

Step 5: Check your answer. With application problems, it is sometimes easier (and better) to use the original wording of the problem rather than the equations you write.

She usually sells as many small photos as medium and large photos combined.
• Medium and large photos combined: $6 + 3 = 9$, which is the number of small photos.
She also sells twice as many medium photos as large.
• Medium photos is $6$, which is twice the number of large photos $(3)$.
A booth at the art fair costs  $300$.
• Andrea receives $10(9)$ or $90$ for the $9$ small photos, $15(6)$ or $90$ for the $6$ medium photos, and $40(3)$ or $120$ for the large photos. $90 + 90 + 120 = 300$.
If Andrea sells $9$ small photos, $6$ medium photos, and $3$ large photos, she will receive exactly the amount of money needed to pay for the booth.

In the following video example, we show how to define a system of three equations in three variables that represents a mixture needed by a chemist.

https://youtu.be/612Ad0W9ZeY Our last example shows you how to write a system of three equations that represents ticket sales for a theater that has three different prices for tickets. https://youtu.be/Wg_v5R7BFo0