Solve the system x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2

The solution of the system is x=1,y=2,z=3x = 1,\quad y = 2,\quad z = 3

Answer

System of linear equations
x=1,y=2,z=3x = 1,\quad y = 2,\quad z = 3

Checked numerically before it is shown

Step-by-step solution

Solve by

Gaussian elimination

  1. Augmented matrix

    Write the augmented matrix [A | b]:

    (11162−11312−12)\left(\begin{array}{ccc|c}1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 2\end{array}\right)
  2. Row operation

    Row operation R2→R2−2R1R_{2} \to R_{2} - 2R_{1}:

    (11160−3−1−912−12)\left(\begin{array}{ccc|c}1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 1 & 2 & -1 & 2\end{array}\right)
  3. Row operation

    Row operation R3→R3−R1R_{3} \to R_{3} - R_{1}:

    (11160−3−1−901−2−4)\left(\begin{array}{ccc|c}1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & -2 & -4\end{array}\right)
  4. Row operation

    Row operation R3→3R3+R2R_{3} \to 3R_{3} + R_{2}:

    (11160−3−1−900−7−21)\left(\begin{array}{ccc|c}1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 0 & -7 & -21\end{array}\right)
  5. Triangular system

    The matrix is triangular; write it back as equations:

    {x+y+z=6−3y−z=−9−7z=−21\begin{cases}x + y + z = 6 \\ - 3 y - z = -9 \\ - 7 z = -21\end{cases}
  6. Last equation

    The last equation has only zz; solve it:

    −7z=−21- 7 z = -21
  7. Divide both sides

    Divide both sides by −7-7:

    z=3z = 3
  8. Back-substitute

    Put the known values into the equation above and solve for yy:

    −3y−3=−9-3 y - 3 = -9
  9. Simplify

    Simplify both sides:

    −3y−3=−9- 3 y - 3 = -9
  10. Add to both sides

    Add 33 to both sides:

    −3y=−6- 3 y = -6
  11. Divide both sides

    Divide both sides by −3-3:

    y=2y = 2
  12. Back-substitute

    Put the known values into the equation above and solve for xx:

    x+2+3=6x + 2 + 3 = 6
  13. Simplify

    Simplify both sides:

    x+5=6x + 5 = 6
  14. Subtract from both sides

    Subtract 55 from both sides:

    x=1x = 1

Change the problem in the solver Equation solver

Related solved examples