5  Variables and equations

In this section we introduce one of the key concepts of algebra: variables. The purpose of variables is to be able to write down a particular computation, and manipulate that computation, in a situation where we don’t know yet what number we want to put into the computation. The variable is a placeholder for the number(s) that we might want to put in… it’s a placeholder for a number that might vary. Typically, we use single letters for variables.

Note

Rather than write \(3\cdot x\), it is customary to simply write \(3x\) for the number three multiplied by the variable \(x\).

Remember that multiplication is simply lazy addition, and so \[ 3x = 3\cdot x = x + x + x. \]

Using this shortcut notation, the equation in Example 5.1 is simply \(y=3x\).

5.1 Constructing equations

Example 5.2 (Practice: constructing equations) For each of the following scenarios, define the variables and then construct the requested equation that relates them.

  1. Each day, Lucas always does 5 more pushups than Hollie. Construct an equation that related the Lucas’ pushup count to Hollie’s.

  2. Metta-the-dog eats two cups of kibble each day. She is going to stay over at a friend’s house, and needs to have her kibble packed for her. Construct an equation relating the number of days she will stay to the amount of kibble that must be packed.

  3. A typical American uses 90 gallons of water per day in their home. A small town is planning for their water system. Construct an equation relating the population of the town and the total amount of home water use by the residents.

  4. Karen always drives 5 miles per hour over the speed limit. Write an equation relating the speed limit and her actual speed.

  1. Let \(H\) = Hollie’s pushup count and \(L\) = Lucas’ pushup count

    Equation: \(H + 5 = L\)

  2. Let \(d\) = number of days and \(k\) = amount of kibble in cups

    Equation: \(2d = k\)

  3. Let \(p\) = population of the town and \(w\) = total water use in gallons per day

    Equation: \(90p = w\)

  4. Let \(s\) = speed limit (in mph) and \(a\) = Karen’s actual speed (in mph)

    Equation: \(s + 5 = a\)

5.2 Using equations

One important use of equations is that we can fix a value for one variable, and then deduce the value of the other variable.

In the previous example, the second scenario (finding a value for \(x\)) was a bit more challenging that the first scenario (finding a value for \(y\)). One of the things that makes algebra interesting is that there are a number of clever methods for deducing the value of a variable, depending on the format of the equation. You will see some of those methods in this class, and some more methods in future algebra classes.

Example 5.4 (Practice: using equations) Use the equation from Example 5.1 to answer the following.

  1. If Paul wants to eat 12 cookies per month, how much should be budget?

  2. If Paul is willing to spend $60 per month on cookies, how many cookies can he buy each month?

  3. If Paul is willing to spend $75 per month on cookies, how many cookies can he buy each month?

  1. \(y = 3(12) = 36\) dollars

  2. \(60 = 3x\), so \(x = 20\) cookies

  3. \(75 = 3x\), so \(x = 25\) cookies

5.3 Solving equations

Vocabulary: solving for a variable

Once we have specified the value of one variable, the resulting equation only has one other variable. The process of finding a value for this other variable is called solving for the variable.

For instance, in the second part of Example 5.3, we were given a value for \(y\) and we solved for \(x\).

Example 5.5 (Practice: solving equations) Use the equations that you constructed in Example 5.2 to address the following.

1a. Lucas did 23 pushups. How many pushups did Hollie do?

1b. Hollie did 18 pushups. How many pushups did Lucas do?

2a. Metta-the-dog will stay for 5 days. How much kibble must be packed?

2b. 14 cups of kibble were packed. How many days will Metta stay?

3a. The town has a population of 850 people. What is the total amount of home water use by the residents?

3b. The total home water use is 7,200 gallons per day. What is the population of the town?

4a. The speed limit is 35 mph. What is Karen’s actual speed?

4b. Karen is driving 60 mph. What is the speed limit?

1a. \(H + 5 = 23\), so \(H = 18\) pushups

1b. \(18 + 5 = L\), so \(L = 23\) pushups

2a. \(2(5) = k\), so \(k = 10\) cups

2b. \(2d = 14\), so \(d = 7\) days

3a. \(90(850) = w\), so \(w = 76,500\) gallons per day

3b. \(90p = 7,200\), so \(p = 80\) people

4a. \(35 + 5 = a\), so \(a = 40\) mph

4b. \(s + 5 = 60\), so \(s = 55\) mph

5.4 Homework exercises

Exercise 5.1 For each of the following scenarios, define the variables and then construct the requested equation that relates them.

  1. A recipe calls for 3 times as much flour as sugar. Write an equation relating the amount of sugar to the amount of flour.

  2. Maria is 7 years older than her sister Ana. Write an equation relating Ana’s age to Maria’s age.

  3. A parking garage charges $4 per hour. Write an equation relating the number of hours parked to the total cost.

  4. The temperature in Taos is always 15 degrees cooler than in Albuquerque. Write an equation relating the Albuquerque temperature to the Taos temperature.

  5. A construction worker earns $25 per hour. Write an equation relating the number of hours worked to the total earnings.

  6. Tomas always runs 2 miles more than Sarah. Write an equation relating Sarah’s distance to Tom’s distance.

  7. To convert feet to inches, you multiply by 12. Write an equation relating feet to inches.

  8. A store marks up the wholesale price of items by adding $8. Write an equation relating the wholesale price to the retail price.

  1. Let \(s\) = amount of sugar and \(f\) = amount of flour

    Equation: \(3s = f\)

  2. Let \(A\) = Ana’s age and \(M\) = Maria’s age

    Equation: \(A + 7 = M\)

  3. Let \(h\) = number of hours and \(c\) = total cost in dollars

    Equation: \(4h = c\)

  4. Let \(a\) = Albuquerque temperature and \(t\) = Taos temperature

    Equation: \(a - 15 = t\) (or \(t + 15 = a\))

  5. Let \(h\) = number of hours worked and \(e\) = total earnings in dollars

    Equation: \(25h = e\)

  6. Let \(S\) = Sarah’s distance in miles and \(T\) = Tomas’ distance in miles

    Equation: \(S + 2 = T\)

  7. Let \(f\) = feet and \(i\) = inches

    Equation: \(12f = i\)

  8. Let \(w\) = wholesale price and \(r\) = retail price

    Equation: \(w + 8 = r\)

Exercise 5.2 Solve each problem using the equation from Exercise 5.1.

1a. The amount of flour needed is 9 cups. How much sugar is needed?

1b. The recipe uses 2 cups of sugar. How much flour is needed?

2a. Maria is 25 years old. How old is Ana?

2b. Ana is 14 years old. How old is Maria?

3a. A customer parked for 6 hours. What is the total cost?

3b. The total cost was $32. How many hours did the customer park?

4a. The temperature in Albuquerque is 78 degrees. What is the temperature in Taos?

4b. The temperature in Taos is 55 degrees. What is the temperature in Albuquerque?

5a. A worker earned $200. How many hours did they work?

5b. A worker worked 9 hours. How much did they earn?

6a. Tom ran 10 miles. How far did Sarah run?

6b. Sarah ran 7 miles. How far did Tom run?

7a. A measurement is 36 inches. How many feet is this?

7b. A measurement is 5 feet. How many inches is this?

8a. The retail price is $45. What was the wholesale price?

8b. The wholesale price was $62. What is the retail price?

1a. \(3s = 9\), so \(s = 3\) cups

1b. \(3(2) = f\), so \(f = 6\) cups

2a. \(25 = A + 7\), so \(A = 18\) years old

2b. \(14 + 7 = M\), so \(M = 21\) years old

3a. \(4(6) = c\), so \(c = 24\) dollars

3b. \(4h = 32\), so \(h = 8\) hours

4a. \(78 - 15 = t\), so \(t = 63\) degrees

4b. \(55 + 15 = a\), so \(a = 70\) degrees

5a. \(25h = 200\), so \(h = 8\) hours

5b. \(25(9) = e\), so \(e = 225\) dollars

6a. \(S + 2 = 10\), so \(S = 8\) miles

6b. \(7 + 2 = T\), so \(T = 9\) miles

7a. \(12f = 36\), so \(f = 3\) feet

7b. \(12(5) = i\), so \(i = 60\) inches

8a. \(w + 8 = 45\), so \(w = 37\) dollars

8b. \(62 + 8 = r\), so \(r = 70\) dollars