โ๏ธ Function Kingdom ยท Functions
Transformations of Any Function
Move past the parabola: stretch a graph horizontally with f(kx), reflect it in the y-axis, apply several transformations in the right order, track where a single point goes, and do it all to square roots, cube roots, reciprocals, cubics and exponentials.
In short
- Every transformation fits y = a f(b(x - h)) + k: a and k act on outputs and so act vertically, b and h act on inputs and so act horizontally.
- Inside changes run backwards โ f(x - 3) moves right, f(2x) compresses, f(-x) reflects in the y-axis โ so a point moves to (x0/b + h, a*y0 + k).
- Factor any number out of the bracket before reading a shift: f(2x - 6) is f(2(x - 3)), a shift of 3 and not of 6.
- Only inside changes can alter a domain and only outside changes can alter a range, and a negative a turns the range inequality over.
One form for every graph
Technician Mox keeps the Hall of Transformations tidy with a single line chalked above the door:
y = a f(b(x - h)) + k
Four letters, and between them they describe every stretch, squeeze, flip and slide that can happen to a graph โ whatever f happens to be. You already know two thirds of this from x2 and |x|. What is new is b, and what it does to the inside of the function.
The four letters split cleanly into two jobs.
- a and k live outside f. They change the outputs, so they act vertically: a multiplies every height, k moves every height.
- b and h live inside f. They change the inputs, so they act horizontally: b squeezes or stretches sideways, h slides the graph left or right.
The whole subject is that one split. Ask of any change: is it happening to x before f gets hold of it, or to f's answer afterwards? Nothing else decides the direction.
The one wrinkle โ and it is the wrinkle that costs the marks โ is that inside changes work backwards. Outside, "+ 3" really does lift the graph 3 up. Inside, "- 3" moves it 3 to the right, and multiplying x by 3 makes the graph 3 times narrower.
Why the inside runs backwards
There is nothing mysterious here, and you never have to memorise it. Ask one question: what x makes f receive the input it used to receive?
Suppose f(4) = 7, so the point (4, 7) is on y = f(x).
For y = f(x - 3): f only gets 4 when x - 3 = 4, that is when x = 7. So the point has moved to (7, 7) โ three to the right, even though the equation says minus 3.
For y = f(2x): f only gets 4 when 2x = 4, that is when x = 2. The point has moved to (2, 7) โ halfway in towards the y-axis. Multiplying x by 2 compresses the graph horizontally by a factor of 1/2.
For y = f(x/3): f gets 4 when x/3 = 4, so x = 12. The point has moved out to (12, 7): dividing x by 3 stretches the graph horizontally by a factor of 3.
For y = f(-x): f gets 4 when -x = 4, so x = -4. The graph has been reflected in the y-axis.
So the recipe for the image of a point is short: divide the x-coordinate by b, then add h; multiply the y-coordinate by a, then add k.
(x0, y0) -> (x0/b + h, a*y0 + k)
The trap. y = f(2x - 6) is not a shift of 6. Factor the inside first:
f(2x - 6) = f(2(x - 3))
so it is a horizontal compression by a factor of 1/2 and then a shift of 3 to the right. Whenever there is a number in front of x, factor it out before you read any shift at all.
Order matters for the same reason. In a f(b(x - h)) + k, the stretch happens before the shift on both sides: a height becomes a*y0 and only afterwards has k added, never a(y0 + k).
The parent catalogue
The form is worthless without the shapes it acts on. Six parents cover almost everything you will meet, and each one has an anchor โ the point the transformation carries around.
- f(x) = sqrt(x) โ starts at (0, 0) and rises to the right only. Anchor (0, 0). Domain x >= 0.
- f(x) = cbrt(x), the cube root โ an S lying on its side through (0, 0), defined for every x. Anchor (0, 0).
- f(x) = 1/x โ two branches, with the axes as asymptotes. There is no anchor point; the crossing of the two asymptotes at (0, 0) does the same job.
- f(x) = x3 โ an S through (0, 0), flat at the origin. Anchor (0, 0).
- f(x) = |x| โ a V with its corner at (0, 0). Anchor (0, 0).
- f(x) = 2x โ hugs the x-axis on the left, doubles every step to the right. Passes through (0, 1); the asymptote y = 0 does the anchoring.
Reading a graph is now one move. Find where the anchor has landed: its coordinates are (h, k) directly, with no sign flipping โ the sign inside the bracket is the opposite of h, which is why it is safer to read the point than the equation. Then substitute one more point to get a.
Writing an equation is the same move backwards. Take the parent, replace x by b(x - h), multiply the whole thing by a, add k. For instance a square root reflected in the x-axis, stretched vertically by 3, moved 2 left and 1 up is
y = -3sqrt(x + 2) + 1
Even, odd, and what is left of the domain
Two questions finish the subject off.
Symmetry. Replace every x by -x and see what comes back.
- If f(-x) is identical to f(x), the function is even, and its graph is symmetric about the y-axis. x2, x4, |x| and 1/x2 are even: an even power swallows the minus sign.
- If f(-x) is the exact negative of f(x), the function is odd, and its graph has half-turn symmetry about the origin. x, x3, x5 and 1/x are odd: an odd power passes the minus sign straight through.
- If it is neither, the function is neither โ and most functions are. x2 + x mixes an even power with an odd one, and x3 + 1 spoils an odd function with a constant.
Both comparisons have to be made. Finding that f(-x) is not f(x) rules out even; it says nothing at all about odd. And a function whose domain is one-sided, like sqrt(x), cannot be either, because f(-x) does not even exist.
Domain and range. Start with the parent's own, then move them.
- Only inside changes can touch a domain. In y = -2sqrt(x - 1) + 3 the inside is x - 1, so the domain is x >= 1. The -2 and the + 3 leave it alone.
- Only outside changes can touch a range. That same function has range y <= 3: sqrt is never negative, -2 times something never negative is never positive, and + 3 puts the ceiling at 3. The minus sign turned the inequality over.
- An exponential keeps its asymptote as the edge it never reaches: y = 3*2x - 4 has range y > -4.
- A reciprocal loses one x-value and one y-value: y = 1/(x + 2) - 5 has domain all real numbers except x = -2, and range all real numbers except y = -5.
Worked examples
Example 1
The point (6, 5) lies on the graph of y = f(x). Where is the matching point on the graph of y = -2f((x - 1)/3) + 4?
- Split the work: the inside decides the new x, the outside decides the new y.
- Inside, f receives (x - 1)/3. For f to receive 6, solve (x - 1)/3 = 6, so x - 1 = 18 and x = 19.
- Outside, the height 5 is first multiplied by -2, giving -10.
- Only then is 4 added: -10 + 4 = -6.
- The image is (19, -6).
Example 2
Describe the transformation that takes y = f(x) to y = f(4x - 8), and write the equation of f(x) = sqrt(x) after a reflection in the x-axis, a vertical stretch of 3, and a move 2 units left and 1 unit up.
- First factor the inside: 4x - 8 = 4(x - 2), so the equation is y = f(4(x - 2)).
- The 4 multiplies x, so the graph is compressed horizontally by a factor of 1/4 โ not stretched, and the shift is 2, not 8.
- Then x - 2 slides it 2 units to the right. So: compressed horizontally by a factor of 1/4, then shifted 2 units right.
- For the second part, start from sqrt(x) and put the described numbers into y = a f(b(x - h)) + k: a = -3 (the 3 is the stretch, the minus is the reflection), h = -2, k = 1.
- A move of 2 to the left replaces x by (x + 2), giving sqrt(x + 2).
- Multiply by -3 and add 1 at the end: y = -3sqrt(x + 2) + 1.
- Check the domain and range: the inside needs x + 2 >= 0, so x >= -2, and since -3sqrt(...) is never positive, the range is y <= 1.
Example 3
Is f(x) = x3 - x even, odd or neither? What is the range of y = -2|x - 5| + 7?
- Replace every x with -x: f(-x) = (-x)3 - (-x) = -x3 + x.
- Compare with -f(x) = -(x3 - x) = -x3 + x. They match, so f is odd.
- For the range, start from the parent |x|, whose range is y >= 0.
- Multiplying by -2 stretches it and turns it over, so -2|x - 5| is never positive: it is at most 0.
- Adding 7 lifts that ceiling to 7, so the range is y <= 7. The x - 5 inside changes nothing about the range.
Practice problems, with solutions
Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.
Problem 1
Difficulty 1 of 5The point (-1, -6) lies on the graph of y = f(x). Which point lies on the graph of y = f(x) + 3? Give your answer as the pair (x, y).
Answer: (-1, -3)
- Nothing changes inside f, so the x-coordinate stays at -1.
- Outside f every height changes by + 3, so -6 + 3 = -3.
- Image: (-1, -3)
Problem 2
Difficulty 3 of 5The graph of y = f(x) becomes the graph of y = f(-4x). Which description matches?
- reflected in the x-axis and compressed horizontally by a factor of 1/4
- reflected in the y-axis and shifted 4 units to the left
- reflected in the y-axis and stretched horizontally by a factor of 4
- reflected in the y-axis and compressed horizontally by a factor of 1/4
Answer: D. reflected in the y-axis and compressed horizontally by a factor of 1/4
- The minus sign sits inside f, so it flips the graph across the y-axis rather than the x-axis.
- The factor 4 sits inside f too, so every x-coordinate is divided by 4.
- The graph is reflected in the y-axis and compressed horizontally by a factor of 1/4.
Problem 3
Difficulty 4 of 5Start with the parent function f(x) = x3. Now stretch it vertically by a factor of 4, shift it 1 unit to the left, shift it 5 units up. Write the new function as an expression in x (for example 2(x - 1)3 + 5).
Answer: 4(x + 1)3 + 5
- Start from x3.
- A move of 1 unit to the left replaces x by (x + 1).
- Multiplying the whole parent by 4 gives the stretch.
- Adding 5 at the very end lifts the graph 5 units up.
- y = 4(x + 1)3 + 5
Common mistakes
- Reading f(2x) as a horizontal stretch by 2 when it is really a compression by a factor of 1/2, because the x-coordinates get divided.
- Reading f(2x - 6) as a shift of 6 units instead of factoring it into f(2(x - 3)) and shifting 3.
- Shifting before stretching, so a height becomes a(y0 + k) instead of a*y0 + k.
- Deciding a function is neither even nor odd as soon as f(-x) does not match f(x), without going on to compare it with -f(x).
- Leaving the range of y = -2sqrt(x - 1) + 3 as y >= 3, when the minus sign turns the whole range over to y <= 3.
What you should be able to do
- Describe the effect of f(kx) and f(-x), and combine horizontal and vertical transformations in the correct order.
- Find the image of a point on y = f(x) under y = a f(b(x - h)) + k.
- Write the equation of a transformed square root, cube root, reciprocal, cubic, absolute value or exponential parent.
- Classify a function as even, odd or neither, and state the domain and range of a transformed function.
Where this fits in the curriculum
Common Core
- HSF-BF.B.3
High school โ Identify the effect on the graph of replacing f(x) by f(x) + k, k f(x), f(kx) and f(x + k) for specific values of k; find the value of k given the graphs; recognise even and odd functions from their graphs and algebraic expressions.
- HSF-IF.C.7.B
High school โ Graph square root, cube root and piecewise-defined functions, including step functions and absolute value functions.
- HSF-IF.C.7
High school โ Graph functions expressed symbolically and show key features of the graph, by hand in simple cases and using technology for more complicated cases.
SAT
- Passport to Advanced Math
The graph of a transformed parent function and the effect of each constant.