2.2: Systems of Linear Equations and the Gauss-Jordan Method
-
- Last updated
- Save as PDF
Learning Objectives
In this section you will learn to
- Represent a system of linear equations as an augmented matrix
- Solve the system using elementary row operations.
In this section, we learn to solve systems of linear equations using a process called the Gauss-Jordan method. The process begins by first expressing the system as a matrix, and then reducing it to an equivalent system by simple row operations. The process is continued until the solution is obvious from the matrix. The matrix that represents the system is called the augmented matrix , and the arithmetic manipulation that is used to move from a system to a reduced equivalent system is called a row operation .
Example \(\PageIndex{1}\)
Write the following system as an augmented matrix.
\[\begin{array}{l}
2 x+3 y-4 z=5 \\
3 x+4 y-5 z=-6 \\
4 x+5 y-6 z=7
\end{array}\nonumber \]
Solution
We express the above information in matrix form. Since a system is entirely determined by its coefficient matrix and by its matrix of constant terms, the augmented matrix will include only the coefficient matrix and the constant matrix. So the augmented matrix we get is as follows:
\[\left[\begin{array}{ccc|c}
2 & 3 & -4 & 5 \\
3 & 4 & -5 & -6 \\
4 & 5 & -6 & 7
\end{array}\nonumber\right]\nonumber \]
In the last section, we expressed the system of equations as \(AX = B\), where \(A\) represented the coefficient matrix, and \(B\) the matrix of constant terms. As an augmented matrix, we write the matrix as \(\left[\begin{array}{l|l}A & B \end{array}\right]\). It is clear that all of the information is maintained in this matrix form, and only the letters \(x\), \(y\) and \(z\) are missing. A student may choose to write \(x\), \(y\) and \(z\) on top of the first three columns to help ease the transition.
Example \(\PageIndex{2}\)
For the following augmented matrix, write the system of equations it represents.
\[\left[\begin{array}{ccccc}
1 & 3 & -5 & | & 2 \\
2 & 0 & -3 & | & -5 \\
3 & 2 & -3 & | & -1
\end{array}\right]\nonumber \]
Solution
The system is readily obtained as below.
\[\begin{array}{l}
x+3 y-5 z=2 \\
2 x-3 z=-5 \\
3 x+2 y-3 z=-1
\end{array}\nonumber \]
Once a system is expressed as an augmented matrix, the Gauss-Jordan method reduces the system into a series of equivalent systems by using the row operations. This row reduction continues until the system is expressed in what is called the reduced row echelon form . The reduced row echelon form of the coefficient matrix has 1's along the main diagonal and zeros elsewhere. The solution is readily obtained from this form.
The method is not much different form the algebraic operations we employed in the elimination method in the first chapter. The basic difference is that it is algorithmic in nature, and, therefore, can easily be programmed on a computer.
We will next solve a system of two equations with two unknowns, using the elimination method, and then show that the method is analogous to the Gauss-Jordan method.
Example \(\PageIndex{3}\)
Solve the following system by the elimination method.
\[\begin{array}{l}
x+3 y=7 \\
3 x+4 y=11
\end{array} \nonumber \]
Solution
We multiply the first equation by – 3, and add it to the second equation.
\begin{aligned}
-3 x-9 y &=-21 \\
3 x+4 y &=11 \\ \hline
-5y &=-10
\end{aligned}
By doing this we transformed our original system into an equivalent system:
\begin{aligned}
x+3 y &=7 \\
-5 y &=-10
\end{aligned}
We divide the second equation by – 5, and we get the next equivalent system.
\begin{aligned}
x+3 y &=7 \\
y &=2
\end{aligned}
Now we multiply the second equation by – 3 and add to the first, we get
\[\begin{array}{l}
x=1 \\
y=2
\end{array}\nonumber \]
Example \(\PageIndex{4}\)
Solve the following system from Example 3 by the Gauss-Jordan method, and show the similarities in both methods by writing the equations next to the matrices.
\begin{array}{l}
x+3 y=7 \\
3 x+4 y=11
\end{array}
Solution
The augmented matrix for the system is as follows.
\[\left[\begin{array}{cccc}
1 & 3 & | & 7 \\
3 & 4 & | & 11
\end{array}\right] \quad\left[\begin{array}{c}
x+3 y=7 \\
3 x+4 y=11
\end{array}\right] \nonumber \]
We multiply the first row by – 3, and add to the second row.
\[\left[\begin{array}{cccc}
1 & 3 & | & 7 \\
0 & -5 & | & -10
\end{array}\right] \quad\left[\begin{array}{c}
x+3 y&=7 \\
-5 y&=-10
\end{array}\right] \nonumber \]
We divide the second row by – 5, we get,
\[\left[\begin{array}{llll}
1 & 3 & | & 7 \\
0 & 1 & | & 2
\end{array}\right] \quad\left[\begin{array}{rl}
x+3 y & =7 \\
y & =2
\end{array}\right] \nonumber \]
Finally, we multiply the second row by – 3 and add to the first row, and we get,
\[\left[\begin{array}{llll}
1 & 0 & | & 1 \\
0 & 1 & | & 2
\end{array}\right] \quad\left[\begin{array}{l}
x=1 \\
y=2
\end{array}\right] \nonumber \]
Now we list the three row operations the Gauss-Jordan method employs.
Row Operations
- Any two rows in the augmented matrix may be interchanged.
- Any row may be multiplied by a non-zero constant.
- A constant multiple of a row may be added to another row.
One can easily see that these three row operation may make the system look different, but they do not change the solution of the system.
The first row operation states that if any two rows of a system are interchanged, the new system obtained has the same solution as the old one. Let us look at an example in two equations with two unknowns. Consider the system
\begin{aligned}
x+3 y&=7 \\
3 x+4 y&=11
\end{aligned}
We interchange the rows, and we get,
\begin{aligned}
3 x+4 y&=11 \\
x+3 y&=7
\end{aligned}
Clearly, this system has the same solution as the one above.
The second operation states that if a row is multiplied by any non-zero constant, the new system obtained has the same solution as the old one. Consider the above system again,
\begin{aligned}
x+3 y&=7 \\
3 x+4 y&=11
\end{aligned}
We multiply the first row by –3, we get,
\begin{aligned}
-3 x-9 y &=-21 \\
3 x+4 y &=11
\end{aligned}
Again, it is obvious that this new system has the same solution as the original.
The third row operation states that any constant multiple of one row added to another preserves the solution. Consider our system,
\begin{aligned}
x+3 y&=7 \\
3 x+4 y&=11
\end{aligned}
If we multiply the first row by –3, and add it to the second row, we get,
\begin{aligned}
x+3 y&=7 \\
-5 y&=-10
\end{aligned}
And once again, the same solution is maintained.
Now that we understand how the three row operations work, it is time to introduce the Gauss-Jordan method to solve systems of linear equations. As mentioned earlier, the Gauss-Jordan method starts out with an augmented matrix, and by a series of row operations ends up with a matrix that is in the reduced row echelon form .
A matrix is in the reduced row echelon form if the first nonzero entry in each row is a 1, and the columns containing these 1's have all other entries as zeros. The reduced row echelon form also requires that the leading entry in each row be to the right of the leading entry in the row above it, and the rows containing all zeros be moved down to the bottom. We state the Gauss-Jordan method as follows.
Gauss-Jordan Method
- Write the augmented matrix.
- Interchange rows if necessary to obtain a non-zero number in the first row, first column.
- Use a row operation to get a 1 as the entry in the first row and first column.
- Use row operations to make all other entries as zeros in column one.
- Interchange rows if necessary to obtain a nonzero number in the second row, second column. Use a row operation to make this entry 1. Use row operations to make all other entries as zeros in column two.
- Repeat step 5 for row 3, column 3. Continue moving along the main diagonal until you reach the last row, or until the number is zero.
The final matrix is called the reduced row-echelon form.
Example \(\PageIndex{5}\)
Solve the following system by the Gauss-Jordan method.
\begin{aligned}
2 x+y+2 z &=10 \\
x+2 y+z &=8 \\
3 x+y-z &=2
\end{aligned}
Solution
We write the augmented matrix.
\[\left[\begin{array}{ccccc}
2 & 1 & 2 & | & 10 \\
1 & 2 & 1 & | & 8 \\
3 & 1 & -1 & | & 2
\end{array}\right] \nonumber \]
We want a 1 in row one, column one. This can be obtained by dividing the first row by 2, or interchanging the second row with the first. Interchanging the rows is a better choice because that way we avoid fractions.
\[\left[\begin{array}{ccccc}
1 & 2 & 1 & | & 8 \\
2 & 1 & 2 & | & 10 \\
3 & 1 & -1 & | & 2
\end{array}\right] \quad \text { we interchanged row 1 (R1) and row 2 (R2) }\nonumber \]
We need to make all other entries zeros in column 1. To make the entry (2) a zero in row 2, column 1, we multiply row 1 by - 2 and add it to the second row. We get,
\[\left[\begin{array}{ccccc}
1 & 2 & 1 & | & 8 \\
0 & -3 & 0 & | & -6 \\
3 & 1 & -1 & | & 2
\end{array}\right] \quad-2 R 1+R 2 \nonumber \]
To make the entry (3) a zero in row 3, column 1, we multiply row 1 by - 3 and add it to the third row. We get,
\[\left[\begin{array}{ccccc}
1 & 2 & 1 & | & 8 \\
0 & -3 & 0 & | & -6 \\
0 & -5 & -4 & | & -22
\end{array}\right] \quad-3 R 1+R 3 \nonumber \]
So far we have made a 1 in the left corner and all other entries zeros in that column. Now we move to the next diagonal entry, row 2, column 2. We need to make this entry(–3) a 1 and make all other entries in this column zeros. To make row 2, column 2 entry a 1, we divide the entire second row by –3.
\[\left[\begin{array}{ccccc}
1 & 2 & 1 & | & 8 \\
0 & 1 & 0 & | & 2 \\
0 & -5 & -4 & | & -22
\end{array}\right] \quad \mathrm{R} 2 \div(-3) \nonumber \]
Next, we make all other entries zeros in the second column.
\[\left[\begin{array}{ccccc}
1 & 0 & 1 & | & 4 \\
0 & 1 & 0 & | & 2 \\
0 & 0 & -4 & | & -12
\end{array}\right] \quad-2 R 2+R 1 \text { and } 5 R 2+R 3 \nonumber \]
We make the last diagonal entry a 1, by dividing row 3 by – 4.
\[\left[\begin{array}{ccccc}
1 & 0 & 1 & | & 4 \\
0 & 1 & 0 & | & 2 \\
0 & 0 & 1 & | & 3
\end{array}\right] \quad \quad R 3 \div(-4) \nonumber \]
Finally, we make all other entries zeros in column 3.
\[\left[\begin{array}{ccccc}
1 & 0 & 0 & | & 1 \\
0 & 1 & 0 & | & 2 \\
0 & 0 & 1 & | & 3
\end{array}\right] \quad-\mathrm{R} 3+\mathrm{R} 1 \nonumber \]
Clearly, the solution reads \(x =1\), \(y = 2\), and \(z = 3\).
Before we leave this section, we mention some terms we may need in the fourth chapter.
The process of obtaining a 1 in a location, and then making all other entries zeros in that column, is called pivoting .
The number that is made a 1 is called the pivot element , and the row that contains the pivot element is called the pivot row .
We often multiply the pivot row by a number and add it to another row to obtain a zero in the latter. The row to which a multiple of pivot row is added is called the target row .