# Solving Systems of Equations by Substitution Method

Substitution is the most elementary of all the methods of solving systems of equations.
Substitution method, as the method indicates, involves substituting something into
the equations to make them much simpler to solve. So what do we substitute? We express
one of the variables in terms of the other until we have only one equation with
only one variable. We then solve for that variable and after we obtain its value,
we perform what is called **Back Substitution** to solve for the other missing
variable(s).

## Solving Two Variable Equations by Substitution Method

Let's work some actual examples to understand better how to solve two variable equations using substitution method.

### Example 1

Solve the following system of equations

**Step 1**

It's always better to label your equations so that you know which equation you're working with. Since we have two equations, let's label them as 1 and 2.

**Step2**

The first step in actually solving the system of equations using substitution is to express one variable in terms of another.

Let's use equation(1) and express **y** in terms of **x** in equation(1):

can also be written as

**Step 3**

Now we have **y** in terms of **x** and we can substitute for **y** in
the equation(2)

becomes

**Step 4**

So now we only have a one variable equation which we can solve using the techniques we learned in the section on solving one variable equations.

**Step 5**

Now that we have a value for **x**, we can substitute it into the equation that
we have for **y** and this is what we refer to as **back substitution**.

substituting for **x**

therefore,

**Step 6**

So now we have solved for **x** as 2 and **y** as 0. Therefore, our coordinate
point is **(2,0)**. We can prove that these
are the true values of **x** and **y** by substituting them back into the
original system of equations.

substituting for **x** and **y**

Which proves that the values we obtained are the correct values of **x** and
**y**.

Now that we have our solution, what does it mean? Looking at the graph, we can see
that at the value **(2,0)**, both of our original equations intersect at that point.

### Example 2

Solve the following system of equations by substitution

**Step 1**

As in the previous example, it's always good to label you're equations so that you know which one you're working with.

**Step 2**

Next, we express one variable in terms of the other variable. We choose what variable to express in terms of the other by inspecting the system of equations and guessing which of the two equations looks easier to work with, and which variable will be harder to manipulate.

In the above example, let's work with equation(2) and express **x** in terms of
**y**

becomes

**Step 3**

The next step is to substitute the above into equation(1) in order to obtain one
equation with only one variable, **y**.

is the same as

**Step 4**

And then we can substitute for 2 in the above equation as:

which becomes

therefore,

**Step 5**

Next we perform a back substitution to find the value of **x**. We substitute
the value we've obtained for **y** into the equation for **x**

becomes

therefore,

The solution to the system of equations is x = 3 and y = -1. You can prove this by substituting these values into the original system of equations.

Let's graph the equations to see if the intersection point is indeed **(3,-1)**.

## Solving Three Variable Equations by Substitution Method

Similar to solving two variable equations, when solving for three variables, we express one variable in terms of another and substitute until we obtain a single equation with only one variable. The final equation tends to be rather large and at times complicated making substitution method not a very ideal method for solving three variable systems of equations. However, substitution method's simplicity overshadows all the complications and makes the method a very fundamental method for solving systems of equations.

Let's try a few examples to see how the method actually works.

### Example 3

Solve the following system of equations

**Step 1**

Let's once again begin by labeling our equations

**Step 2**

Next we inspect the system of equations to pick wish variable we should express in terms of the other. Since we have three sets of equations, we need to substitute twice so we need to pick two equations to work with.

Let's pick equations(2) and (3)

**Step 3**

Take equation(3) and express **y** in terms of **x** and **z**

becomes

**Step 4**

Next we substitute for **y** in equation(2)

becomes

which simplifies into

**Step 5**

Next we express **x** in terms of **z**

**Step 6**

Now we have solutions for both **x** and **y** and we still have one untouched
equation. We substitute for **x** and **y** in equation(1) in order to obtain
an equation in terms of only one variable **z**

First substituting for **y**

which simplifies as follows:

**Step 7**

Next we substitute for **x**

which leaves an equation in terms of only **z**, which we then simplify to solve
for **z**

**Step 8**

Now that we've obtained a value for **z**, we perform back substitution to find
**x**

substituting z = 0

**Step 9**

Once again we perform back substitution in order to find the value of **y**.
We use the values we've obtained for **x** and **z** and substitute them into
the equation for **y**:

The solution to the system of equations is **x = -2**, **y = 4**, **z = 0**. In
three dimensions, this would mean that **(-2,4,0)** is the intersection point of all three
lines.

### Example 4:

Solve for the variables in the following system of equations

**Step 1**

First we label the equations:

**Step 2**

Next we inspect the system and choose which equations we want to work with, in what order.

Lets start with equation(1) and then move on to equation(2) and finally equation(3).

**Step 3**

Express x in terms of **y** and **z**

**Step 4**

Next you substitute for **x** in equation(2)

which simplifies to become:

Next we take the above equation and express **z** in terms of **y**

**Step 5**

Then we substitute for **x** and **z** into equation(3) to obtain a one variable
equation.

First we substitute for x and simplify

**Step 6**

Next we substitute for **z**

which simplifies to become

**Step 7**

From which we can solve for **y** as follows:

**Step 8**

Using this value of **y = 3** we perform 2 back substitutions to obtain the values
of **x** and **z**.

First we solve for **z**:

**Step 10**

Lastly we solve for x:

Therefore, the solution to the system of equations above is **x, y, z** = **0.5,3,2.5**