Solve x + y + 3z = 6, 2x − y + 3z = 15, 3x + 3y + 3z = 6
Worked out line by line the way a teacher would write it.
Answer
| Solution | x = 3, y = −3, z = 2 |
Step-by-step solution
10 steps-
1 The system, with the equations numbered\begin{aligned}x + y + 3 z &= 6 & (1)\\ 2 x - y + 3 z &= 15 & (2)\\ 3 x + 3 y + 3 z &= 6 & (3)\end{aligned}
-
2 Write the augmented matrix (coefficients | constants)
The augmented matrix keeps just the numbers: one row per equation, one column per unknown and the constants after the bar. Row operations on it do exactly what the same moves would do to the equations.
\left[\begin{array}{ccc|c} 1 & 1 & 3 & 6\\ 2 & -1 & 3 & 15\\ 3 & 3 & 3 & 6 \end{array}\right] -
3 Row 2 ← Row 2 − 2 · Row 1
Adding a multiple of the pivot row to another row is like adding equal amounts to both sides of an equation. The multiple is chosen so the entry in the pivot column becomes 0.
\left[\begin{array}{ccc|c} 1 & 1 & 3 & 6\\ 0 & -3 & -3 & 3\\ 3 & 3 & 3 & 6 \end{array}\right] -
4 Row 3 ← Row 3 − 3 · Row 1\left[\begin{array}{ccc|c} 1 & 1 & 3 & 6\\ 0 & -3 & -3 & 3\\ 0 & 0 & -6 & -12 \end{array}\right]
-
5 Divide row 2 by -3 so the pivot is 1
Multiplying a whole row by a non-zero number is like multiplying both sides of that equation by it, so the solutions stay the same. Multiplying by 1 / pivot turns the pivot into 1.
\left[\begin{array}{ccc|c} 1 & 1 & 3 & 6\\ 0 & 1 & 1 & -1\\ 0 & 0 & -6 & -12 \end{array}\right] -
6 Row 1 ← Row 1 − Row 2\left[\begin{array}{ccc|c} 1 & 0 & 2 & 7\\ 0 & 1 & 1 & -1\\ 0 & 0 & -6 & -12 \end{array}\right]
-
7 Divide row 3 by -6 so the pivot is 1\left[\begin{array}{ccc|c} 1 & 0 & 2 & 7\\ 0 & 1 & 1 & -1\\ 0 & 0 & 1 & 2 \end{array}\right]
-
8 Row 1 ← Row 1 − 2 · Row 3\left[\begin{array}{ccc|c} 1 & 0 & 0 & 3\\ 0 & 1 & 1 & -1\\ 0 & 0 & 1 & 2 \end{array}\right]
-
9 Row 2 ← Row 2 − Row 3\left[\begin{array}{ccc|c} 1 & 0 & 0 & 3\\ 0 & 1 & 0 & -3\\ 0 & 0 & 1 & 2 \end{array}\right]
-
10 The matrix is in reduced row-echelon form — read off the solutionx = 3,\quad y = -3,\quad z = 2
Check by substitution
| Equation | Left side | Right side | |
|---|---|---|---|
| (1) | 6 | 6 | ✓ |
| (2) | 15 | 15 | ✓ |
| (3) | 6 | 6 | ✓ |
Open this problem in the solver
Change a number or try your own problem: the solver works it out the same way, with a graph and hint mode.