Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

10.2: Finding Composite and Inverse Functions

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives

By the end of this section, you will be able to:

  • Find and evaluate composite functions
  • Determine whether a function is one-to-one
  • Find the inverse of a function

Before you get started, take this readiness quiz.

  1. If f(x)=2x3 and g(x)=x2+2x3, find f(4).
    If you missed this problem, review Example 3.48.
  2. Solve for x, 3x+2y=12.
    If you missed this problem, review Example 2.31.
  3. Simplify: 5(x+4)54.
    If you missed this problem, review Example 1.25.

In this chapter, we will introduce two new types of functions, exponential functions and logarithmic functions. These functions are used extensively in business and the sciences as we will see.

Find and Evaluate Composite Functions

Before we introduce the functions, we need to look at another operation on functions called composition. In composition, the output of one function is the input of a second function. For functions f and g, the composition is written fg and is defined by (fg)(x)=f(g(x)).

We read f(g(x)) as “f of g of x.”

This figure shows x as the input to a box denoted as function g with g of x as the output of the box. Then, g of x is the input to a box denoted as function f with f of g of x as the output of the box.
Figure 10.1.1

To do a composition, the output of the first function, g(x), becomes the input of the second function, f, and so we must be sure that it is part of the domain of f.

Definition 10.2.1

The composition of functions f and g is written fg and is defined by

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

We read f(g(x)) as f of g of x.

We have actually used composition without using the notation many times before. When we graphed quadratic functions using translations, we were composing functions. For example, if we first graphed g(x)=x2 as a parabola and then shifted it down vertically four units, we were using the composition defined by (fg)(x)=f(g(x)) where f(x)=x4.

This figure shows x as the input to a box denoted as g of x equals x squared with x squared as the output of the box. Then, x squared is the input to a box denoted as f of x equals x minus 4 with f of g of x equals x squared minus 4 as the output of the box.
Figure 10.1.2
Example 10.2.1

For functions f(x)=4x5 and g(x)=2x+3, find

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

Solution:

  1. Use the definition of (fg)(x). .
    . .
    . .
    Distribute. .
    Simplify. .
    Table 10.1.1
  2. Use the definition of (fg)(x). .
    . .
    . .
    Distribute. .
    Simplify. .
    Table 10.1.2

Notice the difference in the result in part a. and part b.

c. Notice that (fg)(x) is different than (fg)(x). In part a. we did the composition of the functions. Now in part c. we are not composing them, we are multiplying them.

Use the definition of (fg)(x).

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

Substitute f(x)=4x5 and g(x)=2x+3.

(fg)(x)=(4x5)(2x+3)

Multiply.

(fg)(x)=8x2+2x15

Exercise 10.2.1

For functions f(x)=3x2 and g(x)=5x+1, find

  1. (fg)(x)
  2. (gf)(x)
  3. (fg)(x)
Answer
  1. 15x+1
  2. 15x9
  3. 15x27x2
Exercise 10.2.2

For functions f(x)=4x3, and g(x)=6x5, find

  1. (fg)(x)
  2. (gf)(x)
  3. (fg)(x)
Answer
  1. 24x23
  2. 24x23
  3. 24x238x+15

In the next example we will evaluate a composition for a specific value.

Example 10.2.2

For functions f(x)=x24, and g(x)=3x+2, find:

  1. (fg)(3)
  2. (gf)(1)
  3. (ff)(2)

Solution:

  1. Use the definition of (fg)(3). .
    . .
    Simplify. .
    . .
    Simplify. .
    Table 10.1.3
  2. Use the definition of (gf)(1). .
    . .
    Simplify. .
    . .
    Simplify. .
    Table 10.1.4
  3. Use the definition of (ff)(2). .
    . .
    Simplify. .
    . .
    Simplify. .
    Table 10.1.5
Exercise 10.2.3

For functions f(x)=x29, and g(x)=2x+5, find

  1. (fg)(2)
  2. (gf)(3)
  3. (ff)(4)
Answer
  1. 8
  2. 5
  3. 40
Exercise 10.2.4

For functions f(x)=x2+1, and g(x)=3x5, find

  1. (fg)(1)
  2. (gf)(2)
  3. (ff)(1)
Answer
  1. 65
  2. 10
  3. 5

Determine Whether a Function is One-to-One

When we first introduced functions, we said a function is a relation that assigns to each element in its domain exactly one element in the range. For each ordered pair in the relation, each x-value is matched with only one y-value.

We used the birthday example to help us understand the definition. Every person has a birthday, but no one has two birthdays and it is okay for two people to share a birthday. Since each person has exactly one birthday, that relation is a function.

This figure shows two tables. To the left is the table labeled Name, which from top to bottom reads Alison, Penelope, June, Gregory, Geoffrey, Lauren, Stephen, Alice, Liz, and Danny. The table on the right is labeled Birthday, which from top to bottom reads January 12, February 3, April 25, May 10, May 23, July 24, August 2, and September 15. There are arrows going from Alison to April 25, Penelope to May 23, June to August 2, Gregory to September 15, Geoffrey to January 12, Lauren to May 10, Stephen to July 24, Alice to February 3, Liz to July 24, and Danny to no birthday.
Figure 10.1.38

A function is one-to-one if each value in the range has exactly one element in the domain. For each ordered pair in the function, each y-value is matched with only one x-value.

Our example of the birthday relation is not a one-to-one function. Two people can share the same birthday. The range value August 2 is the birthday of Liz and June, and so one range value has two domain values. Therefore, the function is not one-to-one.

Definition 10.2.2

A function is one-to-one if each value in the range corresponds to one element in the domain. For each ordered pair in the function, each y-value is matched with only one x-value. There are no repeated y-values.

Example 10.2.3

For each set of ordered pairs, determine if it represents a function and, if so, if the function is one-to-one.

  1. {(3,27),(2,8),(1,1),(0,0),(1,1),(2,8),(3,27)}
  2. {(0,0),(1,1),(4,2),(9,3),(16,4)}

Solution:

  1. {(3,27),(2,8),(1,1),(0,0),(1,1),(2,8),(3,27)}

    Each x-value is matched with only one y-value. So this relation is a function.

    But each y-value is not paired with only one x-value, (3,27) and (3,27), for example. So this function is not one-to-one.

  2. {(0,0),(1,1),(4,2),(9,3),(16,4)}

    Each x-value is matched with only one y-value. So this relation is a function.

    Since each y-value is paired with only one x-value, this function is one-to-one.

Exercise 10.2.5

For each set of ordered pairs, determine if it represents a function and if so, is the function one-to-one.

  1. {(3,6),(2,4),(1,2),(0,0),(1,2),(2,4),(3,6)}
  2. {(4,8),(2,4),(1,2),(0,0),(1,2),(2,4),(4,8)}
Answer
  1. One-to-one function
  2. Function; not one-to-one
Exercise 10.2.6

For each set of ordered pairs, determine if it represents a function and if so, is the function one-to-one.

  1. {(27,3),(8,2),(1,1),(0,0),(1,1),(8,2),(27,3)}
  2. {(7,3),(5,4),(8,0),(0,0),(6,4),(2,2),(1,3)}
Answer
  1. Not a function
  2. Function; not one-to-one

To help us determine whether a relation is a function, we use the vertical line test. A set of points in a rectangular coordinate system is the graph of a function if every vertical line intersects the graph in at most one point. Also, if any vertical line intersects the graph in more than one point, the graph does not represent a function.

The vertical line is representing an x-value and we check that it intersects the graph in only one y-value. Then it is a function.

To check if a function is one-to-one, we use a similar process. We use a horizontal line and check that each horizontal line intersects the graph in only one point. The horizontal line is representing a y-value and we check that it intersects the graph in only one x-value. If every horizontal line intersects the graph of a function in at most one point, it is a one-to-one function. This is the horizontal line test.

Definition 10.2.3

Horizontal Line Test

If every horizontal line intersects the graph of a function in at most one point, it is a one-to-one function.

We can test whether a graph of a relation is a function by using the vertical line test. We can then tell if the function is one-to-one by applying the horizontal line test.

Example 10.2.4

Determine

  1. whether each graph is the graph of a function and, if so,
  2. whether it is one-to-one
This first graph shows a straight line passing through (0, 2) and (3, 0). This second shows a parabola opening up with vertex at (0, negative 1).
Figure 10.1.39

Solution:


  1. This figure shows a straight line passing through (0, 2) and (3, 0), with a red vertical line that only passes through one point and a blue horizontal line that only passes through one point.
    Figure 10.1.40

Since any vertical line intersects the graph in at most one point, the graph is the graph of a function. Since any horizontal line intersects the graph in at most one point, the graph is the graph of a one-to-one function.

b.

This figure shows a parabola opening up with vertex at (0, negative 1), with a red vertical line that only passes through one point and a blue horizontal line that passes through two points.
Figure 10.1.41

Since any vertical line intersects the graph in at most one point, the graph is the graph of a function. The horizontal line shown on the graph intersects it in two points. This graph does not represent a one-to-one function.

Exercise 10.2.7

Determine

  1. whether each graph is the graph of a function and, if so,
  2. whether it is one-to-one
Graph a shows a parabola opening to the right with vertex at (negative 1, 0). Graph b shows an exponential function that does not cross the x axis and that passes through (0, 1) before increasing rapidly.
Figure 10.1.42
Answer
  1. Not a function
  2. One-to-one function
Exercise 10.2.8

Determine

  1. whether each graph is the graph of a function and, if so,
  2. whether it is one-to-one
Graph a shows a parabola opening up with vertex at (0, 3). Graph b shows a straight line passing through (0, negative 2) and (2, 0).
Figure 10.1.43
Answer
  1. Function; not one-to-one
  2. One-to-one function

Find the Inverse of a Function

Let’s look at a one-to one function, f, represented by the ordered pairs {(0,5),(1,6),(2,7),(3,8)}. For each x-value, f adds 5 to get the y-value. To ‘undo’ the addition of 5, we subtract 5 from each y-value and get back to the original x-value. We can call this “taking the inverse of f” and name the function f1.

This figure shows the set (0, 5), (1, 6), (2, 7) and (3, 8) on the left side of an oval. The oval contains the numbers 0, 1, 2, and 3. There are black arrows from these numbers that point to the numbers 5, 6, 7, and 8, respectively in a second oval to the right of the first. Above this, there is a black arrow labeled “f add 5” coming from the left oval to the right oval. There are red arrows from the numbers 5, 6, 7, and 8 in the right oval to the numbers 0, 1, 2, and 3, respectively, in the left oval. Below this, we have a red arrow labeled “f with a superscript negative 1” and “subtract 5”. To the right of this, we have the set (5, 0), (6, 1), (7, 2) and (8, 3).
Figure 10.1.44

Notice that that the ordered pairs of f and f1 have their x-values and y-values reversed. The domain of f is the range of f1 and the domain of f1 is the range of f.

Definition 10.2.4

Inverse of a Function Defined by Ordered Pairs

If f(x) is a one-to-one function whose ordered pairs are of the form (x,y), then its inverse function f1(x) is the set of ordered pairs (y,x).

In the next example we will find the inverse of a function defined by ordered pairs.

Example 10.2.5

Find the inverse of the function {(0,3),(1,5),(2,7),(3,9)}. Determine the domain and range of the inverse function.

Solution:

This function is one-to-one since every x-value is paired with exactly one y-value.

To find the inverse we reverse the x-values and y-values in the ordered pairs of the function.

Function{(0,3),(1,5),(2,7),(3,9)}Inverse Function{(3,0),(5,1),(7,2),(9,3)}Domain of Inverse Function{3,5,7,9}Range of Inverse Function{0,1,2,3}

Exercise 10.2.9

Find the inverse of {(0,4),(1,7),(2,10),(3,13)}. Determine the domain and range of the inverse function.

Answer

Inverse function: {(4,0),(7,1),(10,2),(13,3)}. Domain: {4,7,10,13}. Range: {0,1,2,3}.

Exercise 10.2.10

Find the inverse of {(1,4),(2,1),(3,0),(4,2)}. Determine the domain and range of the inverse function.

Answer

Inverse function: {(4,1),(1,2),(0,3),(2,4)}. Domain: {0,1,2,4}. Range: {4,3,2,1}.

We just noted that if f(x) is a one-to-one function whose ordered pairs are of the form (x,y), then its inverse function f1(x) is the set of ordered pairs (y,x).

So if a point (a,b) is on the graph of a function f(x), then the ordered pair (b,a) is on the graph of f1(x). See Figure 10.1.43.

This figure shows the line y equals x with points (3,1) and (1,3) on either side of the line. These two points are connected by a dashed blue line segment.
Figure 10.1.45

The distance between any two pairs (a,b) and (b,a) is cut in half by the line y=x. So we say the points are mirror images of each other through the line y=x.

Since every point on the graph of a function f(x) is a mirror image of a point on the graph of f1(x), we say the graphs are mirror images of each other through the line y=x. We will use this concept to graph the inverse of a function in the next example.

Example 10.2.6

Graph, on the same coordinate system, the inverse of the one-to one function shown.

This figure shows a line from (negative 5, negative 3) to (negative 3, negative 1) then to (negative 1,0) then to (0,2) and then to (3, 4).
Figure 10.1.46

Solution:

We can use points on the graph to find points on the inverse graph. Some points on the graph are: (5,3),(3,1),(1,0),(0,2),(3,4).

So, the inverse function will contain the points: (3,5),(1,3),(0,1),(2,0),(4,3).

This figure shows a line from (negative 5, negative 3) to (negative 3, negative 1) then to (negative 1, 0) then to (0,2) and then to (3, 4). Then there is a dashed line to denote y equals x. There is also a line from (negative 3, negative 5) to (negative 1, negative 3) then to (0, negative 1), then to (2, 0) and then to (4, 3).
Figure 10.1.47

Notice how the graph of the original function and the graph of the inverse functions are mirror images through the line y=x.

Exercise 10.2.11

Graph, on the same coordinate system, the inverse of the one-to one function.

The graph shows a line from (negative 3, negative 4) to (negative 2, negative 2) then to (0, negative 1), then to (1, 2) and then to (4, 3). The graph shows a line from (negative 3, 4) to (0, 3) then to (1, 2) and then to (4, 1).
Figure 10.1.48
Answer
This figure shows a line from (negative 4, negative 3) to (negative 2, negative 2) then to (negative 1, 0) then to (2, 1) and then to (3, 4).
Figure 10.1.49
Exercise 10.2.12

Graph, on the same coordinate system, the inverse of the one-to one function.

.
Figure 10.1.50
Answer
Graph extends from negative 4 to 4 on both axes. Points plotted are (negative 3, 4), (0, 3), (1, 2), and (4, 1). Line segments connect points.
Figure 10.1.51

When we began our discussion of an inverse function, we talked about how the inverse function ‘undoes’ what the original function did to a value in its domain in order to get back to the original x-value.

This figure shows x as the input to a box denoted as function f with f of x as the output of the box. Then, f of x is the input to a box denoted as function f superscript negative 1 with f superscript negative 1 of f of x equals x as the output of the box.
Figure 10.1.52
Definition 10.2.5

Inverse Functions

f1(f(x))=x, for all x in the domain of f

f(f1(x))=x, for all x in the domain of f1

We can use this property to verify that two functions are inverses of each other.

Example 10.2.7

Verify that f(x)=5x1 and g(x)=x+15 are inverse functions.

Solution:

The functions are inverses of each other if g(f(x))=x and f(g(x))=x.

  .
Substitue 5x1 for f(x). .
. .
Simplify. .
Simplify. .
.
Figure 10.1.59
Substitute x+15 for g(x). .
. .
Simplify. .
Simplify. .
Table 10.1.6

Since both g(f(x))=x and f(g(x))=x are true, the functions f(x)=5x1 and g(x)=x+15 are inverse functions. That is, they are inverses of each other.

Exercise 10.2.13

Verify that the functions are inverse functions. f(x)=4x3 and g(x)=x+34.

Answer

g(f(x))=x, and f(g(x))=x, so they are inverses.

Exercise 10.2.14

Verify that the functions are inverse functions. f(x)=2x+6 and g(x)=x62

Answer

g(f(x))=x, and f(g(x))=x, so they are inverses.

We have found inverses of function defined by ordered pairs and from a graph. We will now look at how to find an inverse using an algebraic equation. The method uses the idea that if f(x) is a one-to-one function with ordered pairs (x,y), then its inverse function f1(x) is the set of ordered pairs (y,x).

If we reverse the x and y in the function and then solve for y, we get our inverse function.

Example 10.2.8 How to Find the Inverse of a One-to-One Function

Find the inverse of f(x)=4x+7.

Solution:

Step 1. Substitute y for f(x). Replace f(x) with y. f(x)=4x+7y=4x+7
Step 2: Interchange the variables x and y. Replace x with y and then y with x. x=4y+7
Step 3: Solve for y.

Subtract 7 from each side.

Divide by 4.

x7=4y
x74=y
Step 4: Substitute f1(x) for y. Replace y with f1(x). x74=f1(x)
Step 5: Verify that the functions are inverses.

Show f1(f(x))=x

and f(f1(x))=x

f1(f(x))?=xf1(4x+7)?=x(4x+7)74?=x4x4?=xx=xf(f1(x))?=xf(x74)?=x4(x74)+7?=xx7+7?=xx=x
Table 10.1.7
Exercise 10.2.15

Find the inverse of the function f(x)=5x3.

Answer

f1(x)=x+35

Exercise 10.2.16

Find the inverse of the function f(x)=8x+5.

Answer

f1(x)=x58

We summarize the steps below.

How to Find the Inverse of a One-to-One Function

  1. Substitute y for f(x).
  2. Interchange the variables x and y.
  3. Solve for y.
  4. Substitute f1(x) for y.
  5. Verify that the functions are inverses.
Example 10.2.9 How to Find the Inverse of a One-to-One Function

Find the inverse of f(x)=52x3.

Solution:

f(x)=52x3

Substitute y for f(x).

y=52x3

Interchange the variables x and y.

x=52y3

Solve for y.

(x)5=(52y3)5x5=2y3x5+3=2yx5+32=y

Substitute f1(x) for y.

f1(x)=x5+32

Verify that the functions are inverses.

f1(f(x))?=xf(f1(x))?=xf1(52x3)?=xf(x5+32)?=x(52x3)5+32?=x52(x5+32)3?=x2x3+32?=x5x5+33?=x2x2?=x5x5?=xx=xx=x

Exercise 10.2.17

Find the inverse of the function f(x)=53x2.

Answer

f1(x)=x5+23

Exercise 10.2.18

Find the inverse of the function f(x)=46x7.

Answer

f1(x)=x4+76

Key Concepts

  • Composition of Functions: The composition of functions f and g, is written fg and is defined by

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

    We read f(g(x)) as f of g of x.
  • Horizontal Line Test: If every horizontal line, intersects the graph of a function in at most one point, it is a one-to-one function.
  • Inverse of a Function Defined by Ordered Pairs: If f(x) is a one-to-one function whose ordered pairs are of the form (x,y), then its inverse function f1(x) is the set of ordered pairs (y,x).
  • Inverse Functions: For every x in the domain of one-to-one function f and f1,

    f1(f(x))=x
    f(f1(x))=x

  • How to Find the Inverse of a One-to-One Function:
    1. Substitute y for f(x).
    2. Interchange the variables x and y.
    3. Solve for y.
    4. Substitute f1(x) for y.
    5. Verify that the functions are inverses.

Glossary

one-to-one function
A function is one-to-one if each value in the range has exactly one element in the domain. For each ordered pair in the function, each y-value is matched with only one x-value.

This page titled 10.2: Finding Composite and Inverse Functions is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?