Suppose we know what the graph of a particular function looks like. We can use graph transformations to quickly sketch graphs of functions that are transformed from the original function. We can divide transformations into two types:
These transformations apply to the output of the function. In other words, they apply to the value of $f(\ldots)$. For example,
\[f(x)+5,\quad f(x)-2,\quad 3f(x),\quad -f(x)\]
Geometrically, any transformation outside the function will have an effect in the vertical direction on the original graph. For example, the graph of $y=f(x)+3$ is obtained by shifting the graph of $y=f(x)$ upward by 3 units.
In the following table, we assume that $d>0$ and $c>1$.
New function | Effect on original graph |
---|---|
$f(x)+d$ | Shift up by $d$ |
$f(x)-d$ | Shift down by $d$ |
$cf(x)$ | Stretch vertically by $c$ |
$\frac{1}{c}f(x)$ | Shrink vertically by $\frac{1}{c}$ |
$-f(x)$ | Flip over the $x$-axis |
Example 1. To sketch the graph of $y=x^2+2$, we note that it is $f(x)+2$ where $f(x)=x^2$. Thus the graph of $y=x^2+2$ is obtained by shifting the graph of $y=x^2$ upward by 2 units. Similarly, the graph of $y=x^2-2$ is obtained by shifting the graph of $y=x^2$ downward by 2 units.
These transformations apply to the input of the function. In other words, they apply to $(\ldots)$ inside $f(\ldots)$. For example,
\[f(x+5),\quad f(x-2),\quad f(3x),\quad f(-x)\]
Geometrically, any transformation inside the function will have an effect in the horizontal direction. For example, the graph of $y=f(x-5)$ is obtained by shifting the graph of $y=f(x)$ to the right by 5 units.
In the following table, we assume that $d>0$ and $c>1$.
New function | Effect on original graph |
---|---|
$f(x+d)$ | Shift left by $d$ |
$f(x-d)$ | Shift right by $d$ |
$f(cx)$ | Shrink horizontally by $\frac{1}{c}$ |
$\frac{1}{c}f(x)$ | Stretch horizontally by $c$ |
$f(-x)$ | Flip over the $y$-axis |
Example 2. To sketch the graph of $y=(x+2)^2$, we note that it is $f(x+2)$ where $f(x)=x^2$. Thus the graph of $y=(x+2)^2$ is obtained by shifting the graph of $y=x^2$ to the left by 2 units. Similarly, the graph of $y=(x-2)^2$ is obtained by shifting the graph of $y=x^2$ to the right by 2 units.
We can also have transformations inside and outside the original function.
Example 3. The graph of $y=\sqrt{x-3}+2$ is obtained from the graph of $y=\sqrt{x}$ by shifting it right by 3 units and up by 2 units.