Linear Equation Solver

Solve a system of two simultaneous linear equations in x and y by Cramer's rule, including the no-solution cases.

x 3
x = (c₁b₂ − c₂b₁) / (a₁b₂ − a₂b₁) · y = (a₁c₂ − a₂c₁) / (a₁b₂ − a₂b₁)
y 2
x = (c₁b₂ − c₂b₁) / (a₁b₂ − a₂b₁) · y = (a₁c₂ − a₂c₁) / (a₁b₂ − a₂b₁)
Type of system One unique solution — the two lines cross at exactly one point.
x = (c₁b₂ − c₂b₁) / (a₁b₂ − a₂b₁) · y = (a₁c₂ − a₂c₁) / (a₁b₂ − a₂b₁)
Determinant of the coefficients -14
System being solved 2x + 3y = 12 · 4x − 1y = 10
Check: equation 1 left-hand side 12
Check: equation 2 left-hand side 10

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Linear Equation Solver does

The linear equation solver on this page will solve a system of two simultaneous linear equations in x and y by Cramer's rule, including the no-solution cases. Fill in all 6 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for solving simultaneous equations from an algebra course. For a second version of this linear equation solver, see FreeToolsWorld.org.

How to use it

  1. Rearrange both equations into the form ax + by = c, moving everything with an x or y to the left.
  2. Enter the three numbers from the first equation, using negatives where a term is subtracted.
  3. Enter the three numbers from the second equation.
  4. Read x and y, and confirm the two check rows reproduce your right-hand sides.

How it works

A pair of linear equations in two unknowns describes two straight lines, and solving the system means finding where they cross. Cramer's rule gets there in one step: the denominator is the determinant of the coefficient matrix, a₁b₂ − a₂b₁, and each numerator is the same determinant with one column swapped for the right-hand sides. It is the fastest route for a 2×2 system and it makes the degenerate cases obvious rather than mysterious.

When that determinant is zero the two lines have the same gradient, and there are two very different reasons for it. If the right-hand sides are consistent with that — 2x + 3y = 12 and 4x + 6y = 24 — the equations are the same line written twice and every point on it is a solution. If they are not — 2x + 3y = 12 and 4x + 6y = 30 — the lines are parallel and distinct, and no pair of numbers satisfies both. This page distinguishes the two instead of reporting "no solution" for both.

The two check rows substitute the answer back into the original equations, which should reproduce your right-hand sides. On a well-conditioned system they match to the last decimal. If the determinant is very small but not zero — nearly parallel lines — the solution becomes enormously sensitive to tiny changes in the coefficients, and the check rows are where you notice: they drift away from the values you entered. That sensitivity is real, not a bug, and it is why ill-conditioned systems are treated with suspicion in numerical work.

When to use it

  • Solving simultaneous equations from an algebra course.
  • Finding where two straight lines intersect.
  • Splitting a total between two unknown quantities with two constraints.
  • Breaking down a mixture problem with two components.

Common mistakes to avoid

  • Not rearranging into ax + by = c first. An equation like 3y = 12 − 2x needs the x moved across, giving a = 2, b = 3, c = 12.
  • Dropping a minus sign on a coefficient, which silently produces a plausible but wrong intersection.
  • Entering 0 for a coefficient that is actually absent and then expecting a unique answer — an equation with no y in it still needs b = 0, which is fine, but two such equations cannot pin down y.

Frequently asked questions

What does it mean when the determinant is zero?

The two lines are parallel. Either they are the same line, in which case there are infinitely many solutions, or they are distinct and never meet, in which case there are none. The verdict row tells you which.

Can this solve three equations in three unknowns?

Not on this page — it is built for 2×2. The same Cramer's rule extends to 3×3 using 3×3 determinants, and the determinant calculator on this site will compute those for you.

Why does my answer come out as a long decimal?

Because the intersection of two arbitrary lines rarely lands on a whole number. The result is exact to the precision shown; if you need a fraction, the determinant is the denominator before simplification.

Related tools

See all math & statistics calculators →