Skip to main content
Logo image

Chapter 2 Functions and graphs

Section 2.1 Basics

A function is an input-output process. While more generally a function definition can specify any kind of input and any kind of output, for us a function will always be one number in, one number out.
Schematic of a function as an input-output process.
Figure 2.1.1. Schematic of a function as an input-output process.
There are three components to function notation \(f(t)\text{:}\)
input
The input value is represented by the independent variable \(t\) and is placed inside parentheses.
output
The full expression \(f(t)\) represents the output value that corresponds to the particular input value \(t\text{.}\)
name
The name of a function is often represented by the letter \(f\) (for function), but other letters can be used.
Some functions have special names; for example:
  • \(\sin\text{,}\) \(\cos\text{,}\) and \(\tan\) for the trigonometric sine, cosine, and tangent functions
  • \(\ln\) and \(\exp\) for the natural logarithm and exponential functions.
A function is not a formula. A formula is just one way to describe the input-output process of a function, but there are other ways to do so, including:
  • a table of values
  • a graph
  • a description in words.

Example 2.1.2. A function defined by a table of values.

Let \(f\) represent the function produces outputs \(f(t)\) from inputs \(t\) according to the following table.
\(t\) \(0\) \(1\) \(2\) \(3\) \(\pi\)
\(f(t)\) \(0\) \(1/3\) \(-2\) \(2\) \(\sqrt{5}\)
For example, the table says that \(f(1) = 1/3\text{.}\)

Example 2.1.3. A function defined by a description.

A device that measures wind speed is called an anemometer. Suppose an anemometer is set up in the quad of the Augustana Campus. For \(t\) representing time measured in seconds from the instant the anemometer is fully set up and operational, let \(w(t)\) represent the wind speed measured by the device at time \(t\text{,}\) in kilometres per hour.
It would be pretty difficult to come up with a formula in \(t\) that describes the function in Example 2.1.3. However, as we’ll see in Example 2.3.8, it’s possible (but tedious) to create a “formula” for a function that has initially been defined by a table of values, as in Example 2.1.2.
The information in Example 2.1.2 seems incomplete — how can we determine \(f(-1)\) or \(f(1/2)\) from the table? Since the function description does not specify how to determine output values for these inputs, we must accept that there are no such output values \(f(-1)\) and \(f(1/2)\text{.}\)

Definition 2.1.4. Domain of a function.

The set of all values of the independent variable \(t\) that can be used as an input value for the function, in the sense that there is an associated output value. For values of \(t\) that are not in the domain, we say that the output value \(f(t)\) is undefined.

Example 2.1.5.

If we assume that the anemometer in Example 2.1.3 could continuously record wind speed measurements, then the domain of the \(w\) function in that example is \(t \ge 0\text{,}\) and the function is undefined for \(t \lt 0\text{.}\)
The domain of the function \(f\) from Example 2.1.2 is merely the set of values \(t = 0, 1, 2, 3, \pi \text{,}\) and \(f(t)\) is undefined for all other values of \(t\text{.}\)
Technically, the domain of a function is part of its definition, but it is often not explicitly specified. In that case, we should assume that the domain is as large as possible, and includes all possible input values that “make sense” in the function definition.

Example 2.1.6. An implicit domain.

Let \(f\) represent the function described by the input-output formula
\begin{equation*} f(t) = \frac{1}{t} \text{.} \end{equation*}
The domain of this function is \(t \neq 0\text{,}\) meaning the set of all input values except \(t = 0\text{,}\) since at \(t = 0\) the output formula would involve division by zero.
However, sometimes we want to restrict the possible input values for some reason, even if the description of the function’s input-output process could allow other input values.

Example 2.1.7. A restricted domain.

Let \(f\) represent the function
\begin{align*} f(t) \amp = t^2 \amp t \amp \ge 0 \text{.} \end{align*}
Here the domain is explicitly specified as being \(t \ge 0\text{.}\) So even though the formula \((-1)^2\) is defined, technically the output value \(f(-1)\) is undefined because we have specified in the function definition that the input-output formula \(t \mapsto t^2\) only applies for \(t \ge 0\text{.}\)
We often also want to determine the range of possible output values of a function.

Definition 2.1.8. Range of a function.

The set of all output values that can be achieved by a function.

Example 2.1.9.

The function
\begin{equation*} f(t) = \frac{1}{t^2} \end{equation*}
only outputs positive values. But is every positive value an actual output of the function? Yes, because if \(y\) is a positive number, there is at least one example of an input value so that \(f(t) = y\text{;}\) in particular,
\begin{align*} t \amp = \frac{1}{\sqrt{y}} \amp f(t) \amp = \frac{1}{{1/\sqrt{y}}^2} = y\text{.} \end{align*}
So the range of this function is the set of all positive numbers.

Example 2.1.10. A restricted domain could restrict the range.

The function \(f(t) = t^3\) has the entire set of real numbers \(\R\) for its range, as every real number is the cube of another number. However, the function
\begin{align*} g(t) \amp = t^3 \amp t \amp \ge 0 \end{align*}
has range \(g(t) \ge 0 \text{,}\) since by discarding negative inputs we will no longer achieve any negative outputs.

Section 2.2 Graph of a function

Definition 2.2.1. Graph of a function.

The collection of all input-output pairs \(\bbrac{t, f(t)}\) in the Cartesian plane.
For a point \((t,y)\) in the Cartesian plane, the property of being on the graph or not on the graph of a function \(f\) is precisely determined by whether or not \(f(t) = y\) is true.

Example 2.2.2. Parabola.

The graph of the function \(f(t) = t^2\) creates a curve in a shape called a parabola.
Parabolic graph of the basic quadratic function.
Figure 2.2.3. The parabolic graph of the function \(f(t) = t^2\text{,}\) including two representative points: one on the graph and one not on the graph.
In Figure 2.2.3, the point \((2,4)\) appears on the graph because for \(t = 2\) and \(y = 4\text{,}\) the equality \(f(t) = y\) is true, whereas the point \((-1,6)\) appears displaced from the graph because for \(t = -1\) and \(y = 6\text{,}\) the equality \(f(t) = y\) is not true.
A graph is not necessarily a curve.

Example 2.2.4. A graph as a collection of points.

Consider again the function in Example 2.1.2, which was defined by a table of values. Since the table only defines five input-output pairs, the graph consists of only five isolated points.
An example graph that consists of only five points.
Figure 2.2.5. An example graph that consists of only five points.
Every function can be associated with a collection of points in the Cartesian plane representing input-output pairs, and for many of the functions we study this collection of points will “join together” to form a curve. Is the opposite true? Is every curve in the Cartesian plane the graph of a function?
The “only once” part of Pattern 2.2.6 represents the fact that a function should associate one and only one output value to each input value in the domain. If some vertical line intersects the curve more than once, then those intersection points associate different output values to the same input value, which a function cannot do. The “or not at all” part of Pattern 2.2.6 covers the situation of a vertical line at a \(t\)-position that is not in the domain of the function, in which case there is no corresponding point on the graph for a vertical line at that \(t\)-position to intersect.
A curve that passes the Vertical Line Test.
(a) A curve that passes the Vertical Line Test.
A curve that does not pass the Vertical Line Test.
(b) A curve that does not pass the Vertical Line Test.
Figure 2.2.7. Illustrations of the Vertical Line Test.
If a curve passes the Vertical Line Test, of what function will it be the graph? Remember that a function can be described as an input-output process in several different ways. To describe a function via a graph, assign an output value \(f(t)\) to each input value \(t\) as follows:
  • if the vertical line at position \(t\) does not intersect the graph, leave \(f(t)\) undefined
  • if the vertical line at position \(t\) does intersect the graph and the graph passes the Vertical Line Test, then we can assume that there is only one such point of intersection, so set \(f(t)\) to be the second coordinate of that point.

Section 2.3 Piecewise functions

Sometimes we want to “stitch together” several formulas, so that one formula applies to one subdomain, another formula applies to another subdomain, and so on.

Example 2.3.1. Salary with commission.

Salespeople at a particular store make a base salary of $4000 per month, on top of which they make a $10 commission on every unit they sell. As an additional incentive, after the first 100 units they sell in a month, the commission on additional units sold is $15.
Let \(q\) represent the number of units sold in a month by any one salesperson, and let \(s(q)\) represent the salary to be paid to that employee. In the domain \(0 \le q \le 100 \) we have
\begin{equation*} s(q) = 4000 + 10 q \text{.} \end{equation*}
But on the domain \(q \gt 100 \) we have
\begin{equation*} s(q) = 4000 + 10 q + 5 (q - 100) \text{.} \end{equation*}
We can collect together several formulas into one function definition with some notation. For example, the salary function from Example 2.3.1 can be expressed as
\begin{equation*} s(q) = \begin{cases} 4000 + 10 q \amp 0 \le q \le 100 \\ 4000 + 10 q + 5 (q - 100) \amp q \gt 100 \end{cases}\text{.} \end{equation*}
The format of this notation begins with a large left brace, which alerts the reader that the formulas on the right are to be grouped together as cases in the definition of the function. Then we have the formulas and their associated domain of application, one per line. It’s important that the subdomains don’t overlap, so that we haven’t defined a particular output value in more than one way. However, there is no requirement that the subdomains meet — the function can be left undefined at input values between the subdomains.
A function that is defined in pieces in this way is called, fittingly, a piecewise function. As you can imagine, a piecewise function will also have a graph that appears to be built out of pieces.

Example 2.3.2. Graph of a piecewise function.

Consider the piecewise function
\begin{equation*} f(t) = \begin{cases} t^2 \amp 0 \le t \le 2 \\ 6 - t \amp t \gt 2 \end{cases}\text{,} \end{equation*}
the graph of which appears in Figure 2.3.3. Notice how the graph is made of part parabola, and part line.
Graph of a piecewise-defined function.
Figure 2.3.3. Graph of a piecewise-defined function.
When creating a piecewise-defined function, there is no requirement that the pieces of the graph meet at the transition points.

Example 2.3.4. A piecewise function with a “jump” in its graph.

Now consider the piecewise function
\begin{equation*} g(t) = \begin{cases} t^2 \amp 0 \le t \le 2 \\ 4 - t \amp t \gt 2 \end{cases}\text{,} \end{equation*}
the graph of which appears in Figure 2.3.5. At \(t = 2\text{,}\) the parabola portion on the left ends at height \(4\) but the line begins at height \(2\text{,}\) so the two “pieces” of graph do not meet at the transition point. Also notice that we have drawn a closed point at \((2,4)\) at the “end” of the parabola portion of the graph, but have drawn an open point at \((2,2)\) at the “beginning” of the line portion. This represents the fact that the parabola subdomain \(0 \le t \le 2\) contains the input value \(t = 2\) while the line subdomain \(t \gt 2\) does not, so the piecewise definition dictates that the formula \(g(t) = t^2\) applies when \(t = 2\text{.}\)
Graph of a piecewise-defined function with a "jump" in values.
Figure 2.3.5. Graph of a piecewise-defined function with a “jump” in values.
A piecewise-defined function can be built out of more than two pieces.

Example 2.3.6. A piecewise function in many pieces.

Now consider the piecewise function
\begin{equation*} h(t) = \begin{cases} 0 \amp t \lt 0 \\ t^2 \amp 0 \le t \le 2 \\ 5 \amp 2 \lt t \lt 3 \\ 10 - 2 t \amp 3 \le t \le 5 \\ 0 \amp t \gt 5 \end{cases}\text{,} \end{equation*}
the graph of which appears in Figure 2.3.7.
Graph of a piecewise-defined function with many pieces.
Figure 2.3.7. Graph of a piecewise-defined function with many pieces.
We can use this notation to define a “formula” for a function that as been defined by a table of values, but it is not really any different than writing down a table of values.

Example 2.3.8. Piecewise table of values.

Here is the function from Example 2.1.2 in piecewise-function notation.
\begin{equation*} f(t) = \begin{cases} 0 \amp t = 0 \\ 1/3 \amp t = 1 \\ -2 \amp t = 2 \\ 2 \amp t = 3 \\ \sqrt{5} \amp t = \pi \end{cases}\text{.} \end{equation*}
This function is still only defined at a handful of points — for example, \(f(1/2)\) is undefined because there is no listed formula whose associated subdomain is or contains \(t = 1/2\text{.}\)

Section 2.4 Continuous functions

The graphs in Figure 2.3.5 and Figure 2.3.7 have an odd feature — they approach one value then suddenly jump to a different value. We’ll call this type of feature a point of discontinuity.

Subsection 2.4.1 Definition

Definition 2.4.1. Continuous at a point.
A function \(f(t)\) is said to be continuous at a specific input value \(t = t_0\) if the values of \(f(t)\) can always be restricted to being within some arbitrarily small open range around the value \(f(t_0)\) by restricting the inputs \(t\) to some sufficiently small open subdomain around \(t_0\text{.}\) Otherwise, the function is said to be discontinuous at that point.
In other words, a function is continuous at a point if \(f(t) \approx f(t_0)\) whenever \(t \approx t_0\text{,}\) and we can always make the first approximation better by tightening the second approximation.
Example 2.4.2. Testing the definition of continuity.
The function \(f(t)\) in Example 2.3.4 is discontinuous at \(t = 2\text{.}\) It has value \(f(2) = 4\) there, but if \(t\) is slightly bigger than \(2\) then \(f(t) \approx 2\text{,}\) not \(4\text{.}\) So it’s not possible to restrict output values to the open range
\begin{equation*} 3 \lt f(t) \lt 5 \end{equation*}
around the actual output value \(f(2) = 4\text{.}\) That is, when we take \(f(t) \approx 4\) to mean “no lower than \(3\) and no higher than \(5\)”, there is no way to make this true for all \(t \approx 2\text{,}\) no matter how small a subdomain around \(t = 2\) that we take for the meaning of \(t \approx 2\) because there will always be some \(t \approx 2\) with \(f(t) \approx 2\text{,}\) outside of that restricted range.
On the other hand, that same function is continuous at \(t = 1\text{.}\) No matter how small a range around \(f(1) = 1\) we take \(f(t) \approx 1\) to mean, it is always possible to restrict \(t\) to some small open subdomain around \(t = 1\) so that \(f(t) \approx f(1)\) is true for all \(t\) within that subdomain.
The graph of a function near a point of discontinuity cannot be restricted to particular output range.
(a) There will always be values of \(f(t)\) for \(t \approx 2\) (represented by the part of the graph highlighted red), that are outside of the range \(3 \lt f(t) \lt 5\text{,}\) no matter how small of a subdomain around \(t = 2\) we take \(t \approx 2\) to mean.
The graph of a function near a point of continuity can always be restricted to a small output range, no matter how small.
(b) Using any small range around \(f(1) = 1\text{,}\) we can always restrict the domain around \(t = 1\) so that \(f(t) \approx f(1)\) is true for all \(t \approx 1\text{.}\) (The Greek letter \(\epsilon\) in the figure represents a small amount above or below \(f(1) = 1\) to create a small range.)
Figure 2.4.3. A point of discontinuity and one of continuity.
Graphically, we think of a function as being continuous at an input value \(t = t_0\) if its graph “flows through” the point \(\bbrac{t_0, f(t_0)}\text{,}\) while the graph near a point of discontinuity features some sort of gap or jump. In particular, a function will always be discontinuous at a point that is not in its domain, since then there is no value \(f(t_0)\) with which to compare its “nearby” values.
Discussing continuity point-by-point is tedious; we generally just look for likely spots for discontinuities. (See below for examples.) Between discontinuities, we make a blanket pronouncement of continuity.
Definition 2.4.4. Continuous on a subdomain.
A function \(f(t)\) is said to be continuous on a specific subdomain if it is continuous at every point in that subdomain.
If a function is continuous on its entire domain we will say exactly that: the function is continuous on its domain. If we just say that a function is continuous, we mean that the function is continuous at all real input values.

Subsection 2.4.2 Common types of discontinuity

We will encounter three basic types of discontinuities.
Jump discontinuities.
This occurs when a function suddenly jumps in value, hence the name.
A piecewise function with a jump discontinuity.
(a) A piecewise function can often (but not always!) jump values at transition points.
A function with a redefined point creating a jump discontinuity.
(b) Sometimes the output of a function at one specific input location is specially defined, creating a jump discontinuity.
Figure 2.4.5. Two examples of jump discontinuities.
Removable discontinuities.
You might think of this kind of discontinuity as a “hole in the graph”. For example, for the function
\begin{equation*} f(t) = \frac{t^2 - 1}{t - 1} \text{,} \end{equation*}
for most values of \(t\) we can simplify the input-output formula to
\begin{align*} f(t) \amp = \frac{t^2 - 1}{t - 1} \\ \amp = \frac{(t + 1) \bcancel{(t - 1)}}{\bcancel{t - 1}} \\ \amp = t + 1\text{,} \end{align*}
so that the function’s graph is essentially a line. But the algebra above is not valid for \(t = 1\text{,}\) because in that case our algebra is
\begin{align*} \frac{t^2 - 1}{t - 1} \amp = \frac{(t + 1) (t - 1)}{t - 1} \\ \amp = \frac{(2) \bcancel{(0)}}{\bcancel{0}} \\ \amp = 2\text{,} \end{align*}
which is incorrect because you cannot “cancel” division by zero. So our function is actually undefined at \(t = 1\text{,}\) and its graph just has a hole there.
A graph with a discontinuity caused by an undefined value.
Figure 2.4.6. A graph with a discontinuity caused by an undefined value.
Why not just define \(f(t) = t + 1\) in the first place? Our function might be created as the ratio of two other quantities, where the numerator is a model for some quantity, the denominator is a model for a separate quantity, and we want the function to track their ratio. In this case, it is important to record that the ratio is undefined when the second quantity is zero.
However, the fact that \(f(t) = t + 1\) is true for “almost all” input values justifies the terminology removable discontinuity — we could “remove” the discontinuity by replacing \(f(t)\) by the continuous function \(g(t) = t + 1\text{,}\) so that \(g(t) = f(t)\) is true for “almost all” input values. Thus \(g\) “fixes” the discontinuity in \(f\text{,}\) and so is called a continuous extension of \(f\text{.}\)
Singularities.
Some functions have a different kind of hole in their domain, near which the function values “explode”.
A graph of a function with a discontinuity caused by a singularity.
Figure 2.4.7. The graph of \(f(t) = 1/(t - 2)^2\text{,}\) with a singularity at \(t = 2\text{.}\)
We will call such an input location a singularity for the function. The vertical line at that location (as represented by a dashed line in the example graph in Figure 2.4.7) is called a vertical asymptote for the function’s graph.
We will study singularities and vertical asymptotes more in Chapter 3.

Subsection 2.4.3 The Intermediate Value Theorem

An important feature of continuous graphs is that they cannot “skip over” any particular output level.
A continuous function ascending through all possible output values from low to high.
(a) Ascending through each possible output value.
A continuous function descending through all possible output values from high to low.
(b) Descending through each possible output value.
Figure 2.4.9. As a continuous function ascends/descends, it must take on all possible output values between initial and final output values.
Example 2.4.10. Searching for horizontal intercepts.
The graph of the cubic function
\begin{equation*} p(t) = 5 - t + t^2 - t^3 \end{equation*}
is continuous, so from the information
\begin{align*} p(1) \amp = 4 \text{,} \amp p(2) \amp = -1 \end{align*}
we may conclude that the graph must descend through every possible output value between \(4\) and \(-1\) over the domain \(1 \le t \le 2\text{.}\) (Note, however, that this doesn’t mean the graph cannot ascend on some portion of this domain.)
In particular, since \(p(1) \gt 0\) and \(p(2) \lt 0\text{,}\) we may apply the Intermediate Value Theorem with \(K = 0\) to conclude that there must be at least one solution to
\begin{equation*} 5 - t + t^2 - t^3 = 0 \end{equation*}
somewhere between \(t = 1\) and \(t = 2\text{.}\)

Section 2.5 Graph transformations

Sketching graphs by plotting a few points and then connecting the dots is not a good strategy in general, unless you are a computer and can plot millions of points. The issue is that you may overlook important features that occur between the points you plotted.
For example, consider function
\begin{equation*} f(t) = \frac{2}{2 t - 1} \text{.} \end{equation*}
On a set of axes, plot points at integer values of \(t\text{:}\)
\begin{equation*} t = -2, -1, 0, 1, 2\text{.} \end{equation*}
Then join your points together smoothly to make a “graph” for \(f(t)\text{.}\) Finally, get an online graphing app to graph \(f(t)\) for you and compare with your “graph” — you will find that they are very different.
A better strategy is to become familiar with a set family of reference graphs, and try to interpret graphs of similar functions as transformations of the reference graphs. We often will still plot a few “anchor” points to keep track of as we perform the transformations, but mainly we want to use the relationships between the graph at hand and a reference graph.

Subsection 2.5.1 Vertical transformations

Subsubsection Vertical shift
If we take an “old” function and add some fixed value to every output, we create a “new” function whose graph is moved up (if the added fixed value is positive) or down (if the added fixed value is negative). Accordingly, for
\begin{equation*} g(t) = f(t) + C \text{,} \end{equation*}
we call \(g\) a vertical shift of \(f\text{.}\)
Example 2.5.1. Vertical shifts of the square root function.
To graph either of
\begin{align*} g(t) \amp = \sqrt{t} + 2 \amp h(t) \amp = \sqrt{t} - 2 \text{,} \end{align*}
we relate each of them to the function \(f(t) = \sqrt{t} \text{,}\) whose graph we should know as one-half of a sideways parabola. Some anchor points we might focus on to help us draw the shifted graph are at \(t = 0\) and \(t = 1\text{.}\)
\begin{align*} f(0) \amp = 0 \amp f(1) \amp = 1 \\ g(0) \amp = f(0) + 2 = 2 \amp g(1) \amp = f(1) + 2 = 3 \\ h(0) \amp = f(0) - 2 = -2 \amp h(1) \amp = f(1) - 2 = -1 \end{align*}
Two vertical shifts of the graph of the square root function, one up and one down.
Figure 2.5.2. Two vertical shifts of the graph of \(f(t) = \sqrt{t}\text{,}\) one up and one down.
Subsubsection Vertical scaling
If we take an “old” function and multiply every output by some fixed, positive scale factor, we create a “new” function whose graph has been stretched away from the horizontal axis (if the scale factor is greater than \(1\)) or compressed towards the horizontal axis (if the scale factor is less than \(1\)). Accordingly, for
\begin{equation*} g(t) = k f(t) \text{,} \end{equation*}
we call \(g\) a vertical scaling of \(f\text{.}\)
Example 2.5.3. Vertical scalings of the square root function.
To graph either of
\begin{align*} g(t) \amp = 2 \sqrt{t} \amp h(t) \amp = \frac{\sqrt{t}}{2} \text{,} \end{align*}
again we relate each of them to the graph of the function \(f(t) = \sqrt{t} \text{,}\) and again focus on anchor points at \(t = 0\) and \(t = 1\text{.}\)
\begin{align*} f(0) \amp = 0 \amp f(1) \amp = 1 \\ g(0) \amp = 2 f(0) = 0 \amp g(1) \amp = 2 f(1) = 2 \\ h(0) \amp = \frac{f(0)}{2} = 0 \amp h(1) \amp = \frac{f(1)}{2} = \frac{1}{2} \end{align*}
Two vertical scales of the graph of the square root function, one stretched and one compressed.
Figure 2.5.4. Two vertical scales of the graph of \(f(t) = \sqrt{t}\text{,}\) one stretched and one compressed.
Subsubsection Vertical reflection
If we take an “old” function and change the sign of every output, we create a “new” function whose graph has been reflected in the horizontal axis. Accordingly, for
\begin{equation*} g(t) = - f(t) \text{,} \end{equation*}
we call \(g\) a vertical reflection of \(f\text{.}\) Similarly, if we have
\begin{equation*} g(t) = k f(t) \end{equation*}
with \(k\) negative, then \(g\) will be both a scaling and reflection of \(f\text{.}\)
Example 2.5.5. Vertical reflection of the square root function.
To graph
\begin{equation*} g(t) = - \sqrt{t} \end{equation*}
again we relate it to the graph of the function \(f(t) = \sqrt{t} \text{,}\) and again focus on anchor points at \(t = 0\) and \(t = 1\text{.}\)
\begin{align*} f(0) \amp = 0 \amp f(1) \amp = 1 \\ g(0) \amp = - f(0) = 0 \amp g(1) \amp = - f(1) = -1 \end{align*}
Vertical reflection of the graph of the square root function.
Figure 2.5.6. Vertical reflection of the graph of \(f(t) = \sqrt{t}\text{.}\)
Summary of vertical transformations.
  • Shifts.
    For a positive constant, adding that constant to a function shifts its graph up by that amount, while subtracting that constant shifts its graph down.
  • Scaling.
    Multiplying a function by a positive scale factor that is greater than one stretches the graph away from the horizontal axis by that factor, while a positive scale factor that is less than one compresses the graph towards the horizontal axis.
  • Reflection.
    Multiplying a function by a negative scale factor (or by \(-1\)) reflects the graph in the horizontal axis (as well as any scaling effect).

Subsection 2.5.2 Horizontal transformations

Vertical shifts and scales follow an intuitive patter:
  • adding shifts up while subtracting shifts down
  • a scale factor greater than one stretches while a scale factor less than one compresses.
We will see that horizontal shifts and scales reverse these patterns. For that reason, we will investigate horizontal shifts in terms of subtracting either a positive or negative shift term and horizontal scales in terms of dividing by a scale factor that is either greater or less than one.
Subsubsection Horizontal shift
If we subtract a positive constant from the independent variable before using it as the input for a function, we are essentially causing output values to occur “later.” For example, for \(g(t) = f(t - 2)\text{,}\) the “old” function’s initial output value \(f(0)\) occurs at \(t = 2\) for the “new” function:
\begin{equation*} g(2) = f(2 - 2) = f(0) \text{.} \end{equation*}
So subtracting a positive constant from the independent variable shifts the graph to the right by that amount.
On the other hand, if we subtract a negative constant from the independent variable (so, in effect, adding a positive constant), we cause output values to occur “earlier”. For example, for \(g(t) = f\bbrac{t - (-2)}\text{,}\) the initial value of the “new” function is the same as the “old” function’s value at \(t = 2\text{:}\)
\begin{equation*} g(0) = f\bbrac{0 - (-2)} = f(2) \text{.} \end{equation*}
So subtracting a negative constant from the independent variable shifts the graph to the left by that amount.
In either case, we call the “new” function a horizontal shift of the “old” function.
Example 2.5.7. Horizontal shifts of the square root function.
To graph either of
\begin{align*} g(t) \amp = \sqrt{t - 2} \amp h(t) \amp = \sqrt{t + 2} = \sqrt{t - (-2)}\text{,} \end{align*}
we relate each of them to the function \(f(t) = \sqrt{t} \text{.}\) Now when we choose and track anchor points (again at \(t = 0\) and \(t = 1\) for \(f\)), we want to determine what new independent variable value will produce the same output.
\begin{align*} f(0) \amp = 0 \amp f(1) \amp = 1 \\ g(2) \amp = f(2 - 2) = f(0) \amp g(3) \amp = f(3 - 2) = f(1) \\ h(-2) \amp = f\bbrac{-2 - (- 2)} = f(0) \amp h(-1) \amp = f\bbrac{-1 - (-2)} = f(1) \end{align*}
Two horizontal shifts of the graph of the square root function, one right and one left.
Figure 2.5.8. Two horizontal shifts of the graph of \(f(t) = \sqrt{t}\text{,}\) one right and one left.
Subsubsection Horizontal scaling
If we divide the independent variable by a positive constant that is greater than 1 before using it as the input for a function, we again are causing output values to occur “later,” at least for positive inputs. For example, for \(g(t) = f(t/2)\text{,}\) the value \(f(1)\) achieved by the “old” function at \(t = 1\) won’t be achieved by the “new” function until \(t = 2\text{:}\)
\begin{equation*} g(2) = f(2 / 2) = f(1) \text{.} \end{equation*}
However, this effect is symmetric about the vertical axis — using our same example \(g(t) = f(t/2)\) the value \(f(-1)\) achieved by the “old” function at \(t = -1\) is achieved by the “new” function until \(t = -2\text{:}\)
\begin{equation*} g(-2) = f(-2 / 2) = f(-1) \text{.} \end{equation*}
Overall, the effect is to stretch the graph of the “old” function away from the vertical axis.
Dividing the independent variable by a positive constant that is less than 1 has the opposite effect, so that outputs of the old function are “pulled in” towards the vertical axis. For example, for \(g(t) = f\bbrac{t / 0.5}\text{,}\) the output value of the “old” function at \(t = 2\) becomes the output value of the “new” function at \(t = 1\text{:}\)
\begin{equation*} g(1) = f(1 / 0.5) = f(2) \text{.} \end{equation*}
Again, the effect is symmetric about the vertical axis, so that the overall effect is to compress the graph of the “old” function towards the vertical axis.
In either case, we call the “new” function a horizontal scale of the “old” function.
Example 2.5.9. Horizontal scalings of the square root function.
To graph either of
\begin{align*} g(t) \amp = \sqrt{t / 2} \amp h(t) \amp = \sqrt{2 t} = \sqrt{t / 0.5} \text{,} \end{align*}
again we relate each of them to the graph of the function \(f(t) = \sqrt{t} \text{.}\) And again when we track anchor points (again at \(t = 0\) and \(t = 1\) for \(f\)), we want to determine what new independent variable value will produce the same output. But we can immediately say that the anchor point at \(t = 0\) won’t move, so we’ll focus on the one at \(t = 1\text{.}\)
\begin{align*} f(1) \amp = 1 \\ g(2) \amp = f(2 / 2) = f(1) \\ h(1/2) \amp = f\bbrac{ (1/2) / (1/2) } = f(1) \end{align*}
Two horizontal scales of the graph of the square root function, one stretched and one compressed.
Figure 2.5.10. Two horizontal scales of the graph of \(f(t) = \sqrt{t}\text{,}\) one stretched and one compressed.
Remark 2.5.11.
Sometimes it is possible to re-interpret a horizontal scale as a vertical scale or vice versa, depending on the algebraic properties of the function’s formula. For example, for
\begin{equation*} g(t) = \sqrt{\frac{t}{2}} = \frac{\sqrt{t}}{\sqrt{2}} \end{equation*}
from Example 2.5.9, we could interpret the “new” function as either a horizontal stretch by a factor of \(2\) or as a vertical compression by a factor of \(\sqrt{2}\text{.}\)
Subsubsection Horizontal reflection
If we take an “old” function and change the sign of inputs before they are used, we create a “new” function whose graph has been reflected in the vertical axis. Accordingly, for
\begin{equation*} g(t) = f(- t) \text{,} \end{equation*}
we call \(g\) a horizontal reflection of \(f\text{.}\) Similarly, if we have
\begin{equation*} g(t) = f(t / c) \end{equation*}
with \(c\) negative, then \(g\) will be both a scaling and reflection of \(f\text{.}\)
Example 2.5.12. Horizontal reflection of the square root function.
To graph
\begin{equation*} g(t) = \sqrt{- t} \end{equation*}
again we relate it to the graph of the function \(f(t) = \sqrt{t} \text{.}\) It may seem like the formula for \(g(t)\) makes no sense, since the square root of a negative number is undefined. However, we are implicitly also reflecting the domain of \(f\) to create the domain of \(g\text{:}\) if \(t \le 0\text{,}\) then \(- t \ge 0\text{,}\) and in this case \(\sqrt{- t}\) will make sense.
Again we’ll focus on anchor points at \(t = 0\) and \(t = 1\text{,}\) and again for each anchor point we need to determine what new independent variable value will produce the same output.
\begin{align*} f(0) \amp = 0 \amp f(1) \amp = 1 \\ g(- 0) \amp = f(0) \amp g(- 1) \amp = f\bbrac{-(-1)} = f(1) \end{align*}
Horizontal reflection of the graph of the square root function.
Figure 2.5.13. Horizontal reflection of the graph of \(f(t) = \sqrt{t}\text{.}\)
Summary of horizontal transformations.
  • Shifts.
    Subtracting a positive constant from the independent variable of a function shifts its graph to the right by that amount, while subtracting a negative constant shifts its graph to the left.
  • Scaling.
    Dividing the independent variable of a function by a positive scale factor that is greater than one stretches the graph away from the vertical axis by that factor, while dividing by a positive scale factor that is less than one compresses the graph towards the vertical axis.
  • Reflection.
    Replacing the independent variable in a function by its negative reflects the graph in the vertical axis.