Skip to main content
Mathematics LibreTexts

2.7: Composition of functions

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

    Another important combination of functions is illustrated by the following examples. The general picture is that A depends on B, B depends on C, so that A depends on C.

    1. The coyote population is affected by a rabbit virus, Myxomatosis cuniculi. The size of a coyote population depends on the number of rabbits in the system; the rabbits are affected by the virus Myxomatosis cuniculi; the size of the coyote population is a function of the prevalence of Myxomatosis cuniculi in rabbits.
    2. Heart attack incidence is decreased by low fat diets. Heart attacks are initiated by atherosclerosis, a buildup of deposits in the arteries; in people with certain genetic makeups 3, the deposits are decreased with a low fat diet. The risk of heart attacks in some individuals is decreased by low fat diets.
    3. You shiver in a cold environment. You step into a cold environment and cold receptors (temperature sensitive nerves with peak response at 30◦C) send signals to your hypothalamus; the hypothalamus causes signals to be sent to muscles, increasing their tone; once the tone reaches a threshold, rhythmic muscle contractions begin. See Figure 2.13.
    4. Severity of allergenic diseases is increasing. Childhood respiratory infections such as measles, whooping cough, and tuberculosis stimulate a helper T-cell, TH1 activity. Increased TH1 activity inhibits TH2 (another helper T-cell) activity. Absence of childhood respiratory diseases thus releases TH2 activity. But TH2 activity increases immunoglobulin E which is a component of allergenic diseases of asthma, hay fever, and eczema. Thus reducing childhood respiratory infections may partially account for the observed recent increase in severity of allergenic diseases 4.

    Definition 2.7.1 Composition of Functions.

    If F and G are two functions and the domain of F contains part of the range of G, then the composition of F with G is the function, H, defined by

    \[H(x)=F(G(x)) \quad \text { for all } x \text { for which } G(x) \text { is in the domain of } F\]

    The composition, \(H\), is denoted by \(F \circ G\).

    The notation \(F \circ G\) for the composition of \(F\) with \(G\) means that

    \[(F \circ G)(x)=F(G(x))\]

    The parentheses enclosing \(F \circ G\) insures that \(F \circ G\) is thought of as a single object (function). The parentheses usually are omitted and one sees

    \[F \circ G(x)=F(G(x))\]

    Without the parentheses, the novice reader may not know which of the following two ways to group

    \[(F \circ G)(x) \quad \text { or } \quad F \circ(G(x))\]

    The experienced reader knows the right hand way does not have meaning, so the left hand way must be correct.

    In the “shivering example” above, the nerve cells that perceive the low temperature are the function \(G\) and the hypothalamus that sends signals to the muscle is the function \(F\). The net result is that the cold signal increases the muscle tone. This relation may be diagrammed as in Figure 2.7.1. The arrows show the direction of information flow.

     

    2-13.JPG

    Figure \(\PageIndex{1}\): Diagram of the composition of \(F\) – increase of muscle tone by the hypothalamus – with \(G\) – stimulation from nerve cells by cold.

    Formulas for function composition.

    It is helpful to recognize that a complex equation defining a function is a composition of simple parts. For example

    \[H(x)=\sqrt{1-x^{2}}\]

    is the composition of

    \[F(z)=\sqrt{z} \quad \text { and } \quad G(x)=1-x^{2} \quad F(G(x))=\sqrt{1-x^{2}}\]

    The domain of \(G\) is all numbers but the domain of \(F\) is only \(z \geq 0\) and the domain of \(F \circ G\) is only \(−1 \leq x \leq 1\).

    The order of function composition is very important. For

    \[F(z)=\sqrt{z} \quad \text { and } \quad G(x)=1-x^{2}\]

    the composition, \(G \circ F\) is quite different from \(F \circ G\).

    and its graph is a semicircle.

    \[G \circ F(z)=G(F(z))=1-(F(z))^{2}=1-(\sqrt{z})^{2}=1-z\]

    and its graph is part of a line (defined for \(z \geq 0\)).

    Occasionally it is useful to recognize that a function is the composition of three functions, as in

    \[K(x)=\log \left(\sin \left(x^{2}\right)\right)\]

    \(K\) is the composition, \(F \circ G \circ H\) where

    \[F(u)=\log (u) \quad G(v)=\sin (v) \quad H(x)=x^{2}\]

    The composition of \(F\) and \(F^{−1}\). The composition of a function with its inverse is special. The case of \(F(x) = x^2\), \(x \geq 0\) with \(F^{−1} (x) = \sqrt{x}\) is illustrative.

    \[\left(F \circ F^{-1}\right)(x)=F\left(F^{-1}(x)\right)=F(\sqrt{x})=(\sqrt{x})^{2}=x \quad \text { for } \quad x \geq 0\]

    Also

    \[\left(F^{-1} \circ F\right)(x)=F^{-1}(F(x))=F^{-1}\left(x^{2}\right)=\sqrt{x^{2}}=x \quad \text { for } \quad x \geq 0\]

    The identity function \(I\) is defined by

    \[I(x)=x \quad \text { for } x \text { in a domain } D\]

    where the domain \(D\) is adaptable to the problem at hand.

    For \(F(x) = x^2\) and \(F^{-1}(x)=\sqrt{x}, F \circ F^{-1}(x)=F^{-1} \circ F(x)=x=I(x)\) where \(D\) should be \(x \geq 0\). In the next paragraph we show that

    \[F \circ F^{-1}=I \quad \text { and } \quad F^{-1} \circ F=I\]

    for all invertible functions \(F\).

    The ordered pair (\(a, b\)) belongs to \(F^{−1}\) if and only if (\(b, a\)) belongs to \(F\). Then

    \[\left(F \circ F^{-1}\right)(a)=F\left(F^{-1}(a)\right)=F(b)=a \quad \text { and } \quad\left(F^{-1} \circ F\right)(b)=F^{-1}(F(b))=F^{-1}(a)=b\] 

    Always, (F \circ F^{−1} = I\) and with an appropriate domain \(D\) for \(I\). Also \(F^{−1} \circ F = I\) with possibly a different domain \(D\) for \(I\).

    Example 2.7.1 Two properties of the logarithm and exponential functions are

    \[\text{(a)  } \log _{b} b^{\lambda}=\lambda \quad \text{ and } \quad \text{(b)  } u=b^{\log _{b} u}\]

    The logarithm function, \(L(x) = log_{b} (x)\) is the inverse of the exponential function, \(E(x) = b^x\), and the properties simply state that

    \[L \circ E=I \quad \text { and } E \circ L=I\]

    The identity function composes in a special way with other functions.

    \[(F \circ I)(x)=F(I(x))=F(x) \quad \text { and } \quad(I \circ F)(x)=I(F(x))=F(x)\]

    Thus

    \[F \circ I=F \quad \text { and } \quad I \circ F=F\]

    Because 1 in the numbers has the property that

    \[x \times 1=x \quad \text { and } \quad 1 \times x=x\]

    the number 1 is the identity for multiplication. Sometimes \(F \circ G\) is thought of as multiplication also and \(I\) has the property analogous to 1 of the real numbers. Finally the analogy of

    \[x x^{-1}=x \frac{1}{x}=1 \quad \text { with } \quad F \circ F^{-1}=I\]

    suggests a rationale for the symbol \(F^{−1}\) for the inverse of \(F\).

    With respect to function composition \(F \circ G\) as multiplication, recall the example of \(F(x) = \sqrt{x}\) and \(G(x) = 1 − x^2\) in which \(F \circ G\) and \(G \circ F\) were two different functions. Composition of functions is not commutative, a property of real number multiplication that does not extend to function composition.

     

    Exercises for Section 2.7 Composition of functions

    Exercise 2.7.1 Four examples of composition of two biological processes (of two functions) were described at the beginning of this section on page 85. Write another example of the composition of two biological processes.

    Exercise 2.7.2 Put labels on the diagrams in Figure Ex. 2.7.2 to illustrate the dependence of coyote numbers on rabbit Myxomatosis cuniculi and the dependence of the frequency of heart attacks on diet of a population.

    2-7-2.JPG

    Figure for Exercise 2.7.2 Diagrams for Exercise 2.7.2

    Exercise 2.7.3

    1. In Explore 1.5.1 of Section 1.5 on page 25 you measured the area of the mold colony as a function of day. Using the same pictures in Figure 1.5.1, measure the diameters of the mold colony as a function of day and record them in Exercise Table 2.7.3. Remember that grid lines are separated by 2 mm. Then use the formula, \(A = \pi r^2\), for the area of a circle to compute the third column showing area as a function of day.
    2. Determine the dependence of the colony diameter on time.
    3. Use the composition of the relation between the area and diameter of a circle (\(A = \pi r^2\)) with the dependence of the colony diameter on time to describe the dependence of colony area on time.
    Table for Exercise 2.7.3 Table for Exercise 2.7.3
    Mold colony, page 26
    Day Diameter Area
    0    
    1    
    2    
    3    
    4    
    5    
    6    
    7    
    8    
    9    

    Exercise 2.7.4 S. F. Elena, V. S. Cooper, and R. E. Lenski have grown an V. natriegens population for 3000 generations in a constant, nutrient limited environment. They have measured cell size and fitness of cell size and report (Science 272, 1996, 1802-1804) data shown in the graphs below. The thrust of their report is the observed abrupt changes in fitness, supporting the hypothesis of “punctuated evolution.”

    1. Make a table showing cell size as a function of time for generations 0, 100, 200, 300, 400 and 500.
    2. Make a table showing fitness as a function of time for generations 0, 100, 200, 300, 400 and 500.
    3. Are the data consistent with the hypothesis of ‘punctuated equilibrium’?

    2-7-4.JPG

    Exercise 2.7.5 Find functions, \(F(z)\) and \(G(x)\) so that the following functions, \(H\), may be written as \(F(G(x))\).

    1. \(H(x)=\left(1+x^{2}\right)^{3}\)
    2. \(H(x)=10^{\sqrt{x}}\)
    3. \(H(x)=\log \left(2 x^{2}+1\right)\)
    4. \(H(x)=\sqrt{x^{3}+1}\)
    5. \(H(x)=\frac{1-x^{2}}{1+x^{2}}\)
    6. \(H(x)=\log _{2}\left(2^{x}\right)\)

    Exercise 2.7.6 Find functions, \(F(u)\) and \(G(v)\) and \(H(x)\) so that the following functions, \(K\), may be written as \(F(G(H(x)))\).

    1. \(K(x)=\sqrt{1-\sqrt{x}}\)
    2. \(K(x)=\left(1+2^{x}\right)^{3} \quad\)
    3. \(K(x)=\log \left(2 x^{2}+1\right)\)
    4. \(K(x)=\sqrt{x^{3}+1}\)
    5. \(K(x)=\left(1-2^{x}\right)^{3}\)
    6. \(K(x)=\log _{2}\left(1+2^{x}\right)\)

    Exercise 2.7.7 Compute the compositions, f(g(x)), of the following pairs of functions. In each case specify the domain and range of the composite function, and sketch the graph. Your calculator may assist you. For example, the graph of part A can be drawn on the TI-86 calculator with GRAPH , y(x) = , y1 = x^2 , y2 = 1/(1+y1) You may wish to suppress the display of y1 with SELCT in the y(x)= menu.

    1. \(\begin{array}{l}
      f(z)=\frac{1}{1+z} \\
      g(x)=x^{2}
      \end{array}\)
    2. \(\begin{array}{l}
      f(z)=\frac{z}{1+z} \\
      g(x)=\frac{x}{1-x}
      \end{array}\)
    3. \(\begin{array}{l}
      f(z)=5^{z} \\
      g(x)=\log x
      \end{array}\)
    4. \(\begin{array}{l}
      f(z)=\frac{1}{z} \\
      g(x)=1+x^{2}
      \end{array}\)
    5. \(\begin{array}{l}
      f(z)=\frac{z}{1-z} \\
      g(x)=\frac{x}{1+x}
      \end{array}\)
    6. \(\begin{array}{l}
      f(z)=\log z \\
      g(x)=5^{x}
      \end{array}\)
    7. \(\begin{array}{l}
      f(z)=2^{z} \\
      g(x)=-x^{2}
      \end{array}\)
    8. \(\begin{array}{l}
      f(z)=2^{z} \\
      g(x)=-1 / x^{2}
      \end{array}\)
    9. \(\begin{array}{l}
      f(z)=\log z \\
      g(x)=1-x^{2}
      \end{array}\)

    Exercise 2.7.8 For each part, find two pairs, \(F\) and \(G\), so that \(F \circ G\) is \(H\).

    1. \(H(x)=\sqrt{1-\sqrt{x}}\)
    2. \(H(x)=\frac{1}{1-\sqrt{x}}\)
    3. \(H(x)=\left(1+x^{2}\right)^{3}\)
    4. \(H(x)=\left(x^{\left(x^{2}\right)}\right)^{3}\)
    5. \(H(x)=2^{\left(x^{2}\right)}\)
    6. \(H(x)=\left(2^{x}\right) 2\)

    Exercise 2.7.9 Air is flowing into a spherical balloon at the rate of 10 \(cm^{3}/s\). What volume of air is in the balloon t seconds after there was no air in the balloon? The volume of a sphere of radius \(r\) is \(V = \frac{4}{3} \pi r^3\). What will be the radius of the balloon \(t\) seconds after there is no air in the balloon?

    Exercise 2.7.10 Why are all the points of the graph of \(y=\log _{10}(\sin (x))\) on or below the X-axis? Why are there no points of the graph with \(x\)-coordinates between \(\pi\) and \(2 \pi\)?

    Exercise 2.7.11 Technology Draw the graph of the composition of \(F(x) = 10^x\) with \(G(x) = \log _{10} x\). Now draw the graph of the composition of G with F. Explain the difference between the two graphs.

    Exercise 2.7.12 Let \(P(x) = 2x^{3} − 7x^{2} + 5\) and \(Q(x) = x^{2} − x\). Use algebra to compute \(Q(P(x))\). You may conclude (correctly) from this exercise that the composition of two polynomials is always a polynomial.

    Exercise 2.7.13 Shown in Figure 2.7.13 is the graph of a function, G. Sketch the graphs of

    1. \(G_{a}(x)=-3+G(x)\)
    2. \(G_{b}(x)=G((x-3))\)
    3. \(G_{d}(x)=G(2 x)\)
    4. \(G_{e}(x)=5-2 G(x)\)
    5. \(G_{f}(x)=G(2(x-3))\)
    6. \(G_{g}(x)=3+G(2(x-3))\)
    7. \(G_{h}(x)=4+G(x+4)\)

    2-7-13.JPG

    Figure for Exercise 2.7.13 Graph of G for Exercise 2.7.13.

     

    3 see the Web page, http://www.heartdisease.org/Traits.html

    4 Shirakawa, T. et al, Science 275 1997, 77-79.


    2.7: Composition of functions is shared under a CC BY-NC-ND license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?