System of Equations Solver

System of equations solver, worked by elimination

Enter two linear equations in x and y. You get the point where the lines cross, found by elimination the way it is taught in class, plus a straight answer when they never cross at all, or when they turn out to be the same line twice.

Part of SolveStep's algebra solver. For a single equation in one unknown, use the equation solver.

Terms can be in any order and on either side of the equals sign, so y = 2x + 3 works as well as -2x + y = 3.

What it covers

Where two lines meet, or why they never do

A system of two linear equations is really a geometry question written as algebra: each equation is a straight line, and solving the system means finding the point where they cross. Elimination works by scaling both equations until one variable has a matching coefficient, then subtracting so that variable disappears.

Three things can happen, and a solver that only handles the first one is not much use. The lines cross once, giving a single solution. They are parallel, so they never cross and there is no solution. Or they are the same line written two different ways, in which case every point on it is a solution.

One solution

2x + 3y = 12, x − y = 1

The usual case. The lines cross at exactly one point, given as an exact pair.

No solution

x + y = 3, x + y = 5

Same slope, different intercept. The lines are parallel and never meet, so the system is inconsistent, and the tool says exactly that rather than returning a nonsense number.

Infinitely many

x + y = 3, 2x + 2y = 6

The second equation is just the first doubled, so it adds no new information. Every point on the line is a solution.

Any arrangement

y = 2x + 3

Equations do not need to be in standard form. Terms are collected from both sides before anything else happens.

Worked examples

Two systems, solved in full

A standard system

2x + 3y = 12, x − y = 1
  1. Write both in standard form: (1) 2x + 3y = 12 and (2) x − y = 1.
  2. To eliminate x, scale equation (2) by 2 so both have 2x: 2x − 2y = 2.
  3. Subtract: (3y − (−2y)) = 12 − 2, giving 5y = 10.
  4. So y = 2. Substitute into (2): x − 2 = 1.
  5. Check in (1): 2(3) + 3(2) = 12
x = 3, y = 2

Parallel lines

x + y = 3, x + y = 5
  1. Both equations have identical left-hand sides.
  2. Subtracting one from the other eliminates both variables at once and leaves 0 = 2.
  3. That statement is false, which means no pair of values can satisfy both equations.
  4. Geometrically: the lines have the same slope but different intercepts, so they are parallel and never intersect.
No solution

Try your own →

Common questions

System of equations FAQ

Does it use elimination or substitution?

Elimination, because the steps stay uniform whatever the numbers look like and you never have to pick which variable is easiest to isolate. Substitution reaches the same answer; the final step here does substitute back to find x once y is known.

What happens if the two lines are parallel?

You get 'No solution', with the reason shown: subtracting the scaled equations eliminates both variables and leaves a false statement like 0 = 2. That is not a failure of the method. It is the method correctly telling you the lines never meet.

What if I enter the same equation twice?

You get 'Infinitely many solutions'. The second equation is a multiple of the first and adds no new information, so every point on that single line satisfies the system.

Do the equations have to be in ax + by = c form?

No. Write them however you have them: y = 2x + 3, terms on both sides, any arrangement. They are rearranged into standard form as the first step, which is shown.

Will it give fractions or decimals?

Exact values. When the solution is a fraction you get the fraction rather than a rounded decimal, because a rounded answer substituted back into the original will not check out exactly.

Can it solve three equations in three unknowns?

Not yet. This handles two equations in two unknowns, which covers the large majority of what comes up. Three-variable systems use the same elimination idea applied repeatedly.