StatGardenREF. DESK
Calculators/Maths/System of two linear equations
Maths

System of two linear equations calculator

Solves a₁x+b₁y=c₁ and a₂x+b₂y=c₂ for x and y.

Published 6 August 2026 · Updated 23 September 2026

What this calculator does

Two linear equations in two unknowns describe two lines, and solving them means finding where those lines cross. Cramer's rule gets there with three determinants and no elimination.

The determinant decides whether a solution exists at all. A non-zero determinant means the lines cross at exactly one point; a zero determinant means they are either parallel with no solution or identical with infinitely many.

The formula

FormulaD = a₁b₂ − a₂b₁; x = (c₁b₂ − c₂b₁)/D; y = (a₁c₂ − a₂c₁)/D

The main determinant is a₁b₂ minus a₂b₁. Replacing each coefficient column with the constants and taking the determinant gives the numerator for that variable.

TermMeaning
Determinanta₁b₂ − a₂b₁, which is zero exactly when the lines are parallel or identical.
Cramer's ruleSolving by ratios of determinants rather than by elimination.
Inconsistent systemParallel lines with no intersection, and therefore no solution.

The inputs explained

FieldWhat to enter
a₁Coefficient of x in the first equation.
b₁Coefficient of y in the first equation.
c₁Constant on the right of the first equation.
a₂Coefficient of x in the second equation.
b₂Coefficient of y in the second equation.
c₂Constant on the right of the second equation.

When to use it

Solving simultaneous equations

The most common algebra problem there is, and this avoids elimination arithmetic.

Finding where two lines cross

The solution is exactly the intersection point.

Detecting an inconsistent system

A zero determinant immediately flags parallel or identical lines.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How does the second equation change the solution?

The same first equation against three different second equations.

First equation 2x + 3y = 8
Second equation constant (x − y = c₂)xDeterminant D
c₂ = -11.000-5.000
c₂ = 12.200-5.000
c₂ = 33.400-5.000
The determinant stays at −5.000 throughout, since only the constant changes and the lines keep their slopes. With c₂ = 1 the solution is x = 2.200, and moving the second line shifts the crossing point along the first.

Questions

What does a zero determinant mean?

That the two equations describe lines with the same slope. They are then either the same line, giving infinitely many solutions, or parallel and distinct, giving none. The calculator distinguishes the two cases.

Is Cramer's rule better than elimination?

For two equations it is about equal and arguably cleaner. For larger systems it becomes badly inefficient, since the number of determinants grows quickly, so elimination or matrix factorisation is used instead.

Why check the solution?

Because substituting back is the only way to confirm the arithmetic. The calculator does it automatically, and a mismatch would indicate a problem with the inputs rather than the method.

Can this be done with matrices?

Yes. The system is a matrix equation, and multiplying by the inverse of the coefficient matrix solves it. The determinant being non-zero is exactly the condition for that inverse to exist.

For inverting the coefficient matrix directly, see the matrix inverse calculator. For three equations, see the Cramer's rule calculator.