1.2 - Moving and stretching graphs

1.2 - Moving and stretching graphs

A graph can be moved, reflected or stretched without calculating a new table of values. In this part of 1.2, you will track its points to understand changes inside and outside a function, describe transformations precisely, and combine them in the correct order for algebraic and given-feature graphs.

Translations

Suppose f(2)=5f(2)=5. Why does the graph y=f(x+3)y=f(x+3) contain (−1,5)(-1,5), rather than (5,5)(5,5)? The input to ff must still be 22, so x+3=2x+3=2 and x=−1x=-1. Changing an input inside a function moves a point in the opposite horizontal direction.

Translation

A translation moves every point by the same displacement. The vector (hk)\begin{pmatrix}h\\k\end{pmatrix} means hh units horizontally and kk units vertically, with positive directions right and up.

An outside addition changes the output; an inside addition changes the input needed to obtain that output.

Translations of a graph

A point (u,v)(u,v) on y=f(x)y=f(x) moves as follows:

new graphnew pointtranslation vectory=f(x)+a(u,v+a)(0a)y=f(x+a)(u−a,v)(−a0)\begin{array}{c|c|c} \text{new graph}&\text{new point}&\text{translation vector}\\ y=f(x)+a&(u,v+a)&\begin{pmatrix}0\\a\end{pmatrix}\\ y=f(x+a)&(u-a,v)&\begin{pmatrix}-a\\0\end{pmatrix} \end{array}

These rules hold for positive, zero and negative aa.

Not in the formula booklet: learn it.

The same coordinate change applies to vertices, intercepts as points, endpoints and asymptotes. An old intercept may move away from an axis, so its image need not still be an intercept.

Worked example 1: adding outside the function

Question. Let f(x)=(x−1)2+1f(x)=(x-1)^2+1 for −1≤x≤4-1\le x\le4. Describe the transformation to y=f(x)+3y=f(x)+3, and find its vertex, domain and the image of (3,5)(3,5).

Plan. Add 33 to every output, leaving each input unchanged.

f(x)+3=(x−1)2+4.f(x)+3=(x-1)^2+4.

The original vertex (1,1)(1,1) moves to (1,4)(1,4), and (3,5)(3,5) moves to (3,8)(3,8).

Answer. Translation by (03)\begin{pmatrix}0\\3\end{pmatrix}; vertex (1,4)(1,4); domain −1≤x≤4-1\le x\le4; point image (3,8)(3,8).

Check. At x=3x=3, the new rule gives (3−1)2+4=8(3-1)^2+4=8. The domain is unchanged because the same inputs enter ff.

Move the same +3+3 inside the function. Only its position changes, but the displacement is now horizontal.

Worked example 2: adding inside the function

Question. For the same f(x)=(x−1)2+1f(x)=(x-1)^2+1, −1≤x≤4-1\le x\le4, describe the transformation to y=f(x+3)y=f(x+3), and find its vertex, domain and the image of (3,5)(3,5).

Plan. Solve x+3=ux+3=u for the new horizontal coordinate of each old point (u,v)(u,v).

f(x+3)=((x+3)−1)2+1=(x+2)2+1.f(x+3)=((x+3)-1)^2+1=(x+2)^2+1.

The vertex moves from (1,1)(1,1) to (−2,1)(-2,1), and (3,5)(3,5) moves to (0,5)(0,5). The input to ff must lie in its original domain:

−1≤x+3≤4⟹−4≤x≤1.-1\le x+3\le4\quad\Longrightarrow\quad-4\le x\le1.

Answer. Translation by (−30)\begin{pmatrix}-3\\0\end{pmatrix}; vertex (−2,1)(-2,1); domain −4≤x≤1-4\le x\le1; point image (0,5)(0,5).

Check. At the new point's input x=0x=0, f(x+3)=f(3)=5f(x+3)=f(3)=5. The new vertex makes x+2=0x+2=0.

The two panels show the same original function and the two different locations of the +3+3.

[DIAGRAM: asset_name: Inside and outside translations; asset_slug: function-translations; caption: Adding 3 outside moves the graph up, while adding 3 inside moves it left; description: Two panels plot the original restricted quadratic y equals the square of x minus 1 plus 1 for minus 1 at most x at most 4 in blue. Left panel adds 3 to outputs, showing the vertex move from 1 comma 1 to 1 comma 4. Right panel adds 3 to the input, showing the vertex move to minus 2 comma 1 and the domain shift from minus 1 through 4 to minus 4 through 1. Endpoints are included.]
Adding 3 outside moves the graph up, while adding 3 inside moves it left

Watch out

f(x−4)f(x-4) translates a graph 44 units right, because its new input must satisfy x−4=ux-4=u. Do not use the sign inside the bracket as the direction of the movement.

Track a vertex and the domain together.

Reflections and stretches

Multiplying an output changes its distance from the xx-axis. Multiplying the input changes the horizontal position needed to reproduce the old output. A negative multiplier also reverses the appropriate direction.

Stretch and invariant point

A stretch parallel to an axis multiplies distances from the other axis by a stated positive scale factor. A scale factor between 00 and 11 reduces those distances. An invariant point stays in the same position during the transformation.

For y=af(x)y=af(x), the old output vv becomes avav. For y=f(ax)y=f(ax), the input must satisfy ax=uax=u, so the old horizontal coordinate uu becomes u/au/a.

Reflections and stretches

For a≠0a\ne0,

new graphpoint mappingdescriptiony=af(x)(u,v)↦(u,av)vertical factor ∣a∣y=f(ax)(u,v)↦(u/a,v)horizontal factor 1/∣a∣\begin{array}{c|c|c} \text{new graph}&\text{point mapping}&\text{description}\\ y=af(x)&(u,v)\mapsto(u,av)&\text{vertical factor }|a|\\ y=f(ax)&(u,v)\mapsto(u/a,v)&\text{horizontal factor }1/|a| \end{array}

If a<0a<0, also reflect in the xx-axis for af(x)af(x), or in the yy-axis for f(ax)f(ax). In particular, −f(x)-f(x) and f(−x)f(-x) are single reflections.

Not in the formula booklet: learn it.

In a vertical stretch or reflection, points on the xx-axis are invariant because their outputs are zero. In a horizontal stretch or reflection, points on the yy-axis are invariant because their inputs are zero. The identity scale factor 11, without reflection, leaves every point fixed. The nonzero condition matters: multiplying an input by zero does not give a stretch.

The next examples use a graph made of straight segments joining A(−2,0)A(-2,0), B(0,2)B(0,2) and C(3,−1)C(3,-1). All its features are supplied, so no formula for ff is needed.

Worked example 3: a negative output multiplier

Question. The graph of y=f(x)y=f(x) consists of segments joining A(−2,0)A(-2,0), B(0,2)B(0,2) and C(3,−1)C(3,-1). Describe the transformation to y=−2f(x)y=-2f(x), and find the images of A,B,CA,B,C, its domain and range.

Plan. Multiply each vertical coordinate by −2-2.

A↦(−2,0),B↦(0,−4),C↦(3,2).A\mapsto(-2,0),\qquad B\mapsto(0,-4),\qquad C\mapsto(3,2).

The original outputs range from −1-1 to 22; their images range from −4-4 to 22, with the order reversed by the negative multiplier.

Answer. Reflect in the xx-axis and stretch by factor 22 parallel to the yy-axis. The images are (−2,0),(0,−4),(3,2)(-2,0),(0,-4),(3,2). Domain −2≤x≤3-2\le x\le3; range −4≤y≤2-4\le y\le2.

Check. AA is invariant because its output is zero. The negative height at CC becomes positive, as reflection requires.

Move the multiplier −2-2 inside. Its position changes the affected coordinate and replaces the scale factor by its reciprocal.

Worked example 4: a negative input multiplier

Question. For the same graph, describe the transformation to y=f(−2x)y=f(-2x), and find the images of A,B,CA,B,C, its domain and range.

Plan. Divide each old horizontal coordinate by −2-2, keeping the output unchanged.

A↦(1,0),B↦(0,2),C↦(−3/2,−1).A\mapsto(1,0),\qquad B\mapsto(0,2),\qquad C\mapsto(-3/2,-1).

The transformed segment endpoints run from x=−3/2x=-3/2 to x=1x=1. Every old output still occurs.

Answer. Reflect in the yy-axis and stretch by factor 1/21/2 parallel to the xx-axis. The images are (1,0),(0,2),(−3/2,−1)(1,0),(0,2),(-3/2,-1). Domain −3/2≤x≤1-3/2\le x\le1; range −1≤y≤2-1\le y\le2.

Check. At the image of CC, −2(−3/2)=3-2(-3/2)=3, so the new graph returns f(3)=−1f(3)=-1. Point BB is invariant because its horizontal coordinate is zero.

The reflected position and the reciprocal horizontal factor are visible together.

[DIAGRAM: asset_name: Which coordinate is multiplied; asset_slug: function-negative-stretches; caption: The same multiplier outside and inside produces different reflections and different scale factors; description: Two equal-scale coordinate plots show an original three-vertex polyline through minus 2 comma 0, 0 comma 2 and 3 comma minus 1 in blue. Left shows minus 2 f of x in green through minus 2 comma 0, 0 comma minus 4 and 3 comma 2. Right shows f of minus 2x in green through 1 comma 0, 0 comma 2 and minus 1.5 comma minus 1. Labels identify the invariant original point on each panel.]
The same multiplier outside and inside produces different reflections and different scale factors

Watch out

y=f(3x)y=f(3x) has horizontal scale factor 1/31/3, not 33. Check one point: an old input 66 now needs 3x=63x=6, so its new horizontal coordinate is 22.

Use a different negative input multiplier.

Combined transformations

A translation and a stretch in the same direction can give different graphs when their order is reversed. Track a point, or write the rule after each step, instead of guessing from the final expression.

For a horizontal combination, factor the input first. For example, 2x+4=2(x+2)2x+4=2(x+2): this exposes a horizontal scale factor 1/21/2, followed by a translation 22 units left.

A combined point mapping

For nonzero a,ba,b, a point (u,v)(u,v) on y=f(x)y=f(x) becomes

(h+ub, av+k)ony=af(b(x−h))+k.\left(h+\frac{u}{b},\ av+k\right) \quad\text{on}\quad y=af\bigl(b(x-h)\bigr)+k.

Solve b(x−h)=ub(x-h)=u to find the new horizontal coordinate; apply av+kav+k to the old output. Negative factors include the reflections already taught.

Not in the formula booklet: learn it.

You can describe this as horizontal scaling/reflection, then horizontal translation, together with vertical scaling/reflection, then vertical translation. Operations affecting separate coordinates commute, but a translation and stretch affecting the same coordinate generally do not.

Worked example 5: stretch, then translate

Question. A graph y=f(x)y=f(x) has domain 0≤x≤80\le x\le8 and contains (6,3)(6,3). Describe a sequence taking it to y=f(2x+4)y=f(2x+4). State the corresponding point and the new domain.

Plan. Factor the input, then solve for each new input from the old one.

f(2x+4)=f(2(x+2)).f(2x+4)=f\bigl(2(x+2)\bigr).

First stretch by factor 1/21/2 parallel to the xx-axis, producing f(2x)f(2x). Then translate 22 units left, replacing xx by x+2x+2.

For the old input 66, 2x+4=62x+4=6 gives x=1x=1. For the whole domain,

0≤2x+4≤8⟹−2≤x≤2.0\le2x+4\le8\quad\Longrightarrow\quad-2\le x\le2.

Answer. Horizontal stretch factor 1/21/2, then translation by (−20)\begin{pmatrix}-2\\0\end{pmatrix}. Point (1,3)(1,3); domain −2≤x≤2-2\le x\le2.

Check. At x=1x=1, the new graph evaluates f(6)=3f(6)=3. The endpoints −2,2-2,2 send 2x+42x+4 to 0,80,8, respectively.

Reverse those same two operations. The horizontal displacement is now scaled too.

Worked example 6: translate, then stretch

Question. Start again with the graph in Worked example 5. Translate it 22 units left, then stretch by factor 1/21/2 parallel to the xx-axis. Find the resulting rule, the image of (6,3)(6,3) and the new domain.

Plan. Write the translated rule first, then replace its input by 2x2x.

After translation, let g(x)=f(x+2)g(x)=f(x+2). After stretching,

g(2x)=f(2x+2).g(2x)=f(2x+2).

Tracking the point directly gives (6,3)↦(4,3)↦(2,3)(6,3)\mapsto(4,3)\mapsto(2,3). The domain changes from [0,8][0,8] to [−2,6][-2,6], then to [−1,3][-1,3].

Answer. y=f(2x+2)y=f(2x+2), containing (2,3)(2,3), with domain −1≤x≤3-1\le x\le3. This differs from f(2x+4)f(2x+4).

Check. At x=2x=2, the new input is 2(2)+2=62(2)+2=6, giving the required output 33.

The graphs below use a particular ff through the supplied point. The two final peaks differ by one horizontal unit.

[DIAGRAM: asset_name: Order changes the result; asset_slug: function-transformation-order; caption: Reversing a horizontal stretch and translation changes the final graph; description: A polyline f with vertices 0 comma 0, 6 comma 3 and 8 comma 1 is grey. Blue f of 2x plus 4 has vertices minus 2 comma 0, 1 comma 3 and 2 comma 1. Green f of 2x plus 2 has vertices minus 1 comma 0, 2 comma 3 and 3 comma 1. The original peak 6 comma 3 and the two final peaks are labelled. A legend states the respective transformation orders.]
Reversing a horizontal stretch and translation changes the final graph

These rules apply to trigonometric graphs too. You can transform supplied features without solving a trigonometric equation or knowing how those features were first obtained.

Worked example 7: a trigonometric graph with supplied features

Question. For 0∘≤x≤360∘0^\circ\le x\le360^\circ, the graph y=sin⁡xy=\sin x has range −1≤y≤1-1\le y\le1, a maximum at (90∘,1)(90^\circ,1), a minimum at (270∘,−1)(270^\circ,-1), and passes through (0∘,0)(0^\circ,0). Describe transformations to y=−2sin⁡(x−30∘)+1y=-2\sin(x-30^\circ)+1. Find the images of those three points and the transformed domain and range.

Plan. Translate the inputs 30∘30^\circ right, then apply the output rule −2y+1-2y+1.

The point mapping is (u,v)↦(u+30∘,−2v+1)(u,v)\mapsto(u+30^\circ,-2v+1). Hence

(90∘,1)↦(120∘,−1)(270∘,−1)↦(300∘,3)(0∘,0)↦(30∘,1).\begin{aligned} (90^\circ,1)&\mapsto(120^\circ,-1)\\ (270^\circ,-1)&\mapsto(300^\circ,3)\\ (0^\circ,0)&\mapsto(30^\circ,1). \end{aligned}

Answer. Translate 30∘30^\circ right, reflect in the xx-axis, stretch by factor 22 parallel to the yy-axis, then translate 11 unit up. The new domain is 30∘≤x≤390∘30^\circ\le x\le390^\circ; range −1≤y≤3-1\le y\le3. The old maximum becomes the new minimum at (120∘,−1)(120^\circ,-1), and the old minimum becomes the new maximum at (300∘,3)(300^\circ,3).

Check. At x=30∘x=30^\circ, the inner input is 0∘0^\circ, whose supplied output is zero; the new height is 11. Applying −2y+1-2y+1 to the old range endpoints gives −1-1 and 33, confirming the range.

The same point mapping handles a polynomial, a trigonometric curve or an unfamiliar graph with given features. For an asymptote, transform its coordinate: for example, under af(b(x−h))+kaf(b(x-h))+k, an old vertical asymptote x=cx=c becomes x=h+c/bx=h+c/b, and an old horizontal asymptote y=dy=d becomes y=ad+ky=ad+k.

Problem-solving

For an inside change, set the new input expression equal to the old input. For an outside change, apply the stated operations to the old output. This checks both the direction and the order.

Use that point mapping once more.

Quick Recap

  • Outside additions and multipliers change outputs; inside additions and multipliers change the inputs needed to reproduce an output.
  • f(x+a)f(x+a) moves left by aa; f(ax)f(ax) has horizontal scale factor 1/∣a∣1/|a|, with a reflection when a<0a<0.
  • Describe a stretch with its scale factor and direction, a reflection with its axis, and a translation with its displacement.
  • Factor a combined input or track a point to determine the transformation order and new domain.

In the opening puzzle, x+3=2x+3=2 requires x=−1x=-1, so f(x+3)f(x+3) contains (−1,5)(-1,5).