6 Matrix Solutions to Linear Systems Section 6 Notes Page In this section we will talk about matrices Matrices help to organize data They can also be used to solve equations, which is what we will mainly focus on in this section You will see matrices written with brackets, with numbers written inside organized in rows and columns The numbers inside the matrices are called elements A matrix gives us a shortened and simplified way to write systems of equations When we transform a system of equations into a matrix, this matrix is called the augmented matrix This augmented matrix has a bar that separates the matrix into two groups The numbers that come in front of the variables are written on the left side of the bar, and the constants are placed on the right If any variable is missing, then you will put a zero in that spot EXAMPLE: Write the augmented matrix for the system of linear equations: x y z x z x y 6z On the left side of the augmented matrix, we will just put down the numbers in front of the variables Notice that in the second equation there is no y term This means you will put a zero in that place Your answer is: 6 EXAMPLE: Write the system of linear equations represented by the augmented matrix Use x, y, and z for the variables 6 6 We are doing the exact opposite as we did on the first example We now want to put back in the variables from this matrix The first column is for x, the second is for y, and the third column is for z The bar represents an equals sign, and the numbers in the last column will follow the equals sign If there is a zero then that equation will not have that variable in that location So the answer is: x z y z x 6y 6
Section 6 Notes Page In a previous section we covered solving linear equations using the addition elimination) method You will be doing the same thing with matrices, except that we will just be working with the augmented matrix and no variables In order to do this, we will do row operations The following is a list of row operations you are allowed to do: ) You can interchange the rows in a matrix ) You can multiply or divide all the elements of a row by a nonzero number This is the same as multiplying or dividing both sides of an equation by something ) The elements in any row may be multiplied or divided by a nonzero number, and this result may be added or subtracted to the corresponding elements of another row This is basically the addition elimination) method you did for equations You multiply on equation by something and add it to another equation The following is some notation that you will see with row operations ) Interchange the ith and jth rows: Ri R j ) Multiply everything in the ith row by k: kri ) Add k times everything in the ith row and add it to the corresponding elements in row j: kri R j EXAMPLE: Perform the following matrix row operation and write the new matrix: 6 6 R This operation says to take everything in the first row and multiply it by one-fourth Since the R appears next to the second row, this is where you will write your answer So you will multiply each element in that first row by ¼ Then we will write this answer in the second row You will not do anything with the other two rows Your answer is: 6 6 EXAMPLE: Perform the following matrix row operation and write the new matrix: R R
Section 6 Notes Page This is asking you to multiply everything in the first row by, and then add this to what is in the third row Since is written on the bottom, then our answers will be put in the bottom row and the other rows stay the same I showed the calculations for each element I took the initial element, multiplied it by and then added the corresponding element from row Then I wrote these answers in the last row: R R ) ) ) ) This gives you: 6 Solving a System of Equations using the Gaussian Elimination Method Here are the steps: ) Write the augmented matrix of the system ) Use matrix row operations to simplify the matrix into the following form: You will first get the zero in the row, column Then you will get a zero in row, column, then finally you will get a zero in row, column Once you get the zeros, then divide each row to get a one in the diagonals as shown above ) Once you have it in the form above, put the variables back in and back-substitute to solve EXAMPLE: Solve the system using matrices If there is no solution or if there are infinitely many solutions and a system s equations are dependent, so state z y x z y x z y x We will follow the steps above First we will write the augmented matrix: Now we need to change the in the second row into a zero To do this you will need to find a row operation that will give you a zero We need to multiply the first row by - and add it to the second row Then this answer becomes the new row So this is what we will do: R R ) ) ) ) )) ))
Section 6 Notes Page Our Now we need to get a zero where the is in the last row We need to pick another row operation that will accomplish this If we multiply the first row by - and add it to the last row, we will get a zero So this is what we will do: Our R R )) )) ) ) ) ) Now we need to get a zero where the - is To do this, we need to work with only the last two rows You don t want to use the first row at this point because if you do, then you will get rid of one of the zeros we already have We want to preserve this Therefore if we take the second row and multiply it by and add it to the last row, we will get a zero there Then we will write our answer in the last row So this is what we will do: R R )) )) )) Our )) Finally we need to get a in the diagonals The first two rows already have it, but we need to get a where the is Therefore, divide this row by We will do: R Now that we have it in the correct form, we x y z need to turn this matrix back into a system of equations: y z So we know that z = Now we z will plug this into the second equation to solve for y: y + ) = Solving gives us y = - Now we will take our answer for y and z and plug it into the first equation: x + -) ) = - This gives x - = - Solving gives us x = Therefore our answers are:, -,
Section 6 Notes Page The book does mention another method, called the Gauss-Jordan elimination, but this is more work, so you can just use the Gaussian Elimination with back-substititution EXAMPLE: Solve the system using matrices If there is no solution or if there are infinitely many solutions and a system s equations are dependent, so state x z y x y z x y z First we need to rearrange this so that all the variables and the equal signs line up You will get: x y z x y z Now we will write the augmented matrix: x y z Now the book and MyMathLab will tell you that you must get a in the diagonals before you begin You don t need to do this first because if you do, then you will be dealing with fractions Instead, get your three zeros In fact, you don t even need to get the s in the diagonals at all You can still back substitute to find the answer This will avoid you having to work with fractions This example will illustrate this Now we need to change the in the second row into a zero To do this you will need to find a row operation that will give you a zero We need to multiply the first row by - and add it to times the second row Then this answer becomes the new row So this is what we will do: R R Here is the work for the row operations: )) )) )) ) ) ) ) )) )) ) ) Now we need to get a zero where the is in the last row We need to pick another row operation that will accomplish this If we multiply the first row by - and add it to times the last row, we will get a zero So this is what we will do:
R R Section 6 Notes Page 6 )) )) )) ) ) ) ) )) Our )) ) ) Now we need to get a zero where the - is To do this, we need to work with only the last two rows Therefore if we take the second row and multiply it by - and add it to times the last row, we will get a zero there Then we will write our answer in the last row So this is what we will do: R R )) ) ) ) ) )) ) Our ) ) ) ) From here you don t need to get the s in the diagonal like the book 6 6 says You can, however this will leave you with fractions for back substituting If you don t want to work with fractions, then just turn the matrix back into a system of equations at this point and back substitute: x y z y z 6z 6 We can solve the last equation and get z = - Now we will plug this into the second equation to solve for y: -y + -) = - Simplifying gives us -y = Solving gives us y = Now we will take our answer for y and z and plug it into the first equation: x + -) = This gives x + = Solving gives us x = Therefore our answers are:,, -