# How do you solve #x+y+z=-9#, #x-y+5z=-19#, #5x+y+z=-29# using matrices?

##### 1 Answer

#### Answer:

Oh my goodness these are tedious. But, here goes....

#### Explanation:

You have 3 equations in 3 unknowns, which you should know how to solve.

The matrix technique is a streamlined, shorthand version of the procedure. You start by writing the coefficients for the variables x, y, and z, together with the right hand side, as a matrix.

For this example, we would have:

(this is going to be hard to read because of the spacing between the numbers...)

The numbers in each column represent the coefficients of the variables in the corresponding equations.

...and then you manipulate this matrix using a set of rules, until you can read off the values for the variables. You want to end up with something like:

It's been years since I've done this, but some of the rules I can remember are:

- you can re-arrange the rows in any order you want.

- you can replace a row by adding or subtracting one of the other rows to it (or from it).

- you can replace a row by multiplying every value in it by a constant.

- you can combine these operations, but be careful to do the arithmetic correctly.

For this example, we can replace the bottom row with the remainder of subtracting from it the top row. So we'd get:

...see what I did there? 1st column is 5 -1, second column is 1 - 1, 3rd column is 1 - 1, last colum is -29 - (-9).

Now replace the bottom row by dividing every value by 4:

...the last row is the representation of : 1x + 0y + 0z = -5, so this lets you read off the value for the x variable: -5.

You now have to reduce the other two rows.

...replace the 2nd row with the result of adding rows 1 and 2:

...replace the 2nd row by subtracting 2 times the 3rd row:

...divide the 2nd row by 6:

(which now gives you the value for z: -3

Now, replace row 1 by subtracting from it rows 2 and 3:

In the textbooks, they always rewrite this in the classic "identity matrix" form, with 1's down the diagonal:

so

CHECK YOUR WORK. Plug these values back into the original equations and make sure the result is true:

GOOD LUCK