Please enable scripting (or JavaScript) in your web browser, and then reload this page.
In this lesson, you will learn how to move a function’s graph horizontally or vertically by making simple changes to the formula defining the function.
What are the values of $f(x)+2$ at these values of $x$?
Click to see the graphs of $y_1=f(x)$ and $y_2=f(x)+2$.
The equation $y=f(x)+k$ is now graphed in green, with a slider for $k$.
We’ll now look at shifting some functions whose formulas we know.
Let $g(x)=x^2$. The equation $y_1=g(x)$ is graphed on the grid to the left, along with its shifted version $y=g(x)+k$.
If one graph is $d$ units below another graph, we say that it’s $-d$ units “above” the other graph.
In general:
The graph of $y=f(x)+k$ has the same shape as the graph of $y_1=f(x)$, but shifted up by $k$ units. (If $k$ is negative, this means it’s shifted down by $|k|$ units.)
Now let $e(x)=x^2-2$. The equations $y_1=e(x)$ and $y=e(x)+k$ are graphed on the grid to the left, with a slider for $k$.
The graph which has the same shape as the graph of $y_1=e(x)$, but is shifted up by 3 units, has the equation $y=x^2-2+3$, or $y=x^2+1$. You can see this on the grid by sliding $k$ to 3.
The left-hand table below shows you the values of $f(x)$ for a certain function $\cl"red"f$, at a few values of $x$. To find the value of $f(x-5)$ when $x=1$, we can first notice that $1-5=-4$, and then find the value of $f(-4)$ by looking at the $-4$ row in the left-hand table. Since $f(-4)=1$, $f(x-5)=1$ when $x=1$.
By using the left-hand table in this way, find the value of $f(x-5)$ at each value of $x$ in the right-hand table below.
Click to see the graphs of $y_1=f(x)$ and $y_2=f(x-5)$.
The equation $y = f(x-h)$ is now graphed in green, with a slider for $h$.
We’ll now look again at $g(x)=x^2$. The equation $y_1=g(x)$ is graphed on the grid to the left, along with its shifted version $y=g(x-h)$.
Just as a graph that is $d$ units below another graph is said to be $-d$ units “above” the other graph, a graph that is $d$ units to the left of another graph is said to be $-d$ units “to the right” of the other graph.
The graph of $y=f(x-h)$ has the same shape as the graph of $y_1=f(x)$, but shifted right by $h$ units. (If $h$ is negative, this means it’s shifted left by $|h|$ units.)
Now let $e(x)=(x+1)^2$. The equations $y_1=e(x)$ and $y=e(x-h)$ are graphed on the grid to the left, with a slider for $h$.
The graph which has the same shape as the graph of $y_1=e(x)$, but is shifted right by 3 units, has the equation $y=(x+1-3)^2$, or $y=(x-2)^2$. You can see this by sliding $h$ to 3.
A phenomenon that always repeats after a certain period of time is called “periodic.” For example, the phases of the moon repeat after roughly 29.5 days.
If $f$ is a function and you can find some number $h$ (other than $0$) so that $f(x-h)=f(x)$ for every $x$, then $f$ is called a periodic function. We’ll now see this means that the graph of $f$ repeats whenever $x$ is changed by $h$.
A new function $\cl"red"f$ is now graphed on the grid to the left, along with the graph of $\cl"blue"{y=f(x-h)}$.
Slide $h$ to $-4$, and notice that the graphs of $y_1=f(x)$ and $y=f(x-h)$ then line up perfectly. This means that $f(x+4)=f(x)$ for every $x$.
If $f$ is periodic, the smallest possible positive $h$ where $f(x-h)=f(x)$ for every $x$ is called the period of $f$.