SolveMathAI

System of equations solver

Two equations, three, or more. Substitution or elimination, whichever is cleaner.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

A system asks for the values that make every equation true at once. Two straight lines meet at one point, unless they are parallel (no solution) or the same line (infinitely many). The work is always the same: get rid of one unknown, solve for the other, then go back for the first.

Substitution or elimination

Both always work. Pick by looking at the equations rather than by habit.

  1. Use substitution when one equation is already solved

    If you can see y = something, put that something into the other equation. One line of work and the second unknown is gone.

  2. Use elimination when the coefficients line up

    If one unknown has coefficients that are equal or opposite, add or subtract the equations to cancel it. With +2y and −2y, adding clears y immediately.

  3. Make them line up if they do not

    Multiply one or both equations by whatever makes a pair of coefficients match. Multiplying an equation by a number keeps it true.

  4. Solve the single equation left

    One unknown, one equation, ordinary algebra.

  5. Back-substitute

    Put the value you found into the simplest original equation to get the other unknown.

  6. Check in both original equations

    Not one of them, both. A slip in the elimination step usually still satisfies the equation you worked with.

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Solve the system 2x + y = 7 and x - y = 2

{2x+y=7x−y=2\begin{cases} 2x + y = 7 \\ x - y = 2 \end{cases}
  1. y and −y are opposite, so add the equations
    (2x+y)+(x−y)=7+2(2x + y) + (x - y) = 7 + 2
  2. y is eliminated
    3x=9  ⇒  x=33x = 9 \;\Rightarrow\; x = 3
  3. Back-substitute into the second equation
    3−y=2  ⇒  y=13 - y = 2 \;\Rightarrow\; y = 1
  4. Check both
    2(3)+1=7  ✓3−1=2  ✓2(3) + 1 = 7 \;\checkmark \qquad 3 - 1 = 2 \;\checkmark
Answer
x=3,  y=1x = 3,\; y = 1

Solve the system y = 2x - 1 and 3x + 2y = 12

{y=2x−13x+2y=12\begin{cases} y = 2x - 1 \\ 3x + 2y = 12 \end{cases}
  1. The first is already solved for y, so substitute
    3x+2(2x−1)=123x + 2(2x - 1) = 12
  2. Expand
    3x+4x−2=123x + 4x - 2 = 12
  3. Collect and solve
    7x=14  ⇒  x=27x = 14 \;\Rightarrow\; x = 2
  4. Back-substitute
    y=2(2)−1=3y = 2(2) - 1 = 3
  5. Check the second equation
    3(2)+2(3)=12  ✓3(2) + 2(3) = 12 \;\checkmark
Answer
x=2,  y=3x = 2,\; y = 3

Solve the system 3x + 2y = 16 and 5x - 2y = 0

{3x+2y=165x−2y=0\begin{cases} 3x + 2y = 16 \\ 5x - 2y = 0 \end{cases}
  1. Add to cancel y
    8x=16  ⇒  x=28x = 16 \;\Rightarrow\; x = 2
  2. Back-substitute
    3(2)+2y=16  ⇒  2y=103(2) + 2y = 16 \;\Rightarrow\; 2y = 10
  3. Solve for y
    y=5y = 5
  4. Check
    5(2)−2(5)=0  ✓5(2) - 2(5) = 0 \;\checkmark
Answer
x=2,  y=5x = 2,\; y = 5

Solve the system x + y + z = 6, 2x - y + z = 3, x + 2y - z = 2

{x+y+z=62x−y+z=3x+2y−z=2\begin{cases} x + y + z = 6 \\ 2x - y + z = 3 \\ x + 2y - z = 2 \end{cases}
  1. Add equations 1 and 2 to remove y
    3x+2z=93x + 2z = 9
  2. Double equation 1, then subtract equation 3
    (2x+2y+2z)−(x+2y−z)=12−2  ⇒  x+3z=10(2x + 2y + 2z) - (x + 2y - z) = 12 - 2 \;\Rightarrow\; x + 3z = 10
  3. Two equations, two unknowns
    3x+2z=9,x+3z=103x + 2z = 9, \qquad x + 3z = 10
  4. Substitute x = 10 − 3z
    3(10−3z)+2z=9  ⇒  −7z=−213(10 - 3z) + 2z = 9 \;\Rightarrow\; -7z = -21
  5. Solve down the chain
    z=3,x=1,y=6−1−3=2z = 3, \quad x = 1, \quad y = 6 - 1 - 3 = 2
  6. Check all three
    1+2+3=6  ✓2−2+3=3  ✓1+4−3=2  ✓1 + 2 + 3 = 6\;\checkmark \quad 2 - 2 + 3 = 3\;\checkmark \quad 1 + 4 - 3 = 2\;\checkmark
Answer
x=1,  y=2,  z=3x = 1,\; y = 2,\; z = 3

Where marks get lost

Subtracting when you should add

Opposite coefficients are cleared by adding; equal coefficients by subtracting. Getting it backwards doubles the term instead of removing it.

Multiplying only part of an equation

When you scale an equation, every term is scaled, right-hand side included.

Answering with one number

A system of two unknowns has a pair for an answer. Stopping at x leaves the question half done.

Questions

How do I solve a system of equations?

Reduce it to one equation in one unknown, by substitution or by elimination, then back-substitute for the other. 2x + y = 7 with x − y = 2 gives x = 3, y = 1.

How does the elimination method work?

Add or subtract the equations so one variable cancels. Adding 2x + y = 7 and x − y = 2 removes y and leaves 3x = 9, so x = 3. Multiply an equation first if nothing cancels cleanly.

How does the substitution method work?

Rearrange one equation for a single variable and put that expression into the other. From x − y = 2 you get x = y + 2, and substituting gives 2(y + 2) + y = 7, so y = 1.

Which method should I use?

Elimination when the coefficients already line up, substitution when one variable is already alone or has a coefficient of 1. Both give the same answer, so pick whichever needs fewer steps.

How do I solve a system with three variables?

Eliminate one variable from two different pairs of equations, which leaves a two-variable system, then solve that and back-substitute twice.

What does it mean if there is no solution?

The lines are parallel and never meet, and the algebra collapses to something false. If it collapses to something true, the equations describe the same line and there are infinitely many solutions.

How do I solve a system by graphing?

Draw both lines and read off the crossing point. It is quick for a rough answer but unreliable for fractions, so it is best used as a check on algebra.

Can it handle more than three equations?

Yes. The solver works through larger systems by elimination and names the operation at each step, so you can follow which equation was used on which.