SYSTEMS OF EQUATIONS in THREE VARIABLES

It is often desirable or even necessary to use more than one variable to model a situation in many fields. When this is the case, we write and solve a system of equations in order to answer questions about the situation.



If a system of linear equations has at least one solution, it is consistent. If the system has no solutions, it is inconsistent. If the system has an infinity number of solutions, it is dependent. Otherwise it is independent.



A linear equation in three variables describes a plane and is an equation equivalent to the equation

\begin{eqnarray*}&& \\
Ax+By+Cz+D &=&0 \\
&&
\end{eqnarray*}


where A, B, C, and D are real numbers and A, B, C, and D are not all 0.




Problem 3.1e:


Solve the following system of equations for x, y and z:

       
7x+5y-3z = 16 (1)
       
3x-5y+2z = -8 (2)
       
5x+3y-7z = 0 (3)
       



Answer:          $x=1,\ y=3,\ z=2$



Solution:


We are going to show you how to solve this system of equations three different ways:


1)        Substitution, 2)        Elimination 3)        Matrices




SUBSTITUTION:


The process of substitution involves several steps:


Step 1:        Solve for one of the variables in one of the equations. It makes no difference which equation and which variable you choose. Let's solve for x in equation (1).

\begin{eqnarray*}&& \\
7x+5y-3z &=&16 \\
&& \\
7x &=&3z-5y+16 \\
&& \\
x &=&\frac{3z-5y+16}{7} \\
&&
\end{eqnarray*}


Step 2:        Substitute this value for x in equations (2) and (3). This will change equations (2) and (3) to equations in the two variables y and z. Call the changed equations (4) and (5), respectively.
       
3x-5y+2z = -8  
       
$\displaystyle 3\left( \frac{3z-5y+16}{7}\right) -5y+2z$ = -8  
       
$\displaystyle 7\left[ 3\left( \frac{3z-5y+16}{7}\right) -5y+2z\right]$ = $\displaystyle 7\left[ -8\right]$  
       
$\displaystyle 3\left( 3z-5y+16\right) +7\left( -5y\right) +7\left( 2z\right)$ = -56  
       
9z-15y+48-35y+14z = -56  
       
-50y+23z = -104  
       
50y-23z = 104 (4)
       
       
       
5x+3y-7z = 0  
       
$\displaystyle 5\left( \frac{3z-5y+16}{7}\right) +3y-7z$ = 0  
       
$\displaystyle 7\left[ 5\left( \frac{3z-5y+16}{7}\right) +3y-7z\right]$ = $\displaystyle 7\left[ 0\right]$  
       
$\displaystyle 5\left( 3z-5y+16\right) +7\left( 3y\right) +7\left( -7z\right)$ = 0  
       
15z-25y+80+21y-49z = 0  
       
-4y-34z = -80  
       
2y+17z = 40 (5)
       
       
       

Step 3:        Solve for y in equation (5).
       
2y+17z = 40  
       
y = $\displaystyle \frac{40-17z}{2}$ (6)
       
       
       
       

Step 4:        Substitute this value of y in equation (4). This will give you an equation in z. Solve for z.

\begin{eqnarray*}&& \\
50y-23z &=&104 \\
&& \\
50\left( \frac{40-17z}{2}\r...
...04 \\
&& \\
448z &=&896 \\
&& \\
z &=&2 \\
&& \\
&&
\end{eqnarray*}


Step 5:        Substitute this value of z in equation (6) and solve for y.

\begin{eqnarray*}&& \\
y &=&\frac{40-17z}{2} \\
&& \\
y &=&\frac{40-17\left( 2\right) }{2} \\
&& \\
y &=&3 \\
&& \\
&&
\end{eqnarray*}


Step 7:        Substitute 3 for y and 2 for z in equation (1) and solve for x.

\begin{eqnarray*}&& \\
7x+5y-3z &=&16 \\
&& \\
7x+5\left( 3\right) -3\left...
... &=&16 \\
&& \\
7x &=&7 \\
&& \\
x &=&1 \\
&& \\
&&
\end{eqnarray*}


The solution is: $x=1,\ y=3,$ and z=2.

Step 8:        Check the solutions:

\begin{eqnarray*}&& \\
7\left( 1\right) +5\left( 3\right) -3\left( 2\right) &=...
...t( 2\right) &=&0\rightarrow Yes \\
&& \\
&& \\
&& \\
&&
\end{eqnarray*}


ELIMINATION:


The process of elimination involves several steps: First you reduce three equations to two equations with two variables, and then to one equation with one variable.



Step 1:        Decide which variable you will eliminate. It makes no difference which one you choose. Let us eliminate y first.

\begin{eqnarray*}&& \\
\begin{array}{l}
(1) \\
\\
(2) \\
\\
(3)
\end...
...y & - & 7z & = & 0
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


Step 2:        Add equation (1) to equation (2) to form Equation (4). Add 3 times equation (2) to 5 times equation (3) to form equation (5).

\begin{eqnarray*}&& \\
\left[ Equation\ 1\right] +\left[ Equation\ 2\right] &=...
... &=&\left[
\begin{array}{c}
Equation\ 5
\end{array}
\right]
\end{eqnarray*}



\begin{eqnarray*}&& \\
\begin{array}{l}
(1) \\
\\
(2) \\
\\
(4)
\end...
... & & - & z & = & 8
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{l}
3\times (2) \\
\\
5\times (3)...
...
34x & & & - & 29z & = & -24
\end{array}
\end{array}
\\
&&
\end{eqnarray*}


Step :        We now have two equations with two variables.

\begin{eqnarray*}&& \\
(4) &:&10x-z=8 \\
&& \\
(5) &:&34x-29z=-24 \\
&& \\
&&
\end{eqnarray*}


Step 4:        Multiply both sides of equation (4) by -29 and add the transformed equation (4) to equation (5) to create equation (6) with just one variable.
$
\begin{array}{r}
-29\times (4) \\
\\
+\ (5) \\
\\
=\ (6)
\end{array...
...
34x & - & 29y & = & -24 \\
& & & & \\
-256x & & & = & -256
\end{array}
$



Step 5:        Solve for x in equation (5).

\begin{eqnarray*}&& \\
-256 &=&-256 \\
&& \\
x &=&1 \\
&& \\
&&
\end{eqnarray*}


Step 6:        Substitute 1 for x in equation (5) and solve for z.

\begin{eqnarray*}&& \\
34x-29z &=&-24 \\
&& \\
34\left( 1\right) -29z &=&-24 \\
&& \\
-29z &=&-58 \\
&& \\
z &=&2 \\
&& \\
&&
\end{eqnarray*}


Step 7:        Substitute 1 for x and 2 for z in equation (1) and solve for y.

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


The solution is: $x=1,\ y=3,$ and z=2.


MATRICES:


The process of using matrices is essentially a shortcut of the process of elimination. Each row of the matrix represents an equation and each column represents coefficients of one of the variables.


Step 1: Create a three-row by four-column matrix using coefficients and the constant of each equation.

\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...& \\
5 & & 3 & & -7 & \vert & 0
\end{array}
\right] \\
&&
\end{eqnarray*}



The vertical lines in the matrix stands for the equal signs between both sides of each equation. The first column contains the coefficients of x, the second column contains the coefficients of y, the third column contains the coefficients of z, and the last column contains the constants.



We want to convert the original matrix

\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...& \\
5 & & 3 & & -7 & \vert & 0
\end{array}
\right] \\
&&
\end{eqnarray*}


to the following matrix.

\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
... & \\
0 & & 0 & & 1 & \vert & c
\end{array}
\right] \\
&&
\end{eqnarray*}


Because then you can read the matrix as x=a, y=b, and z=c..



Step 2:        We work with column 1 first. Multiply Row 1 by $\dfrac{1}{7}$ to form a new Row 1.

\begin{eqnarray*}&& \\
\frac{1}{7}\left[ Row\ 1\right] &=&\left[ New\ Row\ 1\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...& \\
5 & & 3 & & -7 & \vert & 0
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 3:        We will now complete with column 1. We want zeros in Cell 21 and Cell 31. We achieve this by adding -3 times Row 1 to Row 2 to form a new Row 2 and, by adding -5 times Row 1 to Row 3 to form a new Row 3.

\begin{eqnarray*}&& \\
-3\left[ Row\ 1\right] +\left[ Row\ 2\right] &=&\left[ ...
...ht] +\left[ Row\ 3\right] &=&\left[ New\ Row\ 3\right]
\\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...c{34}{7} & \vert & -\dfrac{80}{7}
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 4:        Let's now work with column 2.We want the number 1 in Cell 22. We do this by multiplying row 2 by $-\dfrac{7}{50}$ to form a new row 2.

\begin{eqnarray*}&& \\
-\frac{7}{50}\left[ Row\ 2\right] &=&\left[ New\ Row\ 2\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...c{34}{7} & \vert & -\dfrac{80}{7}
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 5:        To complete our work with Row 2 we want zeros in cell 12 and cell 32. We achieve this by adding $-\dfrac{5}{7}$ times Row 2 to Row 1 for a new Row 1, and adding $\dfrac{4}{7}$ times Row 2 to Row 3 for a new Row 3.

\begin{eqnarray*}&& \\
-\frac{5}{7}\left[ Row\ 2\right] +\left[ Row\ 1\right] ...
...ht] +\left[ Row\ 3\right] &=&\left[ New\ Row\
3\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...75} & \vert & -\dfrac{1,792}{175}
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 6:        Let's now work the Column 3. We first want the number 1 in Cell 33. We can do this by multiplying Row 3 by $-\dfrac{175}{896}$ to form a new Row 3.

\begin{eqnarray*}&& \\
-\dfrac{175}{896}\left[ Row\ 3\right] &=&\left[ New\ Row\ 3\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
... & \\
0 & & 0 & & 1 & \vert & 2
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 6:        Let's now put zeros in Cell 13 and Cell 33. We do this by adding $\dfrac{1}{10}$ times Row 3 to Row 1 to form a new Row 1, and by adding $\dfrac{23}{50}$ times Row 3 to Row 2 to form a new Row 2.

\begin{eqnarray*}&& \\
\frac{1}{10}\left[ Row\ 3\right] +\left[ Row\ 1\right] ...
...ht] +\left[ Row\ 2\right] &=&\left[ New\ Row\
2\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
... & \\
0 & & 0 & & 1 & \vert & 2
\end{array}
\right] \\
&&
\end{eqnarray*}


The solution can now be ready off the last matrix: $x=1,\ y=3,$ and z=2.


If you would like to go back to the problem page, click on Problem.

If you would like to review the solution to the next problem, click on Problem

If you would like to return to the beginning of the three by three system of equations, click on Example.




This site was built to accommodate the needs of students. The topics and problems are what students ask for. We ask students to help in the editing so that future viewers will access a cleaner site. If you feel that some of the material in this section is ambiguous or needs more clarification, or if you find a mistake, please let us know by e-mail at sosmath.com.

[Two--Variable Systems] [Three-Variable Systems]
[Algebra] [Geometry] [Trigonometry ]

S.O.S MATH: Home Page

Do you need more help? Please post your question on our S.O.S. Mathematics CyberBoard.

Author: Nancy Marcus

Copyright 1999-2017 MathMedics, LLC. All rights reserved.
Contact us
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA
users online during the last hour