Boneyard Tools

System of Linear Equations Solver

Solve a system of linear equations with two or three unknowns. Enter each coefficient and the constant on the right of every equation and the solver returns x, y and z, or tells you when a system has no solution or infinitely many.

How to solve a system of linear equations

  1. Choose 2 or 3 equations, then type each coefficient into the grid row by row.
  2. Enter the constant value on the right-hand side of every equation.
  3. Read the solution for x, y and z, or the note when the system has no or infinite solutions.

Examples

A 2x2 system with a unique solution

x + y = 3, x - y = 1
x = 2, y = 1

A 3x3 system

x + y + z = 6, 2y + 5z = -4, 2x + 5y - z = 27
x = 5, y = 3, z = -2

An inconsistent system

x + y = 1, x + y = 2
No solution

Frequently asked questions

What kinds of systems can this solve?

It solves square systems of linear equations with two or three unknowns, written as a 2x2 or 3x3 set of coefficients with a constant on the right of each equation. It does not handle more than three unknowns or non-linear terms.

How does the solver work?

It applies Gauss-Jordan elimination with partial pivoting. The coefficients and constants form an augmented matrix that is reduced to row echelon form, then the solution is read off directly. Partial pivoting keeps the arithmetic numerically stable.

What does no solution or infinite solutions mean?

If the equations contradict each other, such as x + y = 1 and x + y = 2, the system is inconsistent and has no solution. If an equation is just a multiple of another, such as x + y = 1 and 2x + 2y = 2, the system is dependent and has infinitely many solutions.

Why is my answer a rounded decimal?

Solutions are computed with floating point math and rounded to six decimal places for display. Exact fractions like one third appear as 0.333333. Whole-number answers are shown without trailing zeros.

Can the coefficients be negative or zero?

Yes. Coefficients and constants can be any finite number, including negatives, zero and decimals. A zero leading coefficient is fine because partial pivoting reorders the equations automatically.

Is my data private?

Yes. The solver runs entirely in your browser. The coefficients and constants you enter are never uploaded or stored on a server, so your calculations stay on your device.

Related tools