Advertisement

Cramer's rule calculator

Choose two or three equations, then enter each row as the coefficients followed by the right side. Cramer's rule divides each replacement determinant by the main determinant.

Calculator

Solution type
Unique solution
Main determinant W
-5.00000000
X determinant Wx
-10.00000000
Y determinant Wy
-15.00000000
x
2.00000000
y
3.00000000

Advertisement

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.

Sources

Advertisement