Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AA › Notes

IB Maths AA · Topic 2 · 2.11 · SL and HL

Transformations of graphs

This note covers how the graph of \(y=f(x)\) changes when you add, multiply or negate parts of the function: translations, stretches and reflections, and combinations of them. It lets you sketch a new graph from a known one and describe a transformation in precise language.

Key ideas

Every transformation either changes the input \(x\), which acts inside the brackets and moves the graph horizontally, or changes the output \(f(x)\), which acts outside the brackets and moves the graph vertically. The horizontal changes often feel "backwards", so learn them carefully.

Translations. The graph of \(y=f(x)+b\) is the graph of \(y=f(x)\) moved \(b\) units up (down if \(b\) is negative). The graph of \(y=f(x-a)\) moves \(a\) units to the right (left if \(a\) is negative). The translation vector is \(\begin{pmatrix}a\\ b\end{pmatrix}\) for \(y=f(x-a)+b\). Horizontal movement is backwards: \(f(x+3)\) moves the graph 3 to the left.

Stretches. The graph of \(y=pf(x)\) is a vertical stretch with scale factor \(p\), parallel to the \(y\)-axis. Each \(y\)-coordinate is multiplied by \(p\), while the \(x\)-intercepts stay fixed. The graph of \(y=f(qx)\) is a horizontal stretch with scale factor \(\dfrac1q\), parallel to the \(x\)-axis. Each \(x\)-coordinate is divided by \(q\), while the \(y\)-intercept stays fixed. So \(f(2x)\) squashes the graph towards the \(y\)-axis, and \(f\!\left(\tfrac{x}{3}\right)\) stretches it away by a factor of 3.

Reflections. The graph of \(y=-f(x)\) is a reflection in the \(x\)-axis. Each \(y\)-coordinate changes sign. The graph of \(y=f(-x)\) is a reflection in the \(y\)-axis. Each \(x\)-coordinate changes sign.

Combining transformations. For a function such as \(y=-2f(x+1)+4\), the order matters. Work in the same order as you would evaluate: do the change inside the bracket first, then multiply, then add. So here the order is: translate 1 unit left, stretch vertically by factor 2, reflect in the \(x\)-axis, then translate 4 units up. Stretches and reflections that change the same coordinate must be done before a translation in that direction. Two vertical stretches, or a vertical stretch and a reflection, can be done in either order, but a stretch and a translation in the same direction cannot be swapped.

Describing a transformation. A full description names the type (translation, stretch, reflection), the direction or line or axis, and the size (vector or scale factor). Using "move" or "shift" without stating the direction and amount is not a description.

Points on the new graph. To find where a point \((x,y)\) on \(y=f(x)\) ends up, apply the same steps to its coordinates. Asymptotes move too: a horizontal asymptote \(y=c\) is changed by vertical transformations, and a vertical asymptote \(x=d\) is changed by horizontal ones.

Definitions and formulae

Term or formulaMeaning / when to use
\(y=f(x)+b\)Translation \(b\) units up, vector \(\begin{pmatrix}0\\ b\end{pmatrix}\).
\(y=f(x-a)\)Translation \(a\) units right, vector \(\begin{pmatrix}a\\ 0\end{pmatrix}\).
\(y=pf(x)\)Vertical stretch, scale factor \(p\). Point \((x,y)\to(x,py)\).
\(y=f(qx)\)Horizontal stretch, scale factor \(\dfrac1q\). Point \((x,y)\to\left(\dfrac xq,y\right)\).
\(y=-f(x)\)Reflection in the \(x\)-axis. Point \((x,y)\to(x,-y)\).
\(y=f(-x)\)Reflection in the \(y\)-axis. Point \((x,y)\to(-x,y)\).
\(y=af(x-h)+k\)General vertical-type combination. Stretch by \(a\) (and reflect if \(a\lt 0\)), then translate by \(\begin{pmatrix}h\\ k\end{pmatrix}\).

Worked examples

Example 1 Let \(f(x)=x^2\). The graph of \(g\) is given by \(g(x)=-f(x+2)+5\). Describe the transformations from \(y=f(x)\) to \(y=g(x)\), and find the vertex and \(y\)-intercept of \(g\).

Write out \(g\): \(g(x)=-(x+2)^2+5\).

Work in order. First, \(f(x+2)\) is a translation of \(\begin{pmatrix}-2\\ 0\end{pmatrix}\), which is 2 units left. Next, the minus sign gives a reflection in the \(x\)-axis. Last, \(+5\) is a translation of \(\begin{pmatrix}0\\ 5\end{pmatrix}\), which is 5 units up.

The vertex of \(y=x^2\) is \((0,0)\). After 2 units left it is \((-2,0)\). After reflection it is still \((-2,0)\). After 5 units up it is \((-2,5)\). The parabola now opens downward, so this is a maximum.

For the \(y\)-intercept, put \(x=0\): \(g(0)=-(2)^2+5=1\).

Answer: translate 2 left, reflect in the \(x\)-axis, translate 5 up. Vertex \((-2,5)\), \(y\)-intercept \((0,1)\).

Example 2 The point \(A(4,-3)\) lies on the graph of \(y=f(x)\). Find the image of \(A\) on each graph: (a) \(y=f(x+1)+2\), (b) \(y=-2f(x)\), (c) \(y=f\!\left(\tfrac12x\right)\), (d) \(y=f(-x)\).

(a) \(f(x+1)\) moves the graph 1 left, so \(x\) goes from 4 to 3. Then \(+2\) moves it up 2, so \(y\) goes from \(-3\) to \(-1\). The image is \((3,-1)\).

(b) The factor 2 is a vertical stretch and the minus sign is a reflection in the \(x\)-axis. So \(y\) becomes \(-2\times(-3)=6\), and \(x\) stays 4. The image is \((4,6)\).

(c) Here \(q=\tfrac12\), so the horizontal stretch has scale factor \(\dfrac{1}{1/2}=2\). The \(x\)-coordinate is multiplied by 2, giving 8, and \(y\) stays \(-3\). The image is \((8,-3)\).

(d) A reflection in the \(y\)-axis changes the sign of \(x\) only. The image is \((-4,-3)\).

Answer: (a) \((3,-1)\), (b) \((4,6)\), (c) \((8,-3)\), (d) \((-4,-3)\)

Example 3 The graph of \(y=2^x\) is transformed to give \(y=2^{x-1}+3\). State the transformation, then give the equation of the horizontal asymptote and the coordinates of the image of \((0,1)\). Finally, show why the order matters by finding the equation when the graph of \(y=x^2\) is translated 2 units up and then stretched vertically by factor 3, and when the same two steps are done in the opposite order.

Since \(2^{x-1}+3=f(x-1)+3\) with \(f(x)=2^x\), the transformation is a translation by the vector \(\begin{pmatrix}1\\ 3\end{pmatrix}\).

The original asymptote is \(y=0\). A vertical shift of 3 moves it to \(y=3\). A horizontal shift does not change a horizontal asymptote.

The point \((0,1)\) moves to \((0+1,\,1+3)=(1,4)\). Check: \(2^{1-1}+3=1+3=4\).

For the order, start with \(y=x^2\). Translate up 2: \(y=x^2+2\). Then stretch vertically by 3, which multiplies the whole expression: \(y=3(x^2+2)=3x^2+6\).

In the opposite order, stretch first: \(y=3x^2\). Then translate up 2: \(y=3x^2+2\).

The results \(3x^2+6\) and \(3x^2+2\) differ, so the order matters.

Answer: translation \(\begin{pmatrix}1\\ 3\end{pmatrix}\); asymptote \(y=3\); image \((1,4)\); the orders give \(y=3x^2+6\) and \(y=3x^2+2\).

Common errors

  • Moving the graph the wrong way for a horizontal translation. The graph of \(y=f(x+3)\) moves 3 units to the left, not the right.
  • Saying the scale factor of \(y=f(2x)\) is 2. It is \(\tfrac12\), because every \(x\)-coordinate is halved.
  • Writing "shift" or "move" without giving the direction and size, or giving a stretch without saying which axis it is parallel to.
  • Applying a vertical stretch and a vertical translation in the wrong order. Compare \(3(x^2+2)\) with \(3x^2+2\).
  • Changing the wrong coordinate of a point. Horizontal changes act on \(x\), vertical changes act on \(y\).

Exam tip: When asked to sketch a transformed graph, mark the image of every labelled point and any intercepts and asymptotes on your sketch. State their new coordinates and equations.

Check yourself

  1. Describe the transformation that maps \(y=f(x)\) to \(y=f(x-4)-1\).
    AnswerIt is a translation by the vector \(\begin{pmatrix}4\\ -1\end{pmatrix}\): 4 units to the right and 1 unit down.
  2. The point \((6,-2)\) is on \(y=f(x)\). Find its image on \(y=3f(x)\) and on \(y=f(3x)\).
    AnswerFor \(y=3f(x)\), multiply \(y\) by 3: \((6,-6)\). For \(y=f(3x)\), the horizontal scale factor is \(\tfrac13\), so \(x\) becomes \(6\times\tfrac13=2\): \((2,-2)\).
  3. The graph of \(y=\sqrt{x}\) is reflected in the \(y\)-axis. Write the equation of the new graph.
    AnswerReplace \(x\) with \(-x\): \(y=\sqrt{-x}\), which is defined for \(x\le 0\).
  4. Find the equation of the graph of \(y=x^2\) after a vertical stretch of factor 2, then a translation of 3 units left.
    AnswerAfter the stretch: \(y=2x^2\). Translating 3 units left replaces \(x\) by \(x+3\): \(y=2(x+3)^2\).