Skip to main content
Mathematics LibreTexts

4.4: Transformations

  • Page ID
    40917
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    There are three major types of transformation that we will consider:
    1) Horizontal and vertical shifts
    2) Reflections over the \(x\) or \(y\) -axis
    3) Horizontal and vertical stretches
    If we take a given function, let's say \(f(x)=x,\) then this has the graph we see below - a straight line with a slope of 1 and a \(y\) -intercept of \(0 .\) If we add to the function \(f(x)+6=x+6,\) then this will add 6 to all of the \(y\) -values which shifts the graph 6 places up.

    clipboard_edb94f846b02456aeaf26cb9d5d4ae93a.png

    Vertical Shifts
    So, if we have a general function \(f(x)\) that is described by a graph, we can determine a graph for \(f(x)+k,\) where \(k\) is some number that will either shift \(f(x)\) up \((\text { if } k>0)\) or down (if \(k<0\) )
    For example, consider the following graph for \(f(x)\)
    clipboard_e1868c85fac715e9cc59d36869608e752.png

    Then, if we want a graph for \(f(x)-2\), just shift all the \(y\) -values down 2 places:
    clipboard_e384d64a193e49d8d61bd23533e44a9c5.png
    This is a standard vertical shift transformation of a function.

    Horizontal Shifts
    A function may also be shifted horizontally by adding or subtracting a number inside the parentheses.
    If we start with our original function \(f(x)\)
    clipboard_e0a58a36da1538d0151b00fc036bc5f2b.png

    Then the transformation \(f(x-2)\) will shift the graph horizontally, except that it will move in the opposite direction of the sign. The \(f(x-2)\) shift will move the graph 2 places to the right whereas a shift of \(f(x+2)\) will move the graph 2 places to the left.

    The reason why this happens will be more clear if we look at a table of values for the function:
    clipboard_e3f5d56400b176ab907f8f40093fbc2c3.png
    Now, if, instead of \(f(x),\) we want \(f(x-2),\) then we add another column to the table:
    clipboard_e6edd92e2223e347c7bfb6507c763b105.png
    Notice that to have the same \(y\) -value as the original graph, we must go 2 places to the right so that after we subtract 2 from the \(x\) -value, we arrive back at the original \(x\) -value. So the graph of \(f(x-2)\) will look like this:
    clipboard_e7ab3b4b08959c213634cd486b7c18eb4.png
    Notice how the values in the graph match up with the values in the table.

    Reflections
    Negating the \(x\) or \(y\) values of a function will have the effect of reflecting the function over the \(y\) or \(x\) axis. If we consider the function \(f(x)\) - the same one we used in the previous examples:
    clipboard_e347cd8db4203bc3a2a618eccde38de61.png
    Then the graph of \(y=-f(x)\) will be reflected over the \(x\) -axis. The negative sign in front of the function negates all of the \(y\) values, reflecting them over the \(x\) -axis. Lets look at this in a table of values:
    clipboard_e9dd6028bd7beb4188d4eec9848e996bf.png
    So the graph would look like this:
    clipboard_ec75725e96bda259ad5fbe6e863659f51.png
    On the other hand, if we negate the \(x\) -variable \((f(-x)),\) then the function values previously associated with the positive values of \(x\) would be associated with the negative values of \(x\) and vice versa. This would reflect the function over the \(y\) -axis.
    If we again consider our original function and a table of values:
    clipboard_e64f52485364cf255f8cc8ba15f4f0fdb.png
    In the table:
    clipboard_e0ab871f54621ac5390d031306b8528ef.png
    And the graph would be reflected over the \(y\) -axis:
    clipboard_e6c4501bcd8113f99eba11ba445467c0d.png

    Stretching and compressing graphs

    The last type of transformation we will examine is that of stretching or compressing a graph by multiplying inside or outside the parentheses. Starting with our familiar example function \(y=f(x)\)
    clipboard_ee635edba8ef54a89bb7811cb6c266823.png
    If we multiply the function by a constant outside of the parentheses: \(y=2 f(x)\) then this will have the effect of multiplying all of the \(y\) values by \(2 .\) In the table:
    clipboard_e21f2103671930d6dda497ea205cadf67.png

    The graph of \(y=2 f(x)\) would look like this:
    clipboard_e921e2a2750a616f22f39cb90a3920425.png
    In a similar way, multiplying by a number less than 1 would compress the graph. The graph for \(y=\frac{1}{2} f(x)\) is below:
    clipboard_e25e17cc193f3365e2d03e6efdf81864a.png

    Multiplying inside the parentheses affects the \(x\) variables.
    If we consider the function \(y=f(2 x)\), then this will have the effect of compressing the graph along the \(x\) -axis:
    clipboard_ef614db647c95609a575f1342bfd8177a.png

    Notice how each \(x\) value had to be cut in half so that when we multiplied it by 2 we ended up with the original \(x\) value. The graph would look like this:

    clipboard_e61bc69029c85ba4a1b495259129bcf73.png

    Multiplying inside the parentheses by a number less than one would stretch the graph out.
    clipboard_e0e8e7f6a564fce4a37dca0e019782025.png
    clipboard_ef9392f4aa2d448f5c2b1adaec789aca2.png
    In these examples, we have considered only one transformation at a time. In the exercises you will need to consider the effect of several transformations at once.

    Exercises 4.4
    1) Match each of the functions on the graph to the appropriate transformation described below.
    a) \(\quad f(x-4)\)
    b) \(\quad f(x)+3\)
    c) \(\quad -3 f(x)\)
    d) \(\quad 2 f(x+6)\)

    clipboard_e167d20f9d1498a9c40e7d33d1e23d22b.png

    2) Match each of the descriptions with the appropriate function transformation.

    \begin{array}{cc}
    a) \quad y=f(x-1) & 1) \text{Shift left one unit} \\
    b) \quad y=f(x)-1 & 2) \text{Reflect over \(x\) -axis, then shift left one unit} \\
    c) \quad y=f(x)+1 & 3) \text{Shift right one unit} \\
    d) \quad y=f(x+1) & 4) \text{Reflect over \(x\) -axis, then shift up one unit} \\
    e) \quad y=f(-x)+1 & 5) \text{Reflect over \(x\) -axis, then shift down one unit} \\
    f) \quad y=f(-x)-1 & 6) \text{Shift down one unit} \\
    g) \quad y=-f(x)+1 & 7) \text{Reflect over \(x\) -axis, reflect over \(y\) -axis, then shift up one unit} \\
    h) \quad y=-f(x+1) & 8 \text{Shift left one unit, reflect over \(y\) -axis, then shift up one unit} \\
    i) \quad y=-f(x)-1) & 9) \text{Shift up one unit} \\
    j) \quad y=f(-x+1) & 10) \text{Reflect over \(y\) -axis, then shift up one unit} \\
    k) \quad y=-f(-x) & 11) \text{Reflect over \(y\) -axis, then shift down one unit} \\
    \end{array}

    3) Match each of the descriptions with the appropriate function transformation.
    \begin{array}{cc}
    a) \quad y=f(x+2)+3 & 1) \text{Shift left 2 units, then shift down 3 units} \\
    b) \quad y=f(x+3)+2 & 2) \text{Shift left 3 units, then shift up 2 units} \\
    c) \quad y=f(x-2)+3 & 3) \text{Shift right 3 units, then shift up 2 units} \\
    d) \quad y=f(x-2)-3 & 4) \text{Shift left 3 units, then shift down 2 units} \\
    e) \quad y=f(x+2)-3 & 5) \text{Shift right 3 units, then shift down 2 units} \\
    f) \quad y=f(x-3)+2 & 6) \text{Reflect over the \(y\) -axis, then shift up 2 units} \\
    g) \quad y=f(x-3)-2 & 7) \text{Reflect over \(x\) -axis, then shift right 2 units} \\
    h) \quad y=f(x+3)-2 & 8) \text{Reflect over \(x\) -axis, then shift left 2 units} \\
    i) \quad y=-f(x+2) & 9) \text{Shift left 2 units, then reflect over the \(y\) -axis} \\
    j) \quad y=-f(x-2) & 10) \text{Shift right 2 units, then shift up 3 units} \\
    k) \quad y=f(2-x) & 11) \text{Shift left 2 units, then shift up 3 units} \\
    \ell) \quad y=f(-x)+2 & 12) \text{Shift right 2 units, then shift down 3 units}
    \end{array}

    Apply the transformations indicated for each function.
    clipboard_e763571b89dd30538d95b384b10a4bdf0.png
    a) \(\quad f(x-3)\)
    b) \(\quad-f(x)+2\)
    c) \(\quad \frac{1}{2} f(x-1)\)
    d) \(\quad f(-x)+1\)
    clipboard_eaf108e96da326bd505a70cda92c9e49e.png
    a) \(\quad g(x)-3\)
    b) \(\quad-g(x)-1\)
    c) \(\quad 2 g(x+2)\)
    d) \(\quad g(2 x)-1\)
    clipboard_e7a2a4c14187e997b81b319f93be1f797.png
    a) \(\quad f(x)+2\)
    b) \(\quad-f(x-1)\)
    c) \(\quad f(x-1)-3\)
    d) \(\quad \frac{1}{3} f(x)+4\)

    clipboard_ef971dd6033506d049e078dd2bfd9ee88.png
    a) \(\quad g(x-2)\)
    b) \(\quad-g(x)+1\)
    c) \(\quad 2 g(x-1)\)
    d) \(\quad \frac{1}{2} g(x)-3\)


    This page titled 4.4: Transformations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Richard W. Beveridge.

    • Was this article helpful?