¶¡ÏãÔ°AV

Skip to main content

Section 2.2 Symmetry, Transformations and Compositions

Subsection 2.2.1 Symmetry

When graphing functions, we can sometimes make use of their inherit symmetry with respect to the coordinate axes to ease geometric interpretation. Not all functions exhibit symmetry, but for those that do, we differentiate between even and odd symmetry as defined below.

Definition 2.9. Function Symmetry.
A function \(y=f(x)\) is called: even if \(f(x)=f(-x)\text{,}\) and
odd if \(f(x)=-f(-x)\text{,}\) and
neither otherwise.

Note:

  1. The graph of an even function stays the same when reflected in the \(y\)-axis. Examples of such functions are \(f(x) = |x|\text{,}\) \(g(x)=\cos(x)\) and \(h(x)=x^2\) as shown in ¹ó¾±²µ³Ü°ù±ðÌý2.2.

  2. The graph of an odd function stays the same when reflected in the \(x\)-axis and the \(y\)-axis, or alternatively, rotated by 180\(^{\circ}\) around the origin. Examples of such functions are \(f(x)=1/x\text{,}\) \(g(x)=\sin(x)\text{,}\) and \(h(x)=x^3\) as shown in ¹ó¾±²µ³Ü°ù±ðÌý2.3.

Figure 2.2. Examples of even functions.
Figure 2.3. Examples of odd functions.

Subsection 2.2.2 Transformations

Transformations are operations we can apply to a function in order to obtain a new function. The most common transformations include translations (shifts), stretches and reflections. We summarize these below.

\begin{equation*} \begin{array}{lllll} \mbox{Function} \amp \qquad\amp \mbox{Conditions} \amp \qquad\amp \mbox{How to graph given the graph of } \\ \hline F(x)=f(x)+c\amp \qquad\amp c>0\amp \qquad\amp \mbox{Shift upwards by units} \\ F(x)=f(x)-c\amp \qquad\amp c>0\amp \qquad\amp \mbox{Shift downwards by units} \\ F(x)=f(x+c)\amp \qquad\amp c>0\amp \qquad\amp \mbox{Shift to the left by units} \\ F(x)=f(x-c)\amp \qquad\amp c>0\amp \qquad\amp \mbox{Shift to the right by units} \\ F(x)=-f(x)\amp \qquad\amp ~\amp \qquad\amp \mbox{Reflect about the -axis} \\ F(x)=f(-x)\amp \qquad\amp ~\amp \qquad\amp \mbox{Reflect about the -axis} \\ F(x)=|f(x)|\amp \qquad\amp ~\amp \qquad\amp \mbox{Take the part of the graph of that lies} \\ ~\amp \qquad\amp ~\amp \qquad\amp \mbox{below the -axis and reflect it about the -axis} \end{array} \end{equation*}

For horizontal and vertical stretches, different resources use different terminology and notation. Use the one you are most comfortable with! Below, both \(a,b\) are positive numbers. Note that we only use the term stretch in this case:

\begin{equation*} \begin{array}{lllll} \mbox{Function} \amp \qquad\amp \mbox{Conditions} \amp \qquad\amp \mbox{How to graph given the graph of } \\ \hline F(x)=af(x)\amp \qquad\amp a>0\amp \qquad\amp \mbox{Stretch vertically by a factor of } \\ F(x)=f(bx)\amp \qquad\amp b>0\amp \qquad\amp \mbox{Stretch horizontally by a factor of } \end{array} \end{equation*}

In the next case, we use both the terms stretch and shrink. We also split up vertical stretches into two cases (\(0\lt a\lt 1\) and \(a>1\)), and split up horizontal stretches into two cases (\(0\lt b\lt 1\) and \(b>1\)). Note that having \(0\lt a\lt 1\) is the same as having \(1/c\) with \(c>1\text{.}\) Also note that stretching by a factor of \(1/c\) is the same as shrinking by a factor \(c\).

\begin{equation*} \begin{array}{lllll} \mbox{Function} \amp \qquad\amp \mbox{Conditions} \amp \qquad\amp \mbox{How to graph given the graph of } \\ \hline F(x)=cf(x)\amp \qquad\amp c>1\amp \qquad\amp \mbox{Stretch vertically by a factor of } \\ F(x)=(1/c)f(x)\amp \qquad\amp c>1\amp \qquad\amp \mbox{Shrink vertically by a factor of } \\ F(x)=f(cx)\amp \qquad\amp c>1\amp \qquad\amp \mbox{Shrink horizontally by a factor of } \\ F(x)=f(x/c)\amp \qquad\amp c>1\amp \qquad\amp \mbox{Stretch horizontally by a factor of } \end{array} \end{equation*}

Some resources keep the condition \(0\lt c\lt 1\) rather than using \(1/c\text{.}\) This is illustrated in the next table.

\begin{equation*} \begin{array}{lllll} \mbox{Function} \amp \qquad\amp \mbox{Conditions} \amp \qquad\amp \mbox{How to graph given the graph of } \\ \hline F(x)=df(x)\amp \qquad\amp d>1\amp \qquad\amp \mbox{Stretch vertically by a factor of } \\ F(x)=df(x)\amp \qquad\amp 0\lt d\lt 1\amp \qquad\amp \mbox{Shrink vertically by a factor of } \\ F(x)=f(dx)\amp \qquad\amp d>1\amp \qquad\amp \mbox{Shrink horizontally by a factor of } \\ F(x)=f(dx)\amp \qquad\amp 0\lt d\lt 1\amp \qquad\amp \mbox{Stretch horizontally by a factor of } \end{array} \end{equation*}

Interactive Demonstration. Investigate the transformations \(y = Af(B(x-C))+D \) with the graph of \(f(x) = x^2 \) below:

Example 2.10. Transformations and Graph Sketching.

In this example we will use appropriate transformations to sketch the graph of the function

\begin{equation*} y=|\sqrt{x+2}-1|-1 \end{equation*}
Solution

We start with the graph of a function we know how to sketch, in particular, \(y=\sqrt{x}\text{:}\) To obtain the graph of the function \(y=\sqrt{x+2}\) from the graph \(y=\sqrt{x}\text{,}\) we must shift \(y=\sqrt{x}\) to the left by \(2\) units. To obtain the graph of the function \(y=\sqrt{x+2}-1\) from the graph \(y=\sqrt{x+2}\text{,}\) we must shift \(y=\sqrt{x+2}\) downwards by \(1\) unit.

To obtain the graph of the function \(y=|\sqrt{x+2}-1|\) from the graph \(y=\sqrt{x+2}-1\text{,}\) we must take the part of the graph of \(y=\sqrt{x+2}-1\) that lies below the \(x\)-axis and reflect it (upwards) about the \(x\)-axis. Finally, to obtain the graph of the function \(y=|\sqrt{x+2}-1|-1\) from the graph \(y=|\sqrt{x+2}-1|\text{,}\) we must shift \(y=|\sqrt{x+2}-1|\) downwards by \(1\) unit:

Subsection 2.2.3 Combining Two Functions

Let \(f\) and \(g\) be two functions. Then we can form new functions by adding, subtracting, multiplying, or dividing. These new functions, \(f+g\text{,}\) \(f-g\text{,}\) \(fg\) and \(f/g\text{,}\) are defined in the usual way.

Operations on Functions.
\begin{equation*} (f+g)(x)=f(x)+g(x)\qquad \qquad (f-g)(x)=f(x)-g(x) \end{equation*}
\begin{equation*} (fg)(x)=f(x)g(x)\qquad \qquad \left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)} \end{equation*}

Suppose \(D_f\) is the domain of \(f\) and \(D_g\) is the domain of \(g\text{.}\) Then the domains of \(f+g\text{,}\) \(f-g\) and \(fg\) are the same and are equal to the intersection \(D_f\cap D_g\) (that is, everything that is in common to both the domain of \(f\) and the domain of \(g\)). Since division by zero is not allowed, the domain of \(f/g\) is \(\{x\in D_f\cap D_g:g(x)\neq 0\}\text{.}\)

Another way to combine two functions \(f\) and \(g\) together is a procedure called composition.

Function Composition.

Given two functions \(f\) and \(g\text{,}\) the composition of \(f\) and \(g\text{,}\) denoted by \(f\circ g\text{,}\) is defined as:

\begin{equation*} (f\circ g)(x)=f(g(x))\text{.} \end{equation*}

The domain of \(f\circ g\) is \(\{x\in D_g:g(x)\in D_f\}\text{,}\) that is, it contains all values \(x\) in the domain of \(g\) such that \(g(x)\) is in the domain of \(f\text{.}\)

Example 2.11. Domain of a Composition.

Let \(f(x)=x^2\) and \(g(x)=\sqrt x\text{.}\) Find the domain of \(f\circ g\text{.}\)

Solution

The domain of \(f\) is \(D_f=\{x\in\R\}\text{.}\) The domain of \(g\) is \(D_g=\{x\in\R:x\geq 0\}\text{.}\) The function \((f\circ g)(x)=f(g(x))\) is:

\begin{equation*} f(g(x))=\left(\sqrt x\right)^2=x\text{.} \end{equation*}

Typically, \(h(x)=x\) would have a domain of \(\{x\in\R\}\text{,}\) but since it came from a composed function, we must consider \(g(x)\) when looking at the domain of \(f(g(x))\text{.}\) Thus, the domain of \(f\circ g\) is \(\{x\in\R:x\geq 0\}\text{.}\)

Example 2.12. Combining Two Functions.

Let \(f(x)=x^2+3\) and \(g(x)=x-2\text{.}\) Find \(f+g\text{,}\) \(f-g\text{,}\) \(fg\text{,}\) \(f/g\text{,}\) \(f\circ g\) and \(g\circ f\text{.}\) Also, determine the domains of these new functions.

Solution

For \(f+g\) we have:

\begin{equation*} \begin{split} (f+g)(x)\amp =f(x)+g(x)\\ \amp=(x^2+3)+(x-2)\\ \amp =x^2+x+1 \end{split} \end{equation*}

For \(f-g\) we have:

\begin{equation*} \begin{split} (f-g)(x)\amp =f(x)-g(x)\\ \amp =(x^2+3)-(x-2)\\ \amp=x^2+3-x+2\\ \amp=x^2-x+5 \end{split} \end{equation*}

For \(fg\) we have:

\begin{equation*} \begin{split} (fg)(x)\amp=f(x)\cdot g(x)\\ \amp=(x^2+3)(x-2)\\ \amp=x^3-2x^2+3x-6 \end{split} \end{equation*}

For \(f/g\) we have:

\begin{equation*} \left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)}=\frac{x^2+3}{x-2} \end{equation*}

For \(f\circ g\) we have:

\begin{equation*} \begin{split} (f\circ g)(x)\amp=f(g(x))\\ \amp=f(x-2)\\ \amp=(x-2)^2+3\\ \amp=x^2-4x+7 \end{split} \end{equation*}

For \(g\circ f\) we have:

\begin{equation*} \begin{split} (g\circ f)(x)\amp=g(f(x))\\ \amp=g(x^2+3)\\ \amp=(x^2+3)-2\\ \amp=x^2+1 \end{split} \end{equation*}

The domains of \(f+g\text{,}\) \(f-g\text{,}\) \(fg\text{,}\) \(f\circ g\) and \(g\circ f\) is \(\{x\in\mathbb{R}\}\text{,}\) while the domain of \(f/g\) is \(\{x\in\mathbb{R}\,:\,x\neq 2\}\text{.}\)

As in the above problem, \(f\circ g\) and \(g\circ f\) are generally different functions.

Exercises for Section 2.2.

Starting with the graph of \(\ds y=\sqrt{x}\text{,}\) the graph of \(\ds y=1/x\text{,}\) and the graph of \(\ds y=\sqrt{1-x^2}\) (the upper unit semicircle), sketch the graph of each of the following functions:

  1. \(\ds f(x)=\sqrt{x-2}\)

  2. \(\ds f(x)=-1-1/(x+2)\)

  3. \(\ds f(x)=4+\sqrt{x+2}\)

    Solution

    Starting with the graph of \(\sqrt{x}\text{,}\) we obtain the graph of \(\sqrt{x+2}\) by translating horizontally 2 units to the left:

    \end{adjustbox} Finally, we translate the graph of \(\sqrt{x+2}\) vertically up by 4 units to obtain the graph of \(f(x)=4+\sqrt{x+2}\text{:}\)

  4. \(\ds y=f(x)=x/(1-x)\)

  5. \(\ds y=f(x)=-\sqrt{-x}\)

  6. \(\ds f(x)=2+\sqrt{1-(x-1)^2}\)

    Solution

    We start with the graph of \(\sqrt{1-x^2}\) (note that the domain is \([-1,1]\)):

    Now translate the graph horizontally by one unit to the right to obtain the graph of \(\sqrt{1-(x-1)^2}\text{:}\)
    Finally, we translate vertically up by 2 units to obtain the graph of \(f(x)=2+\sqrt{1-(x-1)^2}\text{:}\)

  7. \(\ds f(x)=-4+\sqrt{-(x-2)}\)

  8. \(\ds f(x)=2\sqrt{1-(x/3)^2}\)

  9. \(\ds f(x)=1/(x+1)\)

  10. \(\ds f(x)=4+2\sqrt{1-(x-5)^2/9}\)

  11. \(\ds f(x)=1+1/(x-1)\)

    Solution

    The graph of \(\frac{1}{x}\) is shown below:

    From here, we translate horizontally by 1 unit to the right, thereby obtaining the graph of \(\frac{1}{x-1}\text{:}\)
    Lastly, to obtain the graph of \(f(x)=1+\frac{1}{x-1}\text{,}\) we need to translate the graph of \(\frac{1}{x-1}\) vertically up by 1 unit:

  12. \(\ds f(x)=\sqrt{100-25(x-1)^2}+2\)

The graph of \(f(x)\) is shown below. Sketch the graphs of the following functions.

  1. \(\ds y=f(x-1)\)

  2. \(\ds y=1+f(x+2)\)

  3. \(\ds y=1+2f(x)\)

  4. \(\ds y=2f(3x)\)

    Solution

    To obtain the graph of \(f(3x)\text{,}\) we must compress the graph of \(f(x)\) horizontally by a factor of \(\frac{1}{3}\text{.}\)

    Finally, to obtain the graph of \(2f(3x)\text{,}\) we take the graph of \(f(3x)\) and stretch vertically by a factor of 2:

  5. \(\ds y=2f(3(x-2))+1\)

  6. \(\ds y=(1/2)f(3x-3)\)

  7. \(\ds y=f(1+x/3)+2\)

  8. \(\ds y=|f(x)-2|\)

Suppose \(f(x) = 3x-9\) and \(\ds g(x) = \sqrt{x}\text{.}\) What is the domain of the composition \((g\circ f)(x)\text{?}\)

Answer
\(\ds \{x\mid x\ge3\}\)

Let \(f(x) = 2x^{2} - x + 4\text{.}\) Find and simplify

\begin{equation*} \dfrac{f(a+h) - f(a)}{h} \ \ (h \neq 0) \end{equation*}
Answer
\(4a - 2h - 1\)
Solution

We have \(f(x) = 2x^{2} - x + 4\text{.}\) So,

\begin{equation*} \begin{split} \dfrac{f(a+h) - f(a)}{h} \amp = \dfrac{(2(a+h)^{2}-(a+h)+4) - (2a^{2}-a+4)}{h} \\ \amp = \dfrac{2a^{2} + 4ah + 2h^{2} - a - h + 4 -2a^{2} + a - 4}{h} \\ \amp = \dfrac{4ah + 2h^{2} - h}{h} \\ \amp = \dfrac{h(4a + 2h - 1)}{h} \\ \amp = 4a + 2h - 1. \end{split} \end{equation*}

Let \(h(x) = \dfrac{2+x}{\sqrt{x^{2}+4x}}\text{.}\) Find two functions \(f\) and \(g\) (not necessarily unique) such that,

  1. \(h(x) = (f + g)(x)\)

    Answer
    \(f(x) = \dfrac{2}{\sqrt{x^{2}+4x}}\text{,}\) \(g = \dfrac{x}{\sqrt{x^{2}+4x}}\)
  2. \(h(x) = (fg)(x)\)

    Answer
    \(f(x) = 2+x\text{,}\) \(g = \dfrac{1}{\sqrt{x^{2}+4x}}\)
    Solution

    We wish to find two functions, \(f\) and \(g\text{,}\) which satisfy \((fg)(x) = h(x)\text{.}\) Try taking

    \begin{equation*} f(x) = 2 + x \ \ \text{ and } \ \ g(x) = \dfrac{1}{\sqrt{x^{2} + 4x}}\text{.} \end{equation*}

    Then,

    \begin{equation*} fg = (2+x)\left(\dfrac{1}{\sqrt{x^{2} + 4x}}\right) = \dfrac{2+x}{\sqrt{x^{2}+4x}} = h\text{.} \end{equation*}
  3. \(h(x) = (f \circ g)(x)\)

    Answer
    \(f(x) = \dfrac{x}{\sqrt{x^{2}-4}}\text{,}\) \(g = 2+x\)
    Solution

    We wish to find two functions, \(f(x)\) and \(g(x)\text{,}\) such that \(f(g(x)) = h(x) = \dfrac{2+x}{\sqrt{x^2+4x}}\text{.}\) We first notice that we can write

    \begin{equation*} h(x) = \frac{2+x}{\sqrt{x^2+4x}} = \frac{2+x}{\sqrt{(x+2)^2-4}}\text{.} \end{equation*}

    Let \(g(x) = 2+x\text{.}\) Then we need to take \(f(x) = \dfrac{x}{x^2-4}\text{.}\) Thus,

    \begin{equation*} f(g(x)) = f(2+x) = \frac{2+x}{\sqrt{(2+x)^2-4}} = \frac{2+x}{\sqrt{x^2+4x}} = h(x)\text{.} \end{equation*}