In this lesson we're going to use Kramer's rule to solve a system of linear equations with two variables. So let's say we have 2x plus 5y is equal to 26 and 5x minus 4y is equal to negative 1. Calculate the value of x and y using Kramer's rule. So, this system is set up in such a way. A1x plus B1y is equal to C1. And A2x plus B2y is equal to C2.
So, what this tells us is that A1 is 2 and A2 is 5. B1 is 5. B2 is 4. C1 is 26. C2 is negative 1. Now in order to calculate x, x is equal to dx over d and y is equal to dy over d where d is the determinant. So let's calculate d first. So D is the, it's a 2 by 2 determinant of A1, B1, A2, B2.
Now to calculate the value of the 2 by 2 determinant, it's going to be A1 times B2 minus B1 times A2. So we said that a1 is 2, a2 is 5. b1 is 5, b2 is negative 4. So it's going to be 2 times negative 4. and then minus 5 times 5. Now, 2 times negative 4 is negative 8. 5 times 5 is 25. And negative 8 minus 25 is negative 33. So, determinant D is negative 33. Let's save that answer because we're going to use it later. Now let's calculate dx.
So here's the formula for dx. So it's a 2 by 2 matrix, but it's not going to contain the coefficients of x. You need to replace the coefficients of x with c1 and c2.
So the elements of matrix dx is going to be c1, c2, b1, b2. So therefore, it's going to be c1 times b2 minus b1 times c2. In this problem, c1 is 26, c2 is negative 1. b1 is 5, b2 is negative 4. So, it's going to be 26 times negative 4 minus 5 times negative 1. Now, what's 26 times negative 4? Well, 20 times 4 is 80. 6 times 4 is 24. 80 plus 24 is 104. But this is going to be negative 104. And negative 5 times negative 1 is positive 5. Negative 104 plus 5 is negative 99. So dx is negative 99. Now let's calculate dy.
Now for this one we're going to take out the coefficients of y and replace them with c1 and c2. So the elements of dy is going to be a1, a2, c1, and c2. So it's going to equal a1 c2 minus c1 a2. So that's the determinant of that matrix. Now, a1 is 2, a2 is 5, c1, that's 26, c2 is negative 1. So, it's going to be 2 times negative 1. minus 5 times 26 2 times negative 1 is negative 2 now 5 times 20 is 100 5 times 6 is 30 so 100 plus 30 is 130 so 5 times 26 is 130 and negative 2 minus 130 is negative 132 So dy is equal to negative 132. Now once you have d, dx, and dy, you have everything that you need in order to calculate x and y.
So x is simply dx divided by d. So that's negative 99 divided by negative 33. So therefore, that's equal to 3. So x is 3. Now y is going to be dy over d, which is negative 132 divided by negative 33, and that's 4. So y is equal to 4. So the solution is 3 comma 4. And that's the answer. So now you know how to solve a system of linear equations with two variables using Cramer's Rule.
Let's try one more example for the sake of practice. 3x minus 2y is equal to negative 4. And 4x minus y is equal to 3. So go ahead and use Cramer's Rule to get the answer. So this is in the form a1x plus b1y is equal to c1 and a2x plus b2y is equal to c2. So let's calculate d first.
So d is going to have the elements a1, a2, and b1, b2. And so we can see that a1 is 3, a2 is 4, b1 is negative 2, b2 is negative 1. Now let's determine the determinant of this 2 by 2 matrix. So it's going to be 3 times negative 1, and then minus negative 2 times 4. So that's negative 3, and then these two negative signs will cancel, so it's 2 times 4, which is 8. And negative 3 plus 8 is 5. So d is equal to 5. Now let's go ahead and calculate dx. So we need to get rid of these coefficients. So we're not going to use a1 and a2.
Let's replace a1 and a2 with c1 and c2. So it's going to be c1, c2, b1, b2. So c... B1 is negative 4, C2 is 3, B1 is negative 2, B2 is negative 1. So it's going to be negative 4 times negative 1 and then minus negative 2. times 3. So negative 4 times negative 1, that's 4. And then these two negative signs will cancel, so 2 times 3 is 6. So dx is 4 plus 6, which is 10. Now, let's go ahead and calculate dy. So the coefficients of y, we're going to replace it with c1 and c2.
So it's going to be a1, a2, c1, c2. a1 is 3, a2 is 4. c1 is negative 4, c2 is 3. So it's going to be 3 times 3, which is... Well, let me write it out first.
And then minus... negative 4 times 4 so 3 times 3 is 9 and then 4 times 4 is 16 9 plus 16 is 25 so dy is equal to 25 Now we can finish the problem. So x is going to be dx divided by d. So that's 10 divided by 5, which is 2. So x is equal to 2. And y is equal to dx. dy divided by d.
dy is 25, d is 5, 25 divided by 5 is 5. So y is 5. So we have the solution. And if you want to check your work, simply plug it in to the original equation. So 3 times 2 minus 2 times 5. Does it equal negative 4? 3 times 2 is 6. 2 times 5 is 10. 6 minus 10 is negative 4. So it works for the first equation. Now let's try the second one.
4 times 2 minus 5. Does it equal 3? 4 times 2 is 8. 8 minus 5 is 3. So this works. So now you know how to use Cramer's Rule to solve a system of linear equations with two variables.