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 ...
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.
A determinant is a real number that can be very useful in mathematics because it has multiple applications, such as calculating area, volume, and other quantities. Here, we will use determinants to reveal whether a matrix is invertible by using the entries of a square matrix to determine whether there is a solution to the system of equations. Perhaps one of the more interesting applications, however, is their use in cryptography. Secure signals or messages are sometimes sent encoded in a matrix. The data can only be decrypted with an invertible matrix and the determinant. For our purposes, we focus on the determinant as an indication of the invertibility of the matrix. Calculating the determinant of a matrix involves following the specific patterns that are outlined in this section.
The determinant of a 2 × 2 matrix, given
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 |.
Find the determinant of the given matrix.
We will now introduce a final method for solving systems of equations that uses determinants. Known as Cramer’s Rule, this technique dates back to the middle of the 18th century and is named for its innovator, the Swiss mathematician Gabriel Cramer (1704-1752), who introduced it in 1750 in Introduction à l'Analyse des lignes Courbes algébriques. Cramer’s Rule is a viable and efficient method for finding solutions to systems with an arbitrary number of unknowns, provided that we have the same number of equations as unknowns.
Cramer’s Rule will give us the unique solution to a system of equations, if it exists. However, if the system has no solution or an infinite number of solutions, this will be indicated by a determinant of zero. To find out if the system is inconsistent or dependent, another method, such as elimination, will have to be used.
To understand Cramer’s Rule, let’s look closely at how we solve systems of linear equations using basic row operations. Consider a system of two equations in two variables.
We eliminate one variable using row operations and solve for the other. Say that we wish to solve for x. If equation (2) is multiplied by the opposite of the coefficient of y in equation (1), equation (1) is multiplied by the coefficient of y in equation (2), and we add the two equations, the variable y will be eliminated.
Now, solve for x.
Similarly, to solve for y, we will eliminate x.
Solving for y gives
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
x
:
determinant of the numerator in the solution of
x
x= D x D
-
D
y
:
determinant of the numerator in the solution of
y
y= D y D
The key to Cramer’s Rule is replacing the variable column of interest with the constant column and calculating the determinants. We can then express x and y as a quotient of two determinants.
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.
The solution using Cramer’s Rule is given as
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.
Solve the following 2 × 2 system using Cramer’s Rule.
Solve for x.
Solve for y.
The solution is ( 2,−3 ).
Use Cramer’s Rule to solve the 2 × 2 system of equations.
( 3,−7 )
Finding the determinant of a 2×2 matrix is straightforward, but finding the determinant of a 3×3 matrix is more complicated. One method is to augment the 3×3 matrix with a repetition of the first two columns, giving a 3×5 matrix. Then we calculate the sum of the products of entries down each of the three diagonals (upper left to lower right), and subtract the products of entries up each of the three diagonals (lower left to upper right). This is more easily understood with a visual and an example.
Find the determinant of the 3×3 matrix.
- Augment
A
with the first two columns.
det(A)=| a 1 b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 | a 1 a 2 a 3 b 1 b 2 b 3 |
- 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.
- 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.
The algebra is as follows:
Find the determinant of the 3 × 3 matrix given
Augment the matrix with the first two columns and then follow the formula. Thus,
Find the determinant of the 3 × 3 matrix.
−10
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.
Now that we can find the determinant of a 3 × 3 matrix, we can apply Cramer’s Rule to solve a system of three equations in three variables. Cramer’s Rule is straightforward, following a pattern consistent with Cramer’s Rule for 2 × 2 matrices. As the order of the matrix increases to 3 × 3, however, there are many more calculations required.
When we calculate the determinant to be zero, Cramer’s Rule gives no indication as to whether the system has no solution or an infinite number of solutions. To find out, we have to perform elimination on the system.
Consider a 3 × 3 system of equations.
where
If we are writing the determinant D x , we replace the x column with the constant column. If we are writing the determinant D y , we replace the y column with the constant column. If we are writing the determinant D z , we replace the z column with the constant column. Always check the answer.
Find the solution to the given 3 × 3 system using Cramer’s Rule.
Use Cramer’s Rule.
Then,
The solution is ( 1,3,−2 ).
Use Cramer’s Rule to solve the 3 × 3 matrix.
( −2, 3 5 , 12 5 )
Solve the system of equations using Cramer’s Rule.
We begin by finding the determinants D, D x ,and D y .
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.
- Multiply equation (1) by −2.
- Add the result to equation ( 2 ).
We obtain the equation 0=−8, which is false. Therefore, the system has no solution. Graphing the system reveals two parallel lines. See [link].
Solve the system with an infinite number of solutions.
Let’s find the determinant first. Set up a matrix augmented by the first two columns.
Then,
As the determinant equals zero, there is either no solution or an infinite number of solutions. We have to perform elimination to find out.
- Multiply equation (1) by
−2
and add the result to equation (3):
−2x+4y−6x=0 2x−4y+6z=0 0=0
- 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 [link].
There are many properties of determinants. Listed here are some properties that may be helpful in calculating the determinant of a matrix.
- 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 −1 is the reciprocal of the determinant of the matrix A.
- If any row or column is multiplied by a constant, the determinant is multiplied by the same factor.
Illustrate each of the properties of determinants.
Property 1 states that if the matrix is in upper triangular form, the determinant is the product of the entries down the main diagonal.
Augment A with the first two columns.
Then
Property 2 states that interchanging rows changes the sign. Given
Property 3 states that if two rows or two columns are identical, the determinant equals zero.
Property 4 states that if a row or column equals zero, the determinant equals zero. Thus,
Property 5 states that the determinant of an inverse matrix A −1 is the reciprocal of the determinant A. Thus,
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,
Find the solution to the given 3 × 3 system.
Using Cramer’s Rule, we have
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.
- Multiply equation (3) by –2 and add the result to equation (1).
−2x−4y−4x=−8 2x+4y+4z=2 0=−6
Obtaining a statement that is a contradiction means that the system has no solution.
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
- The determinant for [ a b c d ] is ad−bc. See [link].
- Cramer’s Rule replaces a variable column with the constant column. Solutions are x= D x D ,y= D y D . See [link].
- 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 [link].
- To solve a system of three equations in three variables using Cramer’s Rule, replace a variable column with the constant column for each desired solution: x= D x D ,y= D y D ,z= D z D . See [link].
- Cramer’s Rule is also useful for finding the solution of a system of equations with no solution or infinite solutions. See [link] and [link].
- 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 −1 is the reciprocal of the determinant of the matrix A.
- If any row or column is multiplied by a constant, the determinant is multiplied by the same factor. See [link] and [link].
Verbal
Explain why we can always evaluate the determinant of a square matrix.
A determinant is the sum and products of the entries in the matrix, so you can always evaluate that product—even if it does end up being 0.
Examining Cramer’s Rule, explain why there is no unique solution to the system when the determinant of your matrix is 0. For simplicity, use a 2 × 2 matrix.
Explain what it means in terms of an inverse for a matrix to have a 0 determinant.
The inverse does not exist.
The determinant of 2 × 2 matrix A is 3. If you switch the rows and multiply the first row by 6 and the second row by 2, explain how to find the determinant and provide the answer.
Algebraic
For the following exercises, find the determinant.
| 1 2 3 4 |
−2
| −1 2 3 −4 |
| 2 −5 −1 6 |
7
| −8 4 −1 5 |
| 1 0 3 −4 |
−4
| 10 20 0 −10 |
| 10 0.2 5 0.1 |
0
| 6 −3 8 4 |
| −2 −3 3.1 4,000 |
−7,990.7
| −1.1 0.6 7.2 −0.5 |
| −1 0 0 0 1 0 0 0 −3 |
3
| −1 4 0 0 2 3 0 0 −3 |
| 1 0 1 0 1 0 1 0 0 |
−1
| 2 −3 1 3 −4 1 −5 6 1 |
| −2 1 4 −4 2 −8 2 −8 −3 |
224
| 6 −1 2 −4 −3 5 1 9 −1 |
| 5 1 −1 2 3 1 3 −6 −3 |
15
| 1.1 2 −1 −4 0 0 4.1 −0.4 2.5 |
| 2 −1.6 3.1 1.1 3 −8 −9.3 0 2 |
−17.03
| − 1 2 1 3 1 4 1 5 − 1 6 1 7 0 0 1 8 |
For the following exercises, solve the system of linear equations using Cramer’s Rule.
2x−3y=−1 4x+5y=9
( 1,1 )
5x−4y=2 −4x+7y=6
6x−3y=2 −8x+9y=−1
( 1 2 , 1 3 )
2x+6y=12 5x−2y=13
4x+3y=23 2x−y=−1
( 2,5 )
10x−6y=2 −5x+8y=−1
4x−3y=−3 2x+6y=−4
( −1,− 1 3 )
4x−5y=7 −3x+9y=0
4x+10y=180 −3x−5y=−105
( 15,12 )
8x−2y=−3 −4x+6y=4
For the following exercises, solve the system of linear equations using Cramer’s Rule.
x+2y−4z=−1 7x+3y+5z=26 −2x−6y+7z=−6
( 1,3,2 )
−5x+2y−4z=−47 4x−3y−z=−94 3x−3y+2z=94
4x+5y−z=−7 −2x−9y+2z=8 5y+7z=21
( −1,0,3 )
4x−3y+4z=10 5x−2z=−2 3x+2y−5z=−9
4x−2y+3z=6 −6x+y=−2 2x+7y+8z=24
( 1 2 ,1,2 )
5x+2y−z=1 −7x−8y+3z=1.5 6x−12y+z=7
13x−17y+16z=73 −11x+15y+17z=61 46x+10y−30z=−18
- 1 Zeros of Polynomial Functions
- 2 Confidence Interval (Place of Birth)
- 3 Appendix A: Review Exercises (Ch 3-13)
- 4 Introduction to the Impacts of Government Borrowing
- 5 Graphs of Exponential Functions
- 6 Trade Balances and Flows of Financial Capital
- 7 Balancing Keynesian and Neoclassical Models
- 8 The Economics of Pollution
- 9 Introduction to Periodic Functions
- 10 International Environmental Issues