<< Chapter < Page Chapter >> Page >

Composition of functions

When the output of one function is used as the input of another, we call the entire operation a composition of functions. For any input x and functions f and g , this action defines a composite function    , which we write as f g such that

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

The domain of the composite function f g is all x such that x is in the domain of g and g ( x ) is in the domain of f .

It is important to realize that the product of functions f g is not the same as the function composition f ( g ( x ) ) , because, in general, f ( x ) g ( x ) f ( g ( x ) ) .

Determining whether composition of functions is commutative

Using the functions provided, find f ( g ( x ) ) and g ( f ( x ) ) . Determine whether the composition of the functions is commutative .

f ( x ) = 2 x + 1 g ( x ) = 3 x

Let’s begin by substituting g ( x ) into f ( x ) .

f ( g ( x ) ) = 2 ( 3 x ) + 1 = 6 2 x + 1 = 7 2 x

Now we can substitute f ( x ) into g ( x ) .

g ( f ( x ) ) = 3 ( 2 x + 1 ) = 3 2 x 1 = −2 x + 2

We find that g ( f ( x ) ) f ( g ( x ) ) , so the operation of function composition is not commutative.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Interpreting composite functions

The function c ( s ) gives the number of calories burned completing s sit-ups, and s ( t ) gives the number of sit-ups a person can complete in t minutes. Interpret c ( s ( 3 ) ) .

The inside expression in the composition is s ( 3 ) . Because the input to the s -function is time, t = 3 represents 3 minutes, and s ( 3 ) is the number of sit-ups completed in 3 minutes.

Using s ( 3 ) as the input to the function c ( s ) gives us the number of calories burned during the number of sit-ups that can be completed in 3 minutes, or simply the number of calories burned in 3 minutes (by doing sit-ups).

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Investigating the order of function composition

Suppose f ( x ) gives miles that can be driven in x hours and g ( y ) gives the gallons of gas used in driving y miles. Which of these expressions is meaningful: f ( g ( y ) ) or g ( f ( x ) ) ?

The function y = f ( x ) is a function whose output is the number of miles driven corresponding to the number of hours driven.

number of miles  = f ( number of hours )

The function g ( y ) is a function whose output is the number of gallons used corresponding to the number of miles driven. This means:

number of gallons  = g ( number of miles )

The expression g ( y ) takes miles as the input and a number of gallons as the output. The function f ( x ) requires a number of hours as the input. Trying to input a number of gallons does not make sense. The expression f ( g ( y ) ) is meaningless.

The expression f ( x ) takes hours as input and a number of miles driven as the output. The function g ( y ) requires a number of miles as the input. Using f ( x ) (miles driven) as an input value for g ( y ) , where gallons of gas depends on miles driven, does make sense. The expression g ( f ( x ) ) makes sense, and will yield the number of gallons of gas used, g , driving a certain number of miles, f ( x ) , in x hours.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Are there any situations where f ( g ( y ) ) And g ( f ( x ) ) Would both be meaningful or useful expressions?

Yes. For many pure mathematical functions, both compositions make sense, even though they usually produce different new functions. In real-world problems, functions whose inputs and outputs have the same units also may give compositions that are meaningful in either order.

Practice Key Terms 1

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Algebra and trigonometry. OpenStax CNX. Nov 14, 2016 Download for free at https://legacy.cnx.org/content/col11758/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Algebra and trigonometry' conversation and receive update notifications?

Ask