Solve the following equations by Gaussian elimination:
2x + y + z = 12
6x + 5y − 3z = 6
4x − y + 3z = 5
The equations are already written in the required form: variables in order on the LHS and constants on the RHS. Therefore, write down the augmented matrix and proceed with the Gaussian elimination:
\begin{matrix} \\ 2x + y + z = 12 \\ 6x + 5y − 3z = 6 \\ 4x − y + 3z = 5 \end{matrix} → \begin{matrix} \text {x y z RHS} \\ \left(\begin{matrix} 2 & 1 & 1& 12 \\ 6 & 5 & -3 & 6 \\ 4 & -1 & 3 & 5 \end{matrix} \right) \end{matrix}
Now proceed with the elimination on the augmented matrix.
The elimination is now complete; solve by back substitution. From equation (3)²
−8z = −64 hence z = \frac {−64}{-8} = 8
Substitute z = 8 into equation (2)²
y − (3 × 8) = −15 hence y = −15 + (3 × 8) = 9
Substitute z = 8 and y = 9 into equation (1)¹
x + (0.5 × 9) + (0.5 × 8) = 6 hence x = 6 − 4.5 − 4 = −2.5
x=−2.5, y = 9, z = 8
Action | Augmented matrix | Calculations |
Make the boxed 2 into a 1 by dividing row 1 by 2 |
\begin{matrix} \text {x y z RHS} \\ \left(\begin{matrix} \fbox{2} & 1 & 1 & 12 \\ 6 & 5 & -3 & 6 \\ 4 & -1 & 3 & 5 \end{matrix} \right) \end{matrix} \begin{matrix} \\(1) \\(2) \\(3) \end{matrix}
\begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 6 & 5 & -3 & 6 \\ 4 & -1 & 3 & 5 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2) \\(3) \end{matrix} |
|
row 2 + (6 × row 1¹) | \begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 2 & -6 & -30 \\ 4 & -1 & 3 & 5 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)¹ \\(3) \end{matrix} | \left\{\begin{array}{r r r}{{-6}}&{{-3}}&{{-3}}&{{-36}}\\ {{6}}&{{5}}&{{-3}}&{{6}}\\ \hline \\ {{0}}&{{2}}&{{-6}}&{{30}}\end{array}\right. \begin{matrix} (1)¹×−6\\ (2) \\ \\ adding \end{matrix} |
row 3 + (–4 × row 1¹) | \begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 2 & -6 & -30 \\ 0 & -3 & 1 & -19 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)¹ \\(3)¹ \end{matrix} | \left\{\begin{array}{r r r}{{-4}}&{{-2}}&{{-2}}&{{-24}}\\ {{4}}&{{-1}}&{{-3}}&{{5}}\\ \hline \\ {{0}}&{{-3}}&{{1}}&{{-19}}\end{array}\right. \begin{matrix} (1)¹×−4\\ (3) \\ \\ adding \end{matrix} |
Make the boxed 2 into a 1 by dividing row 2¹ by 2 |
\begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & \fbox{2} & -6 & -30 \\ 0 & -3 & 1 & -19 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)¹ \\(3)¹ \end{matrix}
\begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 1 & -3 & -15 \\ 0 & -3 & 1 & -19 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)² \\(3)¹ \end{matrix} |
|
row 3¹ + (−3 × row 2²) | \begin{matrix} \left(\begin{matrix} 1 & 0.5 & 0.5 & 6 \\ 0 & 1 & -3 & -15 \\ 0 & 0 & -8 & -64 \end{matrix} \right) \end{matrix} \begin{matrix} (1)¹ \\(2)² \\(3)¹ \end{matrix} | \left\{\begin{array}{r r r}{{0}}&{{-3}}&{{-9}}&{{-45}}\\ {{0}}&{{-3}}&{{1}}&{{-19}}\\ \hline \\ {{0}}&{{-0}}&{{-8}}&{{-64}}\end{array}\right. \begin{matrix} (2)²×3\\ (3)¹ \\ \\ adding \end{matrix} |