System of Equations Calculator

Enter the coefficients of two linear equations in the form ax + by = c. The solver returns exact answers as fractions, shows every step, and tells you when there is no solution or infinitely many.

System of Equations Calculator

Solve two linear equations in two unknowns exactly, with steps, and detect no or infinite solutions.

Equation 1: a₁x + b₁y = c₁
Equation 2: a₂x + b₂y = c₂

Results

Solution

x = 2, y = 3

x
2
y
3
Determinant D
-5

Step-by-step (Cramer's rule)

  1. Equation 1: 2x + 3y = 13
  2. Equation 2: x − y = -1
  3. D = a₁b₂ − a₂b₁ = (2)(-1) − (1)(3) = -5 (non-zero, so there is exactly one solution)
  4. Dₓ = c₁b₂ − c₂b₁ = (13)(-1) − (-1)(3) = -10
  5. Dᵧ = a₁c₂ − a₂c₁ = (2)(-1) − (1)(13) = -15
  6. x = Dₓ ÷ D = -10 ÷ -5 = 2
  7. y = Dᵧ ÷ D = -15 ÷ -5 = 3
  8. Check: 2(2) + 3(3) = 13 ✓ and 1(2) + -1(3) = -1 ✓

How to use the system of equations calculator

  1. Rearrange each equation to the form ax + by = c. For example, y = 2x + 1 becomes −2x + y = 1.
  2. Enter a, b and c for each equation. Decimals and negative numbers are allowed; use 0 for a missing variable.
  3. Read the solution and the step-by-step working.

How the calculation works

The calculator uses Cramer’s rule. The determinant D = a₁b₂ − a₂b₁ tells you how the two lines relate. If D ≠ 0 the lines cross at exactly one point, given by x = Dₓ/D and y = Dᵧ/D.

If D = 0 the lines are parallel. If Dₓ and Dᵧ are also zero, the equations describe the same line (infinitely many solutions); otherwise the lines never meet (no solution).

All arithmetic is exact: decimal inputs such as 0.1 are converted to fractions (1/10) before solving, so results are never distorted by floating-point rounding.

Formula

Determinant
D = a₁b₂ − a₂b₁
Cramer's rule
x = (c₁b₂ − c₂b₁) ÷ D    y = (a₁c₂ − a₂c₁) ÷ D

Worked examples

2x + 3y = 13 and x − y = −1

D = 2(−1) − 1(3) = −5. Dₓ = 13(−1) − (−1)(3) = −10. Dᵧ = 2(−1) − 1(13) = −15.

x = −10 ÷ −5 = 2, y = −15 ÷ −5 = 3. Check: 2(2) + 3(3) = 13 ✓.

No solution

x + y = 2 and 2x + 2y = 5: D = 2 − 2 = 0 and Dₓ = 10 − 4 = 6 ≠ 0, so the lines are parallel and there is no solution.

Infinitely many solutions

x + 2y = 3 and 2x + 4y = 6: the second equation is twice the first, so every point on the line x + 2y = 3 is a solution.

Assumptions and limitations

  • Solves systems of two linear equations in two unknowns only.
  • Very long decimal inputs produce large fractions; decimal approximations are shown alongside.

Frequently asked questions

What does it mean when the determinant is zero?

The two lines have the same slope. The system has either no solution (parallel lines) or infinitely many (the same line).

Is Cramer’s rule the same as elimination or substitution?

All three methods give the same answer. Cramer’s rule is a compact formula that is easy to check and to detect special cases with.

Can I enter fractions?

Enter decimals (for example 0.5 for ½). Results are always given as exact fractions.

Formulas last reviewed . Read our calculation methodology or report a problem.

All math calculators