# Substitution

In algebra, substitution can refer to a few different things. Most simply, it refers to replacing a variable with a given value. For example, given that x = 7, we can substitute 7 in for x and evaluate the following expression:

7 + 3x - 4 |

7 + 3(7) - 4 = 24 |

We can write this in a number of ways. We can name the expression: F(x) = 7 + 3x - 4. To indicate that we are substituting 7 for x, we could then write F(7). Otherwise, we could also write: 7 + 3x - 4 | x = 7. Both mean to substitute 7 for x in the expression.

## Solving systems of equations with substitution

Substitution is also a method that is used for solving systems of equations. Generally, this involves using one of the equations to write one variable in terms of the other and substituting the expression into the other equation, allowing us to solve for one variable. Once we've solved for one variable, we can plug the value back in to solve for the other.

Example

Given the following equations,

(1) | y - x = 6 |

(2) | x + 3y = 14 |

we can rearrange equation (1) as:

y = 6 + x

We can then plug this expression for y into equation (2).

x + 3(6 + x) = 14

x + 18 + 3x = 14

4x = -4, so x = -1

We can then plug x into the rearranged equation (1): y = 6 + x.

y = 6 + (-1) = 5

Or using equation (2):

-1 + 3y = 14

3y = 15, y = 5

Regardless how we perform the substitution or which equations we use, we should get x = -1, and y = 5.