Substitution Method Calculator

Substitution Method Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

x=c1b2−c2b1a1b2−a2b1,y=a1c2−a2c1a1b2−a2b1where{a1=a1,b1=b1,c1=c1a2=a2,b2=b2,c2=c2\begin{gathered} x = \frac{c_1 b_2 - c_2 b_1}{a_1 b_2 - a_2 b_1}, \qquad y = \frac{a_1 c_2 - a_2 c_1}{a_1 b_2 - a_2 b_1} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} a_1 &= {{\text{a}_1}}, \quad b_1 = {{\text{b}_1}}, \quad c_1 = {{\text{c}_1}} \\ a_2 &= {{\text{a}_2}}, \quad b_2 = {{\text{b}_2}}, \quad c_2 = {{\text{c}_2}} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Solution
x = 2, y = 3
solved by substitution
x 2
y 3
Determinant (a₁b₂ − a₂b₁) -5

Report an error on this page

What Is the Substitution Method?

The substitution method is a classic algebra technique for solving a system of two linear equations in two unknowns. You solve one equation for a single variable and substitute that expression into the other equation, reducing the problem to one equation in one variable. This calculator does that automatically for the general system \(a_1 x + b_1 y = c_1\) and \(a_2 x + b_2 y = c_2\).

Flat diagram showing one equation's variable isolated then substituted into the second equation
The substitution method: solve one equation for a variable, then plug it into the other.

How to Use It

Enter the six coefficients: \(a_1\), \(b_1\), \(c_1\) from the first equation and \(a_2\), \(b_2\), \(c_2\) from the second. Press calculate and you'll get the exact values of x and y, plus the determinant \(a_1 b_2 - a_2 b_1\) that confirms whether a unique solution exists.

The Formula Explained

From equation 1, \(x = (c_1 - b_1 y) / a_1\). Substituting into equation 2 and simplifying gives $$ y = \frac{a_1 c_2 - a_2 c_1}{a_1 b_2 - a_2 b_1} $$ Once y is known, back-substitute to find x. The denominator \(a_1 b_2 - a_2 b_1\) is the determinant of the coefficient matrix. If it equals zero, the two lines are parallel (no solution) or identical (infinitely many solutions), so there is no unique answer.

Advertisement

Worked Example

Solve \(2x + 3y = 13\) and \(x - y = -1\). Here \(a_1=2\), \(b_1=3\), \(c_1=13\), \(a_2=1\), \(b_2=-1\), \(c_2=-1\). Determinant $$ = (2)(-1) - (1)(3) = -5 $$ Then $$ y = \frac{2 \cdot -1 - 1 \cdot 13}{-5} = \frac{-15}{-5} = 3 $$ Back-substitute: $$ x = \frac{13 - 3 \cdot 3}{2} = \frac{4}{2} = 2 $$ So \(x = 2\), \(y = 3\).

Two straight lines crossing at a single intersection point on an x-y coordinate grid
The solution is the point where the two lines intersect.

Interpreting the Solution: Unique, None, or Infinite

Compute \(D = a_1b_2 - a_2b_1\) first. If \(D \neq 0\), the formulas give one exact answer. If \(D = 0\), the numerators decide between the other two cases.

Determinant and consistency Geometric meaning Algebraic outcome during substitution Number of solutions
\(D \neq 0\) Lines with different slopes intersect at one point A single equation in one variable, giving a unique x and then y Exactly one
\(D = 0\) and the numerators are not both zero (inconsistent) Parallel, distinct lines A contradiction such as \(0 = k\) with \(k \neq 0\) (for example \(4 = 6\)) None
\(D = 0\) and both numerators are zero (consistent) Coincident lines (the same line) An identity \(0 = 0\) (for example \(4 = 4\)) Infinitely many

How to verify an answer

  1. Take the x and y values you found.
  2. Substitute them into the first original equation and check that \(a_1x + b_1y\) equals \(c_1\).
  3. Do the same with the second original equation and \(c_2\).
  4. Both must hold. For example, with \(x = \frac{4}{3}\) and \(y = 3\): \(0 \cdot \frac{4}{3} + 2(3) = 6\) ✓ and \(3 \cdot \frac{4}{3} + 3 = 7\) ✓.

Checking against the original equations, not your rearranged ones, also catches algebra slips made during the substitution.

Advertisement

FAQ

What if the determinant is zero? The system has no unique solution — the lines are parallel or coincident.

Can I use decimals or negatives? Yes. Any real coefficient works, including fractions entered as decimals.

Is this the same answer as elimination or Cramer's rule? Yes — for a consistent system with a nonzero determinant, all three methods give the identical x and y.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators