Solve x − 2y + z = −1, x + y − 2z = 2, 3x + y − z = 1

Worked out line by line the way a teacher would write it.

Answer

Solutionx = 0, y = 0, z = −1

Step-by-step solution

11 steps
  1. 1 The system, with the equations numbered
    \begin{aligned}x - 2 y + z &= -1 & (1)\\ x + y - 2 z &= 2 & (2)\\ 3 x + y - z &= 1 & (3)\end{aligned}
  2. 2 Write the augmented matrix (coefficients | constants)
    \left[\begin{array}{ccc|c} 1 & -2 & 1 & -1\\ 1 & 1 & -2 & 2\\ 3 & 1 & -1 & 1 \end{array}\right]
  3. 3 Row 2 ← Row 2 − Row 1
    \left[\begin{array}{ccc|c} 1 & -2 & 1 & -1\\ 0 & 3 & -3 & 3\\ 3 & 1 & -1 & 1 \end{array}\right]
  4. 4 Row 3 ← Row 3 − 3 · Row 1
    \left[\begin{array}{ccc|c} 1 & -2 & 1 & -1\\ 0 & 3 & -3 & 3\\ 0 & 7 & -4 & 4 \end{array}\right]
  5. 5 Divide row 2 by 3 so the pivot is 1
    \left[\begin{array}{ccc|c} 1 & -2 & 1 & -1\\ 0 & 1 & -1 & 1\\ 0 & 7 & -4 & 4 \end{array}\right]
  6. 6 Row 1 ← Row 1 + 2 · Row 2
    \left[\begin{array}{ccc|c} 1 & 0 & -1 & 1\\ 0 & 1 & -1 & 1\\ 0 & 7 & -4 & 4 \end{array}\right]
  7. 7 Row 3 ← Row 3 − 7 · Row 2
    \left[\begin{array}{ccc|c} 1 & 0 & -1 & 1\\ 0 & 1 & -1 & 1\\ 0 & 0 & 3 & -3 \end{array}\right]
  8. 8 Divide row 3 by 3 so the pivot is 1
    \left[\begin{array}{ccc|c} 1 & 0 & -1 & 1\\ 0 & 1 & -1 & 1\\ 0 & 0 & 1 & -1 \end{array}\right]
  9. 9 Row 1 ← Row 1 + Row 3
    \left[\begin{array}{ccc|c} 1 & 0 & 0 & 0\\ 0 & 1 & -1 & 1\\ 0 & 0 & 1 & -1 \end{array}\right]
  10. 10 Row 2 ← Row 2 + Row 3
    \left[\begin{array}{ccc|c} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 \end{array}\right]
  11. 11 The matrix is in reduced row-echelon form — read off the solution
    x = 0,\quad y = 0,\quad z = -1

Check by substitution

EquationLeft sideRight side
(1)−1−1✓
(2)22✓
(3)11✓
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.