How do you solve #x-y+z=3# and #2y-z=1# and #-x+2y= -1# using matrices?

1 Answer
Feb 11, 2016

Answer:

#x = 3#, #y = 1#, #z = 1#

Explanation:

Your linear equation can be written as the following matrix (first column representing the #x#, second column the #y# and third column the #z#):

#( (1, -1, 1, |, 3),(0, 2, -1, |, 1),(-1, 2, 0, |, -1) ) " " {: (I),(II),(III) :}#

To eliminate the #-1# in the first column, compute #I + III -> color(blue)(III)#:

# rArr ( (1, -1, 1, |, 3),(0, 2, -1, |, 1),(color(blue)(0), color(blue)(1), color(blue)(1), |, color(blue)(2)) ) " " {: (I),(II),(color(blue)(III)) :}#

To eliminate the #2# in the second column, compute #II -2 III -> color(red)(II)#:

# rArr ( (1, -1, 1, |, 3),(color(red)(0), color(red)(0), color(red)(-3), |,color(red)( -3)),(0, 1, 1, |, 2) ) " " {: (I),(color(red)(II)),(III) :}#

Compute #-1/3 II -> color(green)(II)#:

# rArr ( (1, -1, 1, |, 3),(color(green)(0), color(green)(0), color(green)(1), |, color(green)(1)),(0, 1, 1, |, 2) ) " " {: (I),(color(green)(II)),(III) :}#

Now, use the second row to eliminate the #1# in the third row, third column:
compute #III - II -> color(orange)(III)#:

# rArr ( (1, -1, 1, |, 3),(0, 0, 1, |, 1),(color(orange)(0), color(orange)(1), color(orange)(0), |, color(orange)(1)) ) " " {: (I),(II),(color(orange)(III)) :}#

We are almost done. Now, you need to use the third row to eliminate the #-1# in the first row, and the second row to eliminate the #1# in the first row, third column.

Let's do it step by step: first, #I + III -> color(violet)(I)#:

# rArr ( (color(violet)(1), color(violet)(0), color(violet)(1), |, color(violet)(4)),(0, 0, 1, |, 1),(0, 1, 0, |, 1) ) " " {: (color(violet)(I)),(II),(III) :}#

Last step: compute #I - II -> color(gray)(I)#:

# rArr ( (color(gray)(1), color(gray)(0), color(gray)(0), |, color(gray)(3)),(0, 0, 1, |, 1),(0, 1, 0, |, 1) ) " " {: (color(gray)(I)),(II),(III) :}#

If you would like, you can also swap #II# and #III# to have the perfect "step format" in your matrix.

The solution is #x = 3#, #y = 1# and #z = 1#.