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. And 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 some 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 kind of 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. All right? That's basically, kind of the analogy there. All right. So let's go ahead and just get started here.
Basically, 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 by 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. Okay. So here, what I've got is I've got the 2 and the negative 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 negative 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 of x and y on the bottom are actually the same thing, so really only have to calculate 3 determinants. Let's take a look at the first one here. The first one is 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, negative 4, 2, negative 4, and then this is going to be, 16. So 16, 16. 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 sort of 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 going to basically just 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 negative 4. I'm going to write this is going to be 5 and negative 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 16. 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 negative 2. So 5 negative 2. Alright? So that's really all there is to it. You kind of 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. So let's go ahead and get started. So, over here for x, what I've got is I've got, remember how to calculate these determinants? Just if you need a little bit of a refresher, you always just go down to the right and then down to the left, and you subtract those products.