Math
Cramer's Rule Calculator
Enter the coefficient matrix and the constants to solve a square linear system with Cramer's rule.
The calculator computes D = det(A), builds each replaced-column matrix, shows its determinant, divides to get every unknown exactly, and checks the answer by substitution. When D = 0 it tells you whether the system has no solution or infinitely many.
One equation per row, one column per unknown. Must be square (as many equations as unknowns).
The right-hand side of each equation, one per line.
Try an example
Result
Solution
—
- D = det(A)
- —
- Status
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What Cramer's rule says
For a square system Ax = b with det(A) ≠ 0, each unknown equals a ratio of One number computed from a square matrix that tells you whether it can be inverted.. Replace the column of A that belongs to that unknown with the constants b, take the determinant, and divide by det(A).
How to use it
- Write each equation as The number multiplying a variable, like the 3 in 3x. in a row of A and its constant in b. Move every term with a variable to the left side first.
- Read D. If it is 0 the rule does not apply; the panel tells you whether the system is inconsistent or dependent.
- Read each D_x, D_y, … with its replaced-column A rectangular grid of numbers arranged in rows and columns., then the quotients that give the unknowns.
- Confirm with the substitution check A·x = b.
How to read the answer
| D | Some D_i ≠ 0? | Meaning |
|---|---|---|
| ≠ 0 | any | Exactly one solution, x_i = D_i / D |
| = 0 | yes | No solution (inconsistent) |
| = 0 | all zero | Usually infinitely many solutions (check with row reduction) |
Cramer's rule vs row reduction
Cramer's rule is elegant and gives each unknown independently, which is handy when you only need one of them. For systems larger than 3 x 3 it needs n + 1 determinants and becomes slower than Gaussian elimination, so this calculator supports up to 8 x 8 but most classes use it for 2 x 2 and 3 x 3.
Common mistakes
- Replacing the wrong column. D_y replaces the second column (the y coefficients), not the second row.
- Forgetting to move variables to the left before reading off coefficients.
- Dividing by D when D = 0. The rule fails there; use RREF to find the solution set.
- Sign errors in 3 x 3 determinants; the calculator shows each determinant so you can compare.
How to type a matrix into this calculator
- Put each row on its own line. Separate the entries in a row with spaces or commas: 2 1 1 or 2, 1, 1.
- Fractions such as 1/3 and decimals such as 0.25 are accepted and kept exact, so 1/3 stays 1/3 instead of becoming 0.3333.
- Every row must have the same number of entries. A row with a missing entry produces a clear error instead of a wrong answer.
- The largest size supported is 8 x 8. Brackets and semicolons are ignored, so [1 2; 3 4] works too.
Worked examples
3 x 3 system
2x + y - z = 8, -3x - y + 2z = -11, -2x + y + 2z = -3
Solution
(2, 3, -1)
2 x 2 system
3x + 2y = 7, x - y = -1
Solution
(1, 2)
Fraction answers
2x + 3y = 1, 4x - y = 5 → x = 8/7, y = -3/7
Solution
(8/7, -3/7)
D = 0, no solution
x + y = 1, x + y = 2
Solution
No solution (D = 0)
D = 0, infinitely many
x + y = 1, 2x + 2y = 2
Solution
Infinitely many solutions (D = 0)
Not square
Two equations, three unknowns
Solution
Error
Frequently asked questions
When can I use Cramer's rule?+
When the system has as many equations as unknowns and the determinant of the coefficient matrix is not zero. Otherwise the formulas divide by zero and you need row reduction.
What does D = 0 mean in Cramer's rule?+
The coefficient matrix is singular. If any D_i is nonzero the system has no solution; if every D_i is also zero it usually has infinitely many. The calculator checks which with row reduction.
How do I find Dx for a 3 x 3 system?+
Copy the coefficient matrix, replace the first column (the x coefficients) with the constants column, and take the determinant of that new matrix.
Is Cramer's rule faster than elimination?+
For 2 x 2 and 3 x 3 by hand it is comparable and gives each unknown separately. For larger systems elimination is much faster, since Cramer's rule needs n + 1 full determinants.
Can Cramer's rule give fractions?+
Yes. Each unknown is a ratio of two integers when the coefficients are integers, so fractional answers are common. The calculator keeps them exact.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Matrix Determinant Calculator
Find the determinant of any square matrix up to 8 x 8 with exact fractions. Shows cofactor expansion along any row or column for 3 x 3 (with a rule-of-Sarrus check), row-reduction steps for larger matrices, and tells you whether the matrix is invertible.
RREF Calculator
Reduce any matrix up to 8 x 8 to reduced row echelon form with every row operation shown, or enter A and b to solve Ax = b with unique, infinite (parametric), and no-solution reporting. Exact fractions throughout.
Matrix Inverse Calculator
Invert any square matrix up to 8 x 8 with exact fractions. Gauss-Jordan elimination on [A | I] with every row operation shown, the adjugate route for small matrices, a singular-matrix explanation, and an A·A⁻¹ = I check.
System of Equations Calculator
Solve a 2x2 linear system with elimination/determinant steps for x and y.
Matrix Rank Calculator
Find the rank of any matrix up to 8 x 8 by row reduction with every step shown. Reports pivot columns, nullity from the rank-nullity theorem, full-rank status, and the determinant for square matrices.
Eigenvalues and Eigenvectors Calculator
Find the eigenvalues and eigenvectors of a square matrix up to 8 x 8. Shows the characteristic polynomial, exact eigenvalues (including fractions, square roots, and complex pairs), eigenvector bases, multiplicities, and whether the matrix is diagonalizable.
Last updated: September 4, 2026