Try it with your numbers
Show every step
Each variable is one determinant divided by one shared determinant, so the rule replaces the juggling of substitution with a fixed pattern of arithmetic. Below: the 2×2 and 3×3 versions, negatives and fractions, where the formula comes from, and what a zero determinant tells you.
Cramer’s rule formula for a 2×2 system
Start with the system in standard form, variables lined up and constants on the right:
Three determinants do all the work. If the determinant is new to you, the determinant of a 2×2 matrix page covers the cross-multiplication pattern.
Then and . The procedure in four steps:
- Rewrite both equations as with variables aligned.
- Compute . If it is , stop: the rule cannot continue.
- Build by replacing the column with the constants, and by replacing the column.
- Divide: , .
The constants go into the column in the same top-to-bottom order as the equations. Writing instead of flips the sign and gives the negative of the right answer.
Note that uses only the coefficients, never the constants. The constants enter only through and , which is why one wrong sign in ruins both answers while a slip in ruins just one.
Quick check
Answer:
How to use Cramer’s rule with negatives and fractions
Negative numbers are where most points disappear, and the cure is mechanical: write every product in parentheses before you subtract. Solve and .
So and . A negative is perfectly normal. The sign cancels when and are negative too, and an answer that looks “too clean” is usually a sign you did it right.
For fractions, clear the denominators first rather than carrying fractions through three determinants. Take and . Multiplying the first equation by the common denominator gives . Now , and . That gives and . Decimals work the same way: multiply by or until every coefficient is an integer.
Why does the formula work? One idea about area

The formula is not a trick to memorise. Read the system as a statement about columns: the constants column is copies of the first coefficient column plus copies of the second. Call those columns , and , so . A determinant is the signed area of the parallelogram built on its two columns.
Now replace the first column with . The extra piece lies along the other side of the parallelogram, so it adds no area, and only the stretch counts:
Divide by and the rule appears. The same idea gives , and it extends to 3×3 systems with volumes instead of areas.
The algebraic route is plain elimination done once, in general. Multiply the first equation by and the second by , then subtract:
That line is in disguise. It also shows why is fatal: you would be dividing both sides by zero. Geometrically, a zero area means the two columns point along one line, so they cannot combine to reach an arbitrary constants column.
How do you solve a 3×3 system with Cramer’s rule?
The pattern is identical, with one more determinant. Replace the column of the variable you want with the constants, keep the rest, and divide by . Solve:
Expand each determinant along the first row (the determinant of a 3×3 matrix page shows the cofactor signs ).
So , and .
If an equation lacks a variable, such as , write it as before building any determinant. Skipping the zero shifts every later column and wrecks the result.
A faster finish: once and are known, substitute into any original equation to get . Here gives , and the fourth determinant is never needed. That saves roughly a quarter of the work. If you want to compare, the elimination approach for three equations reaches the same point .
Quick check
Answer:
What happens when the determinant is zero?

When , the fractions and are undefined, so the rule is silent about the solution. The system has either no solution or infinitely many, and the numerator determinants tell them apart in the 2×2 case:
- and at least one of , nonzero: no solution.
- and both : infinitely many solutions.
Try and . Here and , so there is no solution. Change the first equation to and every determinant becomes , because both equations now describe the same line. The deeper comparison lives on the no solution vs infinitely many solutions page.
The graph explains it. means , so both lines have the same slope. In slope-intercept form that is two lines with equal : parallel (no solution) or identical (infinitely many), as solving systems by graphing shows visually.
One caution for larger systems: in 3×3, all four determinants being zero does not guarantee infinitely many solutions. The system , , has every determinant equal to and still has no solution. In that case, switch to row reduction or elimination.
Try this: Take and . Compute , then find the single value of that makes . What does that value mean for the lines?
Cramer’s rule vs elimination: which is faster?
For a 2×2 system the methods are close, and Cramer’s rule wins when the numbers are awkward, because it never forces you to divide mid-calculation. It also wins when only one variable is wanted: needs two determinants, not a full solve.
| Method | Best when | Weak spot |
|---|---|---|
| Cramer’s rule | 2×2 or 3×3, one variable needed, letters as coefficients | Many determinants as size grows |
| Elimination | Any size, coefficients that line up | Easy to slip on signs mid-way |
| Substitution | One variable already isolated | Fractions pile up fast |
The cost grows quickly. An system needs determinants of size , and each one costs more than the last, so beyond 3×3 the rule is a poor choice for hand work. To feel the difference, solve one system all three ways using the elimination method practice problems and the substitution method practice problems, then time yourself.
How to check the answer without redoing the work
Substitute into the original equations, not into the rewritten ones, so any mistake in setup is caught too. In a 3×3 system, test all three equations. If you used one equation to find by the shortcut, that equation will always pass, so the other two carry the real check.
Two faster mental checks exist for systems with integer coefficients. First, every answer is , so after reducing, its denominator must divide . If and you get , something is wrong before you substitute. Second, swapping the two equations flips the sign of , and together, so the quotients stay put. Redoing the problem with the equations swapped is a cheap independent test.
When the check fails, look at the columns first. A swapped constants column, or a coefficient placed in the wrong spot, causes more wrong answers than arithmetic does.
Quick check
Answer: D = 2, and x is still 3
Real uses: tickets, circuits and where lines cross
A concert sells adult tickets at $12 and student tickets at $8. In total, tickets bring in $460. With adults and students:
Here , and . So and . Check: and .
Two lines in standard form meet at a point that Cramer’s rule gives in one pass. If the lines come as point-slope form, rewrite them as first. Engineers use the same pattern for mesh currents in circuits (Kirchhoff’s laws produce a small linear system), and it also appears in economics, where the coefficients are prices and quantities.
The rule is also the inverse-matrix formula, one component at a time. If and , then , and each entry of that product equals . The condition is exactly the condition for to have an inverse.
Practice problems
0 of 5 solved
- Solve and with Cramer's rule.
Answer:
. , so . , so . - Solve and .
Answer:
. , so . , so . - Solve and .
Answer:
Clear fractions: multiply the first equation by and the second by to get and . Then . , so . , so . - Solve , , .
Answer:
Coefficient rows are , , , so . , , . Divide each by : , , . - For which values of does , fail to have exactly one solution?
Answer:
. Set : , so or . For the second equation is not a multiple of the first (right sides and clash), so there is no solution. The case clashes the same way.
Common questions
What is Cramer's rule used for?
Cramer's rule solves a system of linear equations with as many equations as unknowns by writing each unknown as a ratio of two determinants. It is most useful for 2×2 and 3×3 systems, for finding a single variable without solving the rest, and for formulas where the coefficients are letters.
What does it mean if the determinant D is zero?
The system does not have exactly one solution, so Cramer's rule cannot give an answer. In a 2×2 system, a nonzero or means no solution (parallel lines), and both being zero means infinitely many solutions (the same line).
How do you solve a 3×3 system with Cramer's rule?
Write the system in standard form, compute from the coefficients, then compute , and by replacing one column at a time with the constants. Divide each by . After finding two variables you can substitute into an original equation for the third.
Is Cramer's rule faster than elimination?
For a 2×2 system it is about equal, and it is quicker when you need only one variable. For 3×3 it needs four 3×3 determinants, so elimination is usually shorter. For 4×4 and larger, row reduction is far more efficient.
Why is it called Cramer's rule?
It is named after the Swiss mathematician Gabriel Cramer, who published the general rule in 1750. Special cases were known earlier, but his notation and presentation made the method widely used.
Can Cramer's rule be used on a 4×4 system?
Yes, as long as , but it requires five 4×4 determinants, which is a lot of arithmetic by hand. Computers and textbooks use row reduction for systems that large.