Matrices We are going to use matrices to solve for systems of

advertisement
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).
Download