Solving Systems with Cramer's Rule
By the end of this section, you will be able to:
- Evaluate determinants
- Use Cramer’s Rule to solve a system of equations in two variables
- Evaluate determinants
- Use Cramer’s Rule to solve a system of three equations in three variables
- Know the properties of determinants
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.
Evaluating the Determinant of a Matrix
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.
Find the Determinant of a Matrix. The determinant of a matrix, given
is defined as
Notice the change in notation. There are several ways to indicate the determinant, including and replacing the brackets in a matrix with straight lines, .
Example. Find the determinant of the given matrix.
Solution.
Using Cramer’s Rule to Solve a System of Two Equations in Two Variables
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 . If equation (2) is multiplied by the opposite of the coefficient of in equation (1), equation (1) is multiplied by the coefficient of in equation (2), and we add the two equations, the variable will be eliminated.
Now, solve for .
Similarly, to solve for , we will eliminate .
Solving for gives
Notice that the denominator for both and is the determinant of the coefficient matrix.
We can use these formulas to solve for and , but Cramer’s Rule also introduces new notation:
- : determinant of the coefficient matrix
- : determinant of the numerator in the solution of ,
- : determinant of the numerator in the solution of ,
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 and as a quotient of two determinants.
Cramer’s Rule for Systems. 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 , the column is replaced with the constant column. If we are solving for , the column is replaced with the constant column.
Example. Solve the following system using Cramer’s Rule.
Solution. Solve for .
Solve for .
The solution is .
Use Cramer’s Rule to solve thesystem of equations.Enter the solution as an ordered pair.
Evaluate,, and, then formand.Evaluating the Determinant of a Matrix
Finding the determinant of a matrix is straightforward, but finding the determinant of a matrix is more complicated. One method is to augment the matrix with a repetition of the first two columns, giving a 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 matrix.
Augment with the first two columns.
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:
Example. Find the determinant of the matrix given
Solution. Augment the matrix with the first two columns and then follow the formula. Thus,
Find the determinant of thematrix.
Augment the matrix with its first two columns, then add the three down-diagonal products and subtract the three up-diagonal products.Q&A. Can we use the same method to find the determinant of a larger matrix?
No, this method only works for and matrices. For larger matrices it is best to use a graphing utility or computer software.
Using Cramer’s Rule to Solve a System of Three Equations in Three Variables
Now that we can find the determinant of a 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 matrices. As the order of the matrix increases to , 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 system of equations.
where
If we are writing the determinant , we replace the column with the constant column. If we are writing the determinant , we replace the column with the constant column. If we are writing the determinant , we replace the column with the constant column. Always check the answer.
Example. Find the solution to the given system using Cramer’s Rule.
Solution. Use Cramer’s Rule.
Then,
The solution is .
Use Cramer’s Rule to solve thesystem of equations.Enter the solution as an ordered triple.
Evaluateusing the coefficients of, then,,by replacing one column of coefficients at a time with the constants.Example. Solve the system of equations using Cramer’s Rule.
Solution. We begin by finding the determinants , , and .
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 .
- Add the result to equation (2).
We obtain the equation , which is false. Therefore, the system has no solution. Graphing the system reveals two parallel lines.
Example. Solve the system with an infinite number of solutions.
Solution. 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 and add the result to equation (3):
- Obtaining an answer of , 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.
(Source note: the source’s own version of this figure labels the second plane , the sign-flipped spelling of the equation its example states as — a figure-label slip recorded in this book’s errata; the label above matches the example’s printed system.)
Understanding Properties of Determinants
There are many properties of determinants. Listed here are some properties that may be helpful in calculating the determinant of a matrix.
Properties of Determinants.
- 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 is the reciprocal of the determinant of the matrix .
- If any row or column is multiplied by a constant, the determinant is multiplied by the same factor.
Example. Illustrate each of the properties of determinants.
Solution. 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 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 is the reciprocal of the determinant . 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,
Example. Find the solution to the given system.
Solution. 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 and add the result to equation (1).
Obtaining a statement that is a contradiction means that the system has no solution.
Key concepts
- The determinant for is .
- Cramer’s Rule replaces a variable column with the constant column. Solutions are , .
- To find the determinant of a 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).
- 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: , , .
- Cramer’s Rule is also useful for finding the solution of a system of equations with no solution or infinite solutions.
- 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 is the reciprocal of the determinant of the matrix ; and if any row or column is multiplied by a constant, the determinant is multiplied by the same factor.
Practice
Evaluate determinants
Evaluate the determinant.
Subtract the product of the diagonals going the other way from the product of the main diagonal:.Evaluate the determinant.
Subtract the products of the diagonals:.Evaluate the determinant.
Subtract the products of the diagonals:.Use Cramer’s Rule to solve a system of equations in two variables
Solve the system of linear equations using Cramer’s Rule.Enter the solution as an ordered pair.
Evaluate,, and, then formand.Solve the system of linear equations using Cramer’s Rule.Enter the solution as an ordered pair.
Evaluate,, and, then formand.Solve the system of linear equations using Cramer’s Rule.Enter the solution as an ordered pair.
Evaluate,, and, then formand.Evaluate determinants
Evaluate the determinant.
The matrix is diagonal, so the determinant is just the product of the entries on the main diagonal.Evaluate the determinant.
Augment the matrix with its first two columns, then add the three down-diagonal products and subtract the three up-diagonal products.Evaluate the determinant.
Augment the matrix with its first two columns, then add the three down-diagonal products and subtract the three up-diagonal products.Use Cramer’s Rule to solve a system of three equations in three variables
Solve the system of linear equations using Cramer’s Rule.Enter the solution as an ordered triple.
Evaluateusing the coefficients of, thenby replacing one column at a time with the constants.Solve the system of linear equations using Cramer’s Rule.Enter the solution as an ordered triple.
Evaluateusing the coefficients of(the third equation has no-term), thenby replacing one column at a time with the constants.Solve the system using Cramer’s Rule:How many solutions does the system have?
Evaluatefirst; sincehere, use elimination on the system to decide between no solution and infinitely many.Know the properties of determinants
Which statement correctly explains why the determinant of a square matrix can always be evaluated?
Think about what the diagonal expansion actually does to the matrix’s entries — it never requires dividing or testing them first.If the determinant of a matrix is, what does this mean for the matrix’s inverse?
Recall which quantity you would be dividing by to compute the inverse’s entries.This section is adapted from Precalculus 2e, Section 9.8: Solving Systems with Cramer’s Rule by Jay Abramson and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: omitted a coreq-skills block the pinned CNXML prepends before the section proper (its own “Objective 1” review of using Cramer’s Rule to solve a system, keyed to Intermediate Algebra 4.6.3, complete with its own worked example and two “Practice Makes Perfect” exercise sets) — confirmed against the rendered PDF, page 987 (true PDF index 997), where exercise 61 of the previous section’s Real-World Applications runs directly into the “9.8 Solving Systems with Cramer’s Rule” heading with no corequisite-skills material between them; the same prepended-block pattern is already logged in this book’s errata for §§4.3–4.8 and §§9.1–9.7, and this section joins that list. Kept the “Media” callout’s introductory sentence but omitted its two external video links, matching house precedent elsewhere in this book. Recreated the crossing-arrow mnemonic that illustrates (an uncaptioned inline diagram in the source, not one of its two numbered figures) as an accessible spec-first figure, and independently recomputed the source’s own Figure 1 (two parallel lines, and ) from the printed system rather than tracing the source art. Recreated the source’s two remaining diagrams as accessible spec-first figures: the Sarrus’-rule mnemonic for a determinant (an uncaptioned inline diagram immediately following the augment-with-two-columns list) draws the three down-diagonal products as solid arrows and the three up-diagonal products as dashed arrows, each stroke passing behind the matrix-entry labels it crosses via the figure engine’s gap-behind-text routing (added for this diagram); and the dependent-system plane diagram beside Example 6 (the source’s Figure 2) draws the coincident pair and the distinct plane as two translucent crossing bands with a double-headed arrow along their line of intersection, monochrome like every figure in this book. That figure’s green-plane label is printed in the source as , the sign-flipped spelling of the equation the example itself states — a source defect recorded in this book’s errata — so the recreation labels the plane to match the example’s printed system, with a visible Source note beside it. The symbol is reserved by the grading engine, so every determinant-value, Cramer’s-rule, and properties-of-determinants question here keys a bare number or an ordered pair/triple — never a string containing , , , or — while the prose and worked examples keep the source’s own /// notation throughout, since KaTeX renders it and only submitted answers are restricted. Every retained Try It’s system is inlined directly into the question string as , and every solution is keyed as an ordered pair or triple with the format stated in the question; fraction-valued tuple members are keyed with a plain slash (e.g. (1/2,1/3)), matching this chapter’s own §9.2 precedent, since the grader parses a bare slash between tuple members without the misreading that a juxtaposed factor would cause. The two “how many solutions” categorical outcomes (Example 6’s infinite-solutions system and the matching Practice item) are posed as multiplechoice, never a \text{…} fill-in, following this chapter’s own §9.1–§9.2 convention. The two Verbal exercises with a printed solution that is an explanation rather than a value (“explain why we can always evaluate the determinant of a square matrix” and “explain what it means in terms of an inverse for a matrix to have a determinant”) are recast as multiplechoice items over the source’s own printed explanations, since a free-form justification cannot be graded as a math expression; the Verbal exercise asking for a numeric answer with no printed solution in the Answer Key (explain the effect of swapping rows and scaling both on a determinant of ) was not used, since its answer is not visibly present in the source key. Fourteen selected end-of-section exercises were adapted into interactive Practice components, one group per objective, every one independently re-derived (including by running the arithmetic in Node) rather than read off the source key.