# 3.12: Solving Linear Systems in Three Variables

**At Grade**Created by: CK-12

**Practice**Systems of Linear Equations in Three Variables

You want to make a fruit salad for a summer picnic. Three pounds of strawberries plus five pounds of grapes plus one pound of melon cost $20. Three pounds of strawberries plus two pounds of grapes plus two pounds of melon cost $21. Four pounds of strawberries plus three pounds of grapes plus three pounds of melon cost $30. How much does each fruit cost?

### Guidance

An equation in three variables, such as \begin{align*}2x-3y+4z=10\end{align*}, is an equation of a plane in three dimensions. In other words, this equation expresses the relationship between the three coordinates of each point on a plane. The solution to a system of three equations in three variables is a point in space which satisfies all three equations. When we add a third dimension we use the variable, \begin{align*}z\end{align*}, for the third coordinate. For example, the point (3, -2, 5) would be \begin{align*}x = 3, y = -2\end{align*} and \begin{align*}z = 5\end{align*}. A solution can be verified by substituting the \begin{align*}x, y,\end{align*} and \begin{align*}z\end{align*} values into the equations to see if they are valid.

A system of three equations in three variables consists of three planes in space. These planes could intersect with each other or not as shown in the diagrams below.

- In the first diagram, the three planes intersect at a single point and thus a unique solution exists and can be found.
- The second diagram illustrates one way that three planes can exist and there is no solution to the system. It is also possible to have three parallel planes or two that are parallel and a third that intersects them. In any of these cases, there is no point that is in all three planes.
- The third diagram shows three planes intersecting in a line. Every point on this line is a solution to the system and thus there are infinite solutions.

To solve a system of three equations in three variables, we will be using the linear combination method. This time we will take two equations at a time to eliminate one variable and using the resulting equations in two variables to eliminate a second variable and solve for the third. This is just an extension of the linear combination procedure used to solve systems with two equations in two variables.

#### Example A

Determine whether the point, (6, -2, 5), is a solution to the system:

\begin{align*}x-y+z &= 13\\ 2x+5y-3z &= -13\\ 4x-y-6z &= -4\end{align*}

**Solution:** In order for the point to be a solution to the system, it must satisfy each of the three equations.

First equation: \begin{align*}(6)-(-2)+(5)=6+2+5=13 \end{align*}

Second equation: \begin{align*}2(6)+5(-2)-3(5)=12-10-15=-13 \end{align*}

Third equation: \begin{align*}4(6)-(-2)-6(5)=24+2-30=-4 \end{align*}

The point, (6, -2, 5), satisfies all three equations. Therefore, it is a solution to the system.

#### Example B

Solve the system using linear combinations:

\begin{align*}2x+4y-3z &= -7\\ 3x-y+z &= 20\\ x+2y-z &= -2\end{align*}

**Solution:** We can start by taking two equations at a time and eliminating the same variable. We can take the first two equations and eliminate \begin{align*}z\end{align*}, then take the second and third equations and also eliminate \begin{align*}z\end{align*}.

\begin{align*}& 2x+4y-3z=-7 \qquad \Rightarrow \quad 2x+4y-\cancel{3z}=-7\\ & 3(3x-y+z=20) \qquad \qquad \ \underline{9x-3y+\cancel{3z}=60}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad 11x+y=53\end{align*}

Result from equations 1 and 2: \begin{align*}11x+y=53\end{align*}

\begin{align*}& 3x-y+\cancel{z} = 20\\ & \underline{x+2y-\cancel{z} = -2}\\ & \quad \ \ 4x+y=18\end{align*}

Result from equations 2 and 3: \begin{align*}4x+y=18\end{align*}

Now we have reduced our system to two equations in two variables. We can eliminate \begin{align*}y\end{align*} most easily next and solve for \begin{align*}x\end{align*}.

\begin{align*}& \quad \ 11x+y=53 \quad \Rightarrow \quad \ 11x+\cancel{y}=53\\ & -1(4x+y=18) \qquad \quad \ \underline{-4x-\cancel{y}=-18}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \quad 7x=35\\ & \qquad \qquad \qquad \qquad \qquad \qquad \quad \ x=5\end{align*}

Now use this value to find \begin{align*}y\end{align*}:

\begin{align*}4(5)+y &= 18\\ 20+y &= 18\\ y &= -2\end{align*}

Finally, we can go back to one of the original three equations and use our \begin{align*}x\end{align*} and \begin{align*}y\end{align*} values to find \begin{align*}z\end{align*}.

\begin{align*}2(5)+4(-2)-3z &= -7\\ 10-8-3z &= -7\\ 2-3z &= -7\\ -3z &= -9\\ z &= 3\end{align*}

Therefore the solution is (5, -2, 3).

Don’t forget to check your answer by substituting the point into each equation.

Equation 1: \begin{align*}2(5)+4(-2)-3(3)=10-8-9=-7\end{align*}

Equation 2: \begin{align*}3(5)-(-2)+(3)=15+2+3=20 \end{align*}

Equation 3: \begin{align*}(5)+2(-2)-(3)=5-4-3=-2 \end{align*}

#### Example C

Solve the system using linear combinations:

\begin{align*}x+y+z &= 5\\ 5x+5y+5z &= 20\\ 2x+3y-z &= 8\end{align*}

**Solution:** We can start by combining equations 1 and 2 together by multiplying the first equation by -5.

\begin{align*}& -5(x+y+z=5) \quad \Rightarrow \quad -5x-5y-5z=-25\\ & \ \ 5x+5y+5z =20 \qquad \quad \underline{\;\; 5x+5y+5z=20 \;\;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ \ 0=-5\end{align*}

Since the result is a false equation, there is no solution to the system. If you end up with 0 = 0, then there will be infinitely many solutions.

**Intro Problem Revisit** The system of linear equations represented by this situation is:

\begin{align*}2s + 5g + m = 20\\ 3s + 2g + 2m = 21\\ 4s + 3g + 3m = 30\end{align*}

The easiest way to solve this system is to first solve \begin{align*}2s + 5g + m = 20\end{align*} for *m*. If we do so, we get:

\begin{align*} m = 20 - 2s - 5g\end{align*}

Now we can substitute this value for *m* into the other two equations. When we do so we get a new system of linear equations:

\begin{align*}3s + 2g + 2(20 - 2s - 5g) = 21\\ 4s + 3g + 3(20 - 2s - 5g) = 30\end{align*}

Simplifying both equations results in:

\begin{align*}-s - 8g = -19\\ -2s - 12g = -30\end{align*}

If we multiply the first of these equations by –2, we get the new system of equations:

\begin{align*}2s + 16g = 38\\ -2s - 12g = -30\end{align*}

Now we can add these two equations to eliminate the *s* variable. When we do so, we get *g* = 2.

Next, we can substitute this value of *g* into either of these two equations to get the value of *s*:

\begin{align*}-2s - 12(2) = -30\end{align*} results in *s* = 3.

Finally we subsitute these values for *g* and *s* into one of our original equations.

\begin{align*}2(3) + 5(2) + m = 20\end{align*} results in *m* = 4

Therefore, strawberries cost $3 per pound, grapes cost $2 per pound, and melon costs $4 per pound.

### Guided Practice

1. Is the point, (-3, 2, 1), a solution to the system:

\begin{align*}x+y+z &= 0\\ 4x+5y+z &= -1?\\ 3x+2y-4z &=-8\end{align*}

2. Solve the following system using linear combinations:

\begin{align*}5x-3y+z &= -1\\ x+6y-4z &=-17\\ 8x-y+5z &= 12\end{align*}

3. Solve the following system using linear combinations:

\begin{align*}2x+y-z &= 3\\ x-2y+z &= 5\\ 6x+3y-3z &= 6\end{align*}

#### Answers

1. Check to see if the point satisfies all three equations.

Equation 1: \begin{align*}(-3)+(2)+(1)=-3+2+1=0 \end{align*}

Equation 2: \begin{align*}4(-3)+5(2)+(1)=-12+10+1=-1 \end{align*}

Equation 3: \begin{align*}3(-3)+2(2)-4(1)=-9+4-4=-9 \neq -8 \end{align*}

Since the third equation is not satisfied by the point, the point is not a solution to the system.

2. Combine the first and second equations to eliminate \begin{align*}z\end{align*}. Then combine the first and third equations to eliminate \begin{align*}z\end{align*}.

\begin{align*}& 4(5x-3y+z=-1) \quad \Rightarrow \quad 20x-12y+\cancel{4z}=-4\\ & \quad x+6y-4z=-17 \qquad \quad \ \ \underline{\;\;\;\; x+6y-\cancel{4z}=-17}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ \ 21x-6y=-21\end{align*}

Result from equations 1 and 2: \begin{align*}21x-6y=-21\end{align*}

\begin{align*}& -5(5x-3y+z=-1) \quad \Rightarrow \quad \ -25x+15y-\cancel{5z}=5\\ & \quad \quad 8x-y+5z=12 \qquad \qquad \ \ \underline{\qquad 8x-y+\cancel{5z}=12}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad -17x+14y=17\end{align*}

Result from equations 1 and 3: \begin{align*}-17x+14y=17\end{align*}

Now we have reduced our system to two equations in two variables. We can eliminate \begin{align*}y\end{align*} most easily next and solve for \begin{align*}x\end{align*}.

\begin{align*}& \quad \ 7(21x-6y=-21) \quad \Rightarrow \quad \ \ 147x-\cancel{42y}=-147\\ & 3(-17x+14y=17) \qquad \qquad \ \ \underline{ -51x+\cancel{42y}=51 \;\;\;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ 96x=-96\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ x=-1\end{align*}

Now find \begin{align*}y\end{align*}:

\begin{align*}21(-1)-6y &= -21\\ -21-6y &= -21\\ -6y &= 0\\ y &= 0\end{align*}

Finally, we can go back to one of the original three equations and use our \begin{align*}y\end{align*} and \begin{align*}z\end{align*} values to find \begin{align*}x\end{align*}.

\begin{align*}5(-1)-3(0) + z & = -1\\ -5 + z & = -1\\ z & = 4\end{align*}

Therefore the solution is (-1, 0, 4).

Don’t forget to check your answer by substituting the point into each equation.

Equation 1: \begin{align*}5(-1)-3(0)+(4)=-5+4=-1 \end{align*}

Equation 2: \begin{align*}(-1)+6(0)-4(4)=-1-16=-17 \end{align*}

Equation 3: \begin{align*}8(-1)-(0)+5(4)=-8+20=12 \end{align*}

3. Combine equations 1 and two to eliminate \begin{align*}z\end{align*}. Then combine equations 2 and 3 to eliminate \begin{align*}z\end{align*}.

\begin{align*}& 2x+y-\cancel{z}=3\\ & \underline{x-2y+\cancel{z}=5}\\ & \quad \ \ 3x-y=8\end{align*}

Result from equations 1 and 2: \begin{align*}3x-y=8\end{align*}

\begin{align*}& 3(x-2y+z=5) \quad \Rightarrow \quad 3x-6y+\cancel{3z}=15\\ & 6x+3y-3z=6 \qquad \qquad \underline{6x+3y-\cancel{3z}=6\;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \quad 9x-3y=21\end{align*}

Result from equations 2 and 3: \begin{align*}9x-3y=21\end{align*}

Now we have reduced our system to two equations in two variables. Now we can combine these two equations and attempt to eliminate another variable.

\begin{align*}& -3(3x-y=8) \quad \Rightarrow \ \quad -9x+3y=-24\\ & \quad \ 9x-3y=21 \qquad \qquad \underline{\;\;\; 9x-2y=21 \;\;}\\ & \qquad \qquad \qquad \qquad \qquad \qquad \quad \ \ 0= -3\end{align*}

Since the result is a false equation, there is no solution to the system.

### Practice

- Is the point, (2, -3, 5), the solution to the system:

\begin{align*}2x+5y-z &= -16\\ 5x-y-3z &= -2\\ 3x+2y+4z &= 20\end{align*}

- Is the point, (-1, 3, 8), the solution to the system:

\begin{align*}8x+10y-z &= 14\\ 11x+4y-3z &=-23\\ 2x+3y+z &= 10\end{align*}

- Is the point, (0, 3, 5), the solution to the system:

\begin{align*}5x-3y+2z &= 1\\ 7x+2y-z &= 1\\ x+4y-3z &= -3\end{align*}

- Is the point, (1, -1, 1), the solution to the system:

\begin{align*}x-2y+2z &= 5\\ 6x+y-4z &= 1\\ 4x-3y+z &= 8\end{align*}

Solve the following systems in three variables using linear combinations.

\begin{align*}3x-2y+z &= 0\\ 4x+y-3z &= -9\\ 9x-2y+2z &= 20\end{align*}

\begin{align*}11x+15y+5z &= 1\\ 3x+4y+z &= -2\\ 7x+13y+3z &= 3\end{align*}

\begin{align*}2x+y+7z &= 5\\ 3x-2y-z &= -1\\ 4x-y+3z &= 5\end{align*}

\begin{align*}x+3y-4z &= -3\\ 2x+5y-3z &= 3\\ -x-3y+z &= -3\end{align*}

\begin{align*}3x+2y-5z &= -8\\ 3x+2y+5z &= -8\\ 6x+4y-10z &= -16\end{align*}

\begin{align*}x+2y-z &= -1\\ 2x+4y+z &= 10\\ 3x-y+8z &= 6\end{align*}

\begin{align*}x+y+z &= -3\\ 2x-y-z &= 6\\ 4x+y+z &= 0\end{align*}

\begin{align*}4x+y+3z &= 8\\ 8x+2y+6z &= 15\\ 3x-3y-z &= 5\end{align*}

\begin{align*}2x+3y-z &= -1\\ x-2y+3z &= -4\\ -x+y-2z &= 3\end{align*}

\begin{align*}x-3y+4z & = 14\\ -x+2y-5z & = -13\\ 2x+5y-3z & =-5\end{align*}

\begin{align*}x+y+z &= 3\\ x+y-z &= 3\\ 2x+2y+z &= 6\end{align*}

### Notes/Highlights Having trouble? Report an issue.

Color | Highlighted Text | Notes | |
---|---|---|---|

Please Sign In to create your own Highlights / Notes | |||

Show More |

Consistent

A system of equations is consistent if it has at least one solution.eliminating a variable

Eliminating the variable means making the coefficient of the variable equal to zero thereby removing that variable from that particular system and reducing the number of unknown quantities.Inconsistent

A system of equations is inconsistent if it has no solutions.linearly independent

Three equations are linearly independent if each equation cannot be produced by a linear combination of the other two. Systems that are linearly independent will have just one solution.scaling a row

Scaling a row means multiplying every coefficient in the row by any number you choose (besides zero). This can be helpful for getting coefficients to match so that they can be eliminated.system of equations

A system of equations is a set of two or more equations.### Image Attributions

Here you will identify solutions to and solve linear systems in three variables.