Example 1
Given the following information, where
represents the cost of a slice of pizza (in dollars) and
represents the cost of a drink (in dollars), determine the cost of a slice of pizza and the cost of a drink.
Source: Pizza and Drink - Redline Vector/iStock/Getty Images
Solution
Notice, in this example, Equation \((1)\) only has one unknown, the cost of a pizza slice.
Let's begin by rewriting Equation \((1)\) using the variable \(p\) to represent the cost of a pizza slice.
We can write Equation \((1)\) as \(p + p + p=12\), which simplifies to \(3p=12\).
Solving for \(p\), we get
\(\begin{align*} 3p&=12\\ p&=\dfrac{12}{3}\\ p&=4 \end{align*}\)
Therefore, the cost of one slice of pizza is \($4\).
Now that we know the cost of a slice of pizza, we can use this to help us solve for the cost of a drink.
We can rewrite the second equation using the variables \(p\) (to represent the cost of a pizza slice) and \(d\) (to represent the cost of a drink.)
This gives us \(p+d+d=7\), which simplifies to
\(p+2d=7\)
Knowing \(p=4\), we can substitute this value which will allow us to solve for the value of \(d\). Substituting and solving, we get
\(\begin{align*}p+2d &=7 \\ 4 + 2d &=7 \\ 2d &= 7-4 \\ 2d &= 3 \\ d &= \dfrac{3}{2} \\ d &= 1.5\end{align*}\)
Therefore, the cost of a drink is \($1.50\).
Now let's consider an example where we have two unknowns in both of the equations that we are given.
Example 2
Solve the system of equations by substitution:
\(2x+5y=-9 \tag{1}\)
\(x+3y=-6 \tag{2}\)
Solution
First, let's take a moment to recall that when we are asked to solve a system of equations with two linear relations, it is another way of being asked to find the point of intersection of the two lines.
In this example, we will formalize the process of substitution by stating the steps that can be followed.
Step 1: Isolate one variable in terms of the second
This step will be easier if you can choose to work with an equation that has a variable with a coefficient of \(1\).
This will mean you do not have to divide out the coefficient to isolate the variable, and will avoid having to work with fractions.
In this example, the preferred equation to use is Equation \((2)\), and we will isolate for \(x\). This gives us
\(\begin{align*} x +3y &= -6 \\ \class{hl1}{x} &\class{hl1}{= 3y-6}\end{align*}\)
Step 2: Substitute the expression into the equation not used in Step 1
This step will give us one equation with one unknown. Since we used Equation \((2)\) in Step 1, we will now use Equation \((1)\).
Note, if you accidentally substitute back into the equation you used in Step 1, everything will cancel out, giving you \(0=0\) and you will not be able to continue with your solution.
Continuing here using Equation \((1)\), where we see \(x\), we will substitute \(-3y-6\). This gives us
\(\begin{align*} 2\class{hl1}{x} +5y &= -9 \\ 2\class{hl1}{(-3y-6)}+5y &= -9 \end{align*}\)
Step 3: Solve for the variable
With the substitution complete, we are left with an equation with one unknown, \(y\). This means we can now solve for the value of \(y\).
To solve, we will first use the distributive property to give us
\(\begin{align*} 2(-3-6)+5y &= -9 \\ -6y - 12 + 5y &= -9 \end{align*}\)
Collecting like terms and simplifying, we get
\(\begin{align*} 2(-3-6)+5y &= -9 \\ -6y - 12 + 5y &= -9 \\ -6y + 5y &= -9+12 \\ -y &= 3\\ y &= -3 \end{align*}\)
Step 4: Substitute the value to solve for the second variable
Now that we know the value of \(y\), we can solve for \(x\). In this step, it does not matter which equation you choose to work with. For our solution, we will use Equation \((2)\), \(x+3y=-6\).
Substituting \(y=-3\) and solving we get
\(\begin{align*} x + 3y &= -6 \\ x+3(-3) &= - 6 \\ x-9 &= -6 \\ x&= -6 + 9 \\ x&=3 \end{align*}\)
Step 5: Check the solution \((x,y)=(3,-3)\) in the equation not used in Step 4
Because we used Equation \((2)\) solve for the second unknown \(x\), we will use Equation \((1)\) to check our solution. We will substitute \(x=3\) and \(y=-3\) into Equation \((1)\) to ensure the left side of the equation is equal to the right side of the equation.
Using Equation \((1)\):
\(\begin{align*} \text{LS} &= 2x + 5y \\ &= 2(3) + 5(-3) \\ &= 6- 15 \\ &=-9\end{align*}\)
\(\text{LS}=\text{RS}\)
Therefore, the solution to the system of equations is \((3,-3)\). Or in other words, the two lines will intersect at the point \((3,-3)\).
Graphing both lines,\(2x+5y=-9\) and \(x+3y=-6\), we can see the solution as the point of intersection of the two lines.
