Skip to content

Graph transformations: translations, stretches and reflections

Graph transformations let you sketch a new function from a familiar graph without starting again from a table of values. The central skill is recognising whether a change acts on the output of a function or on its input.

Changes outside ff act vertically. Changes inside the brackets of ff act horizontally, often in the opposite direction from the sign you first see.

You should be comfortable with:

Suppose (u,v)(u,v) lies on y=f(x)y=f(x). This means

v=f(u).v=f(u).

For the transformed graph

y=af(b(xh))+k,y=af\bigl(b(x-h)\bigr)+k,

choose xx so that the input to ff is still uu:

b(xh)=u.b(x-h)=u.

Therefore

x=h+ub.x=h+\frac{u}{b}.

The new output is

y=av+k.y=av+k.

So every point is mapped by

(u,v)(h+ub,k+av).\boxed{(u,v)\longmapsto\left(h+\frac{u}{b},\,k+av\right)}.

This single rule covers translations, stretches, compressions and reflections. It is also the safest way to handle several transformations at once.

The four basic translations and reflections

Section titled “The four basic translations and reflections”

Starting with y=f(x)y=f(x):

New graphTransformationPoint mapping
y=f(x)+ay=f(x)+aTranslation up by aa(x,y)(x,y+a)(x,y)\mapsto(x,y+a)
y=f(xa)y=f(x-a)Translation right by aa(x,y)(x+a,y)(x,y)\mapsto(x+a,y)
y=f(x)y=-f(x)Reflection in the xx-axis(x,y)(x,y)(x,y)\mapsto(x,-y)
y=f(x)y=f(-x)Reflection in the yy-axis(x,y)(x,y)(x,y)\mapsto(-x,y)

Here a>0a>0. A negative value reverses the translation. For example, f(x)3f(x)-3 moves down by 33, while f(x+3)f(x+3) moves left by 33.

The horizontal translation looks reversed because the whole input must remain unchanged. To find where the old input uu appears on f(xa)f(x-a), solve

xa=u,x-a=u,

which gives x=u+ax=u+a.

For

y=f(x)+a,y=f(x)+a,

the input xx is unchanged and aa is added to every output. Every point moves vertically by the same amount.

Worked example 1: translate a quadratic vertically

Section titled “Worked example 1: translate a quadratic vertically”

The graph of

y=x2y=x^2

has vertex (0,0)(0,0). For

y=x25,y=x^2-5,

every output is 55 smaller, so the graph moves down by 55 and the vertex becomes (0,5)(0,-5).

The new roots are not obtained by shifting the old root horizontally. Solve them from the new equation:

x25=0x^2-5=0 x=±5.x=\pm\sqrt5.

Vertical translation preserves the graph’s shape, but it need not preserve its intercepts.

For

y=f(xa),y=f(x-a),

the graph moves right by aa. For y=f(x+a)y=f(x+a), it moves left by aa.

Worked example 2: translate a reciprocal graph

Section titled “Worked example 2: translate a reciprocal graph”

Start with

y=1x,y=\frac1x,

which has asymptotes x=0x=0 and y=0y=0. Now consider

y=1x4+2.y=\frac{1}{x-4}+2.

The x4x-4 moves the graph right by 44, and the +2+2 outside the fraction moves it up by 22. The asymptotes therefore become

x=4andy=2.x=4 \qquad\text{and}\qquad y=2.

The centre of the reciprocal graph moves from (0,0)(0,0) to (4,2)(4,2).

For

y=af(x),y=af(x),

every yy-coordinate is multiplied by aa:

(x,y)(x,ay).(x,y)\mapsto(x,ay).
  • If a>1|a|>1, there is a vertical stretch with scale factor a|a|.
  • If 0<a<10<|a|<1, there is a vertical compression with scale factor a|a|.
  • If a<0a<0, there is also a reflection in the xx-axis.

Points on the xx-axis stay fixed because multiplying 00 by aa still gives 00. Therefore af(x)af(x) has the same roots as f(x)f(x) when a0a\ne0.

Suppose y=f(x)y=f(x) contains the points

(2,3),(0,1),(5,0).(-2,3),\qquad(0,-1),\qquad(5,0).

On

y=2f(x),y=-2f(x),

the corresponding points are

(2,6),(0,2),(5,0).(-2,-6),\qquad(0,2),\qquad(5,0).

The factor 22 doubles each vertical distance from the xx-axis. The negative sign reflects the graph in the xx-axis.

For

y=f(bx),y=f(bx),

the xx-coordinates are divided by bb:

(x,y)(xb,y).(x,y)\mapsto\left(\frac{x}{b},y\right).

The horizontal scale factor is therefore

1b,\frac{1}{|b|},

not b|b|.

  • If b>1|b|>1, the graph is compressed horizontally.
  • If 0<b<10<|b|<1, the graph is stretched horizontally.
  • If b<0b<0, there is also a reflection in the yy-axis.

This reciprocal effect is another consequence of preserving the input. If the old point uses input uu, then on f(bx)f(bx) we need bx=ubx=u, so x=u/bx=u/b.

The graph of y=f(x)y=f(x) contains a turning point at (6,4)(6,-4) and a root at (2,0)(2,0). Find the corresponding points on

y=f(3x).y=f(3x).

Divide every xx-coordinate by 33:

(6,4)(2,4),(6,-4)\mapsto(2,-4), (2,0)(23,0).(2,0)\mapsto\left(\frac23,0\right).

The graph is compressed towards the yy-axis with scale factor 1/31/3.

Different-looking transformations can sometimes produce the same final equation. For example,

f(x)=x2f(x)=x^2

gives

f(2x)=(2x)2=4x2=4f(x).f(2x)=(2x)^2=4x^2=4f(x).

For this particular ff, a horizontal compression by scale factor 1/21/2 produces the same graph as a vertical stretch by scale factor 44. The general transformation rules are still different. Do not infer a general identity from one special function.

For y=f(x)y=-f(x), outputs change sign. Points above the xx-axis move the same distance below it, and vice versa.

For example,

y=exy=-e^x

is the reflection of y=exy=e^x in the xx-axis. Its range is y<0y<0, and it still has horizontal asymptote y=0y=0.

For y=f(x)y=f(-x), inputs change sign. Each point (x,y)(x,y) moves to (x,y)(-x,y).

For example,

y=2x=(12)xy=2^{-x}=\left(\frac12\right)^x

is the reflection of y=2xy=2^x in the yy-axis.

If ff is even, then f(x)=f(x)f(-x)=f(x), so reflection in the yy-axis makes no visible change. If ff is odd, then f(x)=f(x)f(-x)=-f(x), so reflection in either axis gives the same resulting graph.

For

y=af(b(xh))+k,y=af\bigl(b(x-h)\bigr)+k,

use the coordinate map

(u,v)(h+ub,k+av).(u,v)\mapsto\left(h+\frac{u}{b},k+av\right).

This form is clearer than trying to remember a verbal order. It handles every original point in one calculation.

Worked example 5: a full coordinate mapping

Section titled “Worked example 5: a full coordinate mapping”

Suppose (6,2)(6,-2) lies on y=f(x)y=f(x). Find its corresponding point on

y=3f(2(x4))+5.y=-3f\bigl(2(x-4)\bigr)+5.

Here

a=3,b=2,h=4,k=5.a=-3,\qquad b=2,\qquad h=4,\qquad k=5.

The new xx-coordinate is

4+62=7.4+\frac62=7.

The new yy-coordinate is

5+(3)(2)=11.5+(-3)(-2)=11.

Therefore

(6,2)(7,11).(6,-2)\mapsto(7,11).

You can check directly. At x=7x=7, the input to ff is

2(74)=6,2(7-4)=6,

so the original output is f(6)=2f(6)=-2, and

3(2)+5=11.-3(-2)+5=11.

Worked example 6: transform a complete quadratic

Section titled “Worked example 6: transform a complete quadratic”

Starting with f(x)=x2f(x)=x^2, sketch

y=2f(x34)+1.y=-2f\left(\frac{x-3}{4}\right)+1.

Rewrite the input as

x34=14(x3).\frac{x-3}{4}=\frac14(x-3).

Thus a=2a=-2, b=1/4b=1/4, h=3h=3 and k=1k=1. The coordinate map is

(u,v)(3+4u,12v).(u,v)\mapsto(3+4u,1-2v).

Track three useful points from y=x2y=x^2:

(0,0)(3,1),(0,0)\mapsto(3,1), (1,1)(7,1),(1,1)\mapsto(7,-1), (1,1)(1,1).(-1,1)\mapsto(-1,-1).

The result is a downward-opening parabola with vertex (3,1)(3,1) and axis of symmetry x=3x=3.

The transformations are a horizontal stretch by scale factor 44, a translation right by 33, a vertical stretch by scale factor 22, a reflection in the xx-axis, and a translation up by 11.

Some transformations commute, meaning their order does not affect the result. Others do not.

A purely horizontal transformation and a purely vertical transformation can be handled independently. For example, translating right and then translating up gives the same result as translating up and then right.

Order can matter when both transformations act on the same coordinate.

Start with a yy-coordinate vv.

  • Stretch vertically by factor 22, then move up by 33: v2v+3v\mapsto2v+3.
  • Move up by 33, then stretch vertically by factor 22: v2(v+3)=2v+6v\mapsto2(v+3)=2v+6.

These are not the same.

The expression

y=2f(x)+3y=2f(x)+3

means multiply the original output by 22, then add 33. Brackets are decisive:

y=2(f(x)+3)=2f(x)+6y=2\bigl(f(x)+3\bigr)=2f(x)+6

describes a different graph.

For combined transformations, use algebra or the coordinate mapping rather than relying on a memorised list of operations.

Important features transform like other points and lines, but intercepts require care.

A vertical stretch y=af(x)y=af(x) preserves the roots because af(x)=0af(x)=0 exactly when f(x)=0f(x)=0, provided a0a\ne0. A vertical translation generally changes the roots.

A horizontal transformation moves roots according to the input rule. If f(r)=0f(r)=0, then

f(b(xh))=0f\bigl(b(x-h)\bigr)=0

when

b(xh)=r,b(x-h)=r,

so the new root is

x=h+rb.x=h+\frac rb.

The old yy-intercept does not usually map to the new yy-intercept after a horizontal translation. Find the new yy-intercept by substituting x=0x=0 into the transformed equation.

If y=f(x)y=f(x) has horizontal asymptote y=Ly=L, then

y=af(b(xh))+ky=af\bigl(b(x-h)\bigr)+k

has corresponding horizontal asymptote

y=aL+k.y=aL+k.

If y=f(x)y=f(x) has vertical asymptote x=cx=c, the transformed input reaches cc when

b(xh)=c.b(x-h)=c.

Therefore the new vertical asymptote is

x=h+cb.x=h+\frac cb.

The graph of y=f(x)y=f(x) has asymptotes x=2x=2 and y=1y=-1. Find the corresponding asymptotes of

y=3f(2(x+1))+4.y=3f\bigl(-2(x+1)\bigr)+4.

For the vertical asymptote, solve

2(x+1)=2.-2(x+1)=2.

This gives

x=2.x=-2.

For the horizontal asymptote, transform the old output 1-1:

y=3(1)+4=1.y=3(-1)+4=1.

The new asymptotes are x=2x=-2 and y=1y=1.

Domain concerns allowable inputs. Range concerns possible outputs.

If the domain of ff is uDu\in D, then the domain of

af(b(xh))+kaf\bigl(b(x-h)\bigr)+k

contains precisely those xx for which

b(xh)D.b(x-h)\in D.

If the range of ff is vRv\in R, the transformed range consists of

av+kav+k

for vRv\in R. If a<0a<0, remember that multiplying an inequality by aa reverses its direction.

Worked example 8: transform a restricted domain and range

Section titled “Worked example 8: transform a restricted domain and range”

Suppose ff has domain 0x60\le x\le6 and range 2f(x)5-2\le f(x)\le5. Define

g(x)=2f(3(x1))+4.g(x)=-2f\bigl(3(x-1)\bigr)+4.

For the domain, require

03(x1)6.0\le3(x-1)\le6.

Divide by 33:

0x12.0\le x-1\le2.

Add 11:

1x3.1\le x\le3.

For the range, start with

2f(x)5.-2\le f(x)\le5.

Multiplying by 2-2 reverses both inequality signs:

102f(x)4.-10\le-2f(x)\le4.

Then add 44:

6g(x)8.-6\le g(x)\le8.

Modulus transformations are best understood by asking which coordinates must become non-negative.

The graph of y=f(x)\boldsymbol{y=|f(x)|}

Section titled “The graph of y=∣f(x)∣\boldsymbol{y=|f(x)|}y=∣f(x)∣”

The modulus acts on the output. Parts of y=f(x)y=f(x) below the xx-axis are reflected above it. Parts on or above the xx-axis stay fixed:

(x,y)(x,y).(x,y)\mapsto(x,|y|).

The resulting range contains no negative values.

The graph of y=f(x)\boldsymbol{y=f(|x|)}

Section titled “The graph of y=f(∣x∣)\boldsymbol{y=f(|x|)}y=f(∣x∣)”

The modulus acts on the input. Keep the part of y=f(x)y=f(x) for x0x\ge0, reflect it in the yy-axis, and discard the original part for x<0x<0:

f(x)=f(x),f(|-x|)=f(|x|),

so the result is always an even function.

Worked example 9: two different modulus graphs

Section titled “Worked example 9: two different modulus graphs”

Let

f(x)=x24.f(x)=x^2-4.

For

y=f(x)=x24,y=|f(x)|=|x^2-4|,

the part of the parabola between x=2x=-2 and x=2x=2 lies below the xx-axis, so that section reflects upwards. The roots remain x=±2x=\pm2, and the point (0,4)(0,-4) becomes (0,4)(0,4).

For

y=f(x)=x24=x24,y=f(|x|)=|x|^2-4=x^2-4,

the graph is unchanged because ff was already even.

Now compare this with f(x)=x2f(x)=x-2. Then

f(x)=x2|f(x)|=|x-2|

has vertex (2,0)(2,0), while

f(x)=x2f(|x|)=|x|-2

has vertex (0,2)(0,-2) and roots x=±2x=\pm2.

”Inside changes work in the direction of the sign”

Section titled “”Inside changes work in the direction of the sign””

They do not. The graph of f(x+4)f(x+4) moves left by 44 because the old input uu occurs when x+4=ux+4=u, or x=u4x=u-4.

f(2x)f(2x) is a horizontal stretch by factor 22

Section titled “”f(2x)f(2x)f(2x) is a horizontal stretch by factor 222””

Its horizontal scale factor is 1/21/2. Input changes act reciprocally on coordinates.

2f(x)2f(x) and f(2x)f(2x) mean the same thing”

Section titled “”2f(x)2f(x)2f(x) and f(2x)f(2x)f(2x) mean the same thing””

2f(x)2f(x) doubles outputs, while f(2x)f(2x) doubles inputs and halves horizontal coordinates. They coincide for a few special functions only by algebraic accident.

”Translate every intercept in the stated direction”

Section titled “”Translate every intercept in the stated direction””

Transform points on the original graph, but do not assume that a transformed old intercept remains an intercept. After a vertical translation, an old root moves away from the xx-axis. Calculate new intercepts from the new equation.

”For f(x)f(|x|), reflect the whole graph”

Section titled “”For f(∣x∣)f(|x|)f(∣x∣), reflect the whole graph””

Only the original right-hand part is retained and reflected. Keeping the old left-hand part as well may give two different yy-values for the same xx, which would not define a function.

The point (3,4)(-3,4) lies on y=f(x)y=f(x). Find the corresponding point on

y=2f(3(x1))5.y=2f\bigl(3(x-1)\bigr)-5.

Describe fully the transformation from y=f(x)y=f(x) to

y=f(x+62)+3.y=-f\left(\frac{x+6}{2}\right)+3.

The graph of y=f(x)y=f(x) has vertical asymptote x=4x=-4 and horizontal asymptote y=2y=2. Find the corresponding asymptotes of

y=2f(4x8)+1.y=-2f(4x-8)+1.

The domain of ff is 1x5-1\le x\le5. Find the domain of

g(x)=f(2(x+3)).g(x)=f\bigl(2(x+3)\bigr).

Explain how to construct y=f(x)y=|f(x)| and y=f(x)y=f(|x|) from a sketch of y=f(x)y=f(x).

Answers

1. Here a=2a=2, b=3b=3, h=1h=1 and k=5k=-5. Therefore

(3,4)(1+33,5+2(4))=(0,3).(-3,4)\mapsto\left(1+\frac{-3}{3},-5+2(4)\right)=(0,3).

2. Since

x+62=12(x(6)),\frac{x+6}{2}=\frac12(x-(-6)),

the graph is stretched horizontally by scale factor 22, translated left by 66, reflected in the xx-axis, then translated up by 33. The coordinate map is

(u,v)(2u6,3v).(u,v)\mapsto(2u-6,3-v).

3. Rewrite the input as 4(x2)4(x-2). The old vertical asymptote input 4-4 satisfies

4(x2)=4,4(x-2)=-4,

so x=1x=1. The horizontal asymptote output becomes

2(2)+1=3.-2(2)+1=-3.

The new asymptotes are x=1x=1 and y=3y=-3.

4. Require

12(x+3)5.-1\le2(x+3)\le5.

Dividing by 22 and subtracting 33 gives

72x12.-\frac72\le x\le-\frac12.

5. For f(x)|f(x)|, keep the part on or above the xx-axis and reflect every part below it in the xx-axis. For f(x)f(|x|), keep the part for x0x\ge0, reflect it in the yy-axis, and discard the original part for x<0x<0.

Before completing a transformation question, check that you have:

  • identified whether each change acts on inputs or outputs;
  • reversed horizontal translations correctly;
  • used the reciprocal horizontal scale factor 1/b1/|b|;
  • included reflections when a<0a<0 or b<0b<0;
  • transformed points with (u,v)(h+u/b,k+av)(u,v)\mapsto(h+u/b,k+av);
  • recalculated intercepts rather than moving them blindly;
  • transformed asymptotes, domain and range where relevant;
  • distinguished f(x)|f(x)| from f(x)f(|x|).