System of Equations Solver
Enter a 2×2 or 3×3 linear system and solve it with Cramer’s rule. Get the unique solution — or learn the system has no solution or infinitely many — with the determinant and a graph.
- Determinant
- -2
- Type
- Unique solution
Calculator
Cramer’s rule
D = -2
x = Dx / D = -6 / -2 = 3
y = Dy / D = -4 / -2 = 2
Graph
About this calculator
This calculator solves a 2x2 or 3x3 system of linear equations and tells you whether it has one unique solution, no solution, or infinitely many. Use it to check homework, verify hand-worked systems, or explore how changing a coefficient shifts the intersection of lines or planes.
How to read your results
The result card shows either the exact solution (x, y, and optionally z) or the system's classification — unique, none, or infinite. Below the card, the step-by-step breakdown displays the coefficient-matrix determinant and how each variable is recovered via Cramer's rule. For 2x2 systems a coordinate-plane graph plots both lines so you can see their intersection at a glance.
How it's calculated
The solver extracts the n x n coefficient matrix A and the constant vector b from the input rows. It computes det(A) by cofactor expansion (Cramer's rule numerators are found by replacing each column of A with b). The system's classification is determined by comparing the rank of A with the rank of the augmented matrix [A|b] via Gaussian elimination with partial pivoting: rank(A) = rank([A|b]) = n means a unique solution, rank(A) = rank([A|b]) < n means infinite solutions, and rank(A) < rank([A|b]) means no solution. Sources: Wolfram MathWorld — Linear System of Equations; Khan Academy — Solving systems by elimination.
Worked example
Enter the 2x2 system: equation 1 is x + y = 5 and equation 2 is x - y = 1 (coefficients 1, 1, 5 and 1, -1, 1).
The determinant of the coefficient matrix is -2. Cramer's rule gives x = -6 / -2 = 3 and y = -4 / -2 = 2, so the unique solution is x = 3, y = 2. The graph shows the two lines crossing at (3, 2).
Frequently asked questions
What does it mean when the determinant is zero?
A zero determinant means the equations are not independent. The calculator then checks the augmented matrix: if its rank matches the coefficient matrix the lines (or planes) coincide and there are infinitely many solutions; if the ranks differ the system is inconsistent and has no solution.
What is Cramer's rule and when does it apply?
Cramer's rule expresses each variable as a ratio of determinants — the numerator replaces the variable's column in the coefficient matrix with the constant terms, and the denominator is the coefficient-matrix determinant. It applies only when the determinant is non-zero, i.e. the system has exactly one solution.
Can I solve a system with decimal or fractional coefficients?
Yes. Every coefficient cell accepts any finite decimal number. The solver works in floating-point arithmetic with a small tolerance for near-zero pivots, so results are accurate for typical homework problems and well-conditioned engineering systems.
Sources
- mathworld.wolfram.com/LinearSystemofEquations.html
- www.khanacademy.org/math/algebra/x2f8bb11595b61c86:systems-of-equations/x2f8bb11595b61c86:solving-systems-elimination/a/elimination-method-review
Reviewed by the YouCalc Team · Last reviewed
Spot a translation issue, a calculation issue, or have a suggestion? Let us know.