 Welcome back to our lecture series based upon the textbook linear algebra done openly As usual, I'm your professor today. Dr. Angel missile line In this lecture, we're gonna talk about section 5.3 from the textbook entitled Kramer's rule And I'll be honest. I get a I have a very mixed feelings. I have mixed feelings when it comes to Kramer's rule Not a huge fan of it But that's mostly just because most people who use it are using it Inappropriately and I'll make sense of what that is going on here Kramer's rule is actually great when you use it in the right perspective It's often abused and mistreated here. So What is Kramer's rule to find what it isn't just a second, but a little bit of notation I wanted to do to introduce for the sake of Kramer's rule Suppose we have a matrix a whose columns are given as a 1 a 2 a 3 up to a n You can see those right here and suppose we have a vector B right here The plan that's gonna be happening here. So we're gonna be looking at the equation a x equals b And so this matrix a is the coefficient matrix here. This vector B is the vector on the right But before we get to that here, we'll introduce a new matrix Which a was in by in it's a square matrix. We're gonna also define an in by in matrix a I be Where a I be is just identical to a That is you'll have a 1 will be there a 2 will be there a 3 will be there all the way up to a n will be there It's just in the middle in The i-th column of a we're gonna replace the i-th column with this vector B everything else is identical and so this is what we mean by this this matrix a I be Can't say I'm in love with the notation, but we'll use it for right now It gets the point across and it's really only used in this section, but it'll make sense which we see right now So Kramer's rule is a technique For solving systems of equations if we're trying to solve the the system a x equals b Kramer's rule actually offers us a formula for solving this Imagine we have a square matrix a which is in by and it's also a non singular matrix And suppose we also have a vector B that is we're trying to solve the equation a x equals b Well, since a is non singular there's a unique solution to the equation a x equals b and that unique Solution can be given by the following formula if the solution is x then X I the eighth entry in the vector x can be given by this formula or another way of writing it here our vector x We get x 1 x 2 up to x n We're just saying that the first entry is going to look like the determinant of a 1 b Divided by the determinant of a and then the second entry is the determinant of a 2b That is we replace the second column of a with b and you divide that by the determinant of a and you go all the Way down until you get to the determinant of a nb you take the matrix a you replace its nth column with b Take that determinant and divide that by Determinative a and so this gives us a formula. This is a formula for the mage are for the vector x It's a formula for the solution to a linear system Well, that sounds kind of great, right? Formulas are great. I can just plug in the numbers and just compute it like that. That sounds great It's not a formula, right? If you have an equation a x squared plus b x plus c You can see you can sing the tune pop goes the weasel and you can solve your Your quad equation using the quadratic formula it offers an alternative where we don't have to complete the square Sometimes be difficult to do We don't have to factor it which can be difficult to do Sometimes impossible to do depends on the field of coefficients. You're looking at there And so formulas are great, right? formula What if we have what if we have a x cubed? Plus bx squared plus cx plus d equals zero. What if we have a cubic polynomial? Right How does one do that? Did you know? My guess is probably not although some people have heard of it before I I'm quite certain you probably have that in any great extent in your previous algebra classes college algebra In a media algebra you talk about the quadratic formula cubic formula There's also a Quartic formula that is for for degree four polynomials. Why aren't these things being used more popular? I Would recommend googling it sometime Go to Wikipedia. There's there's a good description of it there. It's a formula, but it's very very difficult to Use so difficult that it becomes very impractical No Professor is going to throw this upon their students Unless it's like some crazy honors class or something. It's really really really hard to use It turns out Kramer's rule kind of follows in the same category that we have a formula for the solution of a system of linear equations But this formula is extremely difficult to use because all the determinants are involved We'll see some examples of this in just a moment and it also begs the question We if I want to solve the system a x equals b. Do I need a new formula? Can't I just solve it using row reduction, which is actually efficient algorithm? And so actually I will talk a little bit more about the difficulty of Kramer's rule in just a second I don't verify its truthfulness and in Kramer's rule I should also mention there are some limitations right that first of all the matrix has to be square in by in Otherwise this formula does not apply and how many systems have we considered that aren't square systems And even if it's square the matrix has to be non singular Admittedly if it's if it's a singular matrix, there might not be a solution So it might be inconsistent, but even if there is a solution There could be unique solutions. There could be multiple solutions Kramer's rule doesn't do anything for those I'm sure has very limited scope compared to systems of equations. It's also very hard to Use so why would anyone ever use it again? We'll talk about that a little bit more in just a second This is the this is the mixed feelings. I was talking about earlier I should mention that even if a is singular that is the determinant is zero One can still say something about this If you clear the denominators of this equation right here, you get the determinant of a Times x i is equal to determinant of a i b And so that's actually the formula we want to prove when the determinants non zero you can divide by it to get the formula We had up here But this this this is the more general equation we can use for even singular matrices And the argument's going to basically be the following We're going to take the matrix a and we're going to times it by the matrix i i of x Where what do we mean by this the i here this represents the identity matrix? This is the matrix with One side the down the diagonals zero everywhere else and x here. This is meant to be a solution A solution to to our equation here ax equals b that is if you times x by a you get b That's what we're talking about here All right, and so let's expand the matrix i i x by the notation we saw on the previous slide i i x means you take the identity matrix whose columns look like the e i's you get e i one e i two E i three etc remember e i one was the vector with the one in the first spot zeroes everywhere else E i two is the vector with a two in this a one in the second spot zero everywhere else And so we're just going to get the identity matrix En right one in the last position zeroes everywhere else But because of the i i x notation we're going to put an x in the i th column Well in terms of matrix multiplication if you times a matrix by a matrix That's equivalent to multiplying each individual column Of the second matrix by the entirety of the first matrix So this product will look like its first column is a e one its second column is a e two Its i th column will be a x And then its last column will be a e in Now one thing that's important about The vectors e i Is if you take a matrix and you times it by a column of the identity this will equal So if you times a by the i th column of the identity This will give you the i th column of a and so we're going to use this observation right here And so we get that a e one gives us the first column of a A e two gives us the second column of a And this will continue on the last one will be the nth column of a And all of these are going to reproduce columns of a except for the this i th position The i th position is just a x and like we saw earlier a x is equal to b And so you'll notice that this right here is the matrix a i b So with respect to this a i b matrix we have a factor is a times i i x And so what we're going to do is we're going to take that observation So we take a Times i i x this is equal to a i b And we're going to take the determinant of this thing take the determinant of the left hand side Take the determinant of the right hand side Like so now the determinant factors remember when you have a product inside of a determinant That becomes a product of determinant. So you get the determinant of a times the determinant of i i x And this will equal the determinant of a i b Now this almost establishes the formula we had before The last part really just comes down to this piece right here This right here is none other than the number x i Because the idea is matrix It looks mostly like the identity right you're going to have a one a bunch of zeros You're going to have a one a bunch of zeros Then you have these entries x 1 x 2 x 3 x 4 and then a bunch of zeros and a one right here If you start co-factoring expanding across this row I'm sorry not this not to do the row do the column if you co-factor expand across this one You'll end up with just this minor and that's all there is then co-factor expand this one You'll get this minor right here and then you co-factor expand this one right here In the end the only thing you're left with will be uh just a single x i And it'll be the x i for which you were in that column. This is the third column. So you end up with x 3 And so you end up with the determinant of a times x i is equal to determinant of i of a i b Which is like what we said earlier. That's what we were trying to prove that verifies kramer's rule