System of Equations Calculator
Enter the coefficients of two equations to find x and y. The calculator also tells you when there is no solution or infinitely many.
How it is solved (Cramer's rule)
For the system a₁ x + b₁ y = c₁ and a₂ x + b₂ y = c₂, let the determinant be Δ = a₁ b₂ − a₂ b₁.
- If Δ ≠ 0: there is exactly one solution, x = (c₁ b₂ − c₂ b₁) ÷ Δ and y = (a₁ c₂ − a₂ c₁) ÷ Δ.
- If Δ = 0: whether there is no solution or infinitely many depends on how the constants fit (see the table below).
Decimal coefficients are converted to fractions and calculated exactly, so a rounding error such as 0.1 + 0.2 cannot make the test for Δ = 0 go wrong.
The three kinds of result
| Case | Meaning | Test |
|---|---|---|
| One solution | The two lines cross at one point | Δ ≠ 0 |
| No solution | The two lines are parallel and never meet (or there is a contradictory equation other than 0 = 0) | Δ = 0 and the constants do not match |
| Infinitely many solutions | The two equations describe the same line. Every point on that line is a solution. If all coefficients and constants are 0, every x and y is a solution | Δ = 0 and the constants also match |
When Δ = 0, the tool compares the rank of the coefficient matrix (0 or 1) with the rank of the matrix that includes the constants to decide between no solution and infinitely many. Δ = 0 alone is not enough to decide.
Examples
| Equation 1 | Equation 2 | Result |
|---|---|---|
| x + y = 3 | x − y = 1 | x = 2, y = 1 |
| 2x + 3y = 8 | x − y = −1 | x = 1, y = 2 |
| x + y = 1 | x + y = 2 | No solution (parallel lines) |
| x + y = 1 | 2x + 2y = 2 | Infinitely many solutions (every point on the line x + y = 1) |
| 0x + 0y = 0 | 0x + 0y = 0 | Every x and y is a solution |
Things to know
- Systems with three or more unknowns, graphs, step-by-step working (elimination or substitution) and inequalities are not covered.
- When a solution is a fraction, the reduced fraction and the decimal are shown side by side.
- For an equation with one unknown and a squared term, use the Quadratic Formula Calculator. For arithmetic with fractions, use the Fraction Calculator.
Frequently asked questions
When is there no solution, or infinitely many?
When Δ = a₁ b₂ − a₂ b₁ is 0. If the two lines are parallel and do not overlap, there is no solution; if they overlap, there are infinitely many.
Why is the answer a fraction?
Because it does not divide evenly. The calculator works with exact fractions and shows the reduced fraction and the decimal.
Can I enter an equation with a coefficient of 0?
Yes. Type 0. An empty field is treated as not yet entered.