Cramer's Rule Formula – xᵢ = Dᵢ / D Reference
Complete Cramer's Rule formula reference: variable definitions, step-by-step usage, determinant computation, and three fully worked examples for 2×2 and 3×3 systems.
Formula
For a square n×n system Ax = b with det(A) ≠ 0, each variable xᵢ equals the determinant of the matrix Aᵢ (A with column i replaced by b) divided by the determinant of A.
Variables
| Symbol | Name | Description | Unit |
|---|---|---|---|
| xᵢ | i-th variable | The unknown to solve for (x₁, x₂, ..., xₙ) | — |
| D | Main determinant | det(A), the determinant of the coefficient matrix A | — |
| Dᵢ | i-th sub-determinant | det(Aᵢ), where Aᵢ is A with column i replaced by the constants b | — |
| A | Coefficient matrix | n×n matrix of equation coefficients | — |
| b | Constants vector | Column vector of right-hand side constants | — |
| Aᵢ | Modified matrix | Matrix A with its i-th column replaced by b | — |
How to Use
- Arrange the system as Ax = b and identify A and b.
- Compute D = det(A). If D = 0, the system has no unique solution.
- For each i from 1 to n, form Aᵢ by replacing column i of A with b.
- Compute Dᵢ = det(Aᵢ) for each i.
- Calculate xᵢ = Dᵢ / D for each variable.
Examples
1. 2×2 system: 2x₁ + x₂ = 5, x₁ − x₂ = 1
Verify: 2(2)+1 = 5 ✓, 2−1 = 1 ✓
2. 3×3 system: x₁ + x₂ + x₃ = 6, 2x₁ − x₂ + x₃ = 3, x₁ + 2x₂ − x₃ = 2
D₁ = D₂ = D₃ = 7 by symmetry of this system, giving x₁ = x₂ = x₃ = 7/7 = 1.
Solution: x₁ = 1, x₂ = 1, x₃ = 1. Verify: 1+1+1 = 6 ✓, 2−1+1 = 2 ✓, 1+2−1 = 2 ✓. Use the calculator to verify all Dᵢ step by step.
3. No-solution case: x₁ + x₂ = 3, 2x₁ + 2x₂ = 8
D = 0 and D₁ ≠ 0 → no solution (the lines are parallel).
Related pages
- Use the Calculator — Interactive calculator for this formula
- Read the Notes — Step-by-step explanation with worked examples