Function Transformations: Shifts, Reflections and Stretches
Transformations change a parent graph y = f(x) without changing its basic shape. f(x) + k shifts it up k, f(x − h) shifts it right h, −f(x) reflects it in the x-axis, f(−x) reflects it in the y-axis, a·f(x) stretches it vertically by a, and f(bx) compresses it horizontally by a factor of b. Changes inside the brackets act on x and work in the opposite direction you might expect.
Check it yourself: every example here can be loaded into the Graphing Calculator.
Open the Graphing CalculatorSummary table
| New function | Effect on the graph of f | Point (x, y) moves to |
|---|---|---|
| f(x) + k | shift up k | (x, y + k) |
| f(x − h) | shift right h | (x + h, y) |
| −f(x) | reflect in the x-axis | (x, −y) |
| f(−x) | reflect in the y-axis | (−x, y) |
| a·f(x), a > 1 | vertical stretch by a | (x, a·y) |
| a·f(x), 0 < a < 1 | vertical compression | (x, a·y) |
| f(bx), b > 1 | horizontal compression by b | (x⁄b, y) |
| f(bx), 0 < b < 1 | horizontal stretch | (x⁄b, y) |
Rule of thumb: outside the function affects y and does what it says; inside the brackets affects x and does the opposite.
Text description of this figure
Three panels comparing y = √x with: √x + 2 shifted up; √(x − 3) shifted right; −√x reflected in the x-axis and 2√x stretched vertically.
- f(x) + k: up k (down if k < 0).
- f(x − h): right h (left if h < 0).
- −f(x): flip over the x-axis; a·f(x): stretch by a.
Worked example: y = −2(x − 3)² + 4
Start from the parent y = x² and its vertex (0, 0), with points (1, 1) and (−1, 1).
- (x − 3): shift right 3 → vertex (3, 0).
- × 2: stretch vertically → points 1 unit either side are now 2 higher instead of 1.
- − sign: reflect → the parabola opens down; those points are 2 lower.
- + 4: shift up 4 → vertex (3, 4); neighbours (2, 2) and (4, 2).
The point rule (x, y) → (x + 3, −2y + 4) gives the same results: (1, 1) → (4, 2).
- y = x² vs y = −2(x − 3)² + 4 — opens the Graphing Calculator
Order of operations
When several transformations combine in y = a·f(b(x − h)) + k, apply them in this order:
- horizontal stretch/compression (b),
- horizontal shift (h),
- vertical stretch/reflection (a),
- vertical shift (k).
Watch the factoring: y = f(2x − 6) is f(2(x − 3)), which shifts right 3, not 6.
Recognising transformations in other families
- Absolute value: y = a|x − h| + k — vertex (h, k). See absolute value functions.
- Exponential: y = a·b^(x − h) + k — asymptote y = k. See graphing exponential functions.
- Trigonometric: y = a·sin(b(x − h)) + k — amplitude |a|, period 2π⁄|b|, phase shift h, midline k. See sine and cosine graphs.
Explore with sliders
Type y = a(x − h)^2 + k into the graphing calculator. Sliders for a, h and k appear automatically; drag them and watch each move happen in real time.
- Explore with sliders: a(x − h)² + k — opens the Graphing Calculator
Common mistakes
- Shifting the wrong way horizontally. f(x + 2) moves left.
- Confusing −f(x) with f(−x). One flips top-to-bottom, the other left-to-right.
- Applying the vertical shift before the stretch. 2(f(x) + 1) is not the same as 2f(x) + 1.
- Forgetting to factor b before reading the horizontal shift.
Questions
Why does f(x − 3) move the graph right, not left?
The new graph reaches each old value 3 units later: g(x) = f(x − 3) equals f(0) when x = 3. So every point moves 3 units right.
Does the order of transformations matter?
Yes, sometimes. A safe order is: horizontal shift, stretch/reflect, then vertical shift — or work point by point using (x, y) → (x/b + h, a·y + k).
What is a parent function?
The simplest member of a family: x², |x|, √x, 1/x, 2ˣ, sin x… Transformations of it produce every other member.
Graph your own example with the Graphing Calculator — free, in your browser.
Try it nowSources and further reading
- OpenStax, College Algebra 2e — 3.5 Transformation of Functions
- OpenStax, Precalculus 2e — 1.5 Transformation of Functions
Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.