As a final section in the chapter on functions, we turn our attention to transformations. We think of functions as a relation between variables, \(x \mapsto y\text{.}\) In general, a transformation maps the state \((x,y)\) to another pair \((u,v)\text{.}\) Sometimes, we will think of starting with a function \(x \mapsto y\) and describe the transformation by describing what happens to each of the coordinates, \(x \mapsto u\) and \(y \mapsto v\text{.}\) This is how we might normally think about elementary transformations including translations or shifts, scaling or stretching, and reflections.

In modeling settings, on the other hand, we might think of \((u,v)\) as being physical variables which show a relationship similar to a well-known mathematical relationship. That relationship might seen in a graph as a parabola, as exponential growth or decay, or as periodic cycles that look like a sine wave. Here, we might think of \((x,y)\) as describing the mathematically simple function. In order to understand the function \(u \mapsto v\) based on the function \(x \mapsto y\text{,}\) we will more naturally think of the transformation as finding a way to map \(u \mapsto x\) and \(y \mapsto v\text{.}\)

The overarching theme in transformations is that to find \(u \mapsto v\text{,}\) we will need to compute the composition \(u \mapsto x\text{,}\) \(x \mapsto y\text{,}\) and \(y \mapsto v\text{.}\) Elementary transformations that include translations, scaling, and reflections correspond to \(u \mapsto x\) and \(y \mapsto v\) that are linear functions. We will explore some examples where nonlinear transformations allow us to transform a linear function \(x \mapsto y\) in order to find exponential and power function relations. These correspond to semi-log and log-log transformations.

Subsection4.5.1Elementary Transformations

The elementary transformations of a graph include translation, scaling, and reflection. In algebra courses, we are often given a summary of the equations of such transformations.

Elementary Transformations of Graphs

Suppose we know the graph of a function \(y=f(x)\text{.}\) The following equations define the specified transformations of that graph.

Vertical translation, shifting the graph \(c\) units vertically,

There are some key patterns to these equations of transformation. All of the vertical transformations occur outside the function, while all of the horizontal transformations occur on the input to the function. Vertical transformations involve arithmetic consistent with the operation. For example, to move the graph up 3 units, you add \(+3\) to the output of the function. Horizontal transformations involve arithmetic opposite of the desired operation. To move a graph 3 units to the right, you add \(-3\) to the independent variable.

The following interactive graphs allow you to explore transformations of the graph \(y=\sin(x)\) by dragging sliders.

Example4.5.1

Explore horizontal and vertical translations using the equation

\begin{equation*}
y=\sin(x+a)+b
\end{equation*}

using parameters \(a\) and \(b\text{.}\) Notice that because the input to the sine function is \(x+a=x--a\text{,}\) the direction of translation is opposite the value of \(a\) chosen. The values \(a=0\) and \(b=0\) correspond to no transformation.

Example4.5.3

Explore horizontal and vertical scaling using the equation

\begin{equation*}
y=b\sin(ax)
\end{equation*}

using parameters \(a\) and \(b\text{.}\) Notice that negative multiples result in reflections. The values \(a=1\) and \(b=1\) correspond to no transformation.

We will explore a new approach to understanding transformations that will help us understand more complicated transformations. This approach will also help us understand why horizontal transformations seem to be opposite of what we want.

We start by thinking of the original graph \(y=f(x)\) as a relation between two variables. The transformation will define a relation between two other variables, which usually will have some physical interpretation that we want to model. In this section, we will name the physical variables \(u\) and \(v\text{.}\) If our physical variables should be named \(x\) and \(y\text{,}\) then we need a way to distinguish between the original relation and the transformed relation representing physical variables. We might use uppercase \(X\) and \(Y\) or decorate the variables \(\tilde{x}\) and \(\tilde{y}\text{.}\)

In our general approach to transformations, we will describe the transformation as the composition of a chain of mappings. Because we ultimately want a function \(u \mapsto v\text{,}\) we start with the physical variable \(u\) and need to map it to the mathematical variable \(x\text{,}\) \(u \mapsto x\text{.}\) The original function \(f\) provides the relation \(x \overset{f}\mapsto y\text{.}\) Then we need to find a map from the mathematical dependent variable \(y\) to the physical dependent variable \(v\text{,}\) \(y \mapsto v\text{.}\) This is summarized by the following notation:

\begin{equation*}
u \mapsto x \overset{f} \mapsto y \mapsto v.
\end{equation*}

On the other hand, when we geometrically describe a transformation, we usually describe how we take the original graph in \((x,y)\)-coordinates in order to find the graph for the physical relation in \((u,v)\)-coordinates. Describing the horizontal transformation corresponds to a mapping \(x \mapsto u\text{.}\) Our composition requires the inverse mapping \(u \mapsto x\text{,}\) which explains why horizontal transformations use operations that are the inverse of what we expect.

The elementary transformations correspond to coordinates that are mapped using linear functions for \(u \mapsto x\) and \(y \mapsto v\text{.}\) The slope affects scaling and reflection and a non-zero intercept corresponds affects translation. If we know where corresponding points are found in the original and the transformed graphs, then we can find linear functions that map the coordinates. We use these functions to find the equation of the transformed graph.

Example4.5.5

Find the equation of a parabola whose vertex is at \((2,3)\) and which has another point at \((4,5)\) by finding a transformation of \(y=x^2\) using the points \((0,0)\) and \((1,1)\text{.}\)

Our original graph uses coordinates \((x,y)\text{.}\) For our transformed graph, we will use coordinates \((u,v)\text{.}\) Based on the description of the problem, we need a transformation of coordinates

We will work with one coordinate variable at a time.

The transformation of \(x\)-coordinates, \(u \mapsto x\text{,}\) is illustrated in the following map. The \(u\)-coordinate \(u=2\) of the vertex should map to the \(x\)-coordinate \(x=0\text{,}\) and the \(u\)-coordinate \(u=4\) of the second point should map to the \(x=1\text{.}\)

This map is a linear function. To find the equation of the function, we need the slope,

Using the given point \((u,x)=(2,0)\) and the point–slope equation, we find

\begin{equation*}
x = \frac{1}{2}(u-2) = \frac{u-2}{2}\text{.}
\end{equation*}

The transformation of \(y\)-coordinates is similar, illustrated as another map below. The given points correspond to \(y=0 \mapsto v=3\) and \(y=1 \mapsto v=5\text{.}\)

The equation for the map \(y \mapsto v\) requires the slope,

and the known point \((y,v)=(0,3)\text{.}\) The transformation is given by

\begin{equation*}
v = 2y+3.
\end{equation*}

We find the equation of the transformation by finding the composition represented by the chain,

\begin{equation*}
\begin{cases} \displaystyle x = \frac{u-2}{2}, \\ y=f(x)=x^2, \\ v = 2y+3. \end{cases}
\end{equation*}

Simplifying this composition gives

\begin{equation*}
v = 2 \Big( \frac{u-2}{2} \Big)^2 + 3.
\end{equation*}

If we wanted our transformed variables to be \((x,y)\text{,}\) then the resulting equation would be

\begin{equation*}
y = 2 \Big( \frac{x-2}{2} \Big)^2 + 3.
\end{equation*}

A graph of \(y=x^2\) and the transformation are shown in the figure below.

To find the equations used in the composition for a transformation, you don't need to use the same points for both maps. All that you need to do is find the linear equation required to transform each coordinate separately. Sometimes, it is more convenient to choose different features to describe \(u \mapsto x\) and \(y \mapsto y\text{.}\) The following example illustrates this for a sinusoidal graph.

Example4.5.6

The sine function \(y=\sin(x)\) is a periodic function with a period \(2\pi\) and range \([-1,1]\text{.}\) Key points on the graph include \((0,0)\text{,}\) \((\frac{\pi}{2},1)\text{,}\) \((\pi,0)\text{,}\) \((\frac{3\pi}{2},-1)\text{,}\) and \((2\pi,0)\text{.}\) Any graph that is an elementary transformation of the sine function is called sinusoidal.

Use transformations of the sine function to model the height \(H\) (in cm) of a mass bouncing on a spring as function of time \(t\) (in s). The mass completes one cycle every 2 seconds and reaches a maximum height of 10 cm and minimum height of 2 cm. The mass is known to be at its minimum at \(t=0\text{.}\)

In order to find our model \(t \mapsto H\text{,}\) we need to determine a composition of maps

\begin{equation*}
t \mapsto x \overset{\sin}\mapsto y \mapsto H.
\end{equation*}

We will need to find the functions relating the independent and dependent variables separately.

We start by finding the map corresponding to the independent variables, \(t \mapsto x\text{.}\) Because our mass is at its minimum at \(t=0\) and the sine function is at its minimum at \(x=\frac{3\pi}{2}\text{,}\) we can use the point \((t,x)=(0,\frac{3\pi}{2})\text{.}\) We use the period to find a second point. The mass will return to its minimum at \(t=2\text{.}\) The sine function returns to its minimum at \(x=\frac{3\pi}{2} + 2\pi\text{.}\)

We use the points \((t,x)=(0,\frac{3\pi}{2})\) and \((t,x)=(2,\frac{3\pi}{2}+2\pi)\) to find the transformation \(t \mapsto x\text{.}\) First, we find the slope or rate of change,

Then we write down the equation using the point–slope form of a line,

\begin{equation*}
x = \pi(t-0)+\frac{3\pi}{2} = \pi t + \frac{3\pi}{2} = \pi({\textstyle t+\frac{3}{2}}).
\end{equation*}

To find the transformation for the dependent variables \(y \mapsto H\text{,}\) we can use the minimum and maximum values. The sine function has minimum \(y=-1\) and maximum \(y=1\text{.}\) The mass has minimum height \(H=2\) and maximum height \(H=10\text{.}\) Our map \(y \mapsto H\) includes the points \((y,H)=(-1,2)\) and \((y,H)=(1,10)\text{.}\) The equation is based on the slope or rate of change

\begin{equation*}
H = 4(y-1)+10 = 4y+6\text{.}
\end{equation*}

We put these together as a chain or composition,

\begin{equation*}
t \mapsto x \mapsto y \mapsto H \text{,}
\end{equation*}

using the individual relations found above,

\begin{equation*}
\begin{cases}
x = \pi(t+\frac{3}{2}), \\
y = \sin(x), \\
H = 4y + 6.
\end{cases}
\end{equation*}

Combining these equations, we find our model equation

\begin{equation*}
H = 4 \sin\big( \pi({\textstyle t + \frac{3}{2}})\big) + 6.
\end{equation*}

A graph shows that this model matches the description given.

In general, a sinusoidal graph can be characterized by a centerline \(v=c\text{,}\) an amplitude \(A\text{,}\) a period \(p\text{,}\) and a phase shift \(u=\phi\text{.}\) The standard period of the elementary sine and cosine functions is \(2\pi\text{.}\) The phase shift \(\phi\) is the value of the physical variable \(u=\phi\) that corresponds to \(x=0\text{.}\) These two pieces of information completely determine the map \(u \mapsto x\text{,}\) with slope \(\frac{\Delta x}{\Delta u} = \frac{2\pi}{p}\text{,}\) with a point–slope equation

\begin{equation*}
x = \frac{2 \pi}{p}(u-\phi).
\end{equation*}

The centerline \(v=c\) physically corresponds to the elementary centerline of \(y=0\text{.}\) The amplitude \(A\) corresponds to the elementary amplitude of 1. Consequently, the slope of the transformation map \(y \mapsto v\) is \(\frac{\Delta v}{\Delta y} = A\) so that the point–slope equation of the map is

\begin{equation*}
v = Ay + c.
\end{equation*}

The composition of the chain of mappings with the sine function results in

\begin{equation*}
v = A \sin\left( \frac{2\pi}{p}(u-\phi)\right) + c,
\end{equation*}

while a composition with the cosine function results in

\begin{equation*}
v = A \cos\left( \frac{2\pi}{p}(u-\phi)\right) + c.
\end{equation*}

We use the sine function when the phase shift corresponds to where the graph crosses the centerline \(v=c\text{;}\) the cosine function is used when the phase shift corresponds to the locations of maximum values at \(v=c+A\text{.}\)

Subsection4.5.2Nonlinear Transformations of Linear Relations

A surprising number of useful functions are nonlinear transformations of linear relations. That is, suppose that we are interested in a model for two variables \(x \mapsto y\text{.}\) It is often the case that there are nonlinear coordinate transformations \(x \mapsto u\) and \(y \mapsto v\) such that the relationship for the transformed variables \(u \mapsto v\) is linear.

Example4.5.7

Consider a general exponential model \(y=A b^x\text{.}\) Because the logarithm is one-to-one, we can find an equivalent equation by applying the logarithm to both sides.

If we define a transformed variable \(v=\ln(y)\) and note that \(\ln(A)\) and \(\ln(b)\) are just numbers, then we discover that \(v\) is a linear function of \(x\text{,}\)

\begin{equation*}
v = \ln(b) \cdot x + \ln(A)\text{.}
\end{equation*}

The previous example means that if we have two variables \((x,y)\) such that \((x,\ln(y))\) is linear, then the original variables have an exponential relation. Graphing utilities (like spreadsheets) often have an ability to change an axis to a logarithmic scale. Our result tells us that if the \(y\)-axis is logarithmic and the \(x\)-axis is left alone (linear scale), then the data being viewed have an exponential relation. This type of graph is called a semi-log plot.

By finding the equation of the transformed variables, we can find the original exponential model.

Example4.5.8

Suppose a population grows exponentially such that \(P=500\) when \(t=5\) and \(P=1500\) when \(t=12\text{.}\) Use a semi-log transformation to find the model \(t \mapsto P\text{.}\)

Because we are told the model \(t \mapsto P\) is exponential, we know that \(t \mapsto \ln(P)\) is linear. We first transform the data points to the transformed variables, although we don't need the decimal values.

We find the original model by now solving for \(P\text{.}\) This involves applying the exponential (base \(e\)) to both sides of the equation and then use properties of logarithms and exponents to simplify the result.

While we found that exponential models look linear in a semi-log plot, a power function model will look linear in a log-log plot. This means that both coordinate axes are transformed with a logarithm.

Example4.5.9

In 1967, Lasiewski and Dawson published an article in The Condor relating the body mass \(M\) (in kg) and resting metabolic rate \(R\) (in kcal/day) for birds. They tabulated the recorded body mass and metabolic rate for individual birds based on published studies. The following table includes twelve of these birds. Graph the data and determine if the data appear linear in a log-log plot. Then use a linear regression of transformed data to estimate the model

Bird

\(M\) (kg)

\(R\) (kcal/day)

Rufous hummingbird

0.0038

1.5

Common nighthawk

0.075

9.5

Common wood pigeon

0.150

17.0

Northern bobwhite

0.194

23.0

Wood duck

0.485

65

Pacific gull

1.21

127

Great horned owl

1.450

108

Wood stork

2.5

201

Brown pelican

3.51

264

Sandhill crane

3.89

168

Trumpeter swan

8.88

418

Andean condor

10.32

351

Table4.5.10 Selected body mass and resting metabolic rate of birds, as tabulated in Lasiewski and Dawson (1967).

After entering the data into a spreadsheet or other graphing utility, we generate a scatterplot of the points \((M,R)\text{,}\) as shown below on the left. You should see that the relationship of the data is increasing and concave down. If we modify both axes to use a logarithmic scale, as shown below on the right, we see that the transformed relationship looks reasonably linear. This suggests using a linear relation on the transformed coordinates.

To form the linear model, we need to generate actual transformed values and not just a graph using logarithm scales. In the spreadsheet, we will create two new columns for \(\ln(M)\) and for \(\ln(R)\text{.}\) For example, suppose the mass \(M\) of Selasphorus rufus appears in the spreadsheet in cell B2 and we want to generate the transformed variable \(\ln(M)\) in cell D2. In cell D2, we would type the formula =ln(B2). Copying this formula and pasting it into other cells will preserve the relative location. If you paste it into cell D3, you will discover it automatically changed the formula to =ln(B3).

Once we have new columns \(\ln(M)\) and \(\ln(R)\text{,}\) we can create a new scatterplot of data \((\ln(M), \ln(R))\) using linear scales. This new graph will have the same appearance as the original data using logarithmic scales, except that the axes show the logarithm of the data rather than the original data using logarithmic scales. With this new graph, we can find the linear trend line. The graph below shows the graph of the transformed data, along with a trend line using the formula

We find the model of the relation for the original variables \(M \mapsto R\) by solving for \(R\) and simplifying. To eliminate the logarithm, we apply the inverse operation of the natural exponential. Because our data are approximate, we can use decimal approximations for our formulas.

We see that the model is a power function, \(R = 83.030 M^{0.7356}\text{.}\) The figure below shows the original data using linear axes along with this approximating model.

Subsection4.5.3Summary

Elementary transformations of a graph of a function include translation, scaling, and reflection.

Vertical transformations are applied to the output of the function directly.

Horizontal transformations are applied to the input of the function as inverse operations.

Elementary transformations can be found using linear functions that map the original coordinates \((x,y)\) to the transformed coordinates \((X,Y)\) with \(x \overset{T_x}\mapsto X \) and \(y \overset{T_y}\mapsto Y\) using composition,

\begin{equation*}
X \overset{T_x^{-1}}\mapsto x \mapsto y \overset{T_y}\mapsto Y.
\end{equation*}

Addition by a constant (intercept) corresponds to translation.

Multiplication by a constant (slope) corresponds to rescaling.

A negative multiple (slope) corresponds to reflection.

Nonlinear transformations using invertible maps can also be useful. A common transformation is the logarithm, corresponding to viewing a graph with logarithmic scales.

Data \((x,y)\) that appear linear on a semi-log plot (with the \(y\)-axis in logarithmic scale) means that \((x,\ln(y))\) will have a linear relation. Subsequently, \(x \mapsto y\) will be an exponential model.

Data \((x,y)\) that appear linear on a log-log plot (with both axes in logarithmic scale) means that \((\ln(x),\ln(y))\) will have a linear relation. Subsequently, \(x \mapsto y\) will be a power function model.

SubsectionExercises

1

Find the equation of a parabola with a vertex at \((3,2)\) and a second point at \((6,0)\text{.}\)

2

View a graph of \(y=|x|\text{,}\) which forms the shape of a “V”. Find the equation of a transformation that moves the vertex to \((-3,2)\text{,}\) opens downward, and has a second point at \((0,0)\text{.}\)

3

The function \(\displaystyle f(x)=\frac{x}{1+x}\) is a simple increasing, concave down function that passes through \(f(0)=0\) and has a horizontal asymptote \(y=1\) and half-saturation constant \(x=1\text{.}\) This basic function is often used to model the reaction rate of enzyme-catalyzed reactions.

Suppose that \(C\) is the concentration of a reactant in an enzyme-catalyzed reaction and \(V\) is the rate of reaction. Use transformations of \(y=\frac{x}{1+x}\) to find a model for \(C \mapsto V\) such that the \((C,V)=(0,0)\) is a possible state, the saturating rate is \(V=50\text{,}\) and the half-saturation occurs at \(C=80\text{.}\)

4

The Gaussian function \(f(x)=e^{-\frac{1}{2}x^2}\) is symmetric about \(x=0\) with a maximum \(f(0)=1\text{,}\) has a horizontal asymptote \(y=0\) as \(x \to \pm \infty\text{,}\) and has inflection points at \(x=\pm 1\text{.}\) This function is often used in statistics to describe normally distributed data.

The height of individuals in a population were recorded and observed to have a normal distribution. A histogram plot showing the number of individuals \(N\) with the same height \(H\text{,}\) rounded to the nearest centimeter, could be modeled \(H \mapsto N\) as a transformation of \(f\text{.}\) The maximum in the histogram (line of symmetry) is at \(H=152\) cm with \(N=250\text{.}\) The inflection points were observed to be at \(H=144\) cm and \(H=160\) cm. The horizontal asymptote is still \(N=0\text{.}\) Find a Gaussian curve to model the distribution.

5

Find an equation for a sinusoidal graph \((x,y)\) with a period 10, a center line (midpoint between the maximum and minimum) of \(y=8\text{,}\) and has a maximum at \((x,y)=(2,11)\text{.}\)

6

The number of hours of daylight \(H\) is a periodic function of the time \(D\text{,}\) measured in days after the year begins. The cycle repeats every 365 days. The longest day is on the summer solstice, which occurs at \(D=172.25\text{,}\) with \(H=14.85\text{.}\) The shortest day is the winter solstice, which occurs at \(D=354.75\text{,}\) with \(H=9.48\text{.}\) Find a sinusoidal model for \(D \mapsto H\text{.}\) Use your model to determine the number of hours of daylight on \(pi\)-day, \(D=72\text{.}\)

7

The cosine is another trigonometric function with period \(2\pi\) and range \([-1,1]\) and has the identical graph shape as sine. However, the maximum for cosine occurs at \(\cos(0)=1\) and the minimum occurs at \(\cos(\pi)=-1\text{.}\) Find the equation of cosine in terms of the sine function by using transformations.

8

The square of the cosine function, \(\cos^2(x)\text{,}\) has the same shape as the sine and cosine graphs, except that the period is \(\pi\) and the minimum and maximum values are \(0\) and \(1\text{,}\) respectively. We know \(\cos^2(0)=1\) and \(\cos^2(\frac{\pi}{2})=0\text{.}\) Find the equation of \(\cos^2(x)\) in terms of the sine or cosine function by using transformations.

9

The square of the sine function, \(\sin^2(x)\text{,}\) has the same shape as the sine and cosine graphs, except that the period is \(\pi\) and the minimum and maximum values are \(0\) and \(1\text{,}\) respectively. We know \(\sin^2(0)=0\) and \(\sin^2(\frac{\pi}{2})=1\text{.}\) Find the equation of \(\sin^2(x)\) in terms of the sine or cosine function by using transformations.

10

A population \(P\) grows exponentially in time \(t\) such that \(P=500\) when \(t=2\) and triples every 12 years. Use the semi-log transform to find a linear model \(t \mapsto \ln(P)\) and then find the model \(t \mapsto P\text{.}\) What was the population when \(t=0\text{?}\)

11

In a simple electrical circuit, the voltage \(V\) on a capacitor decays exponentially as a function of time \(t\text{.}\) After \(t=5\) seconds, we find \(V=8\) volts; after another 5 seconds, we find \(V=6.4\) volts. Use the semi-log transform to find a linear model \(t \mapsto \ln(V)\) and then find the exponential model \(t \mapsto V\text{.}\) When will the circuit reach \(V=1\) volt?

12

During childhood development, the head grows at a different rate than the rest of the body. This is why the heads of young children look larger proportional to their body than older children and adults. Such growth is called allometry and is often observed to follow a power law.

According to the World Health Organization's statistics for child development, the median circumference \(C\) of the head for a one-year-old girl is 45 cm and the median height \(H\) is 74.5 cm. For a five-year-old, the median head size is \(C=50\) cm and the median height is \(H=109.5\) cm. Use a log-log transform to find a linear model \(\ln(H) \mapsto \ln(C)\) and then find the power function model \(H \mapsto C\text{.}\) If this pattern continues, predict the head circumference for a ten-year-old where the median height is \(H=140\) cm.

13

Chemical reactions generally occur at a rate \(R\) that is proportional to a power of the reactant concentration \(C\text{.}\) Such a reaction will have a graph \((C,R)\) that appears linear in a log-log plot. Suppose you have a reaction such that \(R=0.5\) when \(C=0.2\) and \(R=1.5\) when \(C=0.4\text{.}\) Use a log-log transform to find a linear model \(\ln(C) \mapsto \ln(R)\) and then find the power function model \(C \mapsto R\text{.}\)