# Solving Systems of Linear Equations using Substitution

### {{ 'ml-heading-theory' | message }}

A system of equations is a set of two or more equations. Systems can be solved graphically and algebraically. In this section, one algebraic method, the substitution method, will be applied to solve a system of linear equations.
Method

## Substitution Method

The substitution method is an algebraic means of finding the solution(s) to a system of equations by substituting a variable's equivalent value into another equation in the system. $\begin{cases}y-4=2x & \, \text {(I)}\\ 9x+6=3y & \text {(II)}\end{cases}$ The general idea for this example system is to isolate $y$ in Equation (I) and substitute its equivalent value into Equation (II). By doing so, $y$ in Equation (II) will be eliminated and it will be possible to solve for $x.$

### 1

Solve one equation for one variable

Before substitution is possible, one equation must have an isolated variable. Notice that by adding $4$ to both sides of Equation (I), $y$ can be isolated. $\begin{cases}y-4=2x \quad \Rightarrow \quad y=2x+4 \\ 9x+6=3y \end{cases}$

### 2

Substitute the variable's equivalent expression

Substitute the rewritten equation from Step $1$ into the other equation by substituting the expression equal to $y$ in Equation (II). $\begin{cases}y={\color{#0000FF}{2x+4}} \\ 9x+6=3({\color{#0000FF}{2x+4}}) \end{cases}$ Now, Equation (II) only has one variable, $x.$

### 3

Solve the resulting equation

Since the resulting equation from Step $2$ only contains one variable, it can be solved using inverse operations.

$9x+6=3(2x+4)$
$9x+6=6x +12$
$3x+6=12$
$3x=6$
$x=2$
The $x$-coordinate of the solution to the system is $x=2.$

### 4

Substitute found variable value into either given equation
The solution found in Step $3$ can be used to find the other variable. To do this, substitute the solution into either equation and solve. Here, $x=2$ is substituted into Equation (I).
$y=2x+4$
$y=2({\color{#0000FF}{2}})+4$
$y=4+4$
$y=8$
The $y$-coordinate of the solution is $y=8.$ Thus, the solution to the system is $(2,8).$
It's possible to employ this method for systems that include any combination of linear equations, quadratic equations, or inequalites, among others.
Exercise

$\begin{cases}y=\text{-} x-1 \\ y=2x-13 \end{cases}$

Solution
To use the substitution method, we substitute one equation into the other. Here, since both equations are isolated for $y,$ substituting turns into setting the equations equal to each other. Specifically, we'll substitute $y={\color{#0000FF}{\text{-} x-1}}$ into the second. $y = 2x=13 \quad \Rightarrow \quad {\color{#0000FF}{\text{-} x-1}} = 2x-13$ Next, we can solve the above equation for $x.$
$\text{-} x-1=2x-13$
$\text{-} 3x-1=\text{-} 13$
$\text{-} 3x=\text{-} 12$
$x=4$
Thus, the $x$-coordinate of the solution is $x=4.$ Next, we can use this value to find the $y$-coordinate. To do this, we can substitute $x=4$ into either equation. We'll arbitrarily choose the first equation.
$y=\text{-} x-1$
$y=\text{-} {\color{#0000FF}{4}}-1$
$y=\text{-} 5$
Thus, $y=\text{-} 5.$ This means the solution to the system is $(4, \text{-} 5).$
Show solution Show solution
Exercise

The sum of two numbers is $17.$ One of the numbers is two more than three times the other number. Write a system that represents the given relationships. Then, find the numbers using substitution.

Solution

We can use the given information to write two equations. First, we must define our variables. Let the first number be $x$ and the other $y.$ We know that the sum of these numbers is $17.$ Thus, $x+y=17.$ We also know that one of the numbers, let's say $x,$ is two more than three times the other number, which is then $y.$ This gives us the equation $x=3y+2.$ Together these two equations create the system $\begin{cases}x+y=17 \\ x=3y+2. \end{cases}$ To solve this system using substitution, we must substitute one equation into the other. Let's substitute $x=3y+2$ into $x+y=17.$ This will allow us to then solve for $y.$

$x+y=17$
${\color{#0000FF}{3y+2}}+y=17$
$4y+2=17$
$4y=15$
$y=\dfrac{15}{4}$
$y=3.75$
We've found that the $y$-coordinate of the solution is $y=3.75.$ We can substitute this value into either equation to solve for the corresponding $x$-value. We'll choose the second equation.
$x=3y+2$
$x=3\cdot {\color{#0000FF}{3.75}}+2$
$x=11.25+2$
$x=13.25$
Since $x=13.25,$ the solution to the system is $(13.25, 3.75).$
Show solution Show solution