MathematicsGrade 10–11

Shifting, stretching and reflecting graphs

Shift, stretch, reflect: every move of the graph leaves its mark in the function's equation.

Loading simulation …

What is it about?

From the graph of a basic function ff (for example x2x^2, x\sqrt{x}, 1x\frac{1}{x}, sin⁡x\sin x or 2x2^x) we get the graph of

g(x)=a⋅f(b (x−c))+dg(x) = a \cdot f\big(b\,(x - c)\big) + d

by shifting, stretching and reflecting.

You can think of it as a sequence of four steps – this is exactly how the timeline plays it:

Step Term Effect on the graph
① bb f(bx)f(bx) horizontal stretch by the factor 1b\frac{1}{b} (for ∣b∣>1\lvert b\rvert > 1 a compression); b<0b < 0: also a reflection in the yy-axis
② cc f(b(x−c))f\big(b(x - c)\big) shift by cc in the xx-direction (c>0c > 0: to the right)
③ aa a⋅f(b(x−c))a \cdot f\big(b(x - c)\big) vertical stretch by the factor aa; a<0a < 0: also a reflection in the xx-axis
④ dd …+d\ldots + d shift by dd in the yy-direction (d>0d > 0: up)

A point (x∣y)(x \mid y) on the graph of ff becomes

(xb+c  |  a⋅y+d).\left(\frac{x}{b} + c \;\middle|\; a \cdot y + d\right).

Example: in g(x)=2 (x−1)2−2g(x) = 2\,(x - 1)^2 - 2 we have a=2a = 2, b=1b = 1, c=1c = 1, d=−2d = -2. The vertex (0∣0)(0 \mid 0) of the standard parabola moves to S(1∣−2)S(1 \mid -2), the point (2∣4)(2 \mid 4) moves to (2+1∣2⋅4−2)=(3∣6)(2 + 1 \mid 2 \cdot 4 - 2) = (3 \mid 6). Check: g(3)=2⋅4−2=6g(3) = 2 \cdot 4 - 2 = 6. The zeros are 00 and 22, and g(0)=0g(0) = 0.

Why bb first, then cc? If the inside reads f(bx−c)f(bx - c), the curve that has already been shifted is stretched – and the shift shrinks with it. You have to factor out bb: f(2x−1)=f(2(x−0.5))f(2x - 1) = f\big(2(x - 0.5)\big). The vertex of (2x−1)2(2x - 1)^2 lies at x=0.5x = 0.5, the vertex of (2(x−1))2\big(2(x - 1)\big)^2 at x=1x = 1.

Good to know: For some basic functions, bb can be replaced by a factor in front of ff, for example (2x)2=4x2(2x)^2 = 4x^2 or 12x=0.5x\frac{1}{2x} = \frac{0.5}{x}. This does not work for the sine: sin⁡(2x)\sin(2x) has half the period, 2sin⁡x2 \sin x has twice the amplitude.

Try it

  1. Starting picture: Press “Play step by step”. Watch how the graph is stretched, shifted, stretched and shifted one after the other. Pause, use “Step back” and “Step forward”, or drag the knob of the timeline.
  2. Drag the round anchor point: it is the image of the origin, so (c∣d)(c \mid d). Drag the diamond-shaped shape point: it changes aa and bb. What happens if you drag it below the anchor point or past it to the left?
  3. Square root with b = −1: Play the steps. How does the graph “flip over” the yy-axis? Why is the domain now x≤2x \le 2?
  4. Sine function: Read off the amplitude, the period and the midline. Change bb and watch the period 2π∣b∣\frac{2\pi}{\lvert b\rvert}.
  5. Hyperbola and exponential function: How do the asymptotes move?
  6. Pitfall: order: The animation shifts first and then stretches. Compare the result hh with the correct gg (dashed).
  7. Set a=0a = 0. What is left of the graph?

Tasks

Task 1: Read off the parameters

The graph comes from the absolute value function f(x)=∣x∣f(x) = \lvert x\rvert. Find aa, cc and dd (here b=1b = 1) and give the term. Load task

Show solution

The corner point is at (−2∣3)(-2 \mid 3), so c=−2c = -2 and d=3d = 3. The graph opens downwards and is flatter than ∣x∣\lvert x\rvert: going 2 to the right, it drops by 1, so a=−0.5a = -0.5. Hence g(x)=−0.5⋅∣x+2∣+3g(x) = -0.5 \cdot \lvert x + 2\rvert + 3. Show solution

Task 2: A point moves

Which point does the point (2∣4)(2 \mid 4) of the standard parabola move to for g(x)=0.5⋅(x+1)2+3g(x) = 0.5 \cdot (x + 1)^2 + 3?

Show solution

a=0.5a = 0.5, b=1b = 1, c=−1c = -1, d=3d = 3. The point (2∣4)(2 \mid 4) becomes (2+(−1)∣0.5⋅4+3)=(1∣5)(2 + (-1) \mid 0.5 \cdot 4 + 3) = (1 \mid 5). Check: g(1)=0.5⋅4+3=5g(1) = 0.5 \cdot 4 + 3 = 5. Show

Task 3: Mind the bracket

By how much is the graph of g(x)=(2x−4)2g(x) = (2x - 4)^2 shifted compared with the graph of f(x)=(2x)2f(x) = (2x)^2?

Show solution

Factor out b=2b = 2: g(x)=(2(x−2))2g(x) = \big(2(x - 2)\big)^2. The graph is shifted by c=2c = 2 to the right – not by 44. Show For comparison, the wrong order “first shift by 4, then compress”: Comparison

Task 4: Build a sine curve

Find g(x)=a⋅sin⁡(bx)+dg(x) = a \cdot \sin(bx) + d with amplitude 22, period π\pi and midline y=1y = 1. Also give the range. Load task

Show solution

Amplitude a=2a = 2, period 2πb=π\frac{2\pi}{b} = \pi, so b=2b = 2, midline d=1d = 1: g(x)=2sin⁡(2x)+1g(x) = 2\sin(2x) + 1. The values vary by 22 on either side of 11: range [−1,3][-1, 3]. Show solution

Task 5: Reflected square root

Write g(x)=2−xg(x) = \sqrt{2 - x} in the form b(x−c)\sqrt{b(x - c)}. Give the domain and calculate g(−2)g(-2).

Show solution

2−x=−(x−2)2 - x = -(x - 2), so b=−1b = -1, c=2c = 2: the square root is reflected in the yy-axis and shifted 22 to the right. The expression under the root must not be negative: 2−x≥02 - x \ge 0, so the domain is (−∞,2](-\infty, 2]. g(−2)=4=2g(-2) = \sqrt{4} = 2. Show

Task 6: Asymptotes and zeros

a) Give the asymptotes and the zero of g(x)=2x+1+1g(x) = \frac{2}{x + 1} + 1. b) Find the asymptote and the zero of h(x)=−2x−1+3h(x) = -2^{x - 1} + 3.

Show solution

a) The asymptotes x=0x = 0 and y=0y = 0 of 1x\frac{1}{x} move with c=−1c = -1 and d=1d = 1: x=−1x = -1 and y=1y = 1. Zero: 2x+1=−1⇒x+1=−2⇒x=−3\frac{2}{x + 1} = -1 \Rightarrow x + 1 = -2 \Rightarrow x = -3. Show

b) Horizontal asymptote y=3y = 3 (because d=3d = 3). Zero: 2x−1=3⇒x−1=log⁡23⇒x=1+log⁡23≈2.5852^{x - 1} = 3 \Rightarrow x - 1 = \log_2 3 \Rightarrow x = 1 + \log_2 3 \approx 2.585. Show

Ideas for the classroom

  • Use: Upper secondary, special properties of functions: shifting, stretching and reflecting graphs, applied to familiar types of functions. Please check the curriculum for the exact list of basic functions.
  • Steps on the board: The timeline can be paused after each step. The class can first predict where the graph will move next and then check the prediction.
  • Guess the term: With “Show the term and the effects” switched off, only the graph is shown and the sliders for aa, bb, cc and dd are hidden; “New task” rolls new values that can be read off uniquely, “Reveal the term” shows the answer and plays the steps. This works well in pairs.
  • Same logic, different functions: The same four steps work in the same way for parabola, square root, hyperbola, sine and exponential function. It may be worth setting one transformation and only changing the basic function.
  • Model: Parameters in tenths, b=0b = 0 is not allowed. The sequence shown is one possible order; other orders also work if the parameters are adjusted accordingly. If “reduce motion” is switched on on the device, “Play step by step” jumps to the first step; “Step forward” continues.
  • Common stumbling blocks:
    • “f(x−2)f(x - 2) is shifted to the left.” – The minus inside the bracket means a shift to the right.
    • “f(2x)f(2x) is stretched horizontally.” – It is compressed, by the factor 12\frac{1}{2}.
    • In f(2x−4)f(2x - 4), bb is not factored out and the shift is read as 44 instead of 22.
    • The reflections are mixed up: a<0a < 0 reflects in the xx-axis, b<0b < 0 in the yy-axis.
    • For the parabola, students expect bb and aa to be uniquely determined – (2x)2=4x2(2x)^2 = 4x^2 shows that this is not the case.