Solve the following equations by Gauss–Jordan elimination:
2x + y + z = 12
6x + 5y − 3z = 6
4x − y + 3z = 5
Rearrange the equations to have variables on the LHS and constants on the RHS, as for Gaussian elimination. Then write them as an augmented matrix. Start by carrying out the Gaussian elimination, i.e., reducing the augmented matrix to upper triangular form. Since this is the same set of equations as those in Worked Example 9.8, we will continue from this point.
Write down the equations from the augmented matrix:
x + 0y + 0z = −2.5
0x + y + 0z = 9
0x + 0y + z = 8
or read off the solution directly: x=−2.5, y = 9, z = 8
Note: If the elimination process produces fewer equations than unknowns, then there is no unique solution.
Gauss–Jordan elimination will be used in Section 9.5 to calculate the inverse of a matrix.
Action | Augmented matrix | Calculations |
Make the boxed –8 into a 1 by dividing row 3² by –8 |
\begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 1 & -3 & -15 \\ 0 & 0 & \fbox{-8} & -64 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)² \\(3)² \end{matrix} | |
Add multiples of row 3 to rows 1 and 2 to generate 0s in column 3 |
\begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 1 & -3 & -15 \\ 0 & 0 & 1 & 8 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)² \\(3)³ \end{matrix} | |
(–0.5 × row 3³) + row 1¹ (3 × row 3³) + row 2² | \begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0 & 2 \\ 0 & 1 & 0 & 9 \\ 0 & 0 & 1 & 8 \end{matrix} \right) \end{matrix} \begin{matrix} (1)² \\(2)³ \\(3)³ \end{matrix} | Calculate (–0.5 × row 3³) →(0 0 –0.5 –4) Calculate (3 × row 3³) →(0 0 –3 24) |
Add multiples of row 2 to row 1 to generate 0s in column 2 |
\begin{matrix} \left(\begin{matrix} 1 & 0 & 0 & -2.5 \\ 0 & 1 & 0 & 9 \\ 0 & 0 & 1 & 8 \end{matrix} \right) \end{matrix} \begin{matrix} (1)³ \\(2)³ \\(3)³ \end{matrix} | Calculate (–0.5 × row 2³) →(0 –0.5 0 –4.5) |