Linear system solver

Type your equations separated by semicolons, for example 2x + y = 5; x − y = 1. The solver eliminates exactly in fractions and tells you whether the solution is unique, infinite or does not exist.

One equation per ; (or per line), up to 6 equations and 4 unknowns named by letters, for example 2x + y - z = 8; x = y + 1. Fractions like 3/4 work.
SolutionExactly one solution
Valuesx = 2 y = 3 z = -1
Equations × unknowns
3 × 3
Rank of the coefficient matrix
3
Gauss–Jordan steps (augmented matrix)
[ 2 1 -1 | 8 ] [ -3 -1 2 | -11 ] [ -2 1 2 | -3 ] R1 ← R1 ÷ 2 [ 1 1/2 -1/2 | 4 ] [ -3 -1 2 | -11 ] [ -2 1 2 | -3 ] R2 ← R2 − 3·R1 [ 1 1/2 -1/2 | 4 ] [ 0 1/2 1/2 | 1 ] [ -2 1 2 | -3 ] R3 ← R3 − 2·R1 [ 1 1/2 -1/2 | 4 ] [ 0 1/2 1/2 | 1 ] [ 0 2 1 | 5 ] R2 ← R2 ÷ (1/2) [ 1 1/2 -1/2 | 4 ] [ 0 1 1 | 2 ] [ 0 2 1 | 5 ] R1 ← R1 + (1/2)·R2 [ 1 0 -1 | 3 ] [ 0 1 1 | 2 ] [ 0 2 1 | 5 ] R3 ← R3 + 2·R2 [ 1 0 -1 | 3 ] [ 0 1 1 | 2 ] [ 0 0 -1 | 1 ] R3 ← R3 ÷ -1 [ 1 0 -1 | 3 ] [ 0 1 1 | 2 ] [ 0 0 1 | -1 ] R1 ← R1 − R3 [ 1 0 0 | 2 ] [ 0 1 1 | 2 ] [ 0 0 1 | -1 ] R2 ← R2 + R3 [ 1 0 0 | 2 ] [ 0 1 0 | 3 ] [ 0 0 1 | -1 ]

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Type the equations separated by semicolons or new lines. Use letters for unknowns (x, y, z, w or any others, up to four different ones).
  2. Read the type of solution and the values. Open the steps to follow each row operation: R2 ← R2 − 3·R1 means row 2 becomes row 2 minus 3 times row 1.

How it works

The coefficients and constants form an augmented matrix [ A | b ]. For each column the solver finds a pivot (swapping rows if needed), divides the pivot row to make the pivot 1 and clears the column in all other rows (Gauss–Jordan). All arithmetic uses exact fractions on big integers, so there is no rounding error. The matrix tools matrix calculator and fraction calculator use the same exact arithmetic.

Worked example

x + y + z = 6; 2y + 5z = −4; 2x + 5y − z = 27 has the unique solution x = 5, y = 3, z = −2. Check: 5 + 3 − 2 = 6, 2·3 + 5·(−2) = −4 and 2·5 + 5·3 − (−2) = 27.

x + y = 1; x + y = 2 has no solution, while x + y = 2; 2x + 2y = 4 has infinitely many (x = 2 − y).

Tips

  • Write a coefficient of 1 as nothing (x, not 1x) and a missing unknown by leaving it out.
  • A system with more unknowns than independent equations always has either no or infinitely many solutions.

Frequently asked questions

What is Gaussian elimination?

A way to solve a linear system by row operations on the augmented matrix. Rows are swapped, scaled and added to each other until each pivot column has a single 1 (Gauss–Jordan form), from which the unknowns can be read off.

How does the solver decide the number of solutions?

After elimination, a row of the form 0 = nonzero means the equations contradict each other: no solution. Otherwise, if the rank equals the number of unknowns, there is exactly one solution; if the rank is smaller, some unknowns are free and there are infinitely many solutions.

How are infinitely many solutions written?

The free unknowns stay as parameters and the others are expressed through them. For x + y = 2 the answer is x = 2 − y, y = y: any y gives a solution.

Why are the results fractions?

The elimination uses exact fractions, so 2x + y = 1, x − y = 0 gives x = 1/3, not 0.33333. A decimal version is shown too whenever a value is not a whole number.

Can I enter the same unknown on both sides?

Yes. The tool moves everything to the left, so x = y + 1 is treated as x − y = 1. Unknowns are single letters and are listed alphabetically.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.