BAM! Mr. Tarrou. In this video we are going to look at two examples of using Cramer's
Rule to allow us to solve systems of equations in a different manner. We are going to do
first a 2x2 matrix and then a 3x3 matrix. The Cramer's Rule is really going to be a
much more efficient way of solving that larger 3x3 matrix system of equations compared to
using the Gaussian elimination method and of course we do know now with technology that
all of these ways of solving these problems by hand are a lot quicker by just typing it
into a calculator and getting an answer but then again, what's the calculator really doing,
we don't really understand the process that's being used to solve that work and maybe someday
you'll be programming a computer or a calculator to help somebody else. So at any rate... Cramer's
Rule! Let ‘c’ be the coefficient matrix of the system of equations. so we have ax+by
equals m and fx+gy is equal to n so the matrix c, the coefficient matrix is going to be,
you identify it, we have the variables of x and y in here and all the other variables
a, b, f, g, m, n these are all going to be constants in the problem and the matrix a,
b, f, g is going to be your coefficient matrix. Well it comes in front of the x's and it comes
in front of the y's so whatever variables you have in your problem. The solution to
the system of equations is going to be, x is going to be equal to, now, m, n, these
are the constants that the equations are set equal to. You can see that we have taken out
the a and the f of the coefficient matrix and replaced them with the constants, values,
the numerical values the equations are equal to, that is the x and y on one side and just
this constant value on the right. So if you want to solve for x, you take the coefficient
matrix, you take out the coefficients of x and you plug in those values of m and n in
the first column. Keep the b and the g, keep the coefficients of y in there and find the
determinant of the two by two matrix and divide it by the determinant of matrix c, just the
matrix that we have the coefficients of x and y in there. The formula or my textbook
is using just the determinant of c in the denominator because we have the same value
in the denominator for both of those steps of solving for x and y. So we are going to
save writing there. And then y is going to be, go back to that coefficient matrix, put
the a and the f back in, put the coefficients of x back in, but this time take out the coefficients
of y and replace them with the constants of m and n again and then once again find the
determinant of the 2x2 matrix and divide it by the determinant of c, the coefficient matrix
of the system. Here what it is going to look like in practice. We are going to solve x-2y=5
and 3x+y=-4. So c is going to be, matrix c is going to be equal to 1 and 3 in the first
column and -2, 1 in the second. And then the determinant of c is going to be equal to 1
times 1 minus negative 2 times 3. Just running out of room there. so the determinant of c
is going equal to 1 minus a -6 or 1 minus -6, just showing all the work, these negatives
are going to cancel out of course, so we get 1 plus 6 is equal to 7. Okay now that’s
going to, that value of 7 is going to be in the denominator in both of my fractions, I
go through the, continue the process to find x and y. So let’s pick another color here.
Let’s see the x. x is going to be equal to, well we have matrix c, we are going to
take out the coefficients of x and plug in 5 and -4. So we have the determinant of 5
and -4, these constants off to the right, -2, 1 keep that in there over the determinant
of c, which we already know is 7. okay so we have 5 times 1 minus -2 times -4 over 7
and that comes out to be 5 minus, now -2 times -4 is positive 8, so 5 minus 8 over 7 or -3/
7ths. Now let’s take one more step and find out what y is equal to. so y is equal to,
go back to this matrix c, your constant coefficient matrix, but now take out the coefficients
of y and again plug in that 5 and -4. So we are going to go back to the first column being
1 and 3, the second column now is going to be 5 and a -4. and again it’s going to be
over 7, the determinant of c. so that’s going to be equal to 1 times -4 minus 5 times
3 over 7. We get -4 minus 15 and our value of y is going to be -19 over 7. Now don’t
forget when you have, we have x to the first, y to the first, we have a linear system here
so this is basically going to, when we solve x-2y=5 and 3x+y=-4, we are finding out what
value of x and y will make both of those equations true. we are going to find out where these
equations of line, because they have all the exponents of 1 where these lines intersect
and these two lines intersect at the point (-3/7, -19/7), So if you want to make sure
that those answers are right, you have to plug that value of x and y into both the first
equation and the second equation cause both of those equations are supposed to be at that
same point. Doing Cramer’s rule on 2x2 systems like this with two equations and 2 unknowns
is really not that much quicker than doing it with substitution or the linear combination
method. What really, its benefit however is you can see both of our answers are fractional
values, yet we do not have to really deal with any fractions in the process of solving
the equations. So in that respect, it can be easier. I just did this very very quickly
in my head, it took me longer to write it than actually do it and yet we have those
fractional values. If I did substitution or linear combination method, those would have
been dealt with a little bit more carefully through the process of solving the question.
Otherwise if you have whole number answers, probably would be quicker to do substitution
or the linear combination method of solving those 2x2 systems. however when you have 3
equations and 3 unknowns, then this process is a big time saver, you are going to see
a lot of writing in the next example but again I am showing all those steps cause I am trying
to teach you how to do it. Once you get the knack down, you can probably do a lot of this
multiplication and arithmetic in your head and go even faster. So let’s see what the
second example is going to look like when we have three equations and three unknowns.
Okay last example. We are going to solve 2x+y-2z is equal to -1. 4x-2y-z equals 5 and x-2y+3z
is equal to 6. Okay I solve this exact same question in my video teaching Gaussian elimination
with matrices and it took a lot of work. Now again I am going to do a decent amount of
writing but that’s only to teach you the process, a lot of this, you don’t want to
skip too much, make any careless mistakes but it does go fairly quickly. So we are going
to, once again identify the matrix c as our coefficient matrix. So we have c is equal
to the, well let’s go ahead and find the determinant of c, then we won’t to write
quite as much. The determinant of c is equal to the determinant of 2, 4 and 1. Now 1, -2
and -2 and -1 and 3. Okay so we just learnt in a previous video about solving or finding
determinants of these larger matrices, we need to take the first two columns and copy
them again to the right of the original matrix. So we are going to do 2, 4 and 1. 1, -2 and
-2. We are going to do diagonals from the upper left hand corner down to the right.
Now I do want to try and fit this all up on the screen at one time so I am going to do
a little bit of this in my head. We have 2 times -2 is equal to -4 and -4 times 3 is
-12. So we have -12 from that first diagonal. Then we are going to have 1 times -1 times
1 down here is still -1. So plus -1 cause we do want to add those elements that we get
from multiplying those diagonals and then we have plus -2 times 4 is -8 and -8 times
-2 is positive 16. And we are going to add all this up. We have -12 and -1 is -13 plus
16 is equal to three. Okay now we are going to go ahead and multiply through the diagonal
going from the upper right hand corner down through all of these rows. So we are going
to add those as well. so we have 1 times 4 is 4 times 3 is 12 plus 2 times -1 is -2 times
-2 is +4 plus -2 times -2 is positive 4 times 1 is 4 again and we get 12 and 4 is 16 and
16 and 4 is equal to 20. Now we want to take our sum from the first set of diagonal and
subtract it with the sum from the second set of diagonals. So our full determinant is going
to be equal to, the determinant of c is going to be equal to 3 minus 20 and give us -17.
So some talking and writing at the same time and making sure this is all good, I want to
make sure my answers are right. Okay so we have, now, reviewing again, how to find the
determinant of a 3x3 matrix. Let’s try and set up what we are going to do for x. let’s
see what color I have not used yet. Green. So x is going to be equal to the determinant,
remember we did in the previous question, we took out the coefficient of x and plugged
in the constant column so we are going to do -1, 5 and 6 and then go back to our original
coefficient matrix and keep all those values. so we are going to do 1, -2 and -2 and -2,-1
and 3 and that is going to be the determinant. Again with those constants in there for replacing
the coefficients of x over -17, the determinant of c. Now I don’t think you really want
to see me do a bunch of arithmetic in my head. So I am going to step out, give you the solution
or repeat it for y and x, z excuse me and give you a chance to make sure you can find
these determinants correctly on your own as well. So now I am going to step out, reveal
the solution and we will come back and set up for y.
So I have taken those first two columns, copied them, did my diagonals, multiplied and subtracted,
we ended up with x equaling -17 over -17 which of course means that x is equal to 1. I am
going to erase this and write that summary down after we get to setting up our value
of y. so y is going to be, again this matrix, let’s put the coefficient of x back in 2,
4 and 1. Put those constants now in for the y column or replace the coefficients of y
with those constants. -1, 5 and 6. Then go back to -2, -1 and 3. Again that’s going
to be over -17. So let’s repeat finding that determinant again for y keeping it over
-17 and see what that answer comes out to be. Okay so we have a y value that’s equal
to -1, so let’s see here, I forgot to write a little summary down. x equals, what was
it? 1. we have y is equal to -1 cause 17 divided by -17 and of course we are going to repeat
this one more time for z, which, I am just going to write the answer down, we have z
is equal to 2, 4 and 1, the determinant of, and 1, -2 and -2 and now we are going to put
those constants in for the coefficients of z which is -1, 5 and 6 again over the determinant
of c which was again -17. This is coming out to be, again, -17 over -17 which comes out
to be 1 so z is equal to 1. so it still is a little bit tedious with writing these determinants
down and doing the diagonals, multiplying and such, but this went much, much quicker
than doing the same question with the Gaussian elimination method so you can see that it
definitely has some very good benefits of helping you get your homework done faster
and it is time for me to get out of here myself. I am Mr. Tarrou. BAM! Go do your homework.