7.1 Composition and Inverse Functions

Learning Objectives

  1. Perform function composition.
  2. Determine whether or not given functions are inverses.
  3. Use the horizontal line test.
  4. Find the inverse of a one-to-one function algebraically.

Composition of Functions

In mathematics, it is often the case that the result of one function is evaluated by applying a second function. For example, consider the functions defined by f(x)=x2 and g(x)=2x+5. First, g is evaluated where x=1 and then the result is squared using the second function, f.

This sequential calculation results in 9. We can streamline this process by creating a new function defined by f(g(x)), which is explicitly obtained by substituting g(x) into f(x).

f(g(x))=f(2x+5)=(2x+5)2=4x2+20x+25

Therefore, f(g(x))=4x2+20x+25 and we can verify that when x=1 the result is 9.

f(g(1))=4(1)2+20(1)+25=420+25=9

The calculation above describes composition of functionsApplying a function to the results of another function., which is indicated using the composition operatorThe open dot used to indicate the function composition (fg)(x)=f(g(x)). (). If given functions f and g,

(fg)(x)=f(g(x))CompositionofFunctions

The notation fg is read, “f composed with g.” This operation is only defined for values, x, in the domain of g such that g(x) is in the domain of f.

Example 1

Given f(x)=x2x+3 and g(x)=2x1 calculate:

  1. (fg)(x).
  2. (gf)(x).

Solution:

  1. Substitute g into f.

    (fg)(x)=f(g(x))=f(2x1)=(2x1)2(2x1)+3=4x24x+12x+1+3=4x26x+5

  2. Substitute f into g.

    (gf)(x)=g(f(x))=g(x2x+3)=2(x2x+3)1=2x22x+61=2x22x+5

Answer:

  1. (fg)(x)=4x26x+5
  2. (gf)(x)=2x22x+5

The previous example shows that composition of functions is not necessarily commutative.

Example 2

Given f(x)=x3+1 and g(x)=3x13 find (fg)(4).

Solution:

Begin by finding (fg)(x).

(fg)(x)=f(g(x))=f(3x13)=(3x13)3+1=3x1+1=3x

Next, substitute 4 in for x.

(fg)(x)=3x(fg)(4)=3(4)=12

Answer: (fg)(4)=12

Functions can be composed with themselves.

Example 3

Given f(x)=x22 find (ff)(x).

Solution:

(ff)(x)=f(f(x))=f(x22)=(x22)22=x44x2+42=x44x2+2

Answer: (ff)(x)=x44x2+2

Try this! Given f(x)=2x+3 and g(x)=x1 find (fg)(5).

Answer: 7

Inverse Functions

Consider the function that converts degrees Fahrenheit to degrees Celsius: C(x)=59(x32). We can use this function to convert 77°F to degrees Celsius as follows.

C(77)=59(7732)=59(45)=25

Therefore, 77°F is equivalent to 25°C. If we wish to convert 25°C back to degrees Fahrenheit we would use the formula: F(x)=95x+32.

F(25)=95(25)+32=45+32=77

Notice that the two functions C and F each reverse the effect of the other.

This describes an inverse relationship. In general, f and g are inverse functions if,

(fg)(x)=f(g(x))=x  forallxinthedomainofgand(gf)(x)=g(f(x))=xforallxinthedomainoff.

In this example,

C(F(25))=C(77)=25F(C(77))=F(25)=77

Example 4

Verify algebraically that the functions defined by f(x)=12x5 and g(x)=2x+10 are inverses.

Solution:

Compose the functions both ways and verify that the result is x.

(fg)(x)=f(g(x))=f(2x+10)=12(2x+10)5=x+55=x

(gf)(x)=g(f(x))=g(12x5)=2(12x5)+10=x10+10=x

Answer: Both (fg)(x)=(gf)(x)=x; therefore, they are inverses.

Next we explore the geometry associated with inverse functions. The graphs of both functions in the previous example are provided on the same set of axes below.

Note that there is symmetry about the line y=x; the graphs of f and g are mirror images about this line. Also notice that the point (20, 5) is on the graph of f and that (5, 20) is on the graph of g. Both of these observations are true in general and we have the following properties of inverse functions:

  1. The graphs of inverse functions are symmetric about the line y=x.
  2. If (a,b) is on the graph of a function, then (b,a) is on the graph of its inverse.

Furthermore, if g is the inverse of f we use the notation g=f1. Here f1 is read, “f inverse,” and should not be confused with negative exponents. In other words, f1(x)1f(x) and we have,

(ff1)(x)=f(f1(x))=xand(f1f)(x)=f1(f(x))=x

Example 5

Verify algebraically that the functions defined by f(x)=1x2 and f1(x)=1x+2 are inverses.

Solution:

Compose the functions both ways to verify that the result is x.

(ff1)(x)=f(f1(x))=f(1x+2)=1(1x+2)2=x+212=x+22=x

(f1f)(x)=f1(f(x))=f1(1x2)=1(1x2)+2=11x=x

Answer: Since (ff1)(x)=(f1f)(x)=x they are inverses.

Recall that a function is a relation where each element in the domain corresponds to exactly one element in the range. We use the vertical line test to determine if a graph represents a function or not. Functions can be further classified using an inverse relationship. One-to-one functionsFunctions where each value in the range corresponds to exactly one value in the domain. are functions where each value in the range corresponds to exactly one element in the domain. The horizontal line testIf a horizontal line intersects the graph of a function more than once, then it is not one-to-one. is used to determine whether or not a graph represents a one-to-one function. If a horizontal line intersects a graph more than once, then it does not represent a one-to-one function.

The horizontal line represents a value in the range and the number of intersections with the graph represents the number of values it corresponds to in the domain. The function defined by f(x)=x3 is one-to-one and the function defined by f(x)=|x| is not. Determining whether or not a function is one-to-one is important because a function has an inverse if and only if it is one-to-one. In other words, a function has an inverse if it passes the horizontal line test.

Note: In this text, when we say “a function has an inverse,” we mean that there is another function, f1, such that (ff1)(x)=(f1f)(x)=x.

Example 6

Determine whether or not the given function is one-to-one.

Solution:

Answer: The given function passes the horizontal line test and thus is one-to-one.

In fact, any linear function of the form f(x)=mx+b where m0, is one-to-one and thus has an inverse. The steps for finding the inverse of a one-to-one function are outlined in the following example.

Example 7

Find the inverse of the function defined by f(x)=32x5.

Solution:

Before beginning this process, you should verify that the function is one-to-one. In this case, we have a linear function where m0 and thus it is one-to-one.

  • Step 1: Replace the function notation f(x) with y.

    f(x)=32x5y=32x5

  • Step 2: Interchange x and y. We use the fact that if (x,y) is a point on the graph of a function, then (y,x) is a point on the graph of its inverse.

    x=32y5

  • Step 3: Solve for y.

    x=32y5x+5=32y23(x+5)=2332y23x+103=y

  • Step 4: The resulting function is the inverse of f. Replace y with f1(x).

    f1(x)=23x+103

  • Step 5: Check.

    (ff1)(x)=f(f1(x))=f(23x+103)=32(23x+103)5=x+55=x

    (f1f)(x)=f1(f(x))=f1(32x5)=23(32x5)+103=x103+103=x

Answer: f1(x)=23x+103

If a function is not one-to-one, it is often the case that we can restrict the domain in such a way that the resulting graph is one-to-one. For example, consider the squaring function shifted up one unit, g(x)=x2+1. Note that it does not pass the horizontal line test and thus is not one-to-one. However, if we restrict the domain to nonnegative values, x0, then the graph does pass the horizontal line test.

On the restricted domain, g is one-to-one and we can find its inverse.

Example 8

Find the inverse of the function defined by g(x)=x2+1 where x0.

Solution:

Begin by replacing the function notation g(x) with y.

g(x)=x2+1y=x2+1wherex0

Interchange x and y.

x=y2+1wherey0

Solve for y.

x=y2+1x1=y2±x1=y

Since y0 we only consider the positive result.

y=x1g1(x)=x1

Answer: g1(x)=x1. The check is left to the reader.

The graphs in the previous example are shown on the same set of axes below. Take note of the symmetry about the line y=x.

Example 9

Find the inverse of the function defined by f(x)=2x+1x3.

Solution:

Use a graphing utility to verify that this function is one-to-one. Begin by replacing the function notation f(x) with y.

f(x)=2x+1x3y=2x+1x3

Interchange x and y.

x=2y+1y3

Solve for y.

x=2y+1y3x(y3)=2y+1xy3x=2y+1

Obtain all terms with the variable y on one side of the equation and everything else on the other. This will enable us to treat y as a GCF.

xy3x=2y+1xy2y=3x+1y(x2)=3x+1y=3x+1x2

Answer: f1(x)=3x+1x2. The check is left to the reader.

Try this! Find the inverse of f(x)=x+133.

Answer: f1(x)=(x+3)31

Key Takeaways

  • The composition operator () indicates that we should substitute one function into another. In other words, (fg)(x)=f(g(x)) indicates that we substitute g(x) into f(x).
  • If two functions are inverses, then each will reverse the effect of the other. Using notation, (fg)(x)=f(g(x))=x and (gf)(x)=g(f(x))=x.
  • Inverse functions have special notation. If g is the inverse of f, then we can write g(x)=f1(x). This notation is often confused with negative exponents and does not equal one divided by f(x).
  • The graphs of inverses are symmetric about the line y=x. If (a,b) is a point on the graph of a function, then (b,a) is a point on the graph of its inverse.
  • If each point in the range of a function corresponds to exactly one value in the domain then the function is one-to-one. Use the horizontal line test to determine whether or not a function is one-to-one.
  • A one-to-one function has an inverse, which can often be found by interchanging x and y, and solving for y. This new function is the inverse of the original function.

Topic Exercises

    Part A: Composition of Functions

      Given the functions defined by f and g find (fg)(x) and (gf)(x).

    1. f(x)=4x1, g(x)=3x

    2. f(x)=2x+5, g(x)=2x

    3. f(x)=3x5, g(x)=x4

    4. f(x)=5x+1, g(x)=2x3

    5. f(x)=x2x+1, g(x)=2x1

    6. f(x)=x23x2, g(x)=x2

    7. f(x)=x2+3, g(x)=x25

    8. f(x)=2x2, g(x)=x2x

    9. f(x)=8x3+5, g(x)=x53

    10. f(x)=27x31, g(x)=x+13

    11. f(x)=1x+5, g(x)=1x

    12. f(x)=1x3, g(x)=3x+3

    13. f(x)=5x, g(x)=3x2

    14. f(x)=2x, g(x)=4x+1

    15. f(x)=12x, g(x)=x2+8

    16. f(x)=2x1, g(x)=1x+1

    17. f(x)=1x2x, g(x)=12x+1

    18. f(x)=2xx+1, g(x)=x+1x

      Given the functions defined by f(x)=3x22, g(x)=5x+1, and h(x)=x, calculate the following.

    1. (fg)(2)

    2. (gf)(1)

    3. (gf)(0)

    4. (fg)(0)

    5. (fh)(3)

    6. (gh)(16)

    7. (hg)(35)

    8. (hf)(3)

      Given the functions defined by f(x)=x+33, g(x)=8x33, and h(x)=2x1, calculate the following.

    1. (fg)(1)

    2. (gf)(2)

    3. (gf)(0)

    4. (fg)(2)

    5. (fh)(1)

    6. (hg)(12)
    7. (hf)(24)

    8. (gh)(0)

      Given the function, determine (ff)(x).

    1. f(x)=3x1

    2. f(x)=25x+1

    3. f(x)=x2+5

    4. f(x)=x2x+6

    5. f(x)=x3+2

    6. f(x)=x3x

    7. f(x)=1x+1

    8. f(x)=x+12x

    Part B: Inverse Functions

      Are the given functions one-to-one? Explain.

    1. f(x)=x+1

    2. g(x)=x2+1

    3. h(x)=|x|+1

    4. r(x)=x3+1

    5. f(x)=x+1

    6. g(x)=3

      Given the graph of a one-to-one function, graph its inverse.

      Verify algebraically that the two given functions are inverses. In other words, show that (ff1)(x)=x and (f1f)(x)=x.

    1. f(x)=3x4, f1(x)=x+43

    2. f(x)=5x+1, f1(x)=1x5

    3. f(x)=23x+1, f1(x)=32x+32

    4. f(x)=4x13, f1(x)=14x+112

    5. f(x)=x8, f1(x)=x2+8, x0

    6. f(x)=6x33, f1(x)=(x+3)36

    7. f(x)=xx+1, f1(x)=x1x

    8. f(x)=x33x, f1(x)=313x

    9. f(x)=2(x1)3+3, f1(x)=1+x323

    10. f(x)=5x13+4, f1(x)=(x4)3+15

      Find the inverses of the following functions.

    1. f(x)=5x

    2. f(x)=12x

    3. f(x)=2x+5

    4. f(x)=4x+3

    5. f(x)=23x+13

    6. f(x)=12x+34

    7. g(x)=x2+5, x0

    8. g(x)=x27, x0

    9. f(x)=(x5)2, x5

    10. f(x)=(x+1)2, x1

    11. h(x)=3x3+5

    12. h(x)=2x31

    13. f(x)=(2x3)3

    14. f(x)=(x+4)31

    15. g(x)=2x3+1
    16. g(x)=1x32
    17. f(x)=5x+1
    18. f(x)=12x9
    19. f(x)=x+5x5
    20. f(x)=3x42x1
    21. h(x)=x510x
    22. h(x)=9x+13x
    23. g(x)=5x+23

    24. g(x)=4x33

    25. f(x)=x634

    26. f(x)=2x+23+5

    27. h(x)=x+153

    28. h(x)=x85+1

    29. f(x)=mx+b, m0

    30. f(x)=ax2+c, x0

    31. f(x)=ax3+d

    32. f(x)=a(xh)2+k, xh

      Graph the function and its inverse on the same set of axes.

    1. f(x)=x+2

    2. f(x)=23x4

    3. f(x)=2x+2

    4. f(x)=13x+4

    5. g(x)=x22, x0

    6. g(x)=(x2)2, x2

    7. h(x)=x3+1

    8. h(x)=(x+2)32

    9. f(x)=2x

    10. f(x)=x+1

    Part C: Discussion Board

    1. Is composition of functions associative? Explain.

    2. Explain why C(x)=59(x32) and F(x)=95x+32 define inverse functions. Prove it algebraically.

    3. Do the graphs of all straight lines represent one-to-one functions? Explain.

    4. If the graphs of inverse functions intersect, then how can we find the point of intersection? Explain.

Answers

  1. (fg)(x)=12x1; (gf)(x)=12x3

  2. (fg)(x)=3x17; (gf)(x)=3x9

  3. (fg)(x)=4x26x+3; (gf)(x)=2x22x+1

  4. (fg)(x)=x410x2+28; (gf)(x)=x4+6x2+4

  5. (fg)(x)=8x35; (gf)(x)=2x

  6. (fg)(x)=x5x+1; (gf)(x)=x+5

  7. (fg)(x)=53x2; (gf)(x)=15x2

  8. (fg)(x)=12x2+16; (gf)(x)=1+32x24x2
  9. (fg)(x)=x; (gf)(x)=x

  10. 361

  11. −9

  12. 7

  13. 2

  14. 2

  15. 21

  16. 0

  17. 5

  18. (ff)(x)=9x4

  19. (ff)(x)=x4+10x2+30

  20. (ff)(x)=x9+6x6+12x3+10

  21. (ff)(x)=x+1x+2

  1. No, fails the HLT

  2. Yes, passes the HLT

  3. Yes, its graph passes the HLT.

  4. No, its graph fails the HLT.

  5. Yes, its graph passes the HLT.

  6. Proof

  7. Proof

  8. Proof

  9. Proof

  10. Proof

  11. f1(x)=x5

  12. f1(x)=12x52
  13. f1(x)=32x+12
  14. g1(x)=x5

  15. f1(x)=x+5

  16. h1(x)=x533
  17. f1(x)=x3+32
  18. g1(x)=2xx3
  19. f1(x)=5xx
  20. f1(x)=5(x+1)x1
  21. h1(x)=510x1
  22. g1(x)=x325
  23. f1(x)=(x+4)3+6

  24. h1(x)=(x+3)51

  25. f1(x)=xbm
  26. f1(x)=xda3
  1. Answer may vary

  2. Answer may vary