Skip to main content

Section 2.2 Solving Equations

In order to solve problems, it helps to be comfortable solving algebraic equations. In this section we will first talk about solving algebraic equations of a certain type (called linear equations), solving multiple linear equations at the same time, and then talking about some problem solving strategies that you can use to try and get a handle on a problem where the answer and/or approach isn’t immediately obvious.
First, let’s give somewhat careful definitions of the objects we care about in equations, and the types of equations we wish to solve. For this section, all coefficients of variables will be integers (that is, positive or negative whole numbers) but some of the solutions to our equations may be rational numbers. In general, these techniques will work with any real numbers in most situations.

Definition 2.2.1.

An expression is a combination of mathematical symbols without a relational symbol (e.g. \(=, \leq\)) symbol relating it to another combination of mathematical symbols. A term is an expression that does not include a addition or subtraction operation (outside of necessary brackets).
A coefficient of a term that includes a variable is the number that variable is multiplied by.
Terms only containing numbers are called constants.
An equation is two equal expressions with an equal sign between them.
To solve an equation for a variable \(x\) means to perform arithmetic operations on both sides of the equation (while maintaining equality) so that the equation is now in the form \(x = \ldots\text{.}\) Note that if there is only one variable, specifying the variable is usually omitted.

Example 2.2.2.

Consider the equation \(3x+4= 5-6x\) which is made of two expressions, \(3x+4\) and \(5-6x\) . In the term \(3x\) on the left hand side (or LHS) of the coefficient is \(3\text{,}\) and in the term \(-6x\) on the right hand side (or RHS) of the equation the coefficient is \(-6\) (here, we are viewing \(5-6x\) as \(5+(-6)x\text{.}\) We will be more precise about this later in the book.)
Sometimes we can have unknown coefficients even in terms with variables, but we specify that these are indeed coefficients. For example, we could have the expression \(ax+by\) where we are thinking of \(x,y\) as our variables and \(a,b \in \mathbb{N}\) as our coefficients.

Definition 2.2.3.

An equation over one (or more) variables is called a linear equation exactly when every term of the equation has at most one variable in it, and that variable has an exponent of \(1\text{.}\)

Example 2.2.4.

\(3x+4 = 6x-7\) is a linear equation since each term has (at most) one copy of \(x\text{.}\)
Similarly, \(3x+4y=7\) is another linear equation since both \(3x\) and \(4y\) have exactly one copy of \(x,y\) in them, and \(7\) has no \(x\)’s or \(y\)’s.
Now a non-example: \(3xy-4x^2=6\) is *not* a linear equation. Here there are two problems (note that just one is enough to disqualify it from being a linear equation): the first term has two variables in it, \(x\) and \(y\text{.}\) Also the second term has two copies of \(x\) multiplied together, since by the definition of exponents \(x^2 = x \times x.\)

Subsection 2.2.1 Solving One Equation

Before we get into the idea of translating a "real world" problem into the language of mathematics, we’ll go over some very important skills to solve many of these problems, which is solving linear equations (or systems of equations). Let’s start with the simplest of cases: solving one equation with one variable.
Let \(x\) be the symbol for our variable, and let \(a,b,c,d \in \mathbb{Z}\) be our coefficients. After collecting like terms, any linear equation can be written in the form \(ax+b=cx+d\text{.}\) As long as \(a \neq c\) we can follow these following steps (called an algorithm) to solve for our variable \(x\text{.}\)
  1. Subtract \(cx\) and \(b\) from both sides of the equation. This gives us
    \begin{equation*} ax+b -cx-b = cx+d -cx - b \end{equation*}
    \begin{equation*} \rightarrow ax-cx = d-b \end{equation*}
    \begin{equation*} \rightarrow (a-c)x=d-b \end{equation*}
  2. Divide everything on both sides by the coefficient \(a-c\text{.}\) This gives us
    \begin{equation*} \dfrac{(a-c)x}{(a-c)} = \dfrac{(d-b)}{(a-c)}. \end{equation*}
    Cancelling out the \(a-c\) we have
    \begin{equation*} x = \dfrac{(d-b)}{(a-c)}. \end{equation*}
We could just memorize the formula above, but there are so many different situations that arise in mathematics that it isn’t feasible to remember everything. However, if you have a strong knowledge of the ideas behind equality and arithmetic of equations, you can recreate this when the need arises.

Example 2.2.5.

What number can we substitute in for \(x\) to solve the equation \(x+5=8\text{?}\)
Solution 1.
Let’s solve \(x+5=8\text{.}\) The easiest way to view this is asking "what number can I add to 5 to get 8". We can formally solve for \(x\) here by subtracting 5 from both sides:
\begin{equation*} x+5-5=8-5 \end{equation*}
\begin{equation*} \rightarrow x = 3. \end{equation*}
We can solve this using the general algorithm above by viewing the equation as \(x+5=0x+8\text{.}\) Then \(x = \dfrac{8-5}{1-0} = 3.\)
What number can we substitute in for \(a\) to solve the equation \(7(a-4)=4-(4-3a)\text{?}\)
Solution 2.
We can solve \(7(a-4)=4-(4-3a)\) by first expanding out the brackets and then combining like terms so that the equation is in the standard form given in the algorithm:
\begin{equation*} \rightarrow 7a-28 = 4-4+3a \end{equation*}
\begin{equation*} \rightarrow 7a -28 = 3a. \end{equation*}
Noting that we can view the RHS of the equation as \(3a+0\text{,}\) we can now use our algorithm above, giving us \(a = \dfrac{0-(-28)}{7-3} = \dfrac{28}{4} = 7.\)
We can check our answers by substituting our solution for the variable and making sure that equality holds. For the second equation we have
\begin{equation*} 7(7-4) \mathop{=}\limits^? 4-(4-3(7)) \end{equation*}
\begin{equation*} \rightarrow 7(3) \mathop{=}\limits^? 4-(4-21) \end{equation*}
\begin{equation*} \rightarrow 21 \mathop{=}\limits^? 4-(-17) \end{equation*}
\begin{equation*} \rightarrow 21 = 21. \end{equation*}
Since we do indeed have equality our solution is correct.

Checkpoint 2.2.6.

Solve the following linear equations. Check your work by substituting your answer into the original equation and checking that equality holds.
  1. \begin{equation*} 7x=91 \end{equation*}
  2. \begin{equation*} 5k-6=-79 \end{equation*}
  3. \begin{equation*} -3y+1 = 7y-8 \end{equation*}
  4. \begin{equation*} 4t+2(4-3t) = 2-6(t-1)+3t \end{equation*}
Solution.
  1. \(\displaystyle x=13\)
  2. \(\displaystyle x=-17\)
  3. \(\displaystyle y=\dfrac{9}{10}\)
  4. \(\displaystyle t=0\)

Subsection 2.2.2 Intro to Systems Of Equations

In many scenarios, we are given two (or more) relationships between two (or more) unknown quantities and we need to use these to find the unknown quantities that satisfy these relationships.

Example 2.2.7.

A typical problem might look like this:
On Monday, you spend \(\$ 9\) to buy two medium coffees and one pizza burger. On Tuesday, you spend \(\$ 15.50\) to buy three medium coffees and two pizza burgers. How much is one medium coffee, and how much is one pizza burger?
Let’s define \(C:=\) the price of a medium coffee (dollars) and \(P:=\) the price of a pizza burger (dollars). We can translate the two sentences above to the equations
\begin{equation*} 2C + P = 9 \end{equation*}
\begin{equation*} 3C + 2P = 15.5. \end{equation*}
Here, we can check that if a medium coffee is $2.50 and a pizza burger is $4, that is \(C=2.5\) and \(P=4\text{,}\) both equations are satisfied, and thus both of the sentences above are true:
\begin{equation*} 2(2.5)+4 = 9 \end{equation*}
\begin{equation*} 3(2.5)+2(4) = 15.5 \end{equation*}
In this section, we will learn some methods of solving problems like finding these quantities in the example above. Note that we will limit our study to situations with \(2\) linear equations and \(2\) variables (which we call "2 by 2 systems of equations") but these methods can be expanded to solve larger systems.
First of all, let’s define a system of equations. Note that unless otherwise stated, all equations are linear equations.

Definition 2.2.8.

A system of equations is a set of equations where equality holds in each of these simultaneously; that is, all equations are true at the same time.
Example 2.2.9.
The two equations in the previous example are a system of equations. We know that two coffees and two pizza burgers coming to $9 is true, and we also know that similarly for the other equation. So both equations are true simultaneously.

Subsection 2.2.3 Substitution

We can use the ideas of equality to help us solve systems of equations. Remember from DefinitionΒ 2.1.3, when two expressions equal, we can substitute one for the other whenever it is convenient. The idea is that since we know how to solve one equation with one variable, so we want to convert a 2 by 2 system of equations into one equation with one variable via substitution. Let’s look at ExampleΒ 2.2.7 in the previous section:
We have the system
\begin{equation*} 2C + P = 9 \end{equation*}
\begin{equation*} 3C + 2P = 15.5. \end{equation*}
Notice that both equations have the variables \(C\) and \(P\) in them. If we could "substitute out" one of the variables in terms of the other by first solving one of the equations for one of the variables, then we would be in a familiar situation with one equation and one variable. This will be our goal.
There isn’t a "correct" choice of variable to solve for (any will indeed do!) we notice it seems easiest to solve for \(P\) in the first equation, as it has a coefficient of \(1\text{,}\) so we do not have to divide at the end to solve for \(P\text{.}\) Solving for \(P\) in the first equation we have
\begin{equation*} P = 9-2C. \end{equation*}
Now any time we see a \(P\) in an equation we can replace, or "substitute" it with \(9-2C\text{.}\) Let’s do this substitution in the second equation:
\begin{equation*} 3C+2(9-2C) = 15.5. \end{equation*}
Here we have one equation with the one variable \(C\text{,}\) so we can use the steps to solve this from the previous section:
\begin{equation*} 3C+18-4C = 15.5 \end{equation*}
\begin{equation*} -C+18 = 15.5 \end{equation*}
\begin{equation*} -C=-2.5 \end{equation*}
\begin{equation*} C = 2.5. \end{equation*}

Checkpoint 2.2.10.

Describe the steps in each line of the previous part of this example.
Now that we know \(C = 2.5\) we can substitute this in to either equation to solve for our other unknown, \(P.\) We will substitute this into the first equation:
\begin{equation*} 2(2.5)+P = 9 \end{equation*}
\begin{equation*} 5 +P=9 \end{equation*}
\begin{equation*} P = 4. \end{equation*}

Checkpoint 2.2.11.

Describe the steps in each line of the previous part of this example.
Now that we have values for all of our variables, we have solved this system of equations. We can check our work by substituting both values into the other equation to make sure equality does indeed hold (as we want both equations to be true simultaneously.)
\begin{equation*} 3(2.5) + 2(4) \mathop{=}\limits^? 15.5 \end{equation*}
\begin{equation*} 7.5+ 8 \mathop{=}\limits^? 15.5 \end{equation*}
\begin{equation*} 15.5=15.5. \end{equation*}
Since we do indeed achieve equality in both equations, we have our solution.
Let’s write these steps as an algorithm:
  1. Choose one of the variables in one of the equations.
  2. Solve the equation for this variable.
  3. Substitute this into the second equation for the solved variable
    Simplify this equation. You now have one equation with at most one variable. If you have no variables left, you either have infinitely many solutions or no solutions (we will be able to tell which later in the chapter) and you are done.
  4. If it still exists, solve this equation for the variable. You should have some number.
  5. Substitute this number into either equation and solve for the remaining variable.
  6. Check your work by substituting the solved values for both variables into the equation not used in the previous step. If you do indeed have equality, your solution is a solution for the system of equations.

Subsection 2.2.4 Elimination

There is another method for solving systems of equations that involves cleverly adding or subtracting multiples of one equation from another. We will explore why this method works, but first we will see the method in action:

Example 2.2.12.

Let’s look at the same example as in the previous sections; that is, the system of equations
\begin{equation*} 2C + P = 9 \end{equation*}
\begin{equation*} 3C + 2P = 15.5. \end{equation*}
Let’s subtract two times the first equation from the second equation (we’ll write this as II - 2I, where I is the first equation and II is the second) by performing the operations on either side of the equals sign separately; when we do that, we will "eliminate" the variable \(P\) from the second equation, and then we’ll be left with one equation with one variable:
\begin{equation*} [II - 2I] \rightarrow [3C+2P - 2(2C+P) = 15.5-2(9)] \end{equation*}
\begin{equation*} \rightarrow 3C+2P - 4C - 2P = 15.5-18 \end{equation*}
\begin{equation*} \rightarrow -C = -2.5 \end{equation*}
\begin{equation*} \rightarrow C = 2.5. \end{equation*}
Now that we know \(C=2.5\) we can substitute that in to either equation and solve for \(P\text{,}\) similarly to the previous example. Thus we have \(P = 4\text{.}\)
As you can see, both methods give the same answer (which is a good thing, of course!). But why does this method work? We will give an example in the case of subtraction, but any operation will work. Note that in practice, addition and subtraction are the most useful in these scenarios.
Imagine we had a system of two equations. We will call the left hand sides of the first and second equation \(L_1\) and \(L_2\text{,}\) respectively. Similarly, we will call the right hand sides \(R_1\) and \(R_2\text{.}\) (Note that in our previous example \(L_1 = 2C+P\) and \(R_1 = 9\)). We can view the system in general as
\begin{equation*} L_1 = R_1 \end{equation*}
\begin{equation*} L_2 = R_2. \end{equation*}
By the property of arithmetic equality, we can subtract \(L_2\) from both sides of Equation I. Thus:
\begin{equation*} L_1-L2 = R_1-L_2 \end{equation*}
Now since \(L_2 = R_2\) we can use the property of substitution to substitute \(R_2\) for \(L_2\) in the right hand side:
\begin{equation*} L_1 - L_2 = R_1 - R_2 \end{equation*}
Thus, we have subtracted Equation II from Equation I and showed that the idea of elimination makes sense.

Checkpoint 2.2.13.

Use the above explanation as a guide to justify that if \(L_1 = R_1\) and \(L_2 = R_2\) then \(L_1 + L_2 = R_1 + R_2\text{.}\)
A few notes:
  1. The method of elimination is more useful when you have larger systems of equations with more equations and/or more variables. In the \(2 \times 2\) case, substitution is generally easy enough to do. However, it is good practice to be able to use the elimination method, as it is extremely more efficient and useful than substitution in these larger systems.
  2. You can eliminate any variable using any equation in your system that you want. It’s usually a good idea to choose a variable with small/easy-to-work-with coefficients, but if you choose another variable, you will still get the correct result.
  3. Once you choose a variable to eliminate, a common and useful technique is to multiply each equation by the coefficient of the variable in the other equation, and then add or subtract to eliminate that variable.

Example 2.2.14.

Let’s solve the system
\begin{equation*} 2C + 3P = 13 \end{equation*}
\begin{equation*} 4C - P = 5 \end{equation*}
We will eliminate the variable \(P\text{.}\) Note that in Equation I the coefficient of \(P\) is 3, and in Equation II it is -1. We want to eliminate this variable, so we need to multiply our equation by a number so that the coefficients of \(P\) in both equations are of opposite sign. To make them opposites, we can multiply Equation II by 3:
\begin{equation*} [3 \times II] β†’ 3(4C - P) = 3Β·5 \end{equation*}
\begin{equation*} \rightarrow 12C - 3P = 15 \end{equation*}
Now Equation I is \(2C + 3P = 13\) and our new equation is \(12C - 3P = 15\text{.}\) If we add them, the \(P\)-terms cancel:
\begin{equation*} [I] + [3 \times II] β†’ (2C + 3P) + (12C - 3P) = 13 + 15 \end{equation*}
Note that we need to add both the left hand sides
\begin{equation*} \rightarrow 14C + 0Β·P = 28 \end{equation*}
\begin{equation*} \rightarrow 14C = 28 \end{equation*}
Now we can solve this equation using our usual methods for one equation and one variable.
\begin{equation*} \rightarrow C = 2 \end{equation*}
Having found \(C = 2\text{,}\) we can now substitute into either original equation. Using Equation II:
\begin{equation*} 4(2) - P = 5 \end{equation*}
\begin{equation*} \rightarrow 8 - P = 5 \end{equation*}
\begin{equation*} \rightarrow -P = -3 \end{equation*}
\begin{equation*} \rightarrow P = 3 \end{equation*}
Therefore, the solution is \((C,P) = (2,3)\text{.}\) Each step used only arithmetic operations on both sides of the equations and the fact that adding or subtracting equal quantities preserves equalityβ€”so the β€œelimination” of \(P\) left us with a single-variable equation. We could have eliminated \(C\) instead and we would, of course, find the same solution to this system.
Elimination also works for systems that have three or more equations and variables. By combining equations to remove one variable at a time, you can reduce a large system to a single-variable equation and then "back-substitute" one equation at a time to find the remaining unknowns. Those techniques are very powerful for handling larger systems, but we will not go further here.

Subsection 2.2.5 How Many Solutions Does a System of Equations Have

In systems of equations, there are three possibilities of the number of solutions there are; either the system has exactly one solution, exactly zero solutions, or infinitely many solutions. We’ve seen what happens when a system has exactly one solution, so we will now look at cases where there are either no or infinitely many solutions.

Example 2.2.15.

Consider the following system:
\begin{equation*} 2x-3y=7 \end{equation*}
\begin{equation*} -4x+6y=4. \end{equation*}
Solve this system using either substitution or elimination. What do you notice?
Solution.
Did you see that both of the variables are eliminated at the same time? In fact, you’ll end up with some nonsense equation like \(0=3\) or \(1=-4\) or some other obvious nonsense (depending on how you tried to solve the system). For what values of \(x,y\) does your nonsense equation hold? None! So in this case there are exactly no solutions.
In fact, you may have noticed that if we divided Equation II by -2 we obtain the system
\begin{equation*} 2x-3y=7 \end{equation*}
\begin{equation*} 2x-3y=-2. \end{equation*}
There is no way that \(2x-3y\) can equal both 7 and -2 at the same time.

Checkpoint 2.2.16.

Make two different systems of two equations with two variables that have no solutions. Try to solve them using both substitution and elimination to see what happens.

Example 2.2.17.

Consider the following system:
\begin{equation*} 6a-b=1 \end{equation*}
\begin{equation*} 12a+2b=2. \end{equation*}
Solve this system using either substitution or elimination. What do you notice?
Solution.
Like the previous example, both variables are eliminated at the same time. However, unlike the example above, here we’re left with an equation that is always true, like \(0=0\) or \(1=1\) or something similar. This means that introducing the second equation did not reduce the number of solutions for this system. In fact, we’re free to choose one of \(a\) or \(b\) and then we can determine the other. For example if \(a=1\) then you can check that \(b=-5\text{.}\) So we have infinitely many pairs of numbers that solve this system.
Can you find three other pairs of numbers \((a,b)\) that are solutions?
In fact, you may have noticed that if we divided Equation II by 2 we obtain the system
\begin{equation*} 6a-b=1 \end{equation*}
\begin{equation*} 6a-b=1. \end{equation*}
Of course, this is just two copies of the same equation!

Checkpoint 2.2.18.

Make two different systems of two equations with two variables that have infinitely many solutions. Try to solve them using both substitution and elimination to see what happens. Then find at least two different solutions for each system you made.
Putting this all together, a 2x2 system of equations has:
  1. No solutions if, when solving the system, you obtain a "nonsense" equation without variables, for example \(0=1\text{.}\)
  2. Infinitely many solutions if, when solving the system, you obtain an equation without variables that is always true, for example \(0=0\text{.}\)
  3. Exactly one solution in every other case.