Cramer’s Rule Calculator (2×2 and 3×3 Systems, Free)
A Cramer’s rule calculator solves a square linear system with determinants: each unknown equals Dx/D, where D is the coefficient determinant and Dx replaces the x-column with the constants. For 2x + 3y = 8 and x − y = −1, D = −5, Dx = −5 and Dy = −10, so x = 1 and y = 2.
=
Eq 2
=
=
Eq 2
=
Eq 3
=
=
Eq 2
=
Eq 3
=
Eq 4
=
| 2 | 3 |
| 1 | −1 |
= −5
| 8 | 3 |
| −1 | −1 |
= −5
| 2 | 8 |
| 1 | −1 |
= −10
Show steps
- Write the system: 2x + 3y = 8; x − y = −1. The coefficient matrix A holds the coefficients of x, y and B holds the constants.
- Find the coefficient determinant: D = 2 × (−1) − 3 × 1 = −2 − 3 = −5. D ≠ 0, so Cramer’s rule applies.
- Replace column 1 (the x column) with the constants: Dx = 8 × (−1) − 3 × (−1) = −8 − (−3) = −5.
8 3 −1 −1 - Replace column 2 (the y column) with the constants: Dy = 2 × (−1) − 8 × 1 = −2 − 8 = −10.
2 8 1 −1 - Divide: x = Dx / D = −5 / (−5) = 1; y = Dy / D = −10 / (−5) = 2.
- Check by substituting: Eq 1: 2(1) + 3(2) = 8 ✓; Eq 2: 1(1) + (−1)(2) = −1 ✓.
How to use the Cramer’s rule calculator
- Pick the size: a 2 × 2 system (x, y), a 3 × 3 system (x, y, z) or a 4 × 4 system (w, x, y, z).
- Enter each equation’s coefficients and constant in the grid, writing 0 for a missing variable. Whole numbers, decimals and fractions such as −3/4 all work. You can also type the equations, for example 2x + 3y = 8; x − y = −1, and press Fill grid.
- Press Solve (the answer also updates as you type). You get D, every replaced-column determinant, the solution as exact fractions with decimals, the graph of the two lines for a 2 × 2 system, and full steps with a check.
How Cramer’s rule works
Write the system as AX = B, where A is the square matrix of coefficients and B is the column of constants. Cramer’s rule says that when D = det(A) ≠ 0, each variable is
xi = Di / D, where Di is the determinant of A with column i replaced by B.
For a 2 × 2 system a₁x + b₁y = c₁ and a₂x + b₂y = c₂:
- D = a₁b₂ − b₁a₂
- Dx = c₁b₂ − b₁c₂ (the x-column replaced by the constants)
- Dy = a₁c₂ − c₁a₂ (the y-column replaced by the constants)
- x = Dx/D and y = Dy/D
For a 3 × 3 system you need four determinants (D, Dx, Dy, Dz), and for 4 × 4 five. The calculator expands each 3 × 3 determinant along the first row, a(ei − fh) − b(di − fg) + c(dh − eg), and each 4 × 4 determinant into four 3 × 3 minors, using exact fraction arithmetic so no rounding creeps in.
Worked examples
2 × 2 system
Solve 2x + 3y = 8 and x − y = −1. D = 2(−1) − 3(1) = −5. Dx = 8(−1) − 3(−1) = −5 and Dy = 2(−1) − 8(1) = −10. So x = −5/−5 = 1 and y = −10/−5 = 2. Check: 2(1) + 3(2) = 8 and 1 − 2 = −1.
2 × 2 system with a fraction answer
For 3x + 2y = 7 and 4x − 5y = 3: D = 3(−5) − 2(4) = −23, Dx = 7(−5) − 2(3) = −41 and Dy = 3(3) − 7(4) = −19. So x = 41/23 ≈ 1.7826 and y = 19/23 ≈ 0.8261. Cramer’s rule gives these exact fractions directly.
3 × 3 system
Solve 2x + y − z = 8, −3x − y + 2z = −11 and −2x + y + 2z = −3. Expanding along the first row, D = 2(−4) − 1(−2) + (−1)(−5) = −1. Replacing one column at a time gives Dx = −2, Dy = −3 and Dz = 1, so x = 2, y = 3 and z = −1.
When D = 0
For 2x + 4y = 6 and x + 2y = 5, D = 2(2) − 4(1) = 0, so Cramer’s rule cannot divide. Here Dx = 6(2) − 4(5) = −8 ≠ 0, which for a 2 × 2 system means the lines are parallel and there is no solution. If D, Dx and Dy were all 0 (as for x + 2y = 3 and 2x + 4y = 6), the equations would describe the same line and there would be infinitely many solutions.
No unique solution: what D = 0 tells you
A zero determinant means the coefficient rows are linearly dependent, so the system has either no solution or infinitely many. Cramer’s rule alone cannot always tell which. For 2 × 2 systems the replaced determinants decide it, as in the example above. For 3 × 3 and larger systems, D = Dx = Dy = Dz = 0 can still happen when the system has no solution (for example x + y + z = 1, x + y + z = 2, x + y + z = 3). That is why the calculator row reduces the augmented matrix [A | B] whenever D = 0: if a row becomes 0 = c with c ≠ 0 there is no solution; otherwise it writes the infinite family in terms of free variables, such as x = 2 − (1/2)z, y = 1 − (1/2)z, z any real number.
Cramer’s rule or elimination?
| Situation | Better choice |
|---|---|
| 2 × 2 or 3 × 3 system, exact fractions wanted | Cramer’s rule: a few determinants and one division per variable |
| You need only one variable | Cramer’s rule: compute D and that one Di |
| 4 × 4 or larger system | Elimination usually takes fewer steps by hand |
| D = 0 | Elimination (row reduction), which also finds infinite solution sets |
| Non-square system (more equations than unknowns) | Elimination; Cramer’s rule needs a square matrix |
Common mistakes
| Mistake | What to do instead |
|---|---|
| Replacing a row instead of a column | Dx replaces the x-column (the coefficients of x) with the constants |
| Forgetting the minus sign on the middle term of a 3 × 3 expansion | The signs alternate +, −, + along the first row |
| Leaving a variable out of an equation | Write 0 as its coefficient so the columns line up |
| Moving constants to the wrong side | Rewrite each equation as ax + by + cz = d first |
| Dividing by D = 0 | Stop and use elimination to decide between no and infinitely many solutions |
| Rounding determinants early | Keep exact fractions until the last step |
Checking homework with the calculator
Solve the problem by hand first: compute D, then each replaced determinant, then divide. Enter the same system here and compare your D and each Di with the calculator’s values one at a time; the first one that differs shows exactly where the slip happened. The last step substitutes the answer back into every equation, a habit worth copying on tests.
Cramer’s rule practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Replace the x-column with the constants 12 and −1: Dx = (12)(−1) − (2)(−1) = −12 + 2 = −10.
Each Di replaces the column of variable i, not a row, with the constant column.
For a diagonal (or triangular) matrix, the determinant is the product of the diagonal: 2 × 3 × 4 = 24.
In a 2 × 2 system, D = 0 with a nonzero Dx means the lines are parallel and never meet.
The second equation is twice the first, so D, Dx and Dy are all 0 and the system has infinitely many solutions.
You need D plus one replaced determinant for each of x, y and z: 1 + 3 = 4.
D = 4(3) − (−1)(2) = 14 and Dy = 4(7) − 7(2) = 14, so y = 14/14 = 1 (and x = 2).
Cramer's rule divides by D, so it needs D ≠ 0. Fractions, negatives and larger square systems are all fine.
Quiz complete
Frequently asked questions
How do you solve a system with Cramer’s rule?
Find the coefficient determinant D. For each variable, replace that variable’s column with the constants and find the determinant, then divide it by D. For 2x + 3y = 8 and x − y = −1, D = −5, Dx = −5 and Dy = −10, so x = 1 and y = 2.
Does Cramer’s rule always work?
Only when the system is square and D ≠ 0. If D = 0 the system has no solution or infinitely many, and you need elimination to tell which. For example, x + y = 2 and 2x + 2y = 4 has D = 0 and infinitely many solutions.
How do you do Cramer’s rule on a TI-84 calculator?
Enter the coefficient matrix as [A] in the matrix editor (2nd, x⁻¹) and use MATH, 1:det( to find D. Then edit [A] so that one column holds the constants (or store a copy as [B]), find its determinant, and divide by D. Repeat for each variable.
How do you use Cramer’s rule for a 3 × 3 system?
Compute four 3 × 3 determinants: D, Dx, Dy and Dz, each by expanding along a row. Then x = Dx/D, y = Dy/D and z = Dz/D. For a triangular system such as x + y + z = 6, y + z = 5, z = 3, D is the product of the diagonal, 1, and the solution is x = 1, y = 2, z = 3.
Can Cramer’s rule be used with complex numbers?
Yes. The determinant formulas work for complex coefficients exactly as for real ones, as long as D ≠ 0. This calculator handles real numbers (whole numbers, decimals and fractions).
Related calculators
- System of equations calculator: solve by substitution or elimination
- Matrix calculator: determinants, inverses and matrix products
- Linear equation calculator: solve one equation in one variable
- Equation of a line calculator: graph-ready line equations
- Fraction calculator: work with fraction answers
Related to This Article
More math articles
- 5th Grade MAP Math Worksheets: FREE & Printable
- 10 Must-Know Expert Tips for the HiSET Math Test
- How Traditional News Media Shape Politics
- Government Responses to Social Movements: Civil Rights Laws
- Full-Length SSAT Upper Level Math Practice Test
- Nevada SBAC Grade 8 Math Free Worksheets: 72 Free PDF Worksheets with Step-by-Step Answer Keys
- Donating money
- Near Synonyms and Commonly Confused Words
- How to Dividing Fractions by Whole Numbers in Recipes!
- Qualitative, Content, and Existing-Record Methods



What people say about "Cramer's Rule Calculator: 2x2 and 3x3 (and 4x4) with Steps"?
No one replied yet.