Variables

Sections

Introduction

Throughout this text you will encounter many variables. For example, \(F\) may represent the strength of a force, \(\vec{F}\) represents a force vector (a vector includes both a positive number and a direction), \(f\) represents frequency, \(P\) may represent period or pressure, \(E\) represents energy, and so on. The particular value that a variable represents may depend on the specific context in which it is used. In addition, there is a difference between lowercase letters and uppercase letters; \(F\) means something different than \(f\), so it is very important to make clear distinctions between the two when you write equations. It is also important to distinguish between a scalar, \(F\), (a single number) and a vector, \(\vec{F}\), so be sure to include the arrow above the symbol when representing a vector.

Variables as Placeholders

Whatever the meaning of a particular variable, just remember that a variable is simply a placeholder for a number or a vector. Since any equation typically involves many different values for a variable depending on the specific problem, using variables rather than the numbers themselves gives equations a great deal of flexibility. However, when working with variables in an equation you treat them exactly like they are numbers; they obey all of the same rules for multiplication, division, addition, subtraction, grouping with parentheses, exponents, and order of operations. For example, consider the relationship between the frequency and wavelength of a sound wave,

$$f\lambda = v.$$

In this equation \(f\) stands for frequency, \(\lambda\) (the Greek alphabet symbol “lambda”)1 stands for wavelength, and \(v\) is the speed of the sound wave. Note that multiplication is assumed when two variables are written next to one another, as in \(f\lambda\). This is to be read as \(f\) times \(\lambda\) or \(f \times \lambda\) or it can be read more simply as “f lambda” with the multiplication implicitly assumed.

1See Table 4.1 in Astronomy: The Human Quest for Understanding for a complete list of Greek letters.

As an example, suppose you hear a musical note with a pitch (the frequency) of \(f = 262\ \text{Hz}\) (middle C) and the wavelength of that note is measured to be \(1.32\ \text{m}\). According to the relationship, frequency times wavelength equals the speed of sound. Therefore, in this case, substituting the actual values for their placeholder variables we find that

$$f\lambda = 262\ \text{Hz} \times 1.32\ \text{m} = 346\ \text{m/s}.$$

Thus, the speed of sound in this example is \(346\ \text{m/s}\). Note that the speed of sound is definitely not a constant; it depends on the physical environment through which the sound moves.

If you were following the units as well as the arithmentic (as you should!) you have seen that you should have ended up with a combination of units of \(\text{Hz}\cdot\text{m}\) (Hertz times meters). The frequency unit of Hertz is one you may have heard of in some other context, such as in electricity (\(60\ \text{Hz}\) wiring in your house or dorm room). Hertz actually stands for cycles per second. Since the number of cycles, or repeating patterns, is just a number without any units of its own, Hertz can be written as \(\text{Hz} = 1/\text{s}\) (some students find \(\text{Hz}\) to be a real pain; pun intended). In the last equation you can then make that substitution for \(\text{Hz}\) and get the correct final units of \(\text{m/s}\). This change of units is just another example of unit conversion, for which there is a unit conversion tutorial available.

A Note About Constants

Along with variables, equations can contain constants. Clearly in an equation like \(2x = y\), \(2\) is a constant while \(x\) and \(y\) are variables. However, it is also the case in many equations that certain letters may represent constants (some of which are universally reserved as physical constants). In our example above, \(f\lambda = v\), where \(f\), \(\lambda\), and \(v\) are all variables, although not entirely independent of one another since specifying the values of two of them forces the value of the third. If the equation had represented the very special case of light waves, then the value of \(v\) is always \(\text{299,792,458}\ \text{m/s}\) in a vacuum (often rounded off to \(3\times 10^8\ \text{m/s}\)). Since the speed of light is a universal constant of nature, it is the same everywhere in the universe and has always had the same value since the beginning of time. The speed of light is symbolized by \(c = 3\times 10^8\ \text{m/s}\). Therefore, in the case of the relationship between frequency, wavelength, and the speed of light, the equation becomes

$$f\lambda = c.$$

Now \(c\) is not allowed to change (it represents a constant, not a variable), meaning that if the frequency is specified, there is only one value of \(\lambda\) that is allowed; the one that, when multiplied by \(f\), gives the value of the speed of light, \(c\).

Suppose that you see the color blue with a wavelength2 of \(\lambda = 450\ \text{nm} = 4.5 \times 10^{-7}\ \text{m}\). Since the speed of the light wave is always \(c\), the only frequency that works is \(6.7 \times 10^{14}\ \text{Hz}\). As a result, the frequency of the blue light that you saw is \(6.7 \times 10^{14}\ \text{Hz}\).

2Note that \(\text{nm}\) is short for \(1\times 10^{-9}\ \text{m}\). \(n\) is a prefix. A list of prefixes is provided in Table 5.1 in Astronomy: The Human Quest for Understanding.

Solving for the Unknown Value

In this section consider the problem of finding an unknown value if all of the other values in the equation are already known. Although this can be difficult in many cases we will focus on just a couple of types of equations in this course.

Before actually solving a general equation, first consider an equation that has only one variable in it:

$$2x = 5.$$

You may have already “guessed” that \(x\) needs to be \(\displaystyle\frac{5}{2}\) in order for the equation to be valid, but how did you get to that conclusion?

There is one major requirement for solving equations like this: Do unto the left side as you would do unto the right side. If you add a number to the left side you must add exactly the same amount to the right side and if you multiply the left side by a number, you must multiply the right side by the same number.

To see this with numbers, rather than variables, consider starting with the obvious statement that \(3 = 3\). If you add the same number to both sides, say \(2\), then you have \(2 + 3 = 2 + 3\), but of course, this is exactly the same as \(5 = 5\). Although the numbers on both sides of the equation changed by adding \(2\) to both sides, the left side still equals the right side. It is the equality that you must maintain.

The same thing happens when you multiply both sides by the same number. Again, starting with \(3 = 3\), and this time multiplying by \(2\) results in \(2 \times 3 = 2 \times 3\), or \(6 = 6\). Equality is maintained in this case as well.

The same principle applies when you subtract a number from the left side; you must subtract the same number from the right side. When you divide the left side by a number you must divide the right side by the same number.

Now, going back to the original equation \(2x = 5\), we want to find out what \(x\) equals. To do so you need to figure out what we can multiply or divide by on both sides of the equation so that we leave \(x\) by itself on the left side. Whatever ends up on the right side is the value of \(x\). Since \(x\) is multiplied by \(2\), if we divide both sides by \(2\) we simply have \(x\) remaining, or

$$2x \div 2 = 5 \div 2\ \ \ \ \ \text{which gives}\ \ \ \ \ x = 2.5.$$

Since division is just the inverse of multiplication, it is also possible to multiply both sides by \(1 \div 2\), or \(\displaystyle \frac{1}{2}\). In fact, doing it this way makes solving for \(x\) more straightforward-looking:

$$\frac{1}{2} \times 2 \times x = \frac{1}{2}\times 5\ \ \ \ \text{or}\ \ \ \ \frac{2x}{2} = \frac{5}{2}.$$

Cancelling \(2\) in both the numerator and the denominator on the left-hand-side we arrive at

$$x = \frac{5}{2} = 2.5.$$

This works because any number (except \(0\)) multiplied by its reciprocal (\(1\) over the number) is always \(1\). Multiplying by the reciprocal is the same thing as dividing a number by itself. In this example \(\displaystyle \frac{1}{2}\times 2 = \frac{2}{2} = 1\).

Whenever you need to divide both sides by a quantity, multiply both sides by its reciprocal instead.

Sometimes you may need to take a couple of steps to get to your answer. For example, suppose that

$$2x + 3 = 15.$$

In this situation you first want to isolate the \(2x\) by itself on the left side of the equation. To do so, subtract \(3\) from both sides, or

$$2x + 3 – 3 = 15 – 3\ \ \ \ \text{which gives}\ \ \ \ 2x = 12.$$

Now you can proceed just as you did in the previous example, namely multiply both sides by the reciprocal of \(2\), or \(\displaystyle \frac{1}{2}\), giving

$$\frac{1}{2} \times 2x = \frac{1}{2} \times 12\ \ \ \ \text{or}\ \ \ \ x = \frac{12}{2} = 6.$$

Thus, \(x = 6\).

It is important to always check you answers, which you can do by simply replacing \(x\) with the result you found. If the solution is valid, the left side must equal the right side. In our second example, making the substitution gives

$$2x + 3 = 2 \times 6 + 3 = 12 + 3 = 15,$$

which is what was on the right side when we started solving for \(x\). The solution works. (Note that multiplication takes precedent over addition; see the order of operations tutorial for a refresher.)

What about the case where there is more than one variable in an equation, but all of the variables are known except one? In this case you have two strategies; you can substitute the known values first and then solve for the last unknown value, or you can solve it symbolically first, and then substitute the values. Either approach works.

If you use the first strategy everything looks like what we have already done. For example, suppose that the equation is \(xy = 7z – 8\) and you are told that \(y = 8\) and \(z = 35\), then

$$xy = 7z – 8\ \ \ \ \text{becomes}\ \ \ \ \ 8x = 7 \times 35 – 8 = 237\ \ \ \ \text{or}\ \ \ \ 8x = 237.$$

Multiplying both sides by the reciprocal of \(8\) (namely \(\displaystyle \frac{1}{8}\)) gives

$$\frac{1}{8} \times 8 \times x = \frac{1}{8} \times 237\ \ \ \text{leading to}\ \ \ \ x = \frac{237}{8}\ \ \ \ \text{or}\ \ \ \ x = 29.625.$$

In the second strategy, which is actually more general, begin by dividing both sides of the equation by \(y\) (multiplying by \(\displaystyle \frac{1}{y}\)), giving

$$\frac{1}{y} \times x \times y = \frac{1}{y} \times (7z – 8).$$

It is very important to remember that you are actually multiplying everything on the right side by \(\displaystyle \frac{1}{y}\). Since \(\displaystyle \frac{1}{y} \times y = 1\), the equation now becomes

$$x = \frac{7z – 8}{y}.$$

Although it may not look like it, this is exactly the same solution we had above. To see that, simply substitute the known values, which are all on the right-hand side now:

$$x = \frac{7 \times 35 – 8}{8} = \frac{237}{8} = 29.625.$$

You should verify for yourself that substituting the values of \(x\), \(y\), \(z\) in the original equation results in the same number on both sides of the equation.

One last point: If the variable you want to solve for happens to be on the right side of the equation, you can simply swap sides since the relationship is an equality. In other words, if

$$8y = 6x + 2$$

and you need to solve for \(x\), you can always write the equation as

$$6x + 2 = 8y.$$

and proceed as you normally would.

Note: It is also possible to solve for the unknown variable in the case where it is located in an equation with exponents. Solving these sorts of problems will be left to the tutorial on exponents.

Quiz Yourself

To make sure that you understand how to solve for unknown variables, try the problems below.

  1. Find the value of \(x\) in the equation \(5x = 13\).
  2. Find the value of \(m\) in \(8m + 3 = 82.\).
  3. Find \(\lambda\) in the equation \(8\lambda = 16.3\).
  4. Suppose that \(f = 120\ \text{Hz}\) and \(v = 200\ \text{m/s}\). Find the value of \(\lambda\).
  5. \(3.2y – 17 = 13x + 4\). Determine the value of \(x\) if \(y = 15.3\).

Answers

  1. \(\displaystyle x=\frac{13}{5}=2.6\vphantom{\Large\frac{1}{1}}\)
  2. \(\displaystyle m=\frac{(82-3)}{8} = 9.875\vphantom{\Large\frac{1}{1}}\)
  3. \(\displaystyle \lambda=\frac{16.3}{8} = 2.0375\vphantom{\Large\frac{1}{1}}\)
  4. Since \(f\lambda=v\), \(\displaystyle \lambda=\frac{v}{f} = \frac{200~\text{m/s}}{120~1/\text{s}} = 1.67~\text{m}\vphantom{\Large\frac{1}{1}}\)
  5. \(\displaystyle x=\frac{3.2y-21}{13}=\frac{3.2\times 15.3 – 21}{13} = 2.15\vphantom{\Large\frac{1}{1}}\)
Scroll to Top