 So let's actually see how one could use this to solve a system of equations so consider the matrix a Which here it's going to be a two by two matrix three negative two negative five and four So if you want to solve a system using Kramer's rule the first thing that's necessary You have to have a square matrix we have that it's to be non singular and one way of checking to see if a matrix is non-singular to compute its Permanent the determinant of a Remember is equal to three negative two negative five and four If the determinant of the square matrix is non-zero that means it's non-singular So that's actually since we have to calculate the term it anyways This is a good way to see if we can even use Kramer's rule And so multiplying together the diagonals you get three and four which is 12 Minus two and five which is 10. I mean those are negatives, but it's double negative there You get 12 minus 2 which sorry 12 minus 10, which is 2 this tells us that a is in fact non-singular And it also is the first step we need to do Kramer's rule The next things we have to do is we have to compute the determinant of a 1 b Which what this means is you take the first column of a and you're going to place it with B Notice here that B is the vector 6 and 8 Just looking at the right-hand sides of those above equations So you're going to put 6 and 8 into the first Column and then the second column of a is identical negative 2 and 4 It's a 2 by 2 determinant So to calculate that we get 6 and 4 which is 24 and then we get negative 2 and 8 Which is going to give us a 16 we're subtracting it so we'll be a positive 16 right there That adds up to be 40 And we have to then compute a 2 b a 2 b means you take the second column of a and you're going to replace it with b So you get 6 8 right there and then the first column is identical to a 3 and negative 5 So you'll notice in this situation a 1 b you put b in the first column a 2 b you put b in the second column right there So calculate this 2 by 2 determinant we get 3 times 8 which is also 24 We're going to get plus because there's a double negative 6 times 5 which is 30 and so those add up to be 54 and So our claim now is that the solution x will equal 40 divided by 2 so we took we took a 1 b divided by the determinant So you get 40 divided by 2 and then for the second entry you're going to take 54 divided by 2 54 divided by 2 so you took a 2 b divided by the determinant right there 2 goes into 40 20 times of course and 2 goes into 54 27 times and so this gives us the unique solution to the system of equations and you can check If you take 3 times 20, that's 60 if you take 2 times 27, that's 54 60 minus 54 6 It's the satisfies the first equation and then for the the second equation there If you take 5 times 20 that's going to be a hundred so it's a negative 100 there And then 4 times 27 that's a hundred and 8 their difference will be 8 So you can see that this in fact does solve the system of equations So it kind of worked okay, but this is a 2 by calculate this we had to calculate 1 2 3 We had to calculate 3 2 by 2 determinants that itself is not so complicated But when it comes to a 2 by 2 determinant you have to do This product in this product so every 2 by 2 2 by 2 determinant takes two multiplications two products one has to do and so if you have three determinants to do you're gonna have to do Four multiplications six multiplications and then given that you have to compute this quotient over here You have a quotient which is kind of like doing a multiplication just multiplying by the reciprocal This thing it's gonna require what we call eight flops In terms of computational difficulty we're basically counting how many times do we have to multiply? Because addition is not too costly, but multiplication even if it's like a nanosecond does cost a little bit of time in terms of computational difficulty on the other hand if we had a if we had a problem like a 1 1 a 1 2 a 2 1 a 2 2 Augment B1 B2 if we want to solve this thing using row reduction What we're gonna do is is that we basically know that this thing is gonna go to zero, right? So we'll go to zero no matter what we're gonna have to multiply There's a flop right here because we're gonna do We're gonna subtract something and we have to subtract a 1 2 Divided by there's a little bit going on there So let me be more specific we are going because we're taking row 2 minus a 2 1 over a 1 1 times row 1 Now we don't actually have to do multiplication in the first column because we know it'll just cancel out so here We have to do a 2 1 over a 1 1 times a 1 2 And we're gonna have to do it here as well. We have to subtract a 2 1 over a 1 1 times b 1 And so in terms of flops here, you do have to do this quotient maybe You're gonna do a multiplication here and here. So we're up to three flops so far Once you do that that'll then simplify these terms and so this will row reduce into being something like the following a 1 1 a 1 2 B 1 we get a zero right here. We're gonna get a something I'm just gonna call it C for the moment and then a D right here So the next thing to do in terms of raise we would we divide everything by C But we don't have to do C divide by C. We know that's gonna equal one And then we have to do divided by C right here. That's another flop right there So up to four keep track of things Then the next thing to do is We're going to we want to get rid of this right here now to do it. We're gonna do row one minus row sorry, we're gonna take We're gonna just do a one two right here row Two and so this is gonna go to a zero right here the one two But here we're gonna have to take B one minus this a one two B over Over C that gives us another flop. We're up to five right now And cuz again We don't have to do a flop on this one because we know it's gonna go to zero and we had to do one right there We already did the we already did the I throw B over C. I meant to write D over C We already did this D over C on the previous calculation. Did I keep track of that? I think I did I'll have to double check there. We did one two three four already did it and Then five. Yeah, so we're good right there and then for this last little piece This last little piece right here We have We have this a one one. We have some number. We'll call it E right now some other number f Zero one This D over C we did this now to get a one right here We just have to divide it by one are we just divide by a one one We already did that one so that's good. You get a one right there You have to divide this by a one one and you have to divide this by a one one So there's two more quotients there So in the end if we kept track of everything we end up with seven flops in terms of difficulty now Seven seven flops versus eight flops not so bad equal, but there is a slight advantage to the row operations The issue though is that when you start looking at three by three four by four and five by five, right? Then the difference of this is going to grow much complicated Row operations I have about a complexity of Like in cubed I think I could be wrong about that one, but it's a polynomial algorithm As opposed to Kramer's rule, which is going to grow like a factorial For even small ends. There's gonna be a huge difference. So Kramer's rule is not necessarily what I recommend if you want to solve systems of equations because it's gonna get complicated very fast I there are some in the homework section in which case You'll be asked to do some of them and that's mostly to convince you about how horrible it is So pack a sandwich before you go into those