SYSTEMS OF EQUATIONS in THREE VARIABLES

It is often desirable or even necessary to use more than one variable to model situations in many fields. 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 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. This is the equation of a plane.




Example 7:


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

       
$\displaystyle \frac{1}{4}x+\frac{2}{3}y+\frac{5}{2}z$ = 20 (1)
       
3x-5y+2z = 11 (2)
       
$\displaystyle \frac{5}{2}x+3y-15z$ = 7 (3)
       

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:        Let's get rid of the fractions. We can do this by multiplying both sides of equation (1) by 12, and both sides of equation (3) by 2.

\begin{eqnarray*}&& \\
(1)\qquad \frac{1}{4}x+\frac{2}{3}y+\frac{5}{2}z &=&20 ...
... \\
&& \\
(3)\qquad 5x+6y-30z &=&14 \\
&& \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
\left( 1\right) \qquad 3x+8y+30z &=&240 \\
&& \\
3x...
... \\
&& \\
x &=&\frac{240-8y-30z}{3} \\
&& \\
&& \\
&&
\end{eqnarray*}


Step 3:        Substitute this value for x in equations (2) and (3) and simplify. This will change equations (2) and (3) to equations in the two variables y and z. Call the changed equations (4) and (5), respectively.
       
$\displaystyle (2)\qquad \qquad 3x-5y+2z$ = 11  
       
$\displaystyle 3\left( \frac{240-8y-30z}{3}\right) -5y+2z$ = 11  
       
$\displaystyle \left( 240-8y-30z\right) -5y+2z$ = 11  
       
-13y-28z = -229  
       
13y+28z = 229 (4)
       
       
       
$\displaystyle (3)\qquad \qquad 5x+6y-30z$ = 14  
       
$\displaystyle 5\left( \frac{240-8y-30z}{3}\right) +6y-30z$ = 14  
       
$\displaystyle 5\left( 240-8y-30z\right) +18y-90z$ = 42  
       
1,200-40y-150z+18y-90z = 42  
       
-22y-240z = -1,158  
       
11y+120z = 579 (5)
       
       

Step 3:        We now have two equations in two unknowns.

\begin{eqnarray*}&& \\
(4) &:&13y+28z=229 \\
&& \\
(5) &:&11y+120z=579 \\
&& \\
&& \\
&&
\end{eqnarray*}


Step 4:        Solve for y in equation (4).

\begin{eqnarray*}(4)\qquad 13y+28z &=&229 \\
&& \\
13y &=&229-28z \\
&& \\
y &=&\frac{229-28z}{13} \\
&& \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
(5)\qquad 11y+120z &=&579 \\
&& \\
11\left( \frac{2...
...\
&& \\
1,252z &=&5,008 \\
&& \\
z &=&4 \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
(4)\qquad 13y+28z &=&229 \\
&& \\
13y+28\left( 4\ri...
...&& \\
13y &=&117z \\
&& \\
y &=&9 \\
&& \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
\left( 1\right) \qquad 3x+8\left( 9\right) +30\left( 4\...
...
&& \\
3x &=&48 \\
&& \\
x &=&16 \\
&& \\
&& \\
&&
\end{eqnarray*}


The solutions: $x=16,\ y=9,\ z=4.\bigskip\bigskip\bigskip $ Step 8:        Let's check this solution.

\begin{eqnarray*}&& \\
(1) &:&\frac{1}{4}x+\frac{2}{3}y+\frac{5}{2}z=20 \\
&...
...-15\left( 4\right)
&=&7\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 z first.

\begin{eqnarray*}&& \\
\begin{array}{l}
(1) \\
\\
(2) \\
\\
(3)
\end...
...& - & 30z & = & 14
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


Step 2:        Add equations (1) and (3) to form equation (4).

\begin{eqnarray*}&& \\
\begin{array}{l}
(1) \\
\\
(3) \\
\\
(4)
\end...
...14y & & & = & 254
\end{array}
\end{array}
& \\
&=& \\
&&
\end{eqnarray*}


Step 3:        Add 15 times equation (2) and equation (3) to form equation (5).

\begin{eqnarray*}&& \\
\begin{array}{l}
(2) \\
\\
(3) \\
\\
(5)
\end...
...-69y & & & = & 179
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


Step 4:        We now have two equations with two variables.



\begin{eqnarray*}(4) &:&8x+14y=254 \\
&& \\
4x+7y &=&127 \\
&& \\
\left( 5\right) &:&50x-69y=179 \\
&& \\
&& \\
&&
\end{eqnarray*}


Step 5:        Add 25 times equation (4) to -2 times equation (5) to form equation (6).

\begin{eqnarray*}&& \\
(4) &:&4x+7y=127 \\
&& \\
100x+175y &=&3,175 \\
&...
...
&& \\
(6) &:&313y=2,817 \\
&& \\
y &=&9 \\
&& \\
&&
\end{eqnarray*}


Step 6.        Substitute this value for y in equation (4) and solve for x.

\begin{eqnarray*}&& \\
&& \\
(4) &:&4x+7y=127 \\
&& \\
4x+7\left( 9\righ...
...&127 \\
&& \\
4x &=&64 \\
&& \\
x &=&16 \\
&& \\
&&
\end{eqnarray*}


Substitute the value for x and y in equation (1) and solve for z.

\begin{eqnarray*}&& \\
(1) &:&3x+8y+30z=240 \\
&& \\
3\left( 16\right) +8\...
...
&& \\
30z &=&120 \\
&& \\
z &=&4 \\
&& \\
&& \\
&&
\end{eqnarray*}


Check the solution as we did before.




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 & & 6 & & -30 & \vert & 14
\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 & & 6 & & -30 & \vert & 14
\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. We would like the number 1 in cell 11(Row1-Col 1). We can achieve this by multiplying Row 1 by $\dfrac{1}{3%
}$.

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



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


Step 3:        Our next objective is get zeros in Cell 12 and Cell 13. We can do this by adding -3 times Row 1 to Row 2 to form a new Row 2, and 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)
...
...rac{22}{3} & & -80 & \vert & -386
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 4:        Our new objective is to get a 1 in Cell 22. To achieve this, multiply row 2 by $-\dfrac{1}{13}.$

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



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
...rac{22}{3} & & -80 & \vert & -386
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 5:        Let's now manipulate the matrix so that there are zeros in Cell 12 and Cell 32. We do this by adding $-\dfrac{8}{3}$ times Row 2 to Row 1 to form a new Row 1 and adding $\dfrac{22}{3}$ times Row 2 to Row 3 to form a new Row 3..

\begin{eqnarray*}&& \\
-\dfrac{8}{3}\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)
...
...}{39} & \vert & -\frac{10016}{39}
\end{array}
\right] \\
&&
\end{eqnarray*}


Step 6:        We now want a 1 in Cell 33. Do this by multiplying Row 3 by $-%
\dfrac{39}{2504}.$

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



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


Step 7:        Let's now manipulate the matrix so that there are zeros in Cell 13 and Cell 33. We do this by adding $-\dfrac{28}{13}$ times Row 3 to Row 2 to form a new Row 2 and adding $-\dfrac{166}{39}$ times Row 3 to Row 1 to form a new Row 1.

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



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


Now you can read the solution from the matrix.

\begin{eqnarray*}x &=&16 \\
y &=&9 \\
z &=&4
\end{eqnarray*}




If you would like to test yourself by working some problem similar to this example, click on Problem.



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.

[Next Problem]
[Two-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-2024 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