Write #x + 4y - z = 7# into the first row of an augmented matrix:
#[
(1,4,-1,|,7)
]#
Write #x + y + z = 2# into the second row:
#[
(1,4,-1,|,7),
(1,1,1,|,2)
]#
Write #-2x - 2y + 2z = -8# into the third row:
#[
(1,4,-1,|,7),
(1,1,1,|,2),
(-2, -2, 2, |, -8)
]#
Multiply row 1 by -1 and add to row 2:
#[
(1,4,-1,|,7),
(0,-3,2,|,-5),
(-2, -2, 2, |, -8)
]#
Multiply row 1 by 2 and add to row 3:
#[
(1,4,-1,|,7),
(0,-3,2,|,-5),
(0, 6, 0, |, 6)
]#
Divide row 3 by 6 and swap with row 2:
#[
(1,4,-1,|,7),
(0, 1, 0, |, 1),
(0,-3,2,|,-5)
]#
Multiply row 2 by 3 and add to row 3:
#[
(1,4,-1,|,7),
(0, 1, 0, |, 1),
(0,0,2,|,-2)
]#
Divide row 3 by 2:
#[
(1,4,-1,|,7),
(0, 1, 0, |, 1),
(0,0,1,|,-1)
]#
Add row 3 to row 1:
#[
(1,4,0,|,6),
(0, 1, 0, |, 1),
(0,0,1,|,-1)
]#
Multiply row 2 by -4 and add to row 1:
#[
(1,0,0,|,2),
(0, 1, 0, |, 1),
(0,0,1,|,-1)
]#
#x = 2, y = 1, z = -1#