Linear equation solver

Type your equations one per line, add any known values, and get the solution plus every elimination step, one line at a time.

Write 2x + 3y = 7, 2*x, x/3, 0.5y or (1/2)x. Names can be several letters, like x1 or price. Lines starting with # are ignored. Variables you give a value under Known values are treated as numbers.

How this solver works

The solver uses Gauss–Jordan elimination, the same method taught in a first linear algebra course. It writes your system as an augmented matrix, then repeats three moves until every pivot column is cleared:

  1. Swap two rows, when the row that should hold the pivot has a zero there.
  2. Scale a row so its pivot becomes 1.
  3. Subtract a multiple of the pivot row from every other row to remove that unknown.

Each of those moves is shown as its own step, written either as equations or as a matrix, with the pivot highlighted. When there is a single answer, the solver also substitutes it back into every original equation so you can see it checks out.

New to the method? Read the step-by-step guide to Gaussian elimination.

Reading the result

Every linear system ends in one of three ways:

The guide on unique, no and infinitely many solutions explains how to tell them apart and what rank has to do with it.

Where engineers use it

Linear systems show up everywhere: node voltages and mesh currents in circuits, forces in statically determinate trusses, material and energy balances in process engineering, mixture and blending problems, and production planning. If you can write each condition as a sum of unknowns times numbers, this tool can solve it. For matrix work such as determinants and inverses, use the matrix calculator.

Frequently asked questions

Does the solver give exact answers or decimals?

Exact answers. Every step uses whole-number fractions, so 1/3 stays 1/3 instead of becoming 0.3333. When an answer is a fraction, a decimal approximation is shown beside it.

How many equations can it handle?

The typed and matrix modes accept any size you can enter; the fill-in-boxes mode goes up to 8 equations and 8 unknowns. The number of equations doesn't have to match the number of unknowns.

What does “rank” mean in the result?

Rank is the number of independent equations left after elimination, which is the number of pivots. If the rank is smaller than the number of unknowns and the system is consistent, there are infinitely many solutions.

Can I use letters for known constants?

Yes. Write the constant in your equations, such as x + y = s, then give its value under Known values, like s=10. It's treated as a number and doesn't count as an unknown.

Is my data sent anywhere?

No. The calculation runs entirely in your browser. Nothing you type is uploaded or stored.