Solve any square system of linear equations Ax = b using Cramer's Rule — with full determinant calculations for D, D1, D2, … shown step by step.
System Setup
Enter coefficients of the system Ax = b. The last column (highlighted in yellow) is the right-hand side b.
The System Ax = b
Solution
Step 1 — Compute D = det(A)
Step 3 — Apply Cramer's Formula
Cramer's Rule — Theory
Cramer's Rule: For a system $Ax = b$ where $A$ is an $n \times n$ matrix with $\det(A) \neq 0$, the unique solution is:
$$x_i = \dfrac{D_i}{D}, \quad i = 1, 2, \ldots, n$$
where $D = \det(A)$ and $D_i = \det(A_i)$, with $A_i$ being the matrix $A$ with its $i$-th column replaced by the vector $b$.
When does Cramer's Rule apply?
• If $D \neq 0$: unique solution exists — Cramer's Rule gives it directly.
• If $D = 0$ and all $D_i = 0$: infinitely many solutions (dependent system).
• If $D = 0$ and any $D_i \neq 0$: no solution (inconsistent system).
Computational note: Cramer's Rule is elegant and exact, but computationally expensive for large $n$ (requires $n+1$ determinant calculations, each costing $O(n!)$ naively). It is most practical for $n \leq 4$ and ideal for exam problems.