Unit 3, lesson 36

Shifting, Reflecting and Stretching Graphs

How a change in a function rule moves each point of its graph, why horizontal changes run through the input, and how to carry the domain along for quadratic, exponential, cubic and reciprocal graphs.

  • Theory part 71
  • Practice part 72
  • Nonlinear Equations and Functions

Theory, part 71

Practice, part 72

You know one point on a graph, say (4,7)(4, 7), and the rule changes from f(x)f(x) to f(x−3)+2f(x - 3) + 2. Where did the point go? Memorized slogans like “minus means right” break down as soon as the rule gets a little more complicated. A better habit is to ask which new input feeds the old input into ff, and then what happens to the output. That one question handles every shift, reflection and stretch on the SAT.

See also Shifting and Reflecting Graphs and Stretching and Compressing Graphs in Foundations for Calculus, and Shifts and Reflections of Graphs and Stretches and Compressions of Graphs in Precalculus.

Key terms

Changed input

Definition Let g(x)=f(u(x))g(x) = f(u(x)), where u(x)u(x) is an expression in xx. To find where the point (a,f(a))(a, f(a)) of the graph of ff appears on the graph of gg, solve u(x)=au(x) = a for xx. Every solution x0x_0 gives the point (x0,f(a))(x_0, f(a)) on the graph of gg, since g(x0)=f(a)g(x_0) = f(a). Changes outside ff, as in c⋅f(u(x))+kc \cdot f(u(x)) + k, then act on the height, sending f(a)f(a) to c⋅f(a)+kc \cdot f(a) + k.

In plain words Inside the parentheses, ask which new xx makes the inside equal the old xx. Outside the parentheses, just do the arithmetic to the old yy.

Example The point (4,7)(4, 7) is on the graph of ff, and g(x)=f(2x−6)g(x) = f(2x - 6). Solving 2x−6=42x - 6 = 4 gives x=5x = 5, and then

g(5)=f(2⋅5−6)=f(4)=7.g(5) = f(2 \cdot 5 - 6) = f(4) = 7.

So (5,7)(5, 7) is on the graph of gg. A slogan about the −6-6 alone would have suggested a shift of 66, which is wrong.

Translation

Definition For constants hh and kk, the graph of

g(x)=f(x−h)+kg(x) = f(x - h) + k

is the graph of ff moved hh units horizontally and kk units vertically. Each point (a,f(a))(a, f(a)) goes to (a+h,f(a)+k)(a + h, f(a) + k), because x−h=ax - h = a gives x=a+hx = a + h. The shift is to the right when h>0h > 0 and to the left when h<0h < 0, and up when k>0k > 0 and down when k<0k < 0.

In plain words Adding outside moves the graph up or down by that amount. Inside, the new input must be hh more than the old one, so the graph moves right by hh.

Example Let f(x)=x2f(x) = x^2 and g(x)=f(x+1)−3=(x+1)2−3g(x) = f(x + 1) - 3 = (x + 1)^2 - 3. The point (2,4)(2, 4) on ff moves to the input solving x+1=2x + 1 = 2, which is x=1x = 1, and to height 4−3=14 - 3 = 1. Check that g(1)=22−3=1g(1) = 2^2 - 3 = 1. The whole parabola moved 11 left and 33 down, and its vertex went from (0,0)(0, 0) to (−1,−3)(-1, -3).

Reflection

Definition The graph of y=−f(x)y = -f(x) is the reflection of the graph of ff across the xx-axis, and each point (a,b)(a, b) goes to (a,−b)(a, -b). The graph of y=f(−x)y = f(-x) is the reflection across the yy-axis, and each point (a,b)(a, b) goes to (−a,b)(-a, b), because −x=a-x = a gives x=−ax = -a.

In plain words A minus sign outside flips the graph upside down. A minus sign on the input flips it left to right.

Example The graph of f(x)=2xf(x) = 2^x contains (1,2)(1, 2). The graph of y=−2xy = -2^x contains (1,−2)(1, -2) and lies entirely below the xx-axis. The graph of y=2−xy = 2^{-x} contains (−1,2)(-1, 2), since 2−(−1)=22^{-(-1)} = 2, and it falls from left to right instead of rising.

Vertical scale

Definition For a constant c≠0c \ne 0, the graph of y=c⋅f(x)y = c \cdot f(x) is obtained by multiplying every height by cc, so each point (a,b)(a, b) goes to (a,cb)(a, cb). If ∣c∣>1\lvert c \rvert > 1 the graph is stretched away from the xx-axis, and if 0<∣c∣<10 < \lvert c \rvert < 1 it is compressed toward it. If c<0c < 0 the graph is also reflected across the xx-axis. Points with b=0b = 0 stay where they are, so the xx-intercepts do not change.

In plain words Every point keeps its xx and has its yy multiplied by cc. Points on the xx-axis do not move.

Example Let f(x)=x2−4f(x) = x^2 - 4, with xx-intercepts −2-2 and 22. For y=3f(x)=3x2−12y = 3f(x) = 3x^2 - 12, the point (1,−3)(1, -3) goes to (1,−9)(1, -9) and the vertex (0,−4)(0, -4) goes to (0,−12)(0, -12). The xx-intercepts are still −2-2 and 22.

Horizontal scale

Definition For a constant b≠0b \ne 0, the graph of y=f(bx)y = f(bx) is obtained by moving each point (a,f(a))(a, f(a)) to (ab,f(a))\left(\frac{a}{b}, f(a)\right), because bx=abx = a gives x=abx = \frac{a}{b}. If ∣b∣>1\lvert b \rvert > 1 the graph is compressed toward the yy-axis by the factor 1∣b∣\frac{1}{\lvert b \rvert}, and if 0<∣b∣<10 < \lvert b \rvert < 1 it is stretched away from it. If b<0b < 0 it is also reflected across the yy-axis. The factor must not be 00, since f(0⋅x)=f(0)f(0 \cdot x) = f(0) is a constant and the graph collapses to a horizontal line.

In plain words Multiplying the input by 22 makes ff reach each old input twice as soon, so the graph is squeezed to half its width, not stretched.

Example Let f(x)=x2−4f(x) = x^2 - 4 again. Then f(2x)=4x2−4f(2x) = 4x^2 - 4, and its zeros solve 2x=±22x = \pm 2, so they are x=±1x = \pm 1, half of the old zeros. The point (3,5)(3, 5) on ff goes to (32,5)\left(\frac{3}{2}, 5\right), and indeed

4⋅(32)2−4=9−4=5.4 \cdot \left(\frac{3}{2}\right)^2 - 4 = 9 - 4 = 5.

Domain under a transformation

Definition If g(x)=c⋅f(u(x))+kg(x) = c \cdot f(u(x)) + k, then the domain of gg is the set of all real xx for which u(x)u(x) lies in the domain of ff. The whole input expression u(x)u(x) must satisfy the requirement of the parent function, not just xx. Changes outside ff do not change the domain, though they can change the range.

In plain words Whatever restriction the parent function has, apply it to everything inside the parentheses. A square root needs its entire inside to be at least 00, and a fraction needs its entire denominator to be nonzero.

Example The function f(x)=xf(x) = \sqrt{x} has domain x≥0x \ge 0. For g(x)=3−xg(x) = \sqrt{3 - x} the inside 3−x3 - x must be at least 00, so the domain is x≤3x \le 3, not x≥0x \ge 0. The point (4,2)(4, 2) on ff goes to the solution of 3−x=43 - x = 4, which is x=−1x = -1, and g(−1)=4=2g(-1) = \sqrt{4} = 2. The endpoint (0,0)(0, 0) goes to (3,0)(3, 0).

Quadratic transformations

Definition For real numbers a≠0a \ne 0, hh and kk, the graph of

y=a(x−h)2+ky = a(x - h)^2 + k

is the parabola y=x2y = x^2 scaled vertically by aa, then moved hh horizontally and kk vertically. Each point (p,p2)(p, p^2) goes to (p+h,ap2+k)(p + h, a p^2 + k). The vertex (0,0)(0, 0) goes to (h,k)(h, k), the axis of symmetry is x=hx = h, and the parabola opens up when a>0a > 0 and down when a<0a < 0. The domain stays all real numbers.

In plain words Track the vertex and one or two neighbors of the parent parabola and you can sketch the new one.

Example For y=−2(x−1)2+3y = -2(x - 1)^2 + 3, follow three points of y=x2y = x^2.

Parent pointNew point
(−1,1)(-1, 1)(0,1)(0, 1)
(0,0)(0, 0)(1,3)(1, 3)
(1,1)(1, 1)(2,1)(2, 1)

Each new xx is the old xx plus 11, and each new yy is −2-2 times the old yy plus 33. The vertex is (1,3)(1, 3) and the parabola opens down.

Polynomial transformations

Definition If pp is a nonconstant polynomial and g(x)=p(x−h)+kg(x) = p(x - h) + k, then gg is again a polynomial of the same degree. When k=0k = 0, a number rr is a zero of pp exactly when r+hr + h is a zero of gg. For the cubic y=a(x−h)3+ky = a(x - h)^3 + k with a≠0a \ne 0, the point (0,0)(0, 0) of y=x3y = x^3 goes to (h,k)(h, k). The domain of a polynomial is all real numbers, and shifts and scales keep it that way.

In plain words A horizontal shift moves every zero by the same amount. A vertical shift usually changes the zeros in a way you have to solve for.

Example The polynomial p(x)=x(x−2)(x+1)p(x) = x(x - 2)(x + 1) has zeros −1-1, 00 and 22. So p(x−3)p(x - 3) has zeros 22, 33 and 55, since x−3x - 3 must equal one of the old zeros. For y=(x+2)3−1y = (x + 2)^3 - 1, the point (1,1)(1, 1) of y=x3y = x^3 goes to (−1,0)(-1, 0), and indeed (−1+2)3−1=0(-1 + 2)^3 - 1 = 0, so x=−1x = -1 is the xx-intercept.

Exponential transformations

Definition For b>0b > 0 with b≠1b \ne 1 and constants a≠0a \ne 0, hh and kk, the graph of

y=a⋅bx−h+ky = a \cdot b^{x - h} + k

has domain all real numbers and horizontal asymptote y=ky = k. If a>0a > 0 its range is y>ky > k, and if a<0a < 0 its range is y<ky < k. Each point (p,bp)(p, b^p) of y=bxy = b^x goes to (p+h,abp+k)(p + h, a b^p + k).

In plain words The asymptote moves up or down with kk, and it does not move left or right. A horizontal shift of an exponential is the same as a vertical scale, since bx−h=b−h⋅bxb^{x - h} = b^{-h} \cdot b^x.

Example For y=2x−1+3y = 2^{x - 1} + 3 the points (0,1)(0, 1) and (1,2)(1, 2) of y=2xy = 2^x go to (1,4)(1, 4) and (2,5)(2, 5). The asymptote is y=3y = 3 and the range is y>3y > 3. The same function can be written as

y=12⋅2x+3.y = \frac{1}{2} \cdot 2^x + 3.

Rational transformations

Definition For constants a≠0a \ne 0, hh and kk, the graph of

y=ax−h+ky = \frac{a}{x - h} + k

is the graph of y=1xy = \frac{1}{x} scaled by aa and moved hh horizontally and kk vertically. Its domain is x≠hx \ne h, because the denominator x−hx - h must not be 00. It has vertical asymptote x=hx = h, horizontal asymptote y=ky = k, and range y≠ky \ne k.

In plain words The two asymptotes of y=1xy = \frac{1}{x}, the two axes, travel with the shift. The excluded input moves with them.

Example For y=1x+2−1y = \frac{1}{x + 2} - 1 the domain is x≠−2x \ne -2 and the asymptotes are x=−2x = -2 and y=−1y = -1. The point (1,1)(1, 1) of y=1xy = \frac{1}{x} goes to (−1,0)(-1, 0), and (−1,−1)(-1, -1) goes to (−3,−2)(-3, -2). Check the first one.

1−1+2−1=0.\frac{1}{-1 + 2} - 1 = 0.

Check yourself

  1. The point (4,−3)(4, -3) lies on the graph of y=f(x)y = f(x). Which point must lie on the graph of y=f(x+2)−5y = f(x + 2) - 5? (A) (6,−8)(6, -8), (B) (2,−8)(2, -8), (C) (2,2)(2, 2), (D) (6,2)(6, 2)
Show the answer

The correct choice is (B). The inside must equal the old input, so x+2=4x + 2 = 4 and x=2x = 2. The height is −3−5=−8-3 - 5 = -8. Choice (A) moves the point right, the classic sign mistake, (C) adds 55 instead of subtracting it, and (D) makes both mistakes.

  1. For the function g(x)=f(2x)g(x) = f(2x), it is known that f(6)=10f(6) = 10. Which statement must be true? (A) g(12)=10g(12) = 10, (B) g(3)=10g(3) = 10, (C) g(6)=20g(6) = 20, (D) g(6)=5g(6) = 5
Show the answer

The correct choice is (B). Since 2x=62x = 6 gives x=3x = 3, the value is g(3)=f(6)=10g(3) = f(6) = 10. Choice (A) doubles the input instead of halving it, since g(12)=f(24)g(12) = f(24). Choices (C) and (D) change the output, but a factor inside the parentheses changes only the input.

  1. The function hh is defined by
h(x)=3x−4+2.h(x) = \frac{3}{x - 4} + 2.

What value of xx makes h(x)=0h(x) = 0?

Show the answer

The answer is 52\frac{5}{2}, which can be entered as 5/2 or 2.5. Setting h(x)=0h(x) = 0 gives 3x−4=−2\frac{3}{x - 4} = -2, so x−4=−32x - 4 = -\frac{3}{2} and x=52x = \frac{5}{2}. This input is allowed, since the domain excludes only x=4x = 4. Check that 3−1.5+2=0\frac{3}{-1.5} + 2 = 0.

How this lesson connects

Resources for this lesson