LINEAR ALGEBRA TOOL

Cramer's Rule Calculator

Solve a square system of linear equations using determinants. Calculate the coefficient determinant, each replaced-column determinant, and the solution values.

Enter your augmented matrix

Enter one equation per line. For n unknowns, each line must contain n coefficients followed by the right-hand-side constant. Supports 2–6 equations. Fractions such as 1/2 are accepted.

Example format: 2 1 8 represents 2x + y = 8. You can also separate the last column with a vertical bar.

Results

Unique solution found.
The determinant is nonzero. The system has a unique solution.
Main determinant D = det(A) -1
Maximum substitution error 0

Solution values

x = Dx / D 2 -2 / -1
y = Dy / D 3 -3 / -1
z = Dz / D -1 1 / -1

Step 1: Coefficient matrix A

21-1
-3-12
-212

Step 2: Main determinant

D = det(A) = -1

Step 3: Replaced-column determinants

Replace one column of A at a time with the constants vector b. Each resulting determinant is the numerator for one unknown.

Dx

Matrix with column 1 replaced by the constants:

81-1
-11-12
-312
Dx = -2

x = -2 / -1 = 2

Dy

Matrix with column 2 replaced by the constants:

28-1
-3-112
-2-32
Dy = -3

y = -3 / -1 = 3

Dz

Matrix with column 3 replaced by the constants:

218
-3-1-11
-21-3
Dz = 1

z = 1 / -1 = -1

Step 4: Check the solution

Substitute the solution into each original equation.

EquationLeft sideRight sideAbsolute error
1 8 8 0
2 -11 -11 0
3 -3 -3 0

How Cramer's rule works

Write a square linear system as Ax = b. A is the coefficient matrix, x contains the unknowns, and b contains the constants.

xᵢ = det(Aᵢ) / det(A), when det(A) ≠ 0

To calculate an unknown, replace the corresponding column of A with b, calculate that matrix's determinant, and divide by det(A).

If det(A) is zero, the system does not have a unique solution. Matrix ranks can then distinguish between no solution and infinitely many solutions.

The calculator uses floating-point arithmetic, so results for nearly singular matrices may be affected by rounding.

Frequently asked questions

How should I enter an equation?

Enter its coefficients in variable order followed by the constant. For example, 2x + 3y = 7 is entered as 2 3 7.

Can I use negative numbers and fractions?

Yes. Values such as -3, 0.25, 1/2 and 2e-3 are accepted.

Why is there no unique solution?

A zero coefficient determinant means Cramer's rule cannot produce a unique solution. The calculator checks matrix ranks to classify the system.

Related calculators

Remove any related link whose target page does not exist on your site.