System of Equations by Substitution
Solve two linear equations by isolating one variable and substituting it into the other. The page opens on x + y = 3 and x - y = 1, whose solution is x = 2, y = 1. Read the separate substitution working below the elimination check.
x + y = 3 x - y = 1elimination 1 row operation, pivoting on the largest coefficientback-substitution 2 stepsx = 2 y = 1residual 0 0 unique solution
- Enter as
- Read from the text
- x, y in 2 equations
- Working
- x
- 2
- y
- 1
- Case
- Unique
Your equations
One equation per line, 2 to 6 of them, in 2 to 6 unknowns. Variables may sit on both sides, coefficients may be fractions or decimals, and x/2 means half of x.
The working
Forward elimination first, largest coefficient leading each column, then back-substitution from the bottom row up. Every multiplier is an exact fraction.
- R2 -> R2 - (1)R1 clears x from row 2
[ 1 1 | 3 ] [ 0 -2 | -2 ]
Back-substitution
- From row 2: -2y = -2, so y = 1.
- From row 1: x + y = 3 with y = 1, so x = 2.
The check
- x + y = 3, residual 0
- x - y = 1, residual 0
Each value is substituted back into the equations as you typed them: every residual is exactly zero, because the arithmetic is done in fractions rather than decimals.
Substitution for two equations
Isolate a variable, replace it in the other equation, then substitute back. These steps use the original equations and exact fractions.
- Isolate x in equation 1: x = 3 - y.
- Substitute into equation 2: (1)(3 - y) + (-1)y = 1.
- Collect terms: (-2)y = -2.
- y = 1.
- Substitute back: x = 3 + (-1)(1) = 2.
Graph of the two-variable system
Approximate graph, axes from -5 to 5. 2 of 2 equation lines cross this view. Read the exact solution and consistency result above.
- Line 1: x + y = 3
- Line 2: x - y = 1
The three answers a linear system can have
Load any of them to see which one you are looking at and why.
- x = 2, y = 1
- No solution: the equations contradict each other
- x = 3 - y, with y free
Common questions
- What does the substitution calculation do?
- It starts from an original equation, isolates a variable as a constant plus a multiple of the other variable, and replaces that variable in the second equation. For the starting example it gets x = 3 - y, substitutes into x - y = 1, then solves -2y = -2 and substitutes y = 1 back to get x = 2.
- What happens if substitution leaves 0 = 0?
- The second equation supplies no new restriction, so one variable remains free and the first equation describes the solution family. If the remaining equation is 0 equal to a nonzero constant, there is no solution. If both original equations are 0 = 0, both variables are free.
- Can this substitution view solve three equations?
- This separate substitution calculation is for exactly two equations in two variables. The main calculator can solve 2 through 6 equations in 2 through 6 variables using Gaussian elimination and back-substitution.
Gaussian elimination that pivots on the largest available coefficient for numerical stability, with every row operation printed so you can follow it. The solution is substituted back into the equations you typed and the residual is shown, so you can see the arithmetic close. A nonlinear term is refused by name rather than quietly linearised.