Cramer's Rule Calculator
Solve square systems from 2x2 to 5x5 with Cramer's rule, main and replacement determinants, step output, and a substitution check.
Cramer's rule solves square systems through the main determinant and replacement determinants. The replacement column is highlighted in each auxiliary matrix. If the main determinant is zero, use Gaussian elimination to classify the system.
What Cramer's rule does
Cramer's rule solves a square linear system by comparing the main determinant of the coefficient matrix with replacement determinants built for each variable.
A is the coefficient matrix, x is the unknown vector, and b is the constants column.
Delta is the main determinant of the coefficient matrix.
Delta_i is the determinant after replacing column i with the constants column.
x_i is found from Delta_i divided by the nonzero Delta.
- Calculate the main determinant
- Replace one coefficient column at a time with the constants column
- Calculate each replacement determinant
- Divide replacement determinants by the main determinant
When Cramer's rule applies
| Condition | Meaning | Action |
|---|---|---|
| main determinant is nonzero | the square system has a unique solution | apply Cramer's rule |
| main determinant is zero | Cramer's rule cannot classify the system | use Gaussian elimination and ranks |
| system is not square | Cramer's rule is not defined | use another linear-system method |
Replacement matrices
For each unknown, the original coefficient matrix is copied and one column is replaced by the constants column. The calculator highlights that replacement column in the determinant blocks.
A_1 and A_2 are replacement matrices for a 2x2 system.
Benefits and limits
- Works only for square systems
- Requires a nonzero main determinant for a unique solution
- Shows determinant expansion for 2x2 and 3x3 systems
- Uses numerical determinant calculation for 4x4 and 5x5 systems
- Accepts fractions as, but displays rounded numeric results
Frequently Asked Questions
Sources and References
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Solve square systems of linear equations from 2x2 to 5x5 with row operations, partial pivoting, back substitution, ranks, and solution classification.
Solve a 3x3 system of linear equations by coefficients with Cramer's rule, Gaussian elimination steps, classification, and answer check.
Solve a 2x2 system of linear equations with Cramer's rule, determinants, solution classification, fractions, and substitution check.