-5
-5
-10
1
2
1
0
0
1
0
0
-5
-5
-10
1
2
1
0
0
1
0
0
Cramer's Rule Calculator solves a system of two linear equations with two unknowns using determinants. Named after Swiss mathematician Gabriel Cramer (1704–1752), this method provides an explicit formula for each unknown as a ratio of determinants. For the system $$a_1x + b_1y = c_1$$ and $$a_2x + b_2y = c_2$$, the solutions are $$x = D_x/D$$ and $$y = D_y/D$$, where $$D$$, $$D_x$$, and $$D_y$$ are specific determinants formed from the system's coefficients.
Cramer's Rule is one of the oldest and most elegant methods for solving linear systems. The main determinant $$D = a_1b_2 - a_2b_1$$ is the determinant of the coefficient matrix. To find $$D_x$$, replace the x-column with the constants: $$D_x = c_1b_2 - c_2b_1$$. To find $$D_y$$, replace the y-column: $$D_y = a_1c_2 - a_2c_1$$. When $$D \neq 0$$, the system has exactly one solution.
The method beautifully connects the solvability of linear systems to determinant theory. When $$D = 0$$, the coefficient matrix is singular, and the system either has no solution (inconsistent — the lines are parallel) or infinitely many solutions (dependent — the lines coincide). Cramer's Rule provides a direct algebraic criterion: if $$D = 0$$ but $$D_x \neq 0$$ or $$D_y \neq 0$$, the system is inconsistent; if all three determinants are zero, the system is dependent.
While Cramer's Rule is computationally impractical for large systems (it requires $$n!$$ multiplications compared to $$n^3$$ for Gaussian elimination), it is perfectly efficient for 2×2 and 3×3 systems. More importantly, it provides theoretical insights. The formula shows that each unknown depends continuously on the coefficients, and it makes explicit how perturbations in the constants affect the solution — essential for sensitivity analysis.
In applications, 2×2 linear systems arise in equilibrium problems (forces in balance), circuit analysis (Kirchhoff's laws), economics (supply-demand equilibrium), and geometry (finding intersection points of lines). Cramer's Rule gives the intersection point directly: if two lines $$a_1x + b_1y = c_1$$ and $$a_2x + b_2y = c_2$$ are not parallel ($$D \neq 0$$), they intersect at the unique point $$(D_x/D, D_y/D)$$.
This calculator takes the six coefficients of a 2×2 system and computes all three determinants, the solution (when it exists), and classifies the system as having a unique solution, infinitely many solutions, or no solution. The determinant values are displayed to help users understand why the system has its particular solution type.
Given the system:
$$a_1x + b_1y = c_1$$
$$a_2x + b_2y = c_2$$
Compute three determinants:
$$D = \begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix} = a_1b_2 - a_2b_1$$
$$D_x = \begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix} = c_1b_2 - c_2b_1$$
$$D_y = \begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix} = a_1c_2 - a_2c_1$$
If $$D \neq 0$$:
$$x = \frac{D_x}{D}, \quad y = \frac{D_y}{D}$$
When $$D \neq 0$$, the system has a unique solution — the two lines intersect at exactly one point $$(x, y)$$. When $$D = 0$$ and $$D_x = D_y = 0$$, the system is dependent — the equations represent the same line, giving infinitely many solutions. When $$D = 0$$ but $$D_x \neq 0$$ or $$D_y \neq 0$$, the system is inconsistent — the lines are parallel with no intersection. The magnitude of $$D$$ also indicates conditioning: a very small $$D$$ means the lines are nearly parallel and the solution is sensitive to small changes.
Inputs
Results
D = 2(−1) − 1(3) = −5. Dₓ = 8(−1) − (−1)(3) = −5. Dᵧ = 2(−1) − 1(8) = −10. So x = −5/−5 = 1, y = −10/−5 = 2. Verify: 2(1)+3(2)=8 ✓, 1(1)−1(2)=−1 ✓
Inputs
Results
D = 1(4) − 2(2) = 0. The coefficient rows are proportional ([1,2] and [2,4]), but the constants are not (5 ≠ 7/2). The lines x+2y=5 and 2x+4y=7 are parallel but not identical.
Cramer's Rule fails when the main determinant $$D = 0$$, meaning the coefficient matrix is singular. In this case, the system either has no solution or infinitely many solutions. The rule cannot distinguish between these cases on its own — you need to check whether $$D_x$$ and $$D_y$$ are also zero. If all are zero, infinitely many solutions; if not, no solution.
No. For an $$n \times n$$ system, Cramer's Rule requires computing $$n+1$$ determinants, each costing $$O(n!)$$ operations with cofactor expansion. Gaussian elimination solves the same system in $$O(n^3)$$ operations. For $$n = 2$$ or $$n = 3$$, the difference is negligible, but for $$n > 4$$, Cramer's Rule becomes impractically slow. Its value is primarily theoretical and pedagogical.
A 2×2 linear system represents two lines in the plane. Cramer's Rule finds their intersection point. $$D = 0$$ means the lines are parallel (same slope). $$D \neq 0$$ means the lines intersect at exactly one point. The magnitude of $$D$$ relates to the angle between the lines — larger $$|D|$$ means a more perpendicular intersection, while small $$|D|$$ means nearly parallel lines.
Yes, Cramer's Rule extends to any $$n \times n$$ system. For 3×3, you compute four 3×3 determinants (one main and one for each variable). Each 3×3 determinant requires cofactor expansion into 2×2 determinants. The formulas become more complex but remain explicit, making Cramer's Rule practical for hand calculation of 3×3 systems.
A small $$|D|$$ relative to the coefficient magnitudes indicates an ill-conditioned system. Small perturbations in the coefficients can cause large changes in the solution. Geometrically, nearly parallel lines (small $$|D|$$) have an intersection point that moves dramatically with slight rotations of either line. The condition number formalizes this sensitivity measure.
Cramer's Rule applies only to square systems ($$n$$ equations, $$n$$ unknowns). For overdetermined systems (more equations than unknowns), the least-squares solution minimizes the error: $$x = (A^TA)^{-1}A^Tb$$. For underdetermined systems (fewer equations), there are infinitely many solutions and additional constraints (like minimum norm) are needed to select one.
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
Matrix Addition Calculator
Linear Algebra Calculators
Matrix Multiplication Calculator
Linear Algebra Calculators
Matrix Determinant Calculator
Linear Algebra Calculators
Matrix Inverse Calculator
Linear Algebra Calculators
Matrix Transpose Calculator
Linear Algebra Calculators
Matrix Rank Calculator
Linear Algebra Calculators