Skip to main content
Mathematics LibreTexts

3.3: Graph Polynomials with Transformations

  • Page ID
    193610
  • \( \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}\)

      

    Learning Objectives

    • Graph functions using vertical and horizontal shifts.
    • Graph functions using reflections about the x-axis and the y-axis.
    • Determine whether a function is even, odd, or neither from its graph.
    • Graph functions using compressions and stretches.
    • Combine transformations.

    Often when given a problem, we try to model the scenario using mathematics in the form of words, tables, graphs, and equations. One method we can employ is to adapt the basic graphs of the toolkit functions to build new models for a given scenario. There are systematic ways to alter functions to construct appropriate models for the problems we are trying to solve.

    Identifying Vertical Shifts

    One simple kind of transformation involves shifting the entire graph of a function up, down, right, or left. The simplest shift is a vertical shift, moving the graph up or down, because this transformation involves adding a positive or negative constant to the function. In other words, we add the same constant to the output value of the function regardless of the input. For a function \(g(x)=f(x)+k\), the function \(f(x)\) is shifted vertically \(k\) units. See Figure \(\PageIndex{1}\) for an example.

    Vertical shift by k=1 of the cube root function f(x)=3√x.vertical Shift.png
    Figure \(\PageIndex{1}\): Vertical shift of functions.

    To help you visualize the concept of a vertical shift, consider that \(y=f(x)\). Therefore, \(f(x)+k\) is equivalent to \(y+k\). Every unit of \(y\) is replaced by \(y+k\), so the \(y\)-value increases or decreases depending on the value of \(k\). The result is a shift upward or downward.

    Example \(\PageIndex{1}\): Adding a Constant to a Function

    If a rocket is launched from the ground at \(96\) feet per second, the height of the ball can be modeled by \(S(t)=96t-16t^2\) feet where t is the number of seconds after the ball is thrown. To get a better flight, we decided to launch the rocket from the top of the building that is \(100\) feet hight. Sketch a graph of this new function.

    pic 1.jpgFigure \(\PageIndex{2}\):  Notice the point \((2,128)\) is highlighted.  At \(2\) seconds the rocket is \(128\) feet in the air.  

    Solution

    We can sketch a graph of this new function by adding \(100\) to each of the output values of the original function. This will have the effect of shifting the graph vertically up, as shown in Figure \(\PageIndex{3}\).

    pic 3.jpgFigure \(\PageIndex{3}\):  Notice that after \(2\) seconds, the rocket is now \(100\) feet higher.  

    Notice that in Figure \(\PageIndex{3}\), for each input value, the output value has increased by \(100\), so if we call the new function \(S(t)\),we could write

    \[S(t)=V(t)+100\]

    This notation tells us that, for any value of \(t\),\(S(t)\) can be found by evaluating the function \(V\) at the same input and then adding \(100\) to the result. This defines \(S\) as a transformation of the function \(V\), in this case a vertical shift up \(100\) units. Notice that, with a vertical shift, the input values stay the same and only the output values change. See Table \(\PageIndex{1}\).

    Table \(\PageIndex{1}\)
    \(t\) \(0\) \(1\) \(2\) \(3\) \(4\) \(5\) \(6\)
    \(V(t)\) \(0\) \(80\) \(128\) \(144\) \(128\) \(80\) \(0\)
    \(S(t)\) \(100\) \(180\) \(228\) \(244\) \(228\) \(180\) \(100\)

    Identifying Horizontal Shifts

    We just saw that the vertical shift is a change to the output, or outside, of the function. We will now look at how changes to input, on the inside of the function, change its graph and meaning. A shift to the input results in a movement of the graph of the function left or right in what is known as a horizontal shift, shown in Figure \(\PageIndex{4}\).

    Figure \(\PageIndex{4}\): Horizontal shift of the function \(f(x)=\sqrt[3]{x}\). Note that \(h=-1\) shifts the graph to the left, that is, towards negative values of \(x\).

    horizontal shift 3.png

    Figure \(\PageIndex{5}\): Horizontal shift of the function \(f(x)=x^2\). Note that \(h=1\) shifts the graph to the right, that is, towards positive values of \(x\).

    For example, if \(f(x)=x^2\), then \(g(x)=(x−1)^2\) is a new function. Each input is reduced by \(1\) prior to squaring the function. The result is that the graph is shifted \(1\)  unit to the right, because we would need to increase the prior input by \(1\)  unit to yield the same output value as given in \(f\).

    Example \(\PageIndex{2}\): Adding a Constant to an Input

    Returning to our rocket from Figure \(\PageIndex{2}\), suppose we launched our rocket \(2\) seconds later.  Sketch a graph of the new function.

    Solution

    We can set \(F(t)\) to be the original program and \(H(t)\) to be the revised program.

    \[F(t)= \text{ the original rocket launch} \nonumber\]

    \[H(t)= \text{ launching \(2\) seconds later} \nonumber\]

    In the new graph, at each time, the height is the same as the original function \(F\) was \(2\) seconds later. For example, in the original function \(F\), the height at \(2\) seconds is \(128\) feet. For the function \(H\), the rocket launches from the ground two seconds later resulting in the rocket reaching \(128\) feet at \(4\) seconds after the original rocket launch. 

    In both cases, we see that, because \(H(t)\) starts \(2\) seconds later, \(h=2\). That means that the same output values are reached when \(H(t)=F(t−(2))=H(t-2)\).

    pic6.jpgFigure \(\PageIndex{6}\)

    Analysis

    Note that \(H(t-2)\) has the effect of shifting the graph to the right.

    Shifting the Other Direction

    Returning to our rocket from Figure \(\PageIndex{2}\), suppose we launched our rocket and started the clock \(2\) seconds after the rocket launched.   Sketch a graph of the new function.

    Solution

    We can set \(F(t)\) to be the original program and \(H(t)\) to be the revised program.

    \[F(t)= \text{ the original rocket launch} \nonumber\]

    \[H(t)= \text{ clock started \(2\) seconds later} \nonumber\]

    In the new graph, at each time, the height is the same as the original function \(F\) was \(2\) seconds earlier. For example, in the original function \(F\), the height at \(2\) seconds is \(128\) feet. For the function \(H\), the rocket launches from the ground and we start the clock late resulting in the rocket reaching \(128\) feet at \(0\) seconds after starting the stopwatch launch. 

    In both cases, we see that, because \(H(t)\) starts \(2\) seconds earlier, \(h=-2\). That means that the same output values are reached when

    \(H(t)=F(t−(-2))=H(t+2)\).

    pic5.jpgFigure \(\PageIndex{7}\)

    Analysis

    Note that \(H(t+2)\) has the effect of shifting the graph to the left.

    Horizontal changes or “inside changes” affect the domain of a function (the input) instead of the range and often seem counterintuitive. The new function \(H(t)\) uses the same outputs as \(F(t)\), but matches those outputs to inputs \(2\) hours earlier than those of \(F(t)\). Said another way, we must add \(2\) hours to the input of \(H\) to find the corresponding output for \(F:F(t)=H(t+2)\).

    Example \(\PageIndex{3}\): Identifying a Horizontal Shift of a Cubic

    Figure \(\PageIndex{6}\) represents a transformation of the toolkit function \(f(x)=x^3\). Relate this new function \(g(x)\) to \(f(x)\), and then find a formula for \(g(x)\).

    cubed.pngFigure \(\PageIndex{8}\): Graph of a cubic

    Solution

    Notice that the graph is identical in shape to the \(f(x)=x^3\) function, but the \(x\)-values are shifted to the right \(4\) units. The inflection point used to be at \((0,0)\), but now the inflection point is at \((4,0)\). The graph is the basic cubic function shifted \(4\)units to the right, so

    \[g(x)=f(x−2) \nonumber\]

    Notice how we must input the value \(x=4\) to get the output value \(y=0\); the \(x\)-values must be 4 units larger because of the shift to the right by 4 units. We can then use the definition of the \(f(x)\) function to write a formula for \(g(x)\) by evaluating \(f(x−4)\).

    \[\begin{align*} f(x)&=x^3 \\ g(x)&=f(x-4) \\ g(x)&=f(x-4)=(x-4)^3 \end{align*}\]

    Analysis

    To determine whether the shift is \(+4\) or \(−4\), consider a single reference point on the graph. For a cubic, looking at the inflection point is convenient. In the original function, \(f(0)=0\). In our shifted function, \(g(4)=0\). To obtain the output value of 0 from the function \(f\), we need to decide whether a plus or a minus sign will work to satisfy \(g(4)=f(x−4)=f(0)=0\). For this to work, we will need to subtract 4 units from our input values.

    Exercise 3.3.1:
    1. Figure \(\PageIndex{9}\) represents a transformation of the function \(f(x)=x^4\). Relate this new function \(g(x)\) to \(f(x)\), and then find a formula for \(g(x)\).

      Graph of a parabola
      Figure \(\PageIndex{9}\): Graph of a parabola
    Answer

    Notice that the graph is identical in shape to the \(f(x)=x^4\) function, but the \(x\)-values are shifted to the left \(2\) units. The vertex used to be at \((0,0)\), but now the vertex is at \((-2,0)\). The graph is the basic quartic function shifted 2 units to the left, so

    \[g(x)=f(x+2) \nonumber\]

    Notice how we must input the value \(x=-2\) to get the output value \(y=0\); the \(x\)-values must be 2 units smaller because of the shift to the left by 2 units. We can then use the definition of the \(f(x)\) function to write a formula for \(g(x)\) by evaluating \(f(x+2)\).

    \[\begin{align*} f(x)&=x^4 \\ g(x)&=f(x+2) \\ g(x)&=f(x+2)=(x+2)^4 \end{align*}\]

    Analysis

    To determine whether the shift is \(+2\) or \(−2\), consider a single reference point on the graph. For a quadratic, looking at the vertex point is convenient. In the original function, \(f(0)=0\). In our shifted function, \(g(2)=0\). To obtain the output value of 0 from the function \(f\), we need to decide whether a plus or a minus sign will work to satisfy \(g(2)=f(x−2)=f(0)=0\). For this to work, we will need to subtract 2 units from our input values.

    Combining Vertical and Horizontal Shifts

    Now that we have two transformations, we can combine them together. Vertical shifts are outside changes that affect the output \((y)\) -axis values and shift the function up or down. Horizontal shifts are inside changes that affect the input \((x)\) -axis values and shift the function left or right. Combining the two types of shifts will cause the graph of a function to shift up or down and right or left.

    Example \(\PageIndex{4}\): Graphing Combined Vertical and Horizontal Shifts

    Given \(f(x)=x^3\), sketch a graph of \(h(x)=f(x+1)−3\).

    Solution

    The function \(f\) is our toolkit cubic function. We know that this graph has a S shape, with the inflection point at the origin. The graph of \(h\) has transformed \(f\) in two ways: \(f(x+1)\) is a change on the inside of the function, giving a horizontal shift left by 1, and the subtraction by 3 in \(f(x+1)−3\) is a change to the outside of the function, giving a vertical shift down by 3. The transformation of the graph is illustrated in Figure \(\PageIndex{10}\).

    fours 3.jpgFigure \(\PageIndex{10}\): Graph of an cubic function, \(y=x^3\), and how it was transformed to \(y=(x+1)^3+3\)
    Exercise 3.3.2:

    Write a formula for the graph shown in Figure \(\PageIndex{11}\), which is a transformation of the quartic function.  

    fours 4.pngFigure \(\PageIndex{11}\): Graph of a quartic function transposed left two units and down three units.
    Answer

    The graph of the toolkit function starts at the origin, so this graph has been shifted \(2\)to the left and up \(3\) units down. In function notation, we could write that as

    \[h(x)=f(x+2)-3 \nonumber\]

    Using the formula for the square root function, we can write

    \[h(x)=\(x+2)^4-3 \nonumber\]

    Analysis

    Note that this transformation has changed the domain and range of the function. This new graph has domain \(\left(\infty,\infty\right)\) and range \(\left[-3,\infty\right)\).

    Graphing Functions Using Reflections about the Axes

    Another transformation that can be applied to a function is a reflection over the x- or y-axis. A vertical reflection reflects a graph vertically across the x-axis, while a horizontal reflection reflects a graph horizontally across the y-axis. The reflections are shown in Figure \(\PageIndex{12}\).

    Graph of the vertical and horizontal reflection of a function..
    Figure \(\PageIndex{12}\): Graph of the vertical and horizontal reflection of a function.

    Notice that the vertical reflection produces a new graph that is a mirror image of the base or original graph about the x-axis. The horizontal reflection produces a new graph that is a mirror image of the base or original graph about the y-axis.

    Given a function \(f(x)\), a new function \(g(x)=−f(x)\) is a vertical reflection of the function \(f(x)\), sometimes called a reflection about (or over, or through) the x-axis.

    Given a function \(f(x)\), a new function \(g(x)=f(−x)\) is a horizontal reflection of the function \(f(x)\), sometimes called a reflection about the y-axis.

    Example \(\PageIndex{5}\): Reflecting a Graph Horizontally and Vertically

    Reflect the graph of \(s(t)=(x-2)^3\) (a) vertically and (b) horizontally.

    Solution

    a. Reflecting the graph vertically means that each output value will be reflected over the horizontal x-axis as shown in Figure \(\PageIndex{13}\).

    reflect 2.pngreflect 4.png
     
    Figure \(\PageIndex{13}\): Graph of the vertical reflection of the \(y=(x-2)^3\)

    Because each output value is the opposite of the original output value, we can write

    \[V(t)=-s(t) \text{ or } V(t)=y=-(x-2)^3 \nonumber\]

    Notice that this is an outside change, or vertical shift, that affects the output \(s(t)\) values, so the negative sign belongs outside of the function.

    b. Reflecting horizontally means that each input value will be reflected over the vertical axis as shown in Figure \(\PageIndex{14}\).

    reflect 2.pngreflect 5.png

    Figure \(\PageIndex{14}\): Horizontal reflection of \(y=(x-2)^3\)

    Because each input value is the opposite of the original input value, we can write

    \[H(t)=s(-t) \text{ or } H(t)=y=(-x-2)^3 \nonumber\]

    Notice that this is an inside change or horizontal change that affects the input values, so the negative sign is on the inside of the function.

     

    Exercise 3.3.3

    Given the toolkit function \(f(x)=(x-2)^2\), graph \(g(x)=−f(x)\) and \(h(x)=f(−x)\). Take note of any surprising behavior for these functions.

    Answer

    a.

    reflect 6.png

    Figure \(\PageIndex{15}\): Graph of a vertically reflected quadratic function

    Analysis

    Notice the domain is \(-\infty,\infty\)) but the range is \(-\infty,0])\

    fours 7.png

    Figure \(\PageIndex{16}\): Graph of a horizontally reflected quadratic function

    Analysis

    Notice the domain is \((-\infty,\infty)\) but the range is \([0,\infty)\)

    Determining Even and Odd Functions

    Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions \(f(x)=x^2\) or \(f(x)=|x|\) will result in the original graph. We say that these types of graphs are symmetric about the y-axis. Functions whose graphs are symmetric about the y-axis are called even functions.

    If the graphs of \(f(x)=x^3\) or \(f(x)=\frac{1}{x}\) were reflected over both axes, the result would be the original graph, as shown in Figure \(\PageIndex{17}\).

    Graph of \(x^3\) and its reflections.
    Figure \(\PageIndex{17}\): (a) The cubic toolkit function (b) Horizontal reflection of the cubic toolkit function (c) Horizontal and vertical reflections reproduce the original cubic function.

    We say that these graphs are symmetric about the origin. A function with a graph that is symmetric about the origin is called an odd function.

    Note: A function can be neither even nor odd if it does not exhibit either symmetry. For example, \(f(x)=2^x\) is neither even nor odd. Also, the only function that is both even and odd is the constant function \(f(x)=0\).

    A function is called an even function if for every input \(x\) \(f(x)=f(−x)\). The graph of an even function is symmetric about the y-axis.

    A function is called an odd function if for every input \(x\) \(f(x)=−f(−x)\). The graph of an odd function is symmetric about the origin.

    Exercise 3.3.4

    Is the function \(f(x)=x^3+2x\) even, odd, or neither?

    Answer

    Without looking at a graph, we can determine whether the function is even or odd by finding formulas for the reflections and determining if they return us to the original function. Let’s begin with the rule for even functions.

    \[f(−x)=(−x)^3+2(−x)=−x^3−2x \nonumber\]

    This does not return us to the original function, so this function is not even. We can now test the rule for odd functions.

    \[−f(−x)=−(−x^3−2x)=x^3+2x \nonumber\]

    Because \(−f(−x)=f(x)\), this is an odd function.

    Analysis

    Consider the graph of \(f\) in Figure \(\PageIndex{18}\). Notice that the graph is symmetric about the origin. For every point \((x,y)\) on the graph, the corresponding point \((−x,−y)\) is also on the graph. For example, \((1, 3)\) is on the graph of \(f\), and the corresponding point \((−1,−3)\) is also on the graph.

    Graph of \(f(x)\) with labeled points at \((1, 3)\) and \((-1, -3)\)
    Figure \(\PageIndex{18}\): Graph of \(f(x)\) with labeled points at \((1, 3)\) and \((-1, -3)\).

    Graphing Functions Using Stretches and Compressions

    Adding a constant to the inputs or outputs of a function changed the position of a graph with respect to the axes, but it did not affect the shape of a graph. We now explore the effects of multiplying the inputs or outputs by some quantity.

    We can transform the inside (input values) of a function or we can transform the outside (output values) of a function. Each change has a specific effect that can be seen graphically.

    Vertical Stretches and Compressions

    When we multiply a function by a positive constant, we get a function whose graph is stretched or compressed vertically in relation to the graph of the original function. If the constant is greater than 1, we get a vertical stretch; if the constant is between 0 and 1, we get a vertical compression. Figure \(\PageIndex{19}\) shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.

    Graph of a function that shows vertical stretching and compression.
    Figure \(\PageIndex{19}\): Vertical stretch and compression

    Definitions: Vertical Stretches and Compressions

    Given a function \(f(x)\), a new function \(g(x)=af(x)\), where \(a\) is a constant, is a vertical stretch or vertical compression of the function \(f(x)\).

    • If \(a>1\), then the graph will be stretched.
    • If \(0<a<1\), then the graph will be compressed.
    • If \(a<0\), then there will be combination of a vertical stretch or compression with a vertical reflection.

    Example \(\PageIndex{6}\): Graphing a Vertical Stretch

    A function \(P(t)\) models the population of fruit flies. The graph is shown in Figure \(\PageIndex{20}\).

    Graph to represent the growth of the population of fruit flies.
    Figure \(\PageIndex{20}\): Graph to represent the growth of the population of fruit flies.

    A scientist is comparing this population to another population, \(Q\), whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.

    Solution

    Because the population is always twice as large, the new population’s output values are always twice the original function’s output values. Graphically, this is shown in Figure \(\PageIndex{21}\).

    If we choose four reference points, \((0, 1)\), \((3, 3)\), \((6, 2)\) and \((7, 0)\) we will multiply all of the outputs by 2.

    The following shows where the new points for the new graph will be located.

    \[(0, 1)\rightarrow(0, 2)\]

    \[(3, 3)\rightarrow(3, 6)\]

    \[(6, 2)\rightarrow(6, 4)\]

    \[(7, 0)\rightarrow(7, 0)\]

    Graph of the population function doubled.
    Figure \(\PageIndex{21}\): Graph of the population function doubled.

    Symbolically, the relationship is written as

    \[Q(t)=2P(t) \nonumber\]

    This means that for any input \(t\), the value of the function \(Q\) is twice the value of the function \(P\). Notice that the effect on the graph is a vertical stretching of the graph, where every point doubles its distance from the horizontal axis. The input values, \(t\), stay the same while the output values are twice as large as before.

    Example 3.3.7

    Let's look at another function \(y=x(x+3)(x-2)\) and how the graph changes when we multiply each output by \(\frac{1}{2}\)

     

    pic 7.jpg
    Solution

    Because each y-value is only \(\frac{1}{2}\) as big as the original value, the new function's output values are always \(\frac{1}{2}\) the original function’s output values. Graphically, this is shown in Figure \(\PageIndex{22}\).

    You can see the reference points on the graph. Each point has the same x-value but the y-vale on the blue graph is \(\frac{1}{2}\) of the value of the original function.  

     

    pic 8.png

    Horizontal Stretches and Compressions

    Now we consider changes to the inside of a function. When we multiply a function’s input by a positive constant, we get a function whose graph is stretched or compressed horizontally in relation to the graph of the original function. If the constant is between 0 and 1, we get a horizontal stretch; if the constant is greater than 1, we get a horizontal compression of the function.

    Graph of the vertical stretch and compression of x^2.
    Figure \(\PageIndex{23}\): Graph of the vertical stretch and compression of \(x^2\).

    Given a function \(y=f(x)\), the form \(y=f(bx)\) results in a horizontal stretch or compression. Consider the function \(y=x^2\). Observe Figure \(\PageIndex{23}\). The graph of \(y=(0.5x)^2\) is a horizontal stretch of the graph of the function \(y=x^2\) by a factor of 2. The graph of \(y=(2x)^2\) is a horizontal compression of the graph of the function \(y=x^2\) by a factor of 2.

    Definitions: Horizontal Stretches and Compressions

    Given a function \(f(x)\), a new function \(g(x)=f(bx)\), where \(b\) is a constant, is a horizontal stretch or horizontal compression of the function \(f(x)\).

    • If \(b>1\), then the graph will be compressed by \(\frac{1}{b}\).
    • If \(0<b<1\), then the graph will be stretched by \(\frac{1}{b}\).
    • If \(b<0\), then there will be combination of a horizontal stretch or compression with a horizontal reflection.

    Example \(\PageIndex{8}\): Recognizing a Horizontal Compression on a Graph

    Relate the function \(g(x)\) to \(f(x)\) in Figure \(\PageIndex{24}\).

    Graph of \(f(x)\) being vertically compressed to \(g(x)\).
    Figure \(\PageIndex{24}\): Graph of \(f(x)\) being vertically compressed to \(g(x)\).

    Solution

    The graph of \(g(x)\) looks like the graph of \(f(x)\) horizontally compressed. Because \(f(x)\) ends at (6,4) and \(g(x)\) ends at (2,4), we can see that the x-values have been compressed by \(\frac{1}{3}\), because \(6(\frac{1}{3})=2\). We might also notice that \(g(2)=f(6)\) and \(g(1)=f(3)\). Either way, we can describe this relationship as \(g(x)=f(3x)\). This is a horizontal compression by \(\frac{1}{3}\).

    Analysis

    Notice that the coefficient needed for a horizontal stretch or compression is the reciprocal of the stretch or compression. So to stretch the graph horizontally by a scale factor of 4, we need a coefficient of \(\frac{1}{4}\) in our function: \(f(\frac{1}{4}x)\). This means that the input values must be four times larger to produce the same result, requiring the input to be larger, causing the horizontal stretching.

    Example \(\PageIndex{9}\)

    Let's look at another function \(y=x(x+3)(x-2)\) and how the graph changes when we multiply each output by \(\frac{1}{2}\) 

    pic 10.pngFigure \(\PageIndex{25}\): Graph of \(f(x)\) being vertically compressed to \(g(x)\).

    Solution

    The graph of \(g(x)\) looks like the graph of \(f(x)\) horizontally stretched. Notice  \(y\) has x-intercepts at \(-3,0)\) and \((2,0)\) while \(g(x)\) has x-intercepts at \(-6,0)\) and \((2,0)\).  We can see that the x-values have been stretched to a larger number by a factor of (\2\). 

    Horizontal Compression

    Let's look at another function \(y=x(x+3)(x-2)\) and how the graph changes when we multiply each output by \(2\) 

    pic 10.pngFigure \(\PageIndex{26}\): Graph of \(f(x)\) being vertically compressed to \(g(x)\).

    Solution

    The graph of \(g(x)\) looks like the graph of \(f(x)\) horizontally combressed. Notice \(f(x)\) has x-intercepts at \(-3,0)\) and \((2,0)\) while \(g(x)\) has x-intercepts at \(-1.5,0)\) and \((1,0)\).  We can see that the x-values have been reduced to a smaller number by a factor of (\\frac{1}{2}\). 

    Analysis

    Notice that the coefficient needed for a horizontal stretch or compression is the reciprocal of the stretch or compression. So to stretch the graph horizontally by a scale factor of 4, we need a coefficient of \(\frac{1}{4}\) in our function: \(f(\frac{1}{4}x)\). This means that the input values must be four times larger to produce the same result, requiring the input to be larger, causing the horizontal stretching

    Key Concepts

    • Vertical shift \(g(x)=f(x)+k\) (up for \(k>0\))
    • Horizontal shift \(g(x)=f(x−h)\)(right) for \(h>0\)
    • Vertical reflection \(g(x)=−f(x)\)
    • Horizontal reflection \(g(x)=f(−x)\)
    • Vertical stretch \(g(x)=af(x)\) (a>0 )
    • Vertical compression \(g(x)=af(x)\) (0<a<1)
    • Horizontal stretch \(g(x)=f(bx)(0<b<1)\)
    • Horizontal compression \(g(x)=f(bx)\) (b>1)
    • A function can be shifted vertically by adding a constant to the output.
    • A function can be shifted horizontally by adding a constant to the input.
    • Relating the shift to the context of a problem makes it possible to compare and interpret vertical and horizontal shifts.
    • Vertical and horizontal shifts are often combined.
    • A vertical reflection reflects a graph about the x-axis. A graph can be reflected vertically by multiplying the output by –1.
    • A horizontal reflection reflects a graph about the y-axis. A graph can be reflected horizontally by multiplying the input by –1.
    • A graph can be reflected both vertically and horizontally. The order in which the reflections are applied does not affect the final graph.
    • A function presented in tabular form can also be reflected by multiplying the values in the input and output rows or columns accordingly.
    • A function presented as an equation can be reflected by applying transformations one at a time.
    • Even functions are symmetric about the y-axis, whereas odd functions are symmetric about the origin.
    • Even functions satisfy the condition \(f(x)=f(−x)\).
    • Odd functions satisfy the condition \(f(x)=−f(−x)\).
    • A function can be odd, even, or neither.
    • A function can be compressed or stretched vertically by multiplying the output by a constant.
    • A function can be compressed or stretched horizontally by multiplying the input by a constant.

    This page titled 3.3: Graph Polynomials with Transformations is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax.