# Difference between revisions of "Substitution"

Substitution is when one replaces all instances of a variable (or expression) with another equivalent variable (or expression).

## Uses

### System of Equations

Main article: System of equations

Substitution is a relatively universal method to solve simultaneous equations. It is generally introduced in a first year high school algebra class. A solution generally exists when the number of equations is exactly equal to the number of unknowns. The method of solving by substitution includes:

1. Isolation of a variable

2. Substitution of variable into another equation to reduce the number of variables by one

3. Repeat until there is a single equation in one variable, which can be solved by means of other methods.

For example, consider the below system. $$\left\{\begin{array}{l}x+y=-1\\3x-y=5\end{array}\right.$$ An example of solving the system by substitution is when we start by isolating $y$ in the top equation to get $y = -x - 1$. Then, we can replace all instances of $y$ with $(-x-1)$ in the second equation. Doing so results in an equation with one variable, and solving it results in \begin{align*} 3x-(-x-1) &= 5 \\ 3x+x+1 &= 5 \\ 4x+1 &= 5 \\ 4x &= 4 \\ x &= 1. \end{align*} After solving for $x$, we can "plug in" the value $1$ for $x$ to get $y = -(1)-1 = -2$, so the solution to the system is $(1,-2)$. As usual, we can check by substituting $1$ for $x$ and $-2$ for $y$.

This same method is used for simultaneous equations with more than two equations.

### Observing Common Parts

Substitution can also be used when an expression has multiple common parts.

For instance, consider the equation $4^x - 6 \cdot 2^x + 8 = 0$. Note that with exponent properties, we can rewrite the equation as $(2^x)^2 - 6 \cdot 2^x + 8 = 0$. Because there are multiple instances of $2^x$ in the equation, we can let $y = 2^x$ and substitute $2^x$ for $y$ to make the equation easier to solve.

Doing so results in \begin{align*} y^2 - 6y + 8 &= 0 \\ (y-4)(y-2) &= 0 \\ y &= 2, 4. \end{align*} Finally, we can substitute $y$ for $2^x$ to get $2^x = 2$ or $2^x = 4$, resulting in $x = 1$ or $x = 2$. As usual, we can check by substituting $1$ and $2$ for $x$ separately.