Hey, everyone. Welcome back. So in a previous video, we learned how to calculate the determinant of a 2 by 2 matrix, and I mentioned that we would eventually use these to solve a system of equations. Well, that's exactly what we're going to do in this video. In this video, we're going to see how to solve a system of 2 equations with 2 unknowns using something called Cramer's rule. Now, the first time you learn this, it might be kind of intimidating. There's lots of numbers flying around everywhere, but I'm going to break it down for you and show you that it's really just a formula. It’s a formula that directly gives you the solution to a system of equations. We're going to pop a bunch of numbers in, calculate determinants, and it'll just spit out our numbers for x and y, our numbers that make these equations true. That's really all there is. Let me go ahead and break it down for you. Now before I start, actually, I want to make a little bit of an analogy. I like to think of Cramer's rule almost as like the quadratic formula. We learn lots of different ways to solve quadratics, but, ultimately, you could just plug a bunch of numbers into a formula, and it'll just give you the answer. This is kind of the same way. We learn lots of different ways to solve a system of equations, but, ultimately, you could just take all these numbers over here, pop them into these equations, and it'll just give you your answers. Now it's tedious and it requires a little bit of work, but it'll always work. Alright? That's basically, kind of the analogy there. Alright. So let's go ahead and just get started here.
The whole idea is that if we're given a system of 2 equations with 2 unknowns, then Cramer's rule is going to involve calculating determinants of 2 by 2 matrices, and we've seen how to do this before. Let's go ahead and get started with this problem. So we've got \(2x + y = 5\), \(-4x + 6y = -2\). We want to solve this using Cramer's rule. We're going to have to calculate one of the determinants, so we're going to have to turn this into a matrix. Alright? That's what I'm going to do over here. I'm going to calculate or determine my augmented matrix, and I'm going to color code these things. Right? So remember, these are going to be my x coefficients, then I've got my y coefficients, and then these are going to be my constants over here. Right? So then these are going to be my constants.
So here, what I've got is I've got the 2 and the -4, and then here I've got the 1 and the 6. And then remember there's a little black bar, and then here I've got the 5 and the -2. Alright? So what Cramer's rule says is that to calculate x, you're going to have to calculate the quotient of 2 determinants. You're going to have to calculate this one and then divide it by this one. Alright? So we're going to have to calculate 2 determinants over here and then divide them. The same thing, by the way, applies for the y. So, it's 2 determinants, and then divide them. In fact, actually, the determinants for x and y on the bottom are actually the same thing, so you really only have to calculate 3 determinants. Let's take a look at the first one here.
The bottoms are actually the easiest ones to calculate because they're really just the a and b terms that you have, which are really kind of just like the x and y coefficients that you had over here. So you just take these numbers, and you just copy them over. Right? So this is going to be 2, -4, and then this is going to be, 1, 6. Alright? So you just straight up copy those, and we'll have to calculate the determinants of those.
Now, on the tops is where it gets a little bit more interesting. Now what happens is when you're solving for the x, what you're going to do is you're going to take the constants that are on the right side of the equation in your matrix, and you're going to have to replace the x coefficients. Right? So you're basically just going to take that column and swap them with the x, and then you're going to write that new matrix. So here what happens is I'm not going to write 2 and -4. I'm going to write this is going to be 5 and -2. That takes the place of the x column. Now the y columns are actually just going to be the same.
This is going to be 1, 6. Alright? So that's what it is for x. For the y, what you're going to see is that we're going to do the same thing, except now we're going to replace the y coefficients. Alright? So now here, what happens is the 2 and the -4, we copy that over. But now instead of the 1 and the 6, now we replace it with the 5 and the -2. So, 2, -4; 5, -2. Alright? So that's really all there is to it. You just are replacing that column of those coefficients with the column of the constants on the right side. Alright? Now we just have to go ahead and calculate these three determinants over here.
| 5 1 −2 6 | | 2 1 −4 6 | | 2 5 −4 −2 | | 2 1 −4 6 |
For the x, what we're going to see here is that this ends up being 5 times 6. This is going to be 30 minus 1 times -2. So this is going to be 30 minus -2. So this is going to be, plus 2. So you could have just have done plus 2. Alright? And then on the bottom here, what we're going to get is 12 minus, again, -4. So this is going to be 12+4, which is going to be 16. Alright? So, in other words, this really just becomes 32 over 16, and this x value is equal to 2. Alright? So that's basically what the x value turns out to be.
Now, for the y, what you'll see is that we already calculated this to be 16, so we don't have to recalculate it. What does the top end up being? So this is 2 times -2, so that is -4, minus 5 times -4. So this is -2 minus, and this is going to be -20. Alright? So this is going to be -4, and then, basically, this is going to be plus 20. Alright? So what this actually ends up being when you work all this out, this actually ends up being 16 over 16, which is just 1. So, in other words, the solution to the system of equations is x equals 2 and y equals 1. Now you can pause the video and just check this yourself. You can plug those numbers back into this equation and find that you'll actually get true statements for both. And, again, there's probably a faster way that we could have done this, but, again, some questions may ask you to use Cramer's rule. Again, it's just another tool in your tool belt. But that's how to solve these kinds of problems using Cramer's rule. Let me know if you have any questions.