## Solving Systems of Equations in Three Variables

A system of equations in three variables involves two or more equations, each of which contains between one and three variables.

### Learning Objectives

Solve a system of equations in three variables graphically, using substitution, or using elimination

### Key Takeaways

#### Key Points

• In a system of equations in three variables, you can have one or more equations, each of which may contain one or more of the three variables, usually x, y, and z. The introduction of the variable z means that the graphed functions now represent planes, rather than lines.
• The substitution method involves solving for one of the variables in one of the equations, and plugging that into the rest of the equations to reduce the system. Repeat until there is a single equation left, and then using this equation, go backwards to solve the previous equations.
• The graphical method involves graphing the system and finding the single point where the planes intersect.
• The elimination method involves adding or subtracting multiples of one equation from the other equations, eliminating variables from each of the equations until one variable is left in each equation.

#### Key Terms

• system of equations in three variables: A set of one or more equations, each of which may contain one ore more of the three variables usually x, y, and z.
• system of equations: A set of equations with multiple variables which can be solved using a specific set of values.

### Systems of Equations in Three Variables

In mathematics, simultaneous equations are a set of equations containing multiple variables. This set is often referred to as a system of equations. A solution to a system of equations is a particular specification of the values of all variables that simultaneously satisfies all of the equations. Graphically, the solution is where the functions intersect.

In a system of equations in three variables, you can have one or more equations, each of which may contain one or more of the three variables, usually x, y, and z. The introduction of the variable z means that the graphed functions now represent planes, rather than lines.

### A Simple Example

This is a set of linear equations, also known as a linear system of equations, in three variables:

$\left\{\begin{matrix} 3x+2y-z=6\\ -2x+2y+z=3\\ x+y+z=4\\ \end{matrix}\right.$

The solution to this system of equations is:

$\left\{\begin{matrix} x=1\\ y=2\\ z=1\\ \end{matrix}\right.$

Plug in these values to each of the equations to see that the solution satisfies all three of the equations.

### Graphical Method

The graphical method of solving a system of equations in three variables involves plotting the planes that are formed when graphing each equation in the system and then finding the intersection point of all three planes. The single point where all three planes intersect is the unique solution to the system.

System of linear equations: This images shows a system of three equations in three variables. The intersecting point (white dot) is the unique solution to this system.

### Substitution Method

The substitution method of solving a system of equations in three variables involves identifying an equation that can be easily by written with a single variable as the subject (by solving the equation for that variable). Next, substitute that expression where that variable appears in the other two equations, thereby obtaining a smaller system with fewer variables. After that smaller system has been solved, whether by further application of the substitution method or by other methods, substitute the solutions found for the variables back into the first right-hand side expression.

For example, consider this system of equations:

$\left\{\begin{matrix} 3x+2y-z=6\\ -2x+2y+z=3\\ x+y+z=4\\ \end{matrix}\right.$

Since the coefficient of z is already 1 in the first equation, solve for z to get:

$z=3x+2y-6$

Substitute this expression for z into the other two equations:

$\left\{\begin{matrix} -2x+2y+(3x+2y-6)=3\\ x+y+(3x+2y-6)=4\\ \end{matrix}\right.$

This new system simplifies to:

$\left\{\begin{matrix} x+4y=9\\ 4x+3y=10\\ \end{matrix}\right.$

Now solving for x in the first equation, one gets:

$x=9-4y$.

Substitute this expression for x into the last equation in the system and solve for y:

\displaystyle \begin{align} 4(9-4y)+3y &=10 \\36-16y+3y&=10 \\13y&=26 \\y&=2 \end{align}

Now that you have the value of y, work back up the equation. Plug $y=2$ into the equation $x=9-4y$ to get $x=1$.

Working up again, plug $(1,2)$ into the first substituted equation and solve for z:

\begin {align}z&=3x+2y-6 \\z&=(3 \cdot 1)+(2 \cdot 2) -6 \\z&=1 \end{align}

Therefore, the solution to the system of equations is $(1,2,1)$.

### Elimination Method

Elimination by judicious multiplication is the other commonly-used method to solve simultaneous linear equations. It uses the general principles that each side of an equation still equals the other when both sides are multiplied (or divided) by the same quantity, or when the same quantity is added (or subtracted) from both sides.

As the equations grow simpler through the elimination of some variables, a variable will eventually appear in fully solvable form, and this value can then be “back-substituted” into previously derived equations by plugging this value in for the variable. Typically, each “back-substitution” can then allow another variable in the system to be solved.

Let’s look at the following system:

$\left\{\begin{matrix} x+y+z=2\\ x-y+3z=4\\ 2x+2y+z=3\\ \end{matrix}\right.$

Using the elimination method, begin by subtracting the first equation from the second and simplifying:

\displaystyle \begin{align} x-y+3z-(x+y+z)&=4-2 \\-2y+2z&=2 \end{align}

We now have the following system of equations:

$\left\{\begin{matrix} x+y+z=2\\ -2y+2z=2\\ 2x+2y+z=3\\ \end{matrix}\right.$

Now subtract two times the first equation from the third equation to get

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

Doing this shows the new system:

$\left\{\begin{matrix} x+y+z=2\\ -2y+2z=2\\ z=1\\ \end{matrix}\right.$

Next, subtract two times the third equation from the second equation and simplify:

\begin {align} -2y+2z-2z&=2-2 \\y&=0 \end {align}

Doing this shows the new system:

$\left\{\begin{matrix} x+y+z=2\\ y=0\\ z=1\\ \end{matrix}\right.$

Finally, subtract the third and second equation from the first equation to get

\begin {align} x+y+z-y-z&=2-0-1 \\x&=1 \end {align}

The final, solved system, therefore, is:

$\left\{\begin{matrix} x=1\\ y=0\\ z=1\\ \end{matrix}\right.$

## Inconsistent and Dependent Systems in Three Variables

Systems of equations in three variables are either independent, dependent, or inconsistent; each case can be established algebraically and represented graphically.

### Learning Objectives

Explain what it means, graphically, for systems of equations in three variables to be inconsistent or dependent, as well as how to recognize algebraically when this is the case

### Key Takeaways

#### Key Points

• Dependent systems have an infinite number of solutions. Graphically, the infinite number of solutions are on a line or plane that serves as the intersection of three planes in space.
• Solving a dependent system by elimination results in an expression that is always true, such as $0 = 0$.
• Inconsistent systems have no solution. Graphically, a system with no solution is represented by three planes with no point in common.
• Solving an inconsistent system by elimination results in a statement that is a contradiction, such as $3 = 0$.

#### Key Terms

• Independent system: A system of equations with a single solution. For systems of equations in three variables, this solution is an ordered triple $(x, y, z)$ that represents the single point of intersection of the three planes.
• Dependent system: A system of equations with an infinite number of solutions. For systems of equations in three variables, there are an infinite number of solutions on a line or plane that is the intersection of three planes in space.
• Inconsistent system: A system of equations with no solution. A system of equations in three variables with no solutions is represented by three planes with no point in common.

### Identifying Dependent and Inconsistent Systems

Recall that a solution to a linear system is an assignment of numbers to the variables such that all the equations are simultaneously satisfied. A solution of a system of equations in three variables is an ordered triple $(x, y, z)$, and describes a point where three planes intersect in space.

There are three possible solution scenarios for systems of three equations in three variables:

• Independent systems have a single solution. Solving the system by elimination results in a single ordered triple $(x, y, z)$. Graphically, the ordered triple defines a point that is the intersection of three planes in space.
• Dependent systems have an infinite number of solutions. Graphically, the solutions fall on a line or plane that is the intersection of three planes in space.
• Inconsistent systems have no solution. Graphically, a system with no solution is represented by three planes with no point in common.

### Dependent Systems of Equations with Three Variables

We know from working with systems of equations in two variables that a dependent system of equations has an infinite number of solutions. The same is true for dependent systems of equations in three variables. An infinite number of solutions can result from several situations. The three planes could be the same, so that a solution to one equation will be the solution to the other two equations. All three equations could be different but they intersect on a line, which has infinite solutions (see below for a graphical representation). Or two of the equations could be the same and intersect the third on a line (see the example problem for a graphical representation).

Dependent systems: An example of three different equations that intersect on a line.

For example, consider this system of equations:

\left\{\begin{matrix} \begin {align} 2x + y - 3z &= 0 \\ 4x + 2y - 6z &= 0 \\ x - y + z &= 0 \end {align} \end{matrix} \right.

First, multiply the first equation by $-2$ and add it to the second equation:

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

We do not need to proceed any further. The result we get is an identity, $0 = 0$, which tells us that this system has an infinite number of solutions. There are other ways to begin to solve this system, such as multiplying the third equation by $−2$, and adding it to the first equation. We would then perform the same steps as above and find the same result, $0 = 0$.

If we were to graph each of the three equations, we would have the three planes pictured below. Notice that two of the planes are the same, and they intersect the third plane on a line. The solution set is infinite, as all points along the intersection line will satisfy all three equations.

Dependent system: Two equations represent the same plane, and these intersect the third plane on a line.

### Inconsistent Systems of Equations with Three Variables

Just as with systems of equations in two variables, we may come across an inconsistent system of equations in three variables, which means that it does not have a solution that satisfies all three equations. The equations could represent three parallel planes, two parallel planes and one intersecting plane, or three planes that intersect the other two but not at the same location. The process of elimination will result in a false statement, such as $3 = 7$, or some other contradiction.

Inconsistent systems: All three figures represent three-by-three systems with no solution. (a) The three planes intersect with each other in three different parallel lines, which do not intersect at a common point. (b) Two of the planes are parallel and intersect with the third plane, but not with each other. (c) All three planes are parallel, so there is no point of intersection.

For example, consider the system of equations

\left\{\begin{matrix} \begin {align} x - 3y + z &= 4\\ -x + 2y - 5z &= 3 \\ 5x - 13y + 13z &= 8 \end {align} \end{matrix} \right.

Using the elimination method for solving a system of equation in three variables, notice that we can add the first and second equations to cancel $x$:

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

Next, multiply the first equation by $-5$,  and add it to the third equation:

\begin {align} -5(x - 3y + z) + (5x - 13y + 13z) &= -5(4) + 8 \\ (-5x + 5x) + (15y - 13y) + (-5z + 13z) &= -20 + 8 \\ 2y + 8z &= -12 \end {align}

Now, notice that we have a system of equations in two variables:

\left\{\begin{matrix} \begin {align} -y - 4z &= 7 \\ 2y + 8z &= -12 \end {align} \end {matrix} \right.

We can solve this by multiplying the top equation by 2, and adding it to the bottom equation:

\begin {align} 2(-y-4z) + (2y + 8z) &= 2(7) -12 \\ (-2y + 2y) + (-8z + 8z) &= 14 - 12 \\ 0 &= 2 \end {align}

The final equation $0 = 2$ is a contradiction, so we conclude that the system of equations in inconsistent, and therefore, has no solution.