100% Free No Sign-Up Unlimited Use No Limits Secure & Private
PDF Tools Calculators Categories Guides Contact No Sign-Up Needed to Use This Site
Matrix A
Vector b
← Ax = b

Solve a 2×2 or 3×3 system of linear equations using Cramer's Rule, showing det(A), each substituted matrix, and every variable's solution step by step.

How It Works

How Cramer's Rule Calculator Works

Cramer's Rule solves a system Ax = b by comparing determinants. First, the calculator finds det(A), the determinant of the coefficient matrix — this only works when det(A) is non-zero, since a zero determinant means the system doesn't have a single unique solution.

For each variable, it builds a new matrix Aᵢ by replacing column i of A with the constants vector b, then computes det(Aᵢ). The value of that variable is simply xᵢ = det(Aᵢ) ÷ det(A) — repeating this once per variable, substituting a different column each time, solves the entire system.

Once every variable is found, the calculator substitutes them back into each original equation to verify that both sides match, confirming the solution is correct. This determinant-based approach is especially clear for small systems, though Gauss-Jordan elimination scales better to larger ones.

Worked Example

See It In Action

For the system 2x + y + z = 5, x + 3y + 2z = 2, x = 3 (matrix A = [[2,1,1],[1,3,2],[1,0,0]], b = [5,2,3]): det(A) = −1. Replacing column 1 with b gives det(A₁) = −3, so x = −3 ÷ −1 = 3. Replacing column 2 gives det(A₂) = −1, so y = −1 ÷ −1 = 1. Replacing column 3 gives det(A₃) = 2, so z = 2 ÷ −1 = −2. Checking equation 1: 2(3) + 1 + (−2) = 5 ✓.
Real-World Use Cases

Who Uses Cramer's Rule Calculator and Why

  • Solving a 2×2 or 3×3 system of linear equations using determinants instead of row-reduction.
  • Finding just one specific variable's value quickly, without solving the entire system.
  • Learning how each variable in Ax = b corresponds to replacing one column of A with the constants vector b.
  • Cross-checking a solution found by Gauss-Jordan elimination or the inverse matrix method using an independent determinant-based approach.
Common Mistakes

Mistakes to Avoid

  • Applying Cramer's Rule to a system larger than 3×3 — computing determinants grows dramatically more expensive as the matrix size increases, making this approach impractical beyond small systems.
  • Attempting the method when det(A) is zero — Cramer's Rule requires a non-zero determinant, since a zero determinant means the system has no solution or infinitely many, not one unique answer to divide by.
  • Replacing the wrong column when building Aᵢ — each variable xᵢ corresponds to replacing column i specifically, not a row or an arbitrary column.
Pro Tips

Tips for Best Results

  • Switch to Gauss-Jordan elimination once a system grows beyond 3×3, since determinant computation doesn't scale well.
  • Use the calculator's final substitution check — plugging the computed x, y, z values back into each original equation — to confirm the solution before relying on it.
Troubleshooting

Fixing Common Problems

det(A) came out to zero. — Cramer's Rule can't be applied — the system either has no solution or infinitely many; use Gauss-Jordan elimination instead to determine which.

My solution doesn't satisfy the original equations. — Double-check which column was replaced with b for each variable — replacing the wrong column produces an incorrect det(Aᵢ) and therefore an incorrect variable value.

Glossary

Terms Explained

Coefficient matrix: The matrix A of coefficients in a system written as Ax = b.

det(Aᵢ): The determinant of the matrix formed by replacing column i of A with the constants vector b, used to solve for variable xᵢ.

FAQ

Frequently Asked Questions

What happens if det(A) is zero?
Cramer's Rule cannot be applied — a zero determinant means the system either has no solution or infinitely many, and there is no single unique answer to divide by. In that case, use Gauss-Jordan elimination instead to determine which case applies.
Why replace a column with b instead of a row?
Cramer's Rule is defined specifically in terms of columns because each variable in Ax = b corresponds to one column of A. Replacing column i isolates the effect of variable xᵢ, which is exactly what makes the det(Aᵢ) ÷ det(A) ratio work out to that variable's value.
Is Cramer's Rule practical for large systems?
Not really — computing a determinant grows dramatically more expensive as the matrix gets larger, so Cramer's Rule is mainly used for 2×2 and 3×3 systems in practice. Larger systems are typically solved with Gauss-Jordan elimination or matrix inversion instead.
How can I check that the solution is correct?
Substitute the computed values of x, y, and z back into each original equation. If both sides of every equation match, the solution satisfies the entire system and is correct — this calculator performs that verification automatically.