Cramer's Rule Calculator
Solve 2x2 and 3x3 systems of linear equations using determinants, replacement matrices, and step-by-step Cramer's rule work.
Solve linear systems with determinants
A Cramer's rule calculator solves a system of linear equations by using determinants. It replaces one coefficient column at a time with the constants column and divides each replacement determinant by the main determinant.
A Cramer's Rule calculator solves systems of linear equations by using determinants. It divides each variable determinant by the coefficient determinant. Cramer's Rule works when the coefficient determinant is not zero.
For a 2x2 system, the calculator finds D, Dx, and Dy, then uses x = Dx / D and y = Dy / D. For a 3x3 system, it also finds Dz and solves for z.
Cramer's rule works only when the coefficient determinant is not zero. If D = 0, this calculator checks whether the system appears inconsistent or dependent instead of pretending there is a unique answer.
Solution
System status: --
Main determinant D
--
--
Replacement determinants
--
Replace one coefficient column with constants.
Equation count
--
Square systems only.
Rank check
--
--
Determinant table
| Determinant | Matrix used | Value | Variable result |
|---|---|---|---|
| -- | |||
Substitution check table
Substitute the solution back into each original equation to verify the result.
| Equation | Left side at solution | Right side | Residual | Check |
|---|---|---|---|---|
| -- | ||||
Step-by-step Cramer's rule
--
--
--
--
Note: Cramer's rule gives a unique solution only when D is not zero. If D is zero, use row reduction or a rank check to determine whether the system has no solution or infinitely many solutions.
How to use the Cramer's rule calculator
- Choose the system size: Select a 2x2 system for x and y, or a 3x3 system for x, y, and z.
- Enter coefficients: Type the coefficient of each variable in the matching row, then enter the constant on the right side.
- Set the tolerance: Keep the default for most decimal inputs, or lower it if you need a stricter zero check.
- Solve: The calculator finds the main determinant and replacement determinants.
- Read the determinant table: Use D, Dx, Dy, and Dz to verify each Cramer's rule division.
- Check the status: If D = 0, the calculator explains whether the system appears inconsistent or dependent.
Cramer's rule formula
Cramer's rule solves a square linear system Ax = b by comparing determinants. The main determinant D comes from the coefficient matrix A. Each replacement determinant comes from replacing one column of A with the constants column b.
D = det(A)
x = Dx / D
y = Dy / D
z = Dz / D for 3x3 systems
The rule is compact and easy to check by hand for small systems. For larger systems, row reduction or matrix software is usually more efficient than computing many determinants.
Formula reference: Wolfram MathWorld - Cramer's Rule.
Cramer's rule examples
| System | D | Replacement determinants | Solution |
|---|---|---|---|
| 2x + y = 11; 5x - 3y = 1 | -11 | Dx = -34, Dy = -33 | x = 34/11, y = 3 |
| x + y = 5; 2x - y = 1 | -3 | Dx = -6, Dy = -9 | x = 2, y = 3 |
| x + y = 4; 2x + 2y = 8 | 0 | Dx = 0, Dy = 0 | Infinitely many solutions |
| x + y = 4; 2x + 2y = 9 | 0 | At least one replacement determinant is nonzero | No solution |
Determinant workflow reference: TU Delft Interactive Linear Algebra - Cramer's Rule.
When Cramer's rule is useful
Cramer's rule is best for small square systems where determinant work is manageable and you want a direct formula for each variable.
Good for 2x2 systems
The determinants are short, so the method is quick and easy to verify by hand.
Useful for symbolic insight
The formulas show exactly how the constants affect each variable in a square system.
Less efficient for large systems
A 4x4 or larger system usually needs row reduction, elimination, or numerical linear algebra instead.
What D = 0 means
The main determinant D tells whether the coefficient matrix is invertible. If D is not zero, the system has exactly one solution and Cramer's rule applies directly.
D is not zero
The system has a unique solution. Divide each replacement determinant by D.
D equals zero
The system has no unique Cramer's rule solution. It may have no solution or infinitely many solutions.
This calculator uses a rank check to describe the zero-determinant case. If the coefficient rank is smaller than the augmented rank, the system is inconsistent. If the ranks match but are smaller than the number of variables, the system is dependent.
Determinant workflow checklist
| Step | What to write | Common mistake | Quick check |
|---|---|---|---|
| 1 | Put the coefficients into matrix A in the same order as x, y, z. | Mixing constants into the coefficient matrix. | A should contain only variable coefficients. |
| 2 | Put the right-side constants into column b. | Changing the row order in b but not in A. | Each constant must stay beside its original equation. |
| 3 | Compute D = det(A). | Dividing by D before checking whether it is zero. | If D = 0, stop using direct Cramer's rule. |
| 4 | Replace exactly one column at a time to get Dx, Dy, and Dz. | Replacing a row instead of a column. | Dx replaces the x coefficient column only. |
| 5 | Divide each replacement determinant by D. | Swapping Dx and Dy in the final answer. | Substitute the result back into the original equations. |
Diagnose no-solution and infinite-solution cases
When D = 0, the determinant formula cannot produce one unique answer. The next useful question is whether the equations contradict each other or describe the same line, plane, or higher-dimensional solution set.
Unique solution
D is not zero
The coefficient matrix is invertible, so every variable has one exact value from Cramer's rule.
No solution
Ranks do not match
The augmented matrix has more rank than the coefficient matrix, which means at least one equation conflicts with the others.
Infinitely many
Ranks match but are low
The equations are dependent, so the solution needs a parameter instead of a single ordered pair or ordered triple.
This is why the calculator reports both determinant values and a rank check. The determinants show whether Cramer's rule applies directly; the ranks explain what happens when it does not.
Linear system classification reference: University of South Carolina - Applied Linear Algebra, Gauss-Jordan Elimination.
Cramer's rule vs elimination vs inverse matrix
Cramer's rule is one of several ways to solve a square linear system. Choosing the best method depends on the system size, whether exact determinant work is required, and whether you need a manual explanation or efficient computation.
Cramer's rule
Best when a problem specifically asks for determinants or when a 2x2 system is small enough to solve by inspection.
Elimination
Often fastest by hand for 3x3 systems because it reuses row operations instead of computing several determinants.
Inverse matrix
Useful when you solve many systems with the same coefficient matrix A but different constants b.
Frequently Asked Questions
What is a Cramer's rule calculator for linear equations?
A Cramer's rule calculator is a linear algebra tool that solves a square system of equations made from linear equations. It builds the coefficient matrix, computes the denominator determinant D, replaces one matrix column at a time with the constants column, and divides each numerator determinant by D to find the unknown variables.
When can I use Cramer's rule on a matrix system?
You can use Cramer's rule when the number of equations equals the number of variables and the coefficient determinant is not zero. That condition means the coefficient matrix is invertible and the algebra system has exactly one solution. If D = 0, the rule cannot produce a unique answer for each unknown, so a rank check or row reduction is needed.
What are Dx, Dy, and Dz numerator determinants?
Dx is the determinant of the matrix formed by replacing the x coefficient column with the constants column. Dy replaces the y matrix column, and Dz replaces the z column in a 3x3 system of equations. These are numerator determinants, while D is the denominator determinant. The solution is found with x = Dx / D, y = Dy / D, and z = Dz / D, which may appear as a fraction or decimal.
What happens if the coefficient determinant is zero?
If D = 0, the system does not have a unique Cramer's rule solution because division by the denominator determinant is not allowed. The equations may be inconsistent, which means no solution exists, or dependent, which means infinitely many solutions exist. The calculator uses a rank comparison on the coefficient matrix and augmented matrix to describe which case is more likely.
Is Cramer's rule better than elimination in algebra?
Cramer's rule is often cleaner for small 2x2 systems and useful when a worksheet asks for determinant, cofactor, or matrix-column work. Elimination and row reduction are usually faster for larger systems because they avoid computing a separate determinant for every variable. For checking a numeric answer, both methods should agree when the linear equation system has a unique solution.
Other useful calculators
Corner Point Calculator
Find feasible-region vertices for linear programming.
Column Space Calculator
Find pivot columns, rank, span, and a basis.
Average Rate of Change Calculator
Find slope over an interval between two points.
Standard Form to Slope Intercept Form Calculator
Convert Ax + By = C into y = mx + b.
Factoring Trinomials Calculator
Factor quadratic trinomials with steps and roots.
Rationalize Denominator Calculator
Remove radicals from a denominator with steps.
Disclaimer: This Cramer's rule calculator is for general educational and informational use only. It performs determinant and rank calculations based on the numbers entered by the user and the tolerance setting selected on the page. It may not match every textbook notation, rounding convention, classroom instruction, assessment rule, or required exact-form answer. Always verify the determinant setup, signs, coefficient order, and final solution format before using the result for homework, exams, engineering work, financial modeling, scientific analysis, or any other decision where accuracy matters.
Last updated: May 23, 2026