Cramer's Rule solves a square system of linear equations by using determinants. Replace one column at a time, compute a determinant, and divide by the determinant of the original coefficient matrix. It works only when .
If the system is written as
and is square with , then the system has a unique solution and Cramer's Rule can find each variable directly.
Cramer's Rule formula
For the variable , the rule is
where is the matrix formed by replacing the th column of with the constants from .
The condition matters. If , the denominator is zero, so Cramer's Rule does not give a unique solution.
When you can use Cramer's Rule
Use it only when all of these are true:
- The system has the same number of equations and unknowns.
- The coefficient matrix is square.
- The determinant of the coefficient matrix is not zero.
If one condition fails, stop there. For example, a zero determinant means the system may have no solution or infinitely many solutions, so Cramer's Rule is not the right tool for a unique solve.
Solve a system step by step
Solve
First identify the coefficient matrix and the constants column:
Compute the determinant of :
Because , the system has a unique solution, so Cramer's Rule applies.
Find
Replace the first column of with :
Then
Now divide by the original determinant:
Find
Replace the second column of with :
Then
Again divide by :
So the solution is
That is the full pattern: one determinant for the original matrix, then one more determinant for each variable.
Why Cramer's Rule matters
Cramer's Rule is not usually the fastest method for a large system. Students learn it because it connects three ideas cleanly:
- solving linear systems
- determinants
- the condition for a unique solution
If , the system has one unique solution. If , something breaks: there may be no solution or infinitely many solutions.
Common mistakes with Cramer's Rule
Using it when
This is the main check. Cramer's Rule relies on dividing by , so a zero determinant means the method does not apply for a unique solution.
Replacing the wrong column
To solve for , replace the -column. To solve for , replace the -column. The constants column does not get appended; it replaces one column at a time.
Treating it as the best method for every system
For larger systems, row reduction or numerical methods are usually more practical. Cramer's Rule is most useful for small systems and for understanding the role of determinants.
When Cramer's Rule is used
You will usually see Cramer's Rule in algebra and linear algebra courses when the goal is understanding rather than speed. It is especially useful when you want to show how each variable depends on the coefficients and constants.
In practice, it is most comfortable for systems and sometimes systems. Beyond that, the determinant work grows quickly, so it stops being the default method.
Try a similar problem
Try solving
First compute . If it is nonzero, replace one column at a time and solve for and . After you finish by hand, compare your setup with a matrix solver to check the determinants as well as the final answer.
Need help with a problem?
Upload your question and get a verified, step-by-step solution in seconds.
Open GPAI Solver →