Function Composition

Key Questions

  • Answer:

    Yes

    Explanation:

    Given composable functions #f#, #g# and #h#

    #(f@(g@h))(x)#

    #= f((g@h)(x)) = f(g(h(x))) = (f@g)(h(x))#

    #= ((f@g)@h)(x)#

    So #f@(g@h) = (f@g)@h#

  • Answer:

    If #g:A->B# and #f:B->C#, then the domain of #f@g# is

    #bar(g)^(-1)@bar(f)^(-1)(C)#

    using the notation described below...

    Explanation:

    If #g# is a function that maps some elements of a set #A# to elements of a set #B#, then the domain of #g# is the subset of #A# for which #g(a)# is defined.

    More formally:

    #g sube A xx B :#

    #AA a in A AA b_1, b_2 in B#

    #((a, b_1) in g ^^ (a, b_2) in g) => b_1 = b_2#

    Use the notation #2^A# to represent the set of subsets of #A# and #2^B# the set of subsets of #B#.

    Then we can define the pre-image function:

    #bar(g)^(-1): 2^B -> 2^A# by #bar(g)^(-1)(B_1) = {a in A : g(a) in B_1}#

    Then the domain of #g# is simply #bar(g)^(-1)(B)#

    If #f# is a function that maps some elements of set #B# to elements of a set #C#, then:

    #bar(f)^(-1): 2^C -> 2^B# is defined by #bar(f)^(-1)(C_1) = {b in B : f(b) in C_1}#

    Using this notation, the domain of #f@g# is simply

    #bar(g)^(-1)(bar(f)^(-1)(C)) = (bar(g)^(-1)@bar(f)^(-1))(C)#

  • To compose a function is to input one function into the other to form a different function. Here's a few examples.

    Example 1: If #f(x) = 2x + 5# and #g(x) = 4x - 1#, determine #f(g(x))#

    This would mean inputting #g(x)# for #x# inside #f(x)#.

    #f(g(x)) = 2(4x- 1) + 5 = 8x- 2 + 5 = 8x + 3#

    Example 2: If #f(x) = 3x^2 + 12 + 12x# and #g(x) =sqrt(3x)#, determine #g(f(x))# and state the domain

    Put #f(x)# into #g(x)#.

    #g(f(x)) = sqrt(3(3x^2 + 12x + 12))#

    #g(f(x)) = sqrt(9x^2 + 36x + 36)#

    #g(f(x)) = sqrt((3x + 6)^2)#

    #g(f(x)) = |3x + 6|#

    The domain of #f(x)# is #x in RR#. The domain of #g(x)# is #x > 0#. Hence, the domain of #g(f(x))# is #x > 0#.

    Example 3: if #h(x) = log_2 (3x^2 + 5)# and #m(x) = sqrt(x + 1)#, find the value of #h(m(0))#?

    Find the composition, and then evaluate at the given point.

    #h(m(x)) = log_2 (3(sqrt(x + 1))^2 + 5)#

    #h(m(x)) = log_2 (3(x + 1) + 5)#

    #h(m(x)) = log_2 (3x + 3 + 5)#

    #h(m(x)) = log_2 (3x + 8)#

    #h(m(2)) = log_2 (3(0) + 8)#

    #h(m(2)) = log_2 8#

    #h(m(2)) = 3#

    Practice exercises

    For the following exercises: #f(x) = 2x + 7, g(x) = 2^(x - 7) and h(x) = 2x^3 - 4#

    a) Determine #f(g(x))#

    b) Determine #h(f(x))#

    c) Determine #g(h(2))#

    Hopefully this helps, and good luck!

Questions