A transformation changes one number in an equation and moves the graph in a predictable way. The hard part is the signs: does f(x − 3) move left or right? Move the sliders below and see.
Further down, a generator gives you new problems until the signs feel automatic. Need the rules first? Read Transformations of graphs of functions and come back.
Transformation explorer
Pick a base function and move the sliders. The dashed curve is f(x). The solid curve is g(x) = a·f(b(x − h)) + k. The circle and the square mark two points of f and where they end up.
Contents
- How to read the explorer
- The order of the transformations
- Worked examples
- Practice generator
- Tips for each type of problem
- Common mistakes
- Frequently asked questions
- See also
How to read the explorer
The explorer draws the dashed base graph $latex f(x)$ and the solid graph $latex g(x)$ built from it with one formula:
$$g(x)=a\,f\big(b\,(x-h)\big)+k$$
- a stretches or compresses the graph vertically. The reflection button over the x-axis makes a negative.
- b stretches or compresses it horizontally, and it works backwards: b = 2 compresses by a factor of 2. The reflection button over the y-axis makes b negative.
- h shifts the graph to the right when positive and to the left when negative.
- k shifts the graph up when positive and down when negative.
Two points of f are marked, the circle (0, 0) and the square (1, 1), together with where they land on g. Try a = 2, h = 3 and k = −1 on $latex x^2$, then switch the base function. The points move the same way every time, because the rules do not depend on f.
The order of the transformations
The formula reads from the inside out, and the graph follows the same order:
- Stretch, compress or reflect horizontally (b).
- Shift horizontally (h).
- Stretch, compress or reflect vertically (a).
- Shift vertically (k).
Take $latex g(x)=-2(x-3)^2+1$. Start with $latex x^2$, shift it 3 units to the right, stretch it vertically by 2, reflect it over the x-axis and then shift it 1 unit up. The vertex goes from (0, 0) to (3, 1) and the parabola opens downward.
The order matters when a shift and a reflection or a stretch act in the same direction. Shifting f up 2 and then reflecting over the x-axis gives $latex -(f(x)+2)=-f(x)-2$, not $latex -f(x)+2$. The generator uses this on purpose: the steps in a problem are applied in the order listed. A horizontal step and a vertical step never affect each other.
Worked examples
Example 1. The graph of $latex f(x)=|x|$ is shifted 2 units to the left and 3 units down. Write $latex g(x)$. Left 2 means $latex x+2$ inside, and down 3 means $latex -3$ at the end, so $latex g(x)=|x+2|-3$. The vertex moves from (0, 0) to (−2, −3).
Example 2. Start with $latex f(x)=\sqrt{x}$, shift it 4 units up, then reflect it over the x-axis. After the shift we have $latex \sqrt{x}+4$. The reflection changes the sign of the whole expression, so $latex g(x)=-(\sqrt{x}+4)=-\sqrt{x}-4$. Reflecting first and shifting after would give $latex -\sqrt{x}+4$, a different graph.
Example 3. The point (4, 2) is on the graph of f. Where does it land on $latex g(x)=-3f(x-1)+5$? The x-coordinate moves 1 unit to the right: 4 + 1 = 5. The y-coordinate is multiplied by −3 and then 5 is added: −3·2 + 5 = −1. The new point is (5, −1).
Example 4. Describe how $latex f(x)=\sqrt{x}$ becomes $latex g(x)=\sqrt{3-x}$. Rewrite the inside: $latex 3-x=-(x-3)$, so $latex g(x)=f\big(-(x-3)\big)$. First reflect over the y-axis, then shift 3 units to the right. Check: g(3) = 0 and g(−1) = √4 = 2, so the curve starts at x = 3 and runs to the left.
Practice generator
Every problem is new. Use Show steps to see the same problem solved one step at a time, and compare it with your own work.
Start with the type that gives you the most trouble. If signs are the problem, begin with Equation to a, h and k. If the order is the problem, use Description to equation. Aim for five correct answers in a row on the first try before you move on.
Practice generator
Choose a type, solve it, and press Check. Negative numbers use a minus sign, and fractions such as 1/2 are accepted.
Tips for each type of problem
- Description to equation. Write the equation after every step instead of jumping to the end. The steps in the solution do exactly that.
- Equation to a, h and k. Compare the equation with $latex a\,f(x-h)+k$. An x + 3 inside means h = −3, because x + 3 = x − (−3).
- Graph to h, k and a. Find where the key point (0, 0) of f went. Its new coordinates are h and k, and the orientation of the curve gives the sign of a.
- Where a point goes. Apply the same steps to the point: x is divided by b and shifted by h, y is multiplied by a and shifted by k.
Common mistakes
- Reading f(x − 3) as a shift to the left. The minus sign goes with x inside the parentheses, so the graph moves 3 units to the right. f(x + 3) moves left.
- Mixing up the two reflections. −f(x) flips the graph upside down, over the x-axis. f(−x) flips it left to right, over the y-axis. For $latex x^2$ and $latex |x|$ the second one changes nothing, and for $latex x^3$ it gives the same graph as the first.
- Treating the horizontal factor like the vertical one. In f(2x) the x-values are divided by 2, so the graph is compressed, not stretched.
- Ignoring the order of a shift and a reflection. Reflect after a shift of 2 units up and the shift becomes 2 units down. Check the order in the problem.
- Putting a number in the wrong place. A number next to x inside moves the graph sideways. A number added at the end moves it up or down.
Frequently asked questions
Which base functions do the tools use?
The explorer and the generator use $latex x^2$, $latex |x|$, $latex \sqrt{x}$ and $latex x^3$. The rules are the same for every function, including the ones in transformations of trigonometric functions.
Does the order of the steps always matter?
Only between steps in the same direction, such as a shift and a reflection, or a shift and a stretch. A horizontal step and a vertical step can go in any order.
What happens when a is between 0 and 1?
The graph is compressed vertically. With a = 0.5 every height is cut in half. A value between −1 and 0, such as −0.5, compresses the graph in the same way and also reflects it over the x-axis.
Why does b work backwards?
Because f(bx) takes at x the value that f takes at bx. With b = 2, the point of f at x = 4 shows up at x = 2 on g, so the graph is half as wide.
Is there a way to remember the signs?
Yes. A change inside the parentheses, next to x, works backwards: x − 3 moves right and 2x compresses. A change outside, on the whole function, works as written: + 3 moves up and 2f stretches. When in doubt, test one point.
How can I check an answer on paper?
Take one point of f, for example (1, 1) on $latex x^2$, apply the steps to it, and test whether the new point satisfies your equation. If it does not, one of the signs is wrong.