System of Equations Calculator
Solve two linear equations in x and y, or three in x, y and z, by Cramer’s rule, with every determinant shown and a plain answer when there is no single solution.
Result
Solution: x = 1, y = 2
Worked exactly from the decimals typed; answers shown to ten significant figures.
- x
- 1
- y
- 2
- D, the determinant of the coefficients
- -5
- Dx
- -5
- Dy
- -10
- Note
- One solution: the determinant is not zero.
https://calcgallery.com/algebra-numbers/system-of-equations-calculator/
Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer
How to use the System of Equations Calculator
- Choose two equations in x and y, or three in x, y and z.
- Write each equation as ax + by + cz = d and enter its coefficients and constant, with minus signs and zeros for missing terms.
- Read the solution, or whether the system has none or infinitely many.
Cramer’s rule
D = det(coefficients)Dx = det(coefficients, x column replaced by the constants)x = Dx ÷ D, y = Dy ÷ D, z = Dz ÷ D (D ≠ 0)
For two equations each determinant is ad − bc. For three, the page expands along the first row, the same cofactor expansion the matrix calculator uses. It works in exact arithmetic on the coefficients as you typed them, decimals included, so 0.1x + 0.2y = 1 and 0.3x + 0.6y = 3 are recognised as the same line, and x + y = 2 with x + 1.0000001y = 2.0000001 gives exactly x = 1, y = 1. Very small or very large determinants are shown in scientific notation, such as 1 × 10^-7, rather than rounded to 0.
When D is zero
A zero determinant means the equations do not pin down one point. Whether they allow none or infinitely many depends on the constants, so the page compares the rank of the coefficients with the rank of the coefficients and constants together: if the constants add a rank, the system is inconsistent and has no solution; if not, it is dependent and has infinitely many. The determinants Dx, Dy and Dz are still shown.
Other ways to solve
Substitution and elimination give the same answer by hand, and graphing two equations shows the solution as the point where their lines cross. For larger systems, or to work with the coefficient matrix itself, use the matrix calculator.
With your numbers
- x = Dx ÷ D = −5 ÷ −5 = 1
- y = Dy ÷ D = −10 ÷ −5 = 2
Quick reference
Worked exactly from the decimals typed; answers shown to ten significant figures.
| Example | Solution |
|---|---|
| 2x + 3y = 8, x − y = −1 | x = 1, y = 2 |
| x + y = 10, x − y = 2 | x = 6, y = 4 |
| x + y = 1, 2x + 2y = 3 | No solution |
| x + y = 1, 2x + 2y = 2 | Infinitely many solutions |
| x + y + z = 6, 2y + 5z = −4, 2x + 5y − z = 27 | x = 5, y = 3, z = −2 |
| A dependent 3 × 3 system | Infinitely many solutions |
Common questions about the System of Equations Calculator
- What is Cramer’s rule?
- A way to solve a square system with determinants. D is the determinant of the coefficients. Replace the x column with the constants to get Dx, and x = Dx ÷ D; do the same for y and z. For 2x + 3y = 8 and x − y = −1, D = −5, Dx = −5 and Dy = −10, so x = 1 and y = 2.
- What if a variable is missing from an equation?
- Enter 0 as its coefficient. 2y + 5z = −4 has no x, so its x coefficient is 0. Likewise a term on the wrong side needs moving first: x = 3 − y becomes x + y = 3.
- What does it mean when there is no solution?
- The equations contradict each other. x + y = 1 and 2x + 2y = 3 describe parallel lines: doubling the first gives 2x + 2y = 2, which can never also equal 3. The determinant is zero, and so is every way of combining the equations to reach an answer.
- And infinitely many solutions?
- At least one equation says nothing new. x + y = 1 and 2x + 2y = 2 are the same line written twice, so every point on it satisfies both. The determinant is again zero; the page tells the two cases apart by elimination, since Cramer’s rule alone cannot.