How this calculator works
Cramer's rule solves a square linear system by determinants. The main determinant W uses the coefficient matrix. Each replacement determinant Wx, Wy or Wz swaps one coefficient column for the right-hand side. When W is non-zero, each variable equals its replacement determinant divided by W. When W is zero, the system either has no solution or infinitely many, and this calculator classifies it with row reduction instead.
Formula
For A x = b, W = det(A), Wi = det(A with column i replaced by b), and xi = Wi / W when W is non-zero.
Worked example
The system 2x + 3y = 13 and x - y = -1 has W = -5, Wx = -10 and Wy = -15. Therefore x = 2 and y = 3. The system x + y + z = 6, x - y + z = 2 and 2x + y - z = 1 has W = 6, Wx = 6, Wy = 12 and Wz = 18, giving 1, 2, 3.
Advertisement
Frequently asked questions
When does Cramer's rule fail?
It needs a non-zero main determinant. If the coefficient matrix is singular, the formula would divide by zero, so the calculator switches to a consistency check.
Is it efficient for large systems?
No. The cost grows roughly with the factorial of the size because each variable needs another determinant. Elimination methods are much faster beyond three or four unknowns.
What if the system has infinitely many solutions?
The determinants cannot assign a single value to each variable. The calculator reports that the system is dependent instead of inventing a solution.