Skip to main content
Logo image

Precalculus JumpStart

Section 6.7 Transformations of Functions

Performing simple algebraic operations on the input or output of a function \(f\) has a predictable effect on how the function’s graph \(y=f(x)\) is transformed:
  • Addition (or subtraction) by a fixed amount \(a \gt 0\) to the input, as in \(y=f(x+a)\text{,}\) or the output, as in \(y = f(x)+a\text{,}\) has a translation effect on the graph by rigidly shifting points left/right or up/down.
  • Multiplication by \(k \gt 0\) with the input, as in \(y=f(kx)\text{,}\) or the output, as in \(y = kf(x)\text{,}\) has a scaling effect on the graph by stretching or contracting points horizontally or vertically in relation to the coordinate axes.
  • Taking the opposite value of the input, as in \(y=f(-x)\text{,}\) or the output, as in \(y = -f(x)\text{,}\) has a reflecting effect on the graph by flipping points over the vertical or horizontal axis.
This is best explored with an example involving a piecewise-defined function. (See Section 6.4.)

Activity 6.1. Exploring Transformations.

Consider the function \(f\) with graph below.

(a)

What is the domain of \(f\text{?}\) What is the range of \(f\text{?}\)
Answer.
Domain: \([-2,8]\text{;}\) Range: \([0,9]\text{.}\)

(b)

The graph of \(f\) is piecewise-linear, meaning it is a piecewise-defined function consisting entirely of linear graphs. Fill in the blanks below to find a formula for \(f\text{.}\) I did the middle piece for you.
\begin{equation*} f(x) = \begin{cases} \underline{\quad\quad\quad},& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ \underline{\quad\quad\quad},& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
Hint.
A line with slope \(m\) and \(x\)-intercept \((a,0)\) must have equation \(y = m(x-a)\text{.}\) Alternatively, if you know the \(y\)-intercept is \((0,b)\text{,}\) then it can be written as \(y=mx+b\text{.}\)
Answer.
One form emphasizes the \(x\)-intercepts:
\begin{equation*} f(x) = \begin{cases} 3(x+2),& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ -3(x-8),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
while the second form emphasizes the \(y\)-intercepts:
\begin{equation*} f(x) = \begin{cases} 3x+6,& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ -3x+24,& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}

(c)

Let’s see what the effect of adding \(2\) to the input of \(f\) will be. Evaluate \(f(x+2)\) using your formula above. To do so, replace every occurrence of \(x\) with \(x+2\text{,}\) including in the inequalities, but don’t simplify anything yet. I’ll do the middle piece.
\begin{equation*} f({\color{blue} x+2}) = \begin{cases} \underline{\quad\quad\quad},& \text{if $-2 \leq \underline{\quad\quad\quad} \lt 1$} \\ 9,& \text{if $ 1 \leq {\color{blue} x+2} \lt 5$} \\ \underline{\quad\quad\quad},& \text{if $ 5 \leq \underline{\quad\quad\quad} \leq 8$} \\ \end{cases} \end{equation*}
Answer.
Starting from
\begin{equation*} f(x) = \begin{cases} 3(x+2),& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ -3(x-8),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
we obtain
\begin{equation*} f({\color{blue} x+2}) = \begin{cases} 3({\color{blue} x+2}+2),& \text{if $-2 \leq {\color{blue} x+2} \lt 1$} \\ 9,& \text{if $ 1 \leq {\color{blue} x+2} \lt 5$} \\ -3({\color{blue} x+2}-8),& \text{if $ 5 \leq {\color{blue} x+2} \leq 8$} \\ \end{cases} \end{equation*}

(d)

Simplify your result from above. In particular, make the inequalities look more friendly to the reader by isolating \(x\) in the middle of each compound inequality. I’ll do the second piece again so you see what I mean.
\begin{equation*} f({\color{blue} x+2}) = \begin{cases} \underline{\quad\quad\quad},& \text{if $\underline{\quad\quad\quad\quad}$} \\ 9,& \text{if ${\color{blue} -1 \leq x \lt 3}$} \\ \underline{\quad\quad\quad},& \text{if $\underline{\quad\quad\quad\quad}$} \\ \end{cases} \end{equation*}
Answer.
\begin{equation*} f(x+2) = \begin{cases} 3(x+4),& \text{if $-4 \leq x \lt -1$} \\ 9,& \text{if $ -1 \leq x \lt 3$} \\ -3(x-6),& \text{if $ 3 \leq x \leq 6$} \\ \end{cases} \end{equation*}

(e)

Graph \(y=f({\color{blue}x+2})\text{.}\) What effect does adding \(2\) to the input of \(f\) have on the graph? How, if at all, have the domain and range changed?
Hint.
The domain is the set of all permissible inputs to the function. Look along the horizontal axis for the domain. The range is the set of all resulting outputs of the function. Look along the vertical axis for the range.
Answer.
The graph of \(y=f(x+2)\) is the graph of \(y=f(x)\) translated \(2\) units to the left. The domain is now \([-4,6]\text{,}\) but the range has not changed.

(f)

Now let’s see what the effect of adding \(2\) to the output of \(f\) will be. We need to evaluate \(f(x)+2\text{.}\) Notice that we first compute \(f(x)\)
\begin{equation*} f(x) = \begin{cases} 3(x+2),& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ -3(x-8),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
then add \(2\) to the results. So that
\begin{equation*} f(x) {\color{blue}+2} = \begin{cases} 3(x+2){\color{blue}+2},& \text{if $-2 \leq x \lt 1$} \\ 9{\color{blue}+2},& \text{if $ 1 \leq x \lt 5$} \\ -3(x-8){\color{blue}+2},& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
Since the operation is only on the output of \(f(x)\text{,}\) no change is made to the inequalities. Sketch the graph of \(y=f(x)+2\text{.}\) What effect does adding \(2\) to the output of \(f\) have on the graph? How, if at all, have the domain and range changed?
Answer.
The graph of \(y=f(x)+2\) is the graph of \(y=f(x)\) translated \(2\) units up. The range is now \([2,11]\text{,}\) but the domain has not changed.

(g)

What is the effect of doubling the output of \(f\text{?.}\) Evaluate \(2f(x)\text{.}\) What happens to the slopes of each linear piece?
Answer.
\begin{equation*} {\color{blue}2\cdot}f(x) = \begin{cases} {\color{blue}2\cdot}3(x+2),& \text{if $-2 \leq x \lt 1$} \\ {\color{blue}2\cdot}9,& \text{if $ 1 \leq x \lt 5$} \\ {\color{blue}2\cdot}(-3(x-8)),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
or
\begin{equation*} {\color{blue}2\cdot}f(x) = \begin{cases} 6(x+2),& \text{if $-2 \leq x \lt 1$} \\ 18,& \text{if $ 1 \leq x \lt 5$} \\ -6(x-8),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
with the effect of doubling the slopes of each line.

(h)

Sketch the graph of \(y=2f(x)\text{.}\) What effect does doubling the output of \(f\) have on the graph? How, if at all, have the domain and range changed?
Answer.
The graph of \(y=2f(x)\) is the graph of \(y=f(x)\) stretched \(vertically\) by a factor of \(2\text{.}\) The range is now \([9,18]\text{,}\) but the domain has not changed.

(i)

What is the effect of doubling the input of \(f\text{?.}\) Evaluate \(f(2x)\text{.}\) What happens to the slopes? What happens to the \(x\)-intercepts? Sketch the and discuss the graph of \(y=f(2x)\)
Answer.
\begin{equation*} f({\color{blue}2\cdot}x) = \begin{cases} 3({\color{blue}2\cdot}x+2),& \text{if $-2 \leq {\color{blue}2\cdot}x \lt 1$} \\ 9,& \text{if $ 1 \leq {\color{blue}2\cdot}x \lt 5$} \\ (-3({\color{blue}2\cdot}x-8)),& \text{if $ 5 \leq {\color{blue}2\cdot}x \leq 8$} \\ \end{cases} \end{equation*}
which becomes
\begin{equation*} f({\color{blue}2\cdot}x) = \begin{cases} 6(x+1),& \text{if $-1 \leq x \lt 0.5$} \\ 9,& \text{if $ 0.5 \leq {\color{blue}2\cdot}x \lt 2.5$} \\ (-6(x-4)),& \text{if $2.5 \leq x \leq 4$} \\ \end{cases} \end{equation*}
Observe that the slopes have doubled again, but the \(x\)-intercepts are half of what they were for \(f\text{.}\)

(j)

Sketch the and discuss the graph of \(y=f(2x)\)
Answer.
The graph of \(y=f(2x)\) is the graph of \(y=f(x)\) compressed \(horizontally\) by a factor of \(2\text{.}\) The domain is now \([1,4]\text{,}\) but the range has not changed.

(k)

What effect will taking the opposite input have on the graph? In other words, what would the graph of \(y=f(-x)\) look like? Write an expression for \(f(-x)\text{,}\) graph, and summarize.
Answer.
Flipping the input,
\begin{equation*} f({\color{blue}-}x) = \begin{cases} 3({\color{blue}-}x+2),& \text{if $-2 \leq {\color{blue}-}x \lt 1$} \\ 9,& \text{if $ 1 \leq {\color{blue}-}x \lt 5$} \\ -3({\color{blue}-}x-8),& \text{if $ 5 \leq {\color{blue}-}x \leq 8$} \\ \end{cases} \end{equation*}
which will reverse the inequalities:
\begin{equation*} f({\color{blue}-}x) = \begin{cases} -3(x-2),& \text{if $2 \geq x \gt -1$} \\ 9,& \text{if $-1 \geq x \gt -5$} \\ 3(x+8),& \text{if $-5 \geq x \geq -8$} \\ \end{cases} \end{equation*}
It’s a little more friendly to write things with the inequalities increasing from left to right:
\begin{equation*} f({\color{blue}-}x) = \begin{cases} 3(x+8),& \text{if $-8 \leq x \leq -5$} \\ -3(x-2),& \text{if $-5 \lt x \leq -1$} \\ 9,& \text{if $-1 \lt x \leq 2$} \\ \end{cases} \end{equation*}
The effect is reflect the graph of \(y=f(x)\) horizontally over the \(y\)-axis.

(l)

What effect will taking the opposite output have on the graph? In other words, what would the graph of \(y=-f(x)\) look like? Write an expression for \(-f(x)\text{,}\) graph, and summarize.
Answer.
Flipping the output,
\begin{equation*} {\color{blue}-}f(x) = \begin{cases} {\color{blue}-}3(x+2),& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ {\color{blue}-}(-3(x-8)),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
which has no effect on the inequalities, resulting in
\begin{equation*} {\color{blue}-}f(x) = \begin{cases} -3(x+2),& \text{if $-2 \leq x \lt 1$} \\ 9,& \text{if $ 1 \leq x \lt 5$} \\ 3(x-8),& \text{if $ 5 \leq x \leq 8$} \\ \end{cases} \end{equation*}
Observe how the slopes of the lines are now opposite. The effect is to reflect \(y=f(x)\) vertically, over the \(x\)-axis.