How Cramer's Rule works
Cramer's Rule solves a system of linear equations directly from determinants, without the row-by-row elimination steps of Gaussian elimination. For two equations in two unknowns, a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the rule expresses both x and y as a ratio of two 2×2 determinants.
Formula and method
First form the coefficient determinant from the x- and y-coefficients: D = a₁b₂ − a₂b₁. Then build two more determinants by swapping one column of coefficients for the constants column (c₁, c₂):
- Dx = c₁b₂ − c₂b₁ (the b-column stays, the a-column is replaced by the constants)
- Dy = a₁c₂ − a₂c₁ (the a-column stays, the b-column is replaced by the constants)
As long as D ≠ 0, the unique solution is x = Dx / D and y = Dy / D. This calculator computes all three determinants and both unknowns in one step.
When there is no unique solution
If D = 0, the coefficient matrix is singular and Cramer's Rule cannot divide by it. Two cases follow: if Dx and Dy are also both zero, the two equations describe the same line, so there are infinitely many (x, y) pairs that satisfy both. If D = 0 but Dx or Dy is nonzero, the two lines are parallel and never cross, so no solution exists.
Checking your result
Plug the computed x and y back into both original equations — each should reduce to the stated constant (c₁ and c₂). You can also sanity-check the determinant itself: if a₁/a₂ equals b₁/b₂, the rows are proportional and D will come out to zero, which is a quick way to predict a degenerate case before you even compute Dx and Dy.
Applications
Cramer's Rule shows up anywhere a small linear system needs an explicit, formulaic solution rather than a numerical routine: circuit analysis with Kirchhoff's voltage and current laws, finding the equilibrium price and quantity where two supply-and-demand lines intersect, and 2D/3D graphics transformations. Because it scales to n×n systems using n×n determinants, the same idea extends to three or more equations, though Gaussian elimination becomes faster for larger systems.