100% free no uploads no sign-up

system of equations solver

To solve a system of linear equations, eliminate one unknown at a time by adding or subtracting multiples of the equations, then substitute back. Type the equations separated by commas or on separate lines.

mode: system

Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas

problem
2x + y = 5
x − y = 1
answer
x = 2
y = 1

✓ checked: these values make every original equation true.

step-by-step working

  1. Write each equation in standard form (unknowns on the left, numbers on the right):

    (1) 2x + y = 5
    (2) x − y = 1
  2. Add (1) and (2) to eliminate y:

    (3) 3x = 6
  3. Divide both sides of (3) by 3.

    x = 2
  4. Substitute x = 2 into (1) and solve for y.

    y = 1

Elimination, step by step

Worked examples

2x + y = 5 x − y = 1

answer
x = 2
y = 1

✓ checked: these values make every original equation true.

step-by-step working

  1. Write each equation in standard form (unknowns on the left, numbers on the right):

    (1) 2x + y = 5
    (2) x − y = 1
  2. Add (1) and (2) to eliminate y:

    (3) 3x = 6
  3. Divide both sides of (3) by 3.

    x = 2
  4. Substitute x = 2 into (1) and solve for y.

    y = 1

3x − 2y = 4 2x + 5y = 9

answer
x = 2
y = 1

✓ checked: these values make every original equation true.

step-by-step working

  1. Write each equation in standard form (unknowns on the left, numbers on the right):

    (1) 3x − 2y = 4
    (2) 2x + 5y = 9
  2. Multiply (1) by 2 and multiply (2) by 3, then subtract (1) from (2) to eliminate x:

    (3) 19y = 19
  3. Divide both sides of (3) by 19.

    y = 1
  4. Substitute y = 1 into (1) and solve for x.

    x = 2

x + y + z = 6 x − y + z = 2 2x + y − z = 1

answer
x = 1
y = 2
z = 3

✓ checked: these values make every original equation true.

step-by-step working

  1. Write each equation in standard form (unknowns on the left, numbers on the right):

    (1) x + y + z = 6
    (2) x − y + z = 2
    (3) 2x + y − z = 1
  2. Add (1) and (2) to eliminate y:

    (4) 2x + 2z = 8
  3. Subtract (1) from (3) to eliminate y:

    (5) x − 2z = −5
  4. Multiply (5) by 2, then subtract (4) from (5) to eliminate x:

    (6) −6z = −18
  5. Divide both sides of (6) by −6.

    z = 3
  6. Substitute z = 3 into (4) and solve for x.

    x = 1
  7. Substitute x = 1 and z = 3 into (1) and solve for y.

    y = 2

No solution or infinitely many

If elimination leaves 0 = 0, the equations are dependent: one is a multiple or combination of the others, and there are infinitely many solutions. If it leaves something impossible like 0 = 1, the equations contradict each other and there is no solution. For two unknowns these are two identical lines and two parallel lines.

Common mistakes

Frequently asked questions

How do I type a system?

Separate the equations with commas, semicolons or new lines, for example: 2x + y = 5, x − y = 1. Use the same letters in every equation.

How many unknowns can it handle?

Up to four linear equations in four unknowns. You need as many equations as unknowns.

Elimination or substitution?

This solver uses elimination because it works the same way for every linear system and keeps the numbers as exact fractions. Substitution gives the same answer and is handy when one equation already says y = …

Can it solve non-linear systems?

Not yet. Systems with x², xy or other non-linear terms aren't supported; you'll get a message saying so.

More math tools