Skip to main content

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.
A rectangle labelled by the function \(f \) appears in the centre, with an input arrow labelled \(t \) pointing into the left side of the rectangle, and an output arrow labelled \(q \) point out of the right side of the rectangle.
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:

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 \(q \) is a positive number, there is at least one example of an input value so that \(f(t) = q \text{;}\) in particular,
\begin{align*} t \amp = \frac{1}{\sqrt{q}} \amp f(t) \amp = \frac{1}{{1/\sqrt{q}}^2} = q\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.
The graph of the function \(f(t) = t^2 \text{,}\) taking the shape of a parabola, is drawn on a set of \(tq \)-axes. The point \((2,4) \) is plotted as a point on the graph, and the point \((-1,6) \) is plotted as a point not on the graph.
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.
Five points are plotted on a set of \(tq \)-axes. One point appears at the origin, one point appears in the fourth quadrant of the plane, and the other three points appear at various positions in the first quadrant of the plane.
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 set of \(tq \)-axes is drawn, and a curve is drawn in the first quadrant of the plane only. The curve begins at the origin, rises steeply into the first quadrant, and then flattens out somewhat as it continues rising to the right. No part of the graph appears to the left of the vertical axis.
Two representative vertical lines are drawn to illustrate the Vertical Line Test. The first vertical line appears to the left of the vertical axis, and does not intersect the curve. The second vertical line appears to the right of the vertical axis, and intersects the curve exactly one. The point of intersection is plotted.
(a) A curve that passes the Vertical Line Test.
A curve that does not pass the Vertical Line Test.
A set of \(tq \)-axes is drawn, and on them a curve is drawn. The curve can be described in two parts, with one part in the first quadrant of the plane, one part in the fourth quadrant, and the two parts meeting at the origin. The former part begins at the origin, rises steeply into the first quadrant, and then flattens out somewhat as it continues rising to the right. The latter part is the mirror image: it descends steeply into the fourth quadrant, and then flattens out somewhat as it continues descending to the right. No part of the graph appears to the left of the vertical axis.
A representative vertical line is drawn to illustrate the Vertical Line Test. This line appears to the right of the vertical axis, and intersects the curve exactly twice, once in the first quadrant and once in the fourth quadrant. Both points of intersection are plotted.
(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 \(u \) represent the number of units sold in a month by any one salesperson, and let \(s(u) \) represent the salary to be paid to that employee. In the domain \(0 \le u \le 100 \) we have
\begin{equation*} s(u) = 4000 + 10 u \text{.} \end{equation*}
But on the domain \(u \gt 100 \) we have
\begin{equation*} s(u) = 4000 + 10 u + 5 (u - 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(u) = \begin{cases} 4000 + 10 u \amp 0 \le u \le 100 \\ 4000 + 10 u + 5 (u - 100) \amp u \gt 100 \text{.}\end{cases} \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 following piecewise function.
\begin{equation*} f(t) = \begin{cases} t^2 \amp 0 \le t \le 2 \\ 6 - t \amp t \gt 2 \end{cases} \end{equation*}
The graph of this function appears in FigureΒ 2.3.3. Notice how the graph is made of part parabola, and part line.
Graph of a piecewise-defined function.
The graph of a piecewise function is drawn on a set of \(tq \)-axes. Between \(t = 0 \) and \(t = 2 \) the graph is a portion of a concave-up parabola, with vertex at the origin. From \(t = 2 \) onward, the graph is a downwards-sloping line. These two pieces of the graph meet at the point \((2,4) \text{,}\) so that the linear piece begins precisely where the parabolic piece ends.
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 \text{,}\end{cases} \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.
The graph of a piecewise function is drawn on a set of \(tq \)-axes. Between \(t = 0 \) and \(t = 2 \) the graph is a portion of a concave-up parabola, with vertex at the origin. The point \((2,4) \) is plotted, representing the endpoint of the parabolic portion of the graph. From \(t = 2 \) onward, the graph is a downwards-sloping line, beginning at point \((2,2) \text{.}\) (This point is plotted as an open circle, indicating that the point itself is not part of the graph.) A vertical dashed line (not part of the graph) bridges the gap between the endpoint of the parabolic piece and the starting point of the linear piece.
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} 1 \amp t \lt 0 \\ t^2 + 1 \amp 0 \le t \le 2 \\ 6 \amp 2 \lt t \lt 3 \\ 11 - 2 t \amp 3 \le t \le 5 \\ 1 \amp t \gt 5 \text{,}\end{cases} \end{equation*}
the graph of which appears in FigureΒ 2.3.7.
Graph of a piecewise-defined function with many pieces.
The graph of a piecewise function is drawn on a set of \(tq \)-axes.
  • On domain \(t \lt 0 \) the graph is a horizontal line at height \(q = 1 \text{.}\)
  • On domain \(0 \le t \le 2 \) the graph is a concave-up parabola, with vertex at point \((0,1) \text{,}\) where it the previous linear piece of the graph meets this new piece. The other endpoint of this piece of the graph at \((2,5) \) is plotted as a closed circle, indicating that it is part of the graph.
  • On domain \(2 \lt t \lt 3 \) the graph is a horizontal line at height \(q = 6 \text{.}\) The endpoints of this piece of the graph at \((2,6) \) and \((3,6) \) are plotted as open circles, indicating that they are not part of the graph.
  • On domain \(3 \le t \le 5 \) the graph is a downward-sloping line, running between points \((3,5) \) and \((5,1) \text{.}\) The point \((3,5) \) is plotted as a closed circle, indicating that it is part of the graph.
  • On domain \(t \gt 5 \) the graph is a horizontal line at height \(q = 1 \text{.}\) This piece of the graph meets the previous piece at the point \((5,1) \text{.}\)
A vertical dashed line (not part of the graph) bridges the gap between the endpoint of the parabolic piece and the starting point of the β€œmiddle” horizontal piece, and a similar dashed line bridges the gap between the endpoint of the β€œmiddle” horizontal piece and the starting point of the downward-sloping linear piece.
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 \text{.}\end{cases} \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 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.4.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.4.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.
Three graphs with identical shapes are drawn on the same set of \(tq \)-axes. The identical shape of the three graphs is the top half of a sideways parabola that opens to the right.
The first such graph begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second identical copy begins with its vertex at height \(q = 2 \) on the vertical axis, rises steeply up to a marked point at \((1,3) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view. This graph lies entirely above the first graph, and an arrow points upwards from the first graph to it, indicating that this second graph is a vertical translation of the first graph upwards by \(2 \) units.
The third identical copy begins with its vertex at height \(q = -2 \) on the vertical axis, rises steeply up to a marked point at \((1,-1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view. This graph lies entirely below the first graph, and an arrow points downwards from the first graph to it, indicating that this third graph is a vertical translation of the first graph downwards by \(2 \) units.
Figure 2.4.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.4.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.
Three graphs with similar shapes are drawn on the same set of \(tq \)-axes. The shape of each of the graphs is that of the top half of a sideways parabola that opens to the right.
The first such graph begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second graph also begins with its vertex at the origin, but rises even more steeply up to a marked point at \((1,2) \text{,}\) and then continues to rise (less steeply than before but more steeply than the first graph) to the right edge of the view. Except for the shared vertex at the origin, this graph lies entirely above the first graph, and an arrow points upwards from the first graph to it, indicating that this second graph is a vertical stretch of the first graph away from the horizontal axis by a factor of \(2 \text{.}\)
The third graph also begins with its vertex at the origin, but rises less steeply up to a marked point at \((1,1/2) \text{,}\) and then continues to rise (both less steeply than before and less steeply than the first graph) to the right edge of the view. Except for the shared vertex at the origin, this graph lies entirely below the first graph, and an arrow points downwards from the first graph to it, indicating that this third graph is a vertical compression of the first graph towards the horizontal axis by a factor of \(2 \text{.}\)
Figure 2.4.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.4.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.
Two graphs with identical shapes are drawn on the same set of \(tq \)-axes, with one a vertical reflection of the other. The identical shape of the two graphs is that of half of a sideways parabola that opens to the right, with one graph being the top half and the other being the bottom half.
The first such graph begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second identical but reflected graph begins with its vertex at the origin, descends steeply down to a marked point at \((1,-1) \text{,}\) and then continues to descend (but less steeply) to the right edge of the view.
A double-headed arrow runs between the two graphs to indicate that they are reflections of each other through the horizontal axis.
Figure 2.4.6. Vertical reflection of the graph of \(f(t) = \sqrt{t} \text{.}\)

Subsubsection Summary of vertical transformations

The three types of vertical transformations.
In each of the following, \(f \) represents the β€œold” function and \(g \) represents the β€œnew” transformed function.
  • Vertical shift.
    Achieved by adding a constant value to every output of the β€œold” function:
    \begin{equation*} g(t) = f(t) + C \qquad \text{for nonzero constant } C \text{.} \end{equation*}
    The graph of \(g \) is obtained by shifting the graph of \(f \) up or down by the magnitude of the shift constant \(C \text{,}\) with a positive value of \(C \) causing a shift up and a negative value of \(C \) causing a shift down.
  • Vertical scaling.
    Achieved by multiplying every output of the β€œold” function by a constant:
    \begin{equation*} g(t) = k f(t) \qquad \text{for positive constant } k \text{.} \end{equation*}
    The graph of \(g \) is obtained by vertically scaling the graph of \(f \) by the scale factor \(k\text{,}\) with \(k \gt 1 \) causing a stretching away from the horizontal axis and \(0 \lt k \lt 1 \) causing a compression towards the horizontal axis.
  • Vertical reflection.
    Achieved by multiplying every output of the β€œold” function by \(-1 \text{:}\)
    \begin{equation*} g(t) = - f(t) \text{.} \end{equation*}
    The graph of \(g \) is obtained by reflecting the graph of \(f \) in the horizontal axis.

Subsection 2.4.2 Horizontal transformations

Vertical shifts and scales follow an intuitive pattern:
  • 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.4.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.
Three graphs with identical shapes are drawn on the same set of \(tq \)-axes. The identical shape of the three graphs is the top half of a sideways parabola that opens to the right.
The first such graph begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second identical copy begins with its vertex at position \(t = 2 \) on the horizontal axis, rises steeply up to a marked point at \((3,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view. This graph lies entirely to the right of and below the first graph, and an arrow points from the first graph rightwards to it, indicating that this second graph is a horizontal translation of the first graph to the right by \(2 \) units.
The third identical copy begins with its vertex at position \(t = -2 \) on the horizontal axis, rises steeply up to a marked point at \((-1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view. This graph lies entirely to the left of and, once it passes the vertical axis, above the first graph, and an arrow points from the first graph leftwards to it, indicating that this third graph is a horizontal translation of the first graph to the left by \(2 \) units.
Figure 2.4.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.4.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.
Three graphs with similar shapes are drawn on the same set of \(tq \)-axes. The shape of each of the graphs is that of the top half of a sideways parabola that opens to the right.
The first such graph begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second graph also begins with its vertex at the origin, but rises less steeply up to a marked point at \((2,1) \text{,}\) and then continues to rise (both less steeply than before and less steeply than the first graph) to the right edge of the view. Except for the shared vertex at the origin, this graph lies entirely below and to the right of the first graph, and an arrow points rightwards from the first graph to it, indicating that this second graph is a horizontal stretch of the first graph away from the vertical axis by a factor of \(2 \text{.}\)
The third graph also begins with its vertex at the origin, but rises even more steeply up to a marked point at \((1/2,1) \text{,}\) and then continues to rise (less steeply than before but more steeply than the first graph) to the right edge of the view. Except for the shared vertex at the origin, this graph lies entirely above and to the left the first graph, and an arrow points leftwards from the first graph to it, indicating that this third graph is a horizontal compression of the first graph towards the horizontal axis by a factor of \(2 \text{.}\)
Figure 2.4.10. Two horizontal scales of the graph of \(f(t) = \sqrt{t} \text{,}\) one stretched and one compressed.
Remark 2.4.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.4.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.4.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.
Two graphs with identical shapes are drawn on the same set of \(tq \)-axes, with one a horizontal reflection of the other.
The first graph has the shape of the top half of a sideways parabola that opens to the right. It begins with its vertex at the origin, rises steeply up to a marked point at \((1,1) \text{,}\) and then continues to rise (but less steeply) to the right edge of the view.
The second identical but reflected graph has the shape of the top half of a sideways parabola that opens to the left. It begins with its vertex at the origin, rises steeply (moving to the left) to a marked point at \((-1,1) \text{,}\) and then continues to rise (but less steeply, and still moving to the left) to the left edge of the view.
A double-headed arrow runs between the two graphs to indicate that they are reflections of each other through the vertical axis.
Figure 2.4.13. Horizontal reflection of the graph of \(f(t) = \sqrt{t} \text{.}\)

Subsubsection Summary of horizontal transformations

The three types of horizontal transformations.
In each of the following, \(f \) represents the β€œold” function and \(g \) represents the β€œnew” transformed function.
  • Horizontal shift.
    Achieved by subtracting a constant value from each input value before applying input-output process of the β€œold” function:
    \begin{equation*} g(t) = f(t - C) \qquad \text{for nonzero constant } C \text{.} \end{equation*}
    The graph of \(g \) is obtained by shifting the graph of \(f \) right or left by the magnitude of the shift constant \(C \text{,}\) with a positive value of \(C \) causing a shift right and a negative value of \(C \) causing a shift left.
  • Horizontal scaling.
    Achieved by dividing each input value by a constant before applying the input-output process of the β€œold” function:
    \begin{equation*} g(t) = f(t / k) \qquad \text{for positive constant } k \text{.} \end{equation*}
    The graph of \(g \) is obtained by horizontally scaling the graph of \(f \) by the scale factor \(k\text{,}\) with \(k \gt 1 \) causing a stretching away from the vertical axis and \(0 \lt k \lt 1 \) causing a compression towards the vertical axis.
  • Horizontal reflection.
    Achieved by multiplying each input value by \(-1 \) before applying the input-output process of the β€œold” function:
    \begin{equation*} g(t) = f(- t) \text{.} \end{equation*}
    The graph of \(g \) is obtained by reflecting the graph of \(f \) in the vertical axis.