Matrices We are going to use matrices to solve for systems of equations. This will be especially convenient when our systems of equations get bigger and bigger. To understand how to use matrices to solve systems of equations we will use an example. We will solve this system of three equations and three unknowns: 3π₯ + π¦ + π§ = 14 −π₯ + 2π¦ − 3π§ = −9 5π₯ − π¦ + 5π§ = 30 Before you begin, make sure that all the equations are written in such a way the x, y, and z terms are written in alphabetical order as they are above. Now, the first step is to write what is called the matrix equation of this system, and here it is… 3 1 1 π₯ 14 [−1 2 −3] [π¦] = [−9] 5 −1 5 π§ 30 Notice that the 3 x 3 matrix on the left is obtained by arranging the coefficients in the system into a matrix (a few have been highlighted in order to make this easier to follow). This is called the coefficient matrix. The matrix just to the right of the coefficient matrix is the matrix of variables. It is important to write this matrix in the correct order, from x to z going from top to bottom. The matrix on the right of the equal sign is called the matrix of constants and is made by arranging the constants from the system above and arranging in the matrix as shown. Let’s simplify the way this equation looks in order to find the next step. Let’s name each of the matrices in the equation. 3 1 1 [−1 2 −3] = π΄, 5 −1 5 π₯ [π¦] = π, π§ 14 [−9] = π΅ 30 Now the matrix equation look like this; π΄π = π΅ If we could solve for X, then we would know the solution to the system because we would have and equation like this: π₯ π [π¦] = [π] π§ π Where a, b, and c are constants (numbers). So x=a, y=b, and z=c. Let’s think back for a minute about how we solve for x when dealing with numbers instead of matrices. For example, in the equation 6π₯ = 12 How would we solve for x? You would probably say “divide by 6 on both sides.” That is correct, but if we try to use that strategy in our matrix equation, it turns out there is no such thing as dividing by a matrix. So I can’t divide by A on both sides of the matrix equation. Let’s look at dividing by 6 in a different way. Rather than dividing by 6 I could think of this as multiplying by the inverse of 6. When I say the inverse of 6 I mean the number that I multiply 6 by in order to get 1 as 1 1 1 1 a result. This number is 6 since 6 (6) = 1. When I multiply by the inverse of 6 on both sides then I get 6 (6)π₯ = 6 (12) which turns into π₯ = 2. It would be nice if we could translate this into the matrix equation. If the matrix A had some kind of inverse I could multiply it by so that the result is some kind of “1” matrix then I could multiply by this inverse π₯ π π¦ matrix on both sides of the equation and I would have what I was after (we would have [ ] = [π ] and we would know π§ π the values of x, y, and z). It turns out that there is an inverse for most square matrices. Let’s name the inverse of the matrix π΄. We’ll call it π΄−1 . . When we multiply a matrix by its inverse we get what is called the identity matrix πΌ, π΄−1 π΄ = πΌ = π΄π΄−1. The identity matrix is x square matrix that has 1s in the downward diagonal from left to right and zeros everywhere else. So the 3x3 identity matrix is 1 [0 0 0 0 1 0] 0 1 So now we can multiply both sides of the matrix equation by the inverse of π΄… π΄−1 π΄π = π΄−1 π΅ Which becomes πΌπ = π΄−1 π΅ Where πΌ is the identity matrix. If you multiply πΌπ find that the result is just π. So we have π = π΄−1 π΅ If we could only find π΄−1 π΅. In order to do this we need to find π΄−1 . We could find the inverse by hand, but we are going to use our calculators. In order to do this we must first enter the matrix into our calculators. Press the “2 nd” button and three buttons below that, press the “π₯ −1 ” button which has “matrix” written above it. Move to the right to highlight “EDIT” and select [A]. At the top of the screen there will be the dimensions of the matrix, for this example will make the matrix a 3 x 3 matrix. It should be straightforward to enter the numbers into the matrix. We want to find π΄−1 π΅. We have π΄ in our calculator already, and we can tell our calculator to find π΄−1, but we still need π΅ in our calculator. Follow the same method as before, but be sure to make the dimensions of π΅ correct (that is 3 x 1). Now that we have π΄ and π΅ we can have the calculator do the rest. Press “2nd” and “π₯ −1 ” and select matrix [A]. We want the inverse of A, so after [A] we press the “π₯ −1 ” button, giving us [π΄]−1 , and after that we enter the matrix menu again and 1 select matrix [B]. On our screen we should have [π΄]−1 [π΅], when we press enter we should get [5]. This means that 6 π₯ 1 [π¦] = [5] π§ 6 And x=1, y=5, and z=6. This gives us the solution to our original system of equations, which is (1, 5, 6).