Substitution Method Calculator

Solve a two-variable linear system and identify its unique solution, inconsistency, or dependent equations.

Solve two linear equations
Enter coefficients for a1x + b1y = c1 and a2x + b2y = c2.

About solving systems by substitution

The substitution method solves simultaneous equations by expressing one variable in terms of the other and inserting that expression into the second equation. For a two-variable linear system, both equations must be true at the same point. A unique solution is an ordered pair whose x and y values satisfy each equation. On a graph, that pair is the intersection of the two lines. Write the equations as a1x + b1y = c1 and a2x + b2y = c2. To substitute manually, choose a variable with a convenient nonzero coefficient. For example, solve the first equation for x, producing x = (c1 - b1y) / a1. Replace x in the second equation with that expression, solve the resulting one-variable equation for y, and then substitute y back into either original equation to obtain x. Finally, check both values in both equations. This calculator computes the mathematically equivalent determinant formulas so that it remains reliable regardless of which coefficient is easiest to isolate. The determinant is a1b2 - a2b1. When it is nonzero, the lines have different slopes and exactly one solution. The coordinates are x = (c1b2 - c2b1) divided by the determinant and y = (a1c2 - a2c1) divided by the determinant. These values are the same ones produced by correctly performed substitution. A zero determinant requires special interpretation. If one complete equation is a multiple of the other, the equations describe the same line and every point on that line is a solution. The system is dependent and has infinitely many solutions. If the variable coefficients are proportional but the constants are not, the lines are parallel and never meet. That inconsistent system has no solution. The result panel distinguishes these cases rather than attempting division by zero. Systems of linear equations model prices and quantities, mixtures, distances and rates, budgets, coordinate geometry, and many other relationships. Keep negative signs with their coefficients, and enter zero when a variable is absent from an equation. Decimal coefficients are accepted, though exact fractions may produce repeating decimal outputs. Rounding is limited to the display; the calculations use full JavaScript numeric precision. Always verify a high-stakes result by replacing x and y in the original equations.

Substitution method examples

Each system illustrates the relationship between equations and their intersection.

SystemSolutionCheck
x + y = 5; 2x - y = 1(2, 3)Both equations are satisfied
2x + 3y = 7; x - y = 1(2, 1)Substitute x = y + 1
x + y = 4; x - y = 0(2, 2)The lines meet once

How to use the substitution solver

  1. Arrange both equations in the form ax + by = c.
  2. Enter the x coefficient, y coefficient, and constant for equation one.
  3. Enter the corresponding three values for equation two.
  4. Select Solve by Substitution and read the solution classification and coordinates.
  5. Check the coordinates by substituting them into both original equations.

Substitution method FAQ

When is substitution the easiest method?

Substitution is especially convenient when one variable already has coefficient 1 or -1. It is also useful when one equation is already solved for a variable.

What does no solution mean?

No solution means the equations represent distinct parallel lines. Their variable coefficients are proportional, but their constants are incompatible.

What do infinitely many solutions mean?

It means both equations describe the same line, even if one looks like a scaled version of the other. Every point on that line satisfies both equations.

Can a coefficient be zero?

Yes, zero means that variable is absent from the equation. The system can still have a unique solution if the two equations together determine both variables.

How can I check the answer?

Replace x and y in each original equation with the displayed values. The left side of each equation should equal its stated constant.