SYSTEMS OF EQUATIONS in THREE VARIABLES

It is often desirable or even necessary to use more than one variable to model a situation in a field such as business, science, psychology, engineering, education, and sociology, to name a few. 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 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 6:


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

       
2x+y-3z = 1 (1)
       
x-4y+z = 6 (2)
       
4x-7y-z = 13 (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:        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 (2).

\begin{eqnarray*}&& \\
x-4y+z &=&6 \\
&& \\
x &=&4y-z+6 \\
&& \\
&&
\end{eqnarray*}


Step 2:        Substitute this value for x in equations (1) and (3). This will change equations (1) and (3) to equations in the two variables y and z. Call the changed equations (4) and (5), respectively..
       
2x+y-3z = 1  
       
$\displaystyle 2\left( 4y-z+6\right) +y-3z$ = 1  
       
8y-2z+12+y-3z = 1  
       
9y-5z = -11 (4)
       
       
4x-7y-z = 13  
       
$\displaystyle 4\left( 4y-z+6\right) -7y-z$ = 13  
       
16y-4z+24-7y-z = 13  
       
9y-5z = -11 (5)
       
       

Step 3:        Now we have a problem because equations (4) and (5) are the same. This means we cannot find a unique solutions. There are an infinite number of solutions.





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

\begin{eqnarray*}&& \\
9y-5z &=&-11 \\
&& \\
9y &=&5z-11 \\
&& \\
y &=&\frac{5z-11}{9} \\
&& \\
&&
\end{eqnarray*}


Step 5:        Substitue this value of y in equation (1) and solve for x..

\begin{eqnarray*}&& \\
2x+y-3z &=&1 \\
&& \\
2x+\left( \frac{5z-11}{9}\rig...
...{20+22z}{18} \\
&& \\
x &=&\frac{10+11z}{9} \\
&& \\
&&
\end{eqnarray*}


The infinity solutions have the form $\left( x,y,z\right) =\left( \frac{%
10+11z}{9},\frac{5z-11}{9},z\right) .$ For example, if z=10, one of the solutions would be $\left( \frac{10+11\left( 10\right) }{9},\frac{5\left(
10\right) -11}{9},10\right) =\left( \frac{40}{3},\frac{13}{3},10\right)
.\bigskip\bigskip\bigskip $ Step 6:        Let's check this one solution.
       
2x+y-3z = 1 (6)
       
$\displaystyle 2\left( \frac{40}{3}\right) +\left( \frac{13}{3}\right) -3\left( 10\right)$ = $\displaystyle 1\rightarrow Yes$  
       
       
$\displaystyle \left( \frac{40}{3}\right) -4\left( \frac{13}{3}\right) +\left( 10\right)$ = $\displaystyle 6\rightarrow Yes$ (7)
       
       
$\displaystyle 4\left( \frac{40}{3}\right) -7\left( \frac{13}{3}\right) -\left( 10\right)$ = 13 (8)
       
       
       

Step 7:        Let's check the general solution.

\begin{eqnarray*}&& \\
&& \\
2\left( \frac{10+11z}{9}\right) +\left( \frac{5...
...}{9} &=&\frac{117}{9}=13\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...
...y & - & z & = & 13
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
\begin{array}{l}
(2) \\
\\
(3) \\
\\
(4)
\end...
...& 11y & & & = & 19
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


Step 3:        Add -3 times equation (3) and equation (1) to form equation (5).

\begin{eqnarray*}&& \\
\begin{array}{l}
(1) \\
\\
(3) \\
\\
(5)
\end...
... 22y & & & = & -38
\end{array}
\end{array}
& \\
&& \\
&&
\end{eqnarray*}


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



\begin{eqnarray*}(4) &:&5x-11y=19 \\
&& \\
\left( 5\right) &:&-10x+22y=-38 \\
&& \\
&& \\
&&
\end{eqnarray*}


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

\begin{eqnarray*}&& \\
(4) &:&10x-22y=38 \\
&& \\
\left( 5\right) &:&-10x+22y=-38 \\
&& \\
(6) &:&0=0 \\
&& \\
&&
\end{eqnarray*}


This means that there is an infinity number of solutions where the value of two of the variables depends on the the value of the third variable. In the example of the substitution method, we let x and y be dependent on z. In this case, let's show y and z to be dependent on x.




Solve for y in equation (5).

\begin{eqnarray*}&& \\
(5) &:&-10x+22y=-38 \\
&& \\
22y &=&10x-38 \\
&& ...
...{10x-38}{22} \\
&& \\
y &=&\frac{5x-19}{11} \\
&& \\
&&
\end{eqnarray*}


Substitute this value of y in equation (1) and solve for z.

\begin{eqnarray*}&& \\
(1) &:&2x+y-3z=1 \\
&& \\
2x+\left( \frac{5x-19}{11...
...{27x-30}{33} \\
&& \\
z &=&\frac{9x-10}{11} \\
&& \\
&&
\end{eqnarray*}


All solutions will be of the form $\left( x,\frac{5x-19}{11},\frac{9x-10}{11}%
\right) \bigskip\bigskip $ Check the solution when x=1 or $\left( 1,-\frac{14}{11},-\frac{1}{11}%
\right) \bigskip $
       
$\displaystyle 2\left( 1\right) +\left( -\frac{14}{11}\right) -3\left( -\frac{1}{11}\right)$ = $\displaystyle 1\rightarrow Yes$ (9)
       
$\displaystyle \left( 1\right) -4\left( -\frac{14}{11}\right) +\left( -\frac{1}{11}\right)$ = $\displaystyle 6\rightarrow Yes$ (10)
       
$\displaystyle 4\left( 1\right) -7\left( -\frac{14}{11}\right) -\left( -\frac{1}{11}\right)$ = $\displaystyle 13\rightarrow Yes$ (11)
       



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)
...
...\\
4 & & -7 & & -1 & \vert & 13
\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)
...
...\\
4 & & -7 & & -1 & \vert & 13
\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 interchanging Rows 1 and 2.

\begin{eqnarray*}&& \\
\left[ Row\ 1\right] &\Longleftrightarrow &\left[ Row\ 2\right] \\
&&
\end{eqnarray*}



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
... & -7 & & -1 & \vert & 13
\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 -2 times Row 1 to Row 2 to form a new Row 2, and adding -4 times Row 1 to Row 3 to form a new Row 3.

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



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


Step 4:        At this point we will assume that you did not notice that rows 2 and 3 are now identical and continue. Multiply Row 2 by $\frac{1}{9}$ to form a new Row 2..

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



\begin{eqnarray*}&& \\
&&
\begin{array}{r}
(1) \\
\\
(2) \\
\\
(3)
...
... & 9 & & -5 & \vert & -11
\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 4 times Row 2 to Row 1 to form a new Row 1 and add -9 times Row 2 to Row 3 to form a new Row 3..

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



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


Step 6:        Now we notice that the last row is all zeros and all we have is two equations in three unknowns. This means that there are an infinite number of solutions, where the value of each variable depends on the other variables.








\begin{eqnarray*}y-\frac{5}{9}z &=&-\frac{11}{9} \\
&& \\
y &=&\frac{5z-11}{...
...}{9} \\
&& \\
x &=&\frac{11z+10}{9} \\
&& \\
&& \\
&&
\end{eqnarray*}



If you would like to work a similar example, click on Example.


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



[Next Example] [Next Problem]
[Two-Variable Systems]
[Algebra] [Geometry] [Trigonometry ]

S.O.S MATH: Home Page

Copyright © 1999-2004 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA