# Systems of equations with substitution

CCSS Math: 8.EE.C.8b
Walk through examples of solving systems of equations with substitution.
Let's work to solve this system of equations:
$y = 2x ~~~~~~~~\gray{\text{Equation 1}}$
$x + y = 24 ~~~~~~~~\gray{\text{Equation 2}}$
The tricky thing is that there are two variables, $x$ and $y$. If only we could get rid of one of the variables...
Here's an idea! Equation $1$ tells us that $\goldD{2x}$ and $\goldD y$ are equal. So let's plug in $\goldD{2x}$ for $\goldD y$ in Equation $2$ to get rid of the $y$ variable in that equation:
\begin{aligned} x + \goldD y &= 24 &\gray{\text{Equation 2}} \\\\ x + \goldD{2x} &= 24 &\gray{\text{Substitute 2x for y}}\end{aligned}
Brilliant! Now we have an equation with just the $x$ variable that we know how to solve:
Nice! So we know that $x$ equals $8$. But remember that we are looking for an ordered pair. We need a $y$ value as well. Let's use the first equation to find $y$ when $x$ equals $8$:
\begin{aligned} y &= 2\blueD x &\gray{\text{Equation 1}} \\\\ y &= 2(\blueD8) &\gray{\text{Substitute 8 for x}}\\\\ \greenD y &\greenD= \greenD{16}\end{aligned}
Sweet! So the solution to the system of equations is $(\blueD8, \greenD{16})$. It's always a good idea to check the solution back in the original equations just to be sure.
Let's check the first equation:
\begin{aligned} y &= 2x \\\\ \greenD{16} &\stackrel?= 2(\blueD{8}) &\gray{\text{Plug in x = 8 and y = 16}}\\\\ 16 &= 16 &\gray{\text{Yes!}}\end{aligned}
Let's check the second equation:
\begin{aligned} x +y &= 24 \\\\ \blueD{8} + \greenD{16} &\stackrel?= 24 &\gray{\text{Plug in x = 8 and y = 16}}\\\\ 24 &= 24 &\gray{\text{Yes!}}\end{aligned}
Great! $(\blueD8, \greenD{16})$ is indeed a solution. We must not have made any mistakes.
Your turn to solve a system of equations using substitution.
Use substitution to solve the following system of equations.
$4x + y = 28$
$y = 3x$
$x =$
$y =$

Now let's find $y$:
The solution:
$x = 4$
$y = 12$

## Solving for a variable first, then using substitution

Sometimes using substitution is a little bit trickier. Here's another system of equations:
$-3x + y = -9~~~~~~~ \gray{\text{Equation 1}}$
$5x + 4y = 32~~~~~~~ \gray{\text{Equation 2}}$
Notice that neither of these equations are already solved for $x$ or $y$. As a result, the first step is to solve for $x$ or $y$ first. Here's how it goes:
Step 1: Solve one of the equations for one of the variables.
Let's solve the first equation for $y$:
\begin{aligned} -3x + y &= -9 &\gray{\text{Equation 1}} \\\\ -3x + y + \maroonD{3x} &= -9 +\maroonD{3x} &\gray{\text{Add 3x to each side}} \\\\ y &= {-9 +3x} &\gray{\text{}}\end{aligned}
Step 2: Substitute that equation into the other equation, and solve for $x$.
\begin{aligned} 5x + 4\goldD y &= 32 &\gray{\text{Equation 2}} \\\\ 5x +4(\goldD{-9 + 3x}) &= 32 &\gray{\text{Substitute -9 + 3x for y}} \\\\ 5x -36 +12x &= 32 &\gray{\text{}} \\\\ 17x - 36 &= 32 &\gray{\text{}} \\\\ 17x &= 68 &\gray{\text{}} \\\\ \blueD x &\blueD= \blueD4 &\gray{\text{Divide each side by 17}}\end{aligned}
Step 3: Substitute $x = 4$ into one of the original equations, and solve for $y$.
\begin{aligned} -3\blueD x + y &= -9 &\gray{\text{The first equation}} \\\\ -3(\blueD{4}) +y &= -9 &\gray{\text{Substitute 4 for x}} \\\\ -12 + y &= -9 &\gray{\text{}} \\\\ \greenD y &\greenD= \greenD3 &\gray{\text{Add 12 to each side}} \end{aligned}
So our solution is $(\blueD4, \greenD 3)$.
Let's check the first equation:
\begin{aligned} -3x + y &= -9 \\\\ -3(\blueD 4) + \greenD 3 &\stackrel?= -9 &\gray{\text{Plug in x = 4 and y = 3}}\\\\ -9 &= -9 &\gray{\text{Yes!}}\end{aligned}
Let's check the second equation:
\begin{aligned} 5x + 4y &= 32 \\\\ 5(\blueD{4}) + 4(\greenD{3}) &\stackrel?= 32 &\gray{\text{Plug in x = 4 and y = 3}}\\\\ 32 &= 32 &\gray{\text{Yes!}}\end{aligned}
Nice! $(\blueD4, \greenD 3)$ is indeed a solution. We must not have made any mistakes.

## Let's practice!

1) Use substitution to solve the following system of equations.
$2x - 3y = -5$
$y = x - 1$
$x =$
$y =$

Now let's find $y$:
The solution:
$x = 8$
$y = 7$
2) Use substitution to solve the following system of equations.
$-7x - 2y = -13$
$x - 2y = 11$
$x =$
$y =$

Let's solve the second equation for $x$:
\begin{aligned} x - 2y &= 11\\\\ x&= 11 + 2y\end{aligned}
Now we can plug this into the first equation:
Now let's find $x$:
The solution:
$x = 3$
$y = -4$
3) Use substitution to solve the following system of equations.
$-3x - 4y = 2$
$-5 = 5x + 5y$
$x =$
$y =$

Let's solve the second equation for $x$:
\begin{aligned} -5 &= 5x+5y\\\\ -1 &= x+y &\gray{\text{Divide by 5}}\\\\ x&= -1 - y\end{aligned}
Now we can plug this into the first equation:
Now let's find $x$:
The solution:
$x = -2$
$y = 1$