9.08 Solving Systems With Cramer's Rule
9.08 Solving Systems With Cramer's Rule
9.08 Solving Systems With Cramer's Rule
We have learned how to solve systems of equations in two variables and three variables, and by multiple methods: substitution,
addition, Gaussian elimination, using the inverse of a matrix, and graphing. Some of these methods are easier to apply than others
and are more appropriate in certain situations. In this section, we will study two more strategies for solving systems of equations.
is defined as
Notice the change in notation. There are several ways to indicate the determinant, including det(A) and replacing the brackets
in a matrix with straight lines, |A|.
Solution
∣ 5 2∣
det(A) = ∣ ∣
∣ −6 3∣
= 5(3) − (−6)(2)
= 27
a2 x + b2 y = c2 (2) (9.8.2)
We eliminate one variable using row operations and solve for the other. Say that we wish to solve for x. If Equation 9.8.2 is
multiplied by the opposite of the coefficient of y in Equation 9.8.1, Equation 9.8.1 is multiplied by the coefficient of y in Equation
9.8.2, and we add the two equations, the variable y will be eliminated.
b2 a1 x + b2 b1 y = b2 c1 Multiply R1 by b2
x(b2 a1 − b1 a2 ) = b2 c1 − b1 c2
c1 b1
[ ]
b2 c1 − b1 c2 c2 b2
x = =
b2 a1 − b1 a2 a1 b1
[ ]
a2 b2
y(a2 b1 − a1 b2 ) = a2 c1 − a1 c2
a1 c1
[ ]
a2 c1 − a1 c2 a1 c2 − a2 c1 a2 c2
y = = =
a2 b1 − a1 b2 a1 b2 − a2 b1 a1 b1
[ ]
a2 b2
Notice that the denominator for both x and y is the determinant of the coefficient matrix.
We can use these formulas to solve for x and y , but Cramer’s Rule also introduces new notation:
D:determinant of the coefficient matrix
D :determinant of the numerator in the solution of x
x
Dx
x = (9.8.3)
D
Cramer’s Rule is a method that uses determinants to solve systems of equations that have the same number of equations as
variables.
Consider a system of two linear equations in two variables.
a1 x + b1 y = c1
a2 x + b2 y = c2
a1 c1
[ ]
Dy a2 c2
y = = ,D ≠0 (9.8.6)
D a1 b1
[ ]
a2 b2
If we are solving for x, the x column is replaced with the constant column. If we are solving for y , the y column is replaced
with the constant column.
2x − 3y = 13
Solution
Solve for x.
Dx
x =
D
15 3
[ ]
13 −3
=
12 3
[ ]
2 −3
−45 − 39
=
−36 − 6
−84
=
−42
=2
Solve for y .
12 15
[ ]
2 13
=
12 3
[ ]
2 −3
156 − 30
=
−36 − 6
126
=−
42
= −3
Exercise 9.8.1
x + 2y = −11
−2x + y = −13
Answer
(3, −7)
2. From upper left to lower right: Multiply the entries down the first diagonal. Add the result to the product of entries down the
second diagonal. Add this result to the product of the entries down the third diagonal.
3. From lower left to upper right: Subtract the product of entries up the first diagonal. From this result subtract the product of
entries up the second diagonal. From this result, subtract the product of entries up the third diagonal.
Solution
Augment the matrix with the first two columns and then follow the formula. Thus,
∣ ∣
0 2 1 0 2
∣ ∣
|A| = ∣ 3 −1 1 3 −1 ∣
∣ ∣
∣ 4 0 1 4 0 ∣
= 0 +8 +0 +4 −0 −6
=6
Exercise 9.8.2
Answer
−10
Q&A: Can we use the same method to find the determinant of a larger matrix?
No, this method only works for 2 × 2 and 3 × 3 matrices. For larger matrices it is best to use a graphing utility or computer
software.
a2 x + b2 y + c2 z = d2 (9.8.8)
a3 x + b3 y + c3 z = d3 (9.8.9)
Dx Dy Dz
x = ,y= ,z= ,D≠0
D D D
where
∣ a1 b1 c1 ∣ ∣ d1 b1 c1 ∣ ∣ a1 d1 c1 ∣ ∣ a1 b1 d1 ∣
∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣
D = a2 b2 c2 , Dx = d2 b2 c2 , Dy = a2 d2 c2 , Dz = a2 b2 d2 (9.8.10)
∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣
∣ a3 b3 c3 ∣ ∣ d3 b3 c3 ∣ ∣ a3 d3 c3 ∣ ∣ a3 b3 d3 ∣
replace they y column with the constant column. If we are writing the determinant D ,we replace the z column with the constant
z
3x − 2y + z = −5
x + 3y − 2z = 14
Solution
Use Cramer’s Rule.
∣1 1 −1 ∣ ∣ 6 1 −1 ∣ ∣1 6 −1 ∣ ∣1 1 6 ∣
∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣
D =
∣
3 −2 1
∣
,Dx =
∣
−5 −2 1
∣
,D y =
∣
3 −5 1
∣
,Dz =
∣
3 −2 −5
∣
∣1 3 −2 ∣ ∣ 14 3 −2 ∣ ∣1 14 −2 ∣ ∣1 3 14 ∣
Then,
Dx −3
x = = =1
D −3
Dy −9
y = = =3
D −3
Dz 6
z = = = −2
D −3
Exercise 9.8.3
x +y +z = 1
x − 2y + 3z = 4
Answer
3 12
(−2, , )
5 5
6x − 4y = 0 (9.8.12)
Solution
We begin by finding the determinants D, D ,and D . x y
∣3 −2 ∣
D =∣ ∣ = 3(−4) − 6(−2) = 0
∣6 −4 ∣
We know that a determinant of zero means that either the system has no solution or it has an infinite number of solutions. To
see which one, we use the process of elimination. Our goal is to eliminate one of the variables.
1. Multiply Equation 9.8.11 by −2.
6x − 4y = 0
––––––––––––
0 = −8
We obtain the equation 0 = −8 , which is false. Therefore, the system has no solution. Graphing the system reveals two
parallel lines. See Figure 9.8.1.
Figure 9.8.1
x − 2y + 3z = 0 (9.8.13)
3x + y − 2z = 0 (9.8.14)
2x − 4y + 6z = 0 (9.8.15)
Solution
Let’s find the determinant first. Set up a matrix augmented by the first two columns.
∣ 1 −2 3 1 −2 ∣
∣ ∣
∣ 3 1 −2 3 1 ∣
∣ ∣
∣ 2 −4 6 2 −4 ∣
Then,
1(1)(6) + (−2)(−2)(2) + 3(3)(−4) − 2(1)(3) − (−4)(−2)(1) − 6(3)(−2) = 0
As the determinant equals zero, there is either no solution or an infinite number of solutions. We have to perform elimination to
find out.
1. Multiply Equation 9.8.13 by −2 and add the result to Equation 9.8.15:
− 2x + 4y − 6x = 0
2x − 4y + 6z = 0
–––––––––––––––––
0 =0
2. Obtaining an answer of 0 = 0 , a statement that is always true, means that the system has an infinite number of solutions.
Graphing the system, we can see that two of the planes are the same and they both intersect the third plane on a line. See
Figure 9.8.2.
PROPERTIES OF DETERMINANTS
1. If the matrix is in upper triangular form, the determinant equals the product of entries down the main diagonal.
2. When two rows are interchanged, the determinant changes sign.
3. If either two rows or two columns are identical, the determinant equals zero.
4. If a matrix contains either a row of zeros or a column of zeros, the determinant equals zero.
5. The determinant of an inverse matrix A is the reciprocal of the determinant of the matrix A .
−1
6. If any row or column is multiplied by a constant, the determinant is multiplied by the same factor.
A =⎢0 2 1 ⎥
⎣ ⎦
0 0 −1
⎡ 1 2 3 1 2 ⎤
A =⎢ 0 2 1 0 2 ⎥
⎢ ⎥
⎣ 0 0 −1 0 0 ⎦
Then
= −2
= 3 − 20
= −17
= 20 − 3
= 17
Property 3 states that if two rows or two columns are identical, the determinant equals zero.
⎡ 1 2 2 1 2 ⎤
A =⎢ 2 2 2 2 2 ⎥
⎢ ⎥
⎣ −1 2 2 −1 2 ⎦
= 4 −4 +8 +4 −4 −8
=0
Property 4 states that if a row or column equals zero, the determinant equals zero. Thus,
1 2
A =[ ]
0 0
=0
= −2
−2 1
⎡ ⎤
−1
A = 3 1
⎣ − ⎦
2 2
1 3
−1
det(A ) = −2 (− )− (1)
2 2
1
=−
2
Property 6 states that if any row or column of a matrix is multiplied by a constant, the determinant is multiplied by the same
factor. Thus,
1 2
A =[ ]
3 4
= −2
2(1) 2(2)
B =[ ]
3 4
= −4
Example 9.8.7: Using Cramer’s Rule and Determinant Properties to Solve a System
3x + 7y + 7z = −5 (9.8.17)
x + 2y + 2z = 4 (9.8.18)
Notice that the second and third columns are identical. According to Property 3, the determinant will be zero, so there is either
no solution or an infinite number of solutions. We have to perform elimination to find out.
1. Multiply Equation 9.8.18 by – 2 and add the result to Equation 9.8.16.
−2x − 4y − 4x = −8
2x + 4y + 4z = 2
0 = −6
Obtaining a statement that is a contradiction means that the system has no solution.
Media
Access these online resources for additional instruction and practice with Cramer’s Rule.
Solve a System of Two Equations Using Cramer's Rule
Solve a Systems of Three Equations using Cramer's Rule
Key Concepts
a b
The determinant for [ ] is ad − bc . See Example 9.8.1.
c d
Dx Dy
Cramer’s Rule replaces a variable column with the constant column. Solutions are x = ,y= . See Example 9.8.2.
D D
To find the determinant of a 3 × 3 matrix, augment with the first two columns. Add the three diagonal entries (upper left to
lower right) and subtract the three diagonal entries (lower left to upper right). See Example 9.8.3.
To solve a system of three equations in three variables using Cramer’s Rule, replace a variable column with the constant column
Dx Dy Dz
for each desired solution: x = ,y= ,z= . See Example 9.8.4.
D D D
Cramer’s Rule is also useful for finding the solution of a system of equations with no solution or infinite solutions. See Example
9.8.5 and Example 9.8.6.
Certain properties of determinants are useful for solving problems. For example:
If the matrix is in upper triangular form, the determinant equals the product of entries down the main diagonal.
When two rows are interchanged, the determinant changes sign.
If either two rows or two columns are identical, the determinant equals zero.
If a matrix contains either a row of zeros or a column of zeros, the determinant equals zero.
The determinant of an inverse matrix A is the reciprocal of the determinant of the matrix A .
−1
If any row or column is multiplied by a constant, the determinant is multiplied by the same factor. See Example 9.8.7 and
Example 9.8.8.
This page titled 9.8: Solving Systems with Cramer's Rule is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by
OpenStax via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.
11.8: Solving Systems with Cramer's Rule by OpenStax is licensed CC BY 4.0. Original source:
https://openstax.org/details/books/precalculus.