Substitution Method Calculator

Enter the coefficients of the 2x2 system of linear equations to solve it step-by-step using the substitution method with an interactive graph.

x + y =
x + y =

Quick Examples

Rate this tool

How to Use the Calculator

This online substitution method calculator is an algebraic and graphing tool designed to solve 2x2 systems of linear equations. In addition to providing the direct solution and analytical classification of the system, the math engine breaks down the solution step by step and generates an interactive graph on the Cartesian plane.

How to enter coefficients into the grid:

  • Unit coefficients (1 and -1): If a variable appears by itself in your problem (for example, x + 2y = 8 or -y = 4), you must explicitly enter 1 or -1 in the corresponding box. The calculator requires the numeric value to process the term.
  • Missing terms or blank cells: If an equation does not contain one of the variables (for example, 2x = 6), you can enter 0 in the missing variable's box or simply leave it blank; the system will automatically treat empty fields as zero.
  • Supported number formats: You can enter integers (positive or negative), decimal values (with a period or comma, such as 1.5 or -0.25), and exact fractions (such as 1/2, -3/4, or 7/3). The engine preserves fractions symbolically throughout the entire calculation to avoid rounding errors.

Once you enter the values and click the calculate button, the output is organized into three main sections:

1. Quick Answer and Classification
In the first highlighted block, you will get an immediate analytical diagnosis of the system based on its solutions:

  • Consistent and independent system: Has a unique solution. Both the exact and decimal values of x and y are displayed, along with the coordinates of the intersection point P(x, y) where the two lines cross.
  • Inconsistent system: Has no solution. This occurs when the equations represent two parallel lines that never intersect on the plane.
  • Consistent and dependent system: Has infinitely many solutions. This happens when both equations correspond to the exact same line (coincident lines).

2. Step-by-Step Mathematical Solution
To ensure an organized and easy-to-follow procedure, the algorithm uses an optimal solving strategy: it automatically checks if any coefficient is equal to 1 or -1 to solve for that variable first, minimizing the appearance of complex fractions early in the problem. The process is divided into the following steps:

  1. Identify the system: The system is displayed in formal notation, labeling equation (1) and equation (2).
  2. Strategic variable isolation: The most convenient variable is solved for in the source equation, showing a clean algebraic step.
  3. Visual substitution: The target equation is taken, and the chosen variable is replaced with the isolated expression.
  4. Solve the single-variable equation: The distributive property is applied, like terms are combined, and the numeric value is solved for and highlighted in a box. For systems with no solution or infinitely many solutions, this step demonstrates the mathematical contradiction (for example, 0 = 5) or identity (for example, 0 = 0).
  5. Calculate the second variable: The value found is substituted back into the expression from step 2 to find the remaining variable.

3. Interactive Graph on the Cartesian Plane
At the bottom, an interactive two-dimensional graph is rendered. Each linear equation is plotted in a distinct color (blue and green), displaying the point of intersection if one exists.

Step-by-Step Examples

The following are examples of problems solved by the calculator.

Example 1

Find the solution to the following system of linear equations using the substitution method:

$$ \begin{cases} x + 2y = 8 \\ 3x - 4y = 4 \end{cases} $$

Result

The system has a unique solution (consistent and independent system):

$$ \displaystyle \begin{cases} \displaystyle x = 4 \\[1em] \displaystyle y = 2 \end{cases} $$

The lines intersect at a single point:

$$ \displaystyle P\left(4, 2\right) $$

Step-by-Step Solution

1. Identify the system of equations.

The system of linear equations to solve is:

$$ \displaystyle \begin{cases} x + 2y = 8 \quad (1) \\[0.5em] 3x - 4y = 4 \quad (2) \end{cases} $$

2. Solve for one variable in one of the equations.

Choose the variable x in equation (1) to solve for:

$$ \displaystyle x + 2y = 8 \\[0.8em] x = 8 - 2y $$

3. Substitute the expression into the other equation.

Substitute the expression obtained for x into equation (2):

$$ \displaystyle 3{\color{blue}x} - 4y = 4 \\[0.8em] 3{\color{blue}(8 - 2y)} - 4y = 4 $$

4. Solve the single-variable linear equation.

Simplify and combine like terms to find the value of y:

$$ \displaystyle 24 - 6y - 4y = 4 \\[0.8em] -10y = 4 - (24) \\[0.8em] -10y = -20 \\[0.8em] y = \dfrac{-20}{-10} \\[0.8em] \boxed{y = 2} $$

5. Substitute the found value to solve for the other variable.

Substitute the value of y into the expression solved for in step 2:

$$ \displaystyle x = 8 - 2y \\[0.8em] x = 8 - 2(2) \\[0.8em] \boxed{x = 4} $$

Therefore, the solution to the system is:

$$ \displaystyle \begin{cases} \displaystyle x = 4 \\[1em] \displaystyle y = 2 \end{cases} $$
Graph of the system of equations x + 2y = 8 and 3x - 4y = 4 with intersection point at (4, 2)
Example 2

Determine the values of x and y that satisfy the following system of equations using the substitution method:

$$ \begin{cases} 2x + 3y = 7 \\ 5x - 2y = 8 \end{cases} $$

Result

The system has a unique solution (consistent and independent system):

$$ \displaystyle \begin{cases} \displaystyle x = 2 \\[1em] \displaystyle y = 1 \end{cases} $$

The lines intersect at a single point:

$$ \displaystyle P\left(2, 1\right) $$

Step-by-Step Solution

1. Identify the system of equations.

The system of linear equations to solve is:

$$ \displaystyle \begin{cases} 2x + 3y = 7 \quad (1) \\[0.5em] 5x - 2y = 8 \quad (2) \end{cases} $$

2. Solve for one variable in one of the equations.

Choose the variable x in equation (1) to solve for:

$$ \displaystyle 2x + 3y = 7 \\[0.8em] 2x = 7 - 3y \\[0.8em] x = \dfrac{7 - 3y}{2} \\[0.8em] x = \frac{7}{2} - \frac{3}{2}y $$

3. Substitute the expression into the other equation.

Substitute the expression obtained for x into equation (2):

$$ \displaystyle 5{\color{blue}x} - 2y = 8 \\[0.8em] 5{\color{blue}\left(\frac{7}{2} - \frac{3}{2}y\right)} - 2y = 8 $$

4. Solve the single-variable linear equation.

Simplify and combine like terms to find the value of y:

$$ \displaystyle \frac{35}{2} - \frac{15}{2}y - 2y = 8 \\[0.8em] -\frac{19}{2}y = 8 - \left(\frac{35}{2}\right) \\[0.8em] -\frac{19}{2}y = -\frac{19}{2} \\[0.8em] y = \dfrac{-\frac{19}{2}}{-\frac{19}{2}} \\[0.8em] \boxed{y = 1} $$

5. Substitute the found value to solve for the other variable.

Substitute the value of y into the expression solved for in step 2:

$$ \displaystyle x = \frac{7}{2} - \frac{3}{2}y \\[0.8em] x = \frac{7}{2} - \frac{3}{2}(1) \\[0.8em] \boxed{x = 2} $$

Therefore, the solution to the system is:

$$ \displaystyle \begin{cases} \displaystyle x = 2 \\[1em] \displaystyle y = 1 \end{cases} $$
Graph of the system of equations 2x + 3y = 7 and 5x - 2y = 8 with intersection at point (2, 1)
Example 3

Find the solution set of the following system of linear equations by applying the substitution method:

$$ \begin{cases} 2x + y = 4 \\ 4x + 2y = 5 \end{cases} $$

Result

The system has no solution (inconsistent system). The lines are parallel and have no points in common.

Step-by-Step Solution

1. Identify the system of equations.

The system of linear equations to solve is:

$$ \displaystyle \begin{cases} 2x + y = 4 \quad (1) \\[0.5em] 4x + 2y = 5 \quad (2) \end{cases} $$

2. Solve for one variable in one of the equations.

Choose the variable y in equation (1) to solve for:

$$ \displaystyle 2x + y = 4 \\[0.8em] y = 4 - 2x $$

3. Substitute the expression into the other equation.

Substitute the expression obtained for y into equation (2):

$$ \displaystyle 4x + 2{\color{blue}y} = 5 \\[0.8em] 4x + 2{\color{blue}(4 - 2x)} = 5 $$

4. Solve the resulting equation.

Simplify and combine like terms:

$$ \displaystyle 8 - 4x + 4x = 5 \\[0.8em] 0x = -3 \\[0.8em] 0 = -3 $$

The resulting statement is a contradiction. Therefore, the system has no solution (the lines are parallel).

Graph of the inconsistent system 2x + y = 4 and 4x + 2y = 5 showing two parallel lines with no points in common
Example 4

Obtain the solution to the following system of equations using the substitution method:

$$ \begin{cases} x - y = 3 \\ 2x - 2y = 6 \end{cases} $$

Result

The system has infinitely many solutions (consistent and dependent system). Both equations represent the same line (coincident lines).

Step-by-Step Solution

1. Identify the system of equations.

The system of linear equations to solve is:

$$ \displaystyle \begin{cases} x - y = 3 \quad (1) \\[0.5em] 2x - 2y = 6 \quad (2) \end{cases} $$

2. Solve for one variable in one of the equations.

Choose the variable x in equation (1) to solve for:

$$ \displaystyle x - y = 3 \\[0.8em] x = 3 +y $$

3. Substitute the expression into the other equation.

Substitute the expression obtained for x into equation (2):

$$ \displaystyle 2{\color{blue}x} - 2y = 6 \\[0.8em] 2{\color{blue}(3 + y)} - 2y = 6 $$

4. Solve the resulting equation.

Simplify and combine like terms:

$$ \displaystyle 6 + 2y - 2y = 6 \\[0.8em] 0y = 0 \\[0.8em] 0 = 0 $$

The resulting statement is an identity. Therefore, the system has infinitely many solutions (the lines are coincident).

Graph of the consistent and dependent system x - y = 3 and 2x - 2y = 6 showing two coincident lines
Example 5

Calculate the values of the variables x and y in the following system with fractional coefficients using the substitution method:

$$ \begin{cases} \frac{3}{2}x + \frac{1}{2}y = 4 \\ \frac{1}{5}x - \frac{3}{2}y = -2 \end{cases} $$

Result

The system has a unique solution (consistent and independent system):

$$ \displaystyle \begin{cases} \displaystyle x = \frac{100}{47} \approx 2.13 \\[1em] \displaystyle y = \frac{76}{47} \approx 1.62 \end{cases} $$

The lines intersect at a single point:

$$ \displaystyle P\left(\frac{100}{47}, \frac{76}{47}\right) \approx \left(2.13, 1.62\right) $$

Step-by-Step Solution

1. Identify the system of equations.

The system of linear equations to solve is:

$$ \displaystyle \begin{cases} \frac{3}{2}x + \frac{1}{2}y = 4 \quad (1) \\[0.5em] \frac{1}{5}x - \frac{3}{2}y = -2 \quad (2) \end{cases} $$

2. Solve for one variable in one of the equations.

Choose the variable x in equation (1) to solve for:

$$ \displaystyle \frac{3}{2}x + \frac{1}{2}y = 4 \\[0.8em] \frac{3}{2}x = 4 - \frac{1}{2}y \\[0.8em] x = \dfrac{4 - \frac{1}{2}y}{\frac{3}{2}} \\[0.8em] x = \frac{8}{3} - \frac{1}{3}y $$

3. Substitute the expression into the other equation.

Substitute the expression obtained for x into equation (2):

$$ \displaystyle \frac{1}{5}{\color{blue}x} - \frac{3}{2}y = -2 \\[0.8em] \frac{1}{5}{\color{blue}\left(\frac{8}{3} - \frac{1}{3}y\right)} - \frac{3}{2}y = -2 $$

4. Solve the single-variable linear equation.

Simplify and combine like terms to find the value of y:

$$ \displaystyle \frac{8}{15} - \frac{1}{15}y - \frac{3}{2}y = -2 \\[0.8em] -\frac{47}{30}y = -2 - \left(\frac{8}{15}\right) \\[0.8em] -\frac{47}{30}y = -\frac{38}{15} \\[0.8em] y = \dfrac{-\frac{38}{15}}{-\frac{47}{30}} \\[0.8em] \boxed{y = \frac{76}{47}} $$

5. Substitute the found value to solve for the other variable.

Substitute the value of y into the expression solved for in step 2:

$$ \displaystyle x = \frac{8}{3} - \frac{1}{3}y \\[0.8em] x = \frac{8}{3} - \frac{1}{3}\left(\frac{76}{47}\right) \\[0.8em] \boxed{x = \frac{100}{47}} $$

Therefore, the solution to the system is:

$$ \displaystyle \begin{cases} \displaystyle x = \frac{100}{47} \approx 2.13 \\[1em] \displaystyle y = \frac{76}{47} \approx 1.62 \end{cases} $$
Graph of the system of fractional equations with intersection point at (100/47, 76/47)

Related Tools

Daniel Machado

Professor of Mathematics, graduated from the Faculty of Exact, Chemical and Natural Sciences of the National University of Misiones (UNAM). Developer and creator of RigelUp, dedicated to building tools for mathematical learning.