Maths

System of Equations Calculator

Solve 2 to 6 linear equations exactly, with elimination steps, or see when there is no unique solution.

By Nitin Raturi · Last reviewed

Your equations

How to use the System of Equations Calculator

Solve 2 to 6 linear equations exactly, with the elimination steps.

  1. Rewrite each equation with the unknowns on the left and the number on the right.
  2. Type each equation’s coefficients and constant on its own line.
  3. Read the solution, or whether there is none or infinitely many.
  4. Follow the row operations to check the working.

Good to know

  • Keep the unknowns in the same order on every line.

Equations

One equation per line: the coefficients of each unknown, then the constant.

How to fill it in

  • 2x + y − z = 8 is typed as 2 1 -1 8 (or 2 1 -1 = 8).
  • Use 0 for a missing unknown; 2 to 6 equations, as many as unknowns.
  • Fractions such as 1/3 and decimals are fine.

Example

2 1 5 and 1 -1 1 (2x + y = 5, x − y = 1) give x = 2, y = 1; the default three equations give x = 2, y = 3, z = −1.

Tip: Answers stay exact: 3x − 2y = 7 and 5x + 4y = 3 give x = 17/11, y = −13/11. Parallel lines give no solution; the same line twice gives infinitely many solutions.

One equation per line: coefficients, then the constant. 2x + y − z = 8 is 2 1 -1 8.

Solution

x = 2, y = 3, z = −1

The system has one solution: x = 2, y = 3, z = −1.

x
2
y
3
z
−1

Row operations on the augmented matrix:

  1. R1 → R1 ÷ 2
  2. R2 → R2 − (−3)·R1
  3. R3 → R3 − (−2)·R1
  4. R2 → R2 ÷ 1/2
  5. R1 → R1 − (1/2)·R2
  6. R3 → R3 − (2)·R2
  7. R3 → R3 ÷ −1
  8. R1 → R1 − (−1)·R3
  9. R2 → R2 − (1)·R3

Exact fractions throughout, by Gauss–Jordan elimination. Each line’s numbers are the coefficients of x, y, z, … in order, then the constant.

How this calculator works

  1. Step 1Write[A | b]Coefficients and constants as rows.
  2. Step 2Eliminaterow operationsSwap, scale and subtract rows.
  3. Step 3Readx, y, z, …Or spot no or infinitely many solutions.

Each equation becomes a row of numbers: its coefficients and its constant. Row operations change the equations without changing their solution.

When the left side becomes the identity, the right-hand column is the answer. A row of zeros with a non-zero constant means the equations contradict each other.

Worked example: three equations

2x + y − z = 8, −3x − y + 2z = −11, −2x + y + 2z = −3
Goal
reduce [A | b] to [I | x]
  1. Augmented rows2 1 −1 8 / −3 −1 2 −11 / −2 1 2 −3
  2. After elimination1 0 0 2 / 0 1 0 3 / 0 0 1 −1
  3. Solutionx = 2, y = 3, z = −1

Substituting back: 2(2) + 3 − (−1) = 8, as the first equation says.

Read the result

  • One solutionx = 2, y = 12x + y = 5 and x − y = 1 cross once.
  • No solutionno solutionx + 2y = 3 and 2x + 4y = 7 are parallel.

Answers stay exact: 3x − 2y = 7 and 5x + 4y = 3 give x = 17/11, y = −13/11. Writing one line twice gives infinitely many solutions.

Assumptions and limits

  • LinearNo powers or products of unknowns.
  • Square systemsAs many equations as unknowns, 2 to 6.
  • ExactFractions, not rounded decimals.
  • No general formInfinite cases are flagged, not parametrised.

A system of linear equations is a matrix problem written out in full.

To work with the coefficients as a matrix, use the matrix calculator. Single equations of higher degree are handled by the quadratic formula calculator and the cubic equation calculator.

Common mistakes

  • Mistake: Changing the order of unknowns between lines.

    Instead: Keep x, y, z in the same order on every line.

  • Mistake: Leaving out a missing unknown.

    Instead: Type 0 for its coefficient.

Checking the method

A separate script solves every system with Cramer’s rule and determinants in exact fractions, and classifies the rest by rank.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

How do I solve 2x + y = 5 and x − y = 1?

Type 2 1 5 and 1 -1 1 on two lines: x = 2, y = 1.

Can it solve three equations in three unknowns?

Yes, up to six. The default system gives x = 2, y = 3, z = −1.

Does it give exact fractions?

Yes: 3x − 2y = 7 and 5x + 4y = 3 give x = 17/11, y = −13/11.

What if the equations have no solution?

It says so. x + 2y = 3 and 2x + 4y = 7 have no solution.

What if they have many solutions?

It reports infinitely many solutions when one equation repeats another, as in x + 2y = 3 and 2x + 4y = 6.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 4 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.