Tutorial on Composition of Functions

How to find the composition of functions and its domain? A tutorial including detailed explanations is presented. Exercises with answers are also included at the end of this page. Also examples of Applications of Composition of Functions are included in this site.

Example 1:

Find (f o g)(-2) given that

f(x) = -3x + 2 and g(x) = |x - 4|

Solution to example 1note that

(f o g)(-2) = f( g(-2) )

evaluate g(-2).

g(-2) = |-2 - 4| = 6

evaluate f( g(-2) ).

f( g(-2) ) = f(6) = -3*6 + 2 = -16

conclusion:

(f o g)(-2) = -16

Example 2:

Find (f o g)(x) and the domain of f o g given that

f(x) = (x - 1) / (x + 2) and g(x) = (x + 1) / (x - 2)

Solution to example 2First find (fog)(x)

(f o g)(x) = f( g(x) ) = (g(x) - 1)/(g(x) + 2)

=[ (x + 1)/(x - 2) - 1 ] / [ (x + 1)/(x - 2) + 2 ]

= 3 / (3x - 3)

First find domain of f and g

domain of f : x not equal to -2

domain of g : x not equal to 2

g(x) has to be in the domain of f.

g(x) not equal to -2

solve for x the equation g(x) = -2

(x + 1)/(x - 2) = -2

x + 1 = -2x + 4

3x = 3

x = 1

for g(x) to be different from -2, x has to be different from 1.

conclusion:
The domain of f o g is: (- ∞ , 1) U (1 , 2) U (2 , + ∞)

Example 3:

Find the composition (f o g)(x) and the domain of f o g given that

f(x) = x 2 + 2 and g(x) = √(x - 2)

Solution to example 3First find (f o g)(x)

(f o g)(x) = f( g(x) ) = g(x) 2 + 2

= ( √(x - 2) ) 2 - 2

= x

First find domain of f and g

domain of f : all real numbers

domain of g : x - 2 > = 0 ; x > = 2

Since the domain of f is all real numbers, we have to make sure that x is in the domain of g so that g has a real value.