Mathematics → Subject Test → Composition of Functions

**Definition**

Given functions f and g, the composition of f with g is denoted by f∘g, is the function defined by

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

Similarly, the composition of g with f is denoted by g∘f, is the function defined by

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

So, compositions are evaluated by plugging the second function into the first function.

**NOTE:** ( f ∘ g ) ( x ) ≠ ( g ∘ f ) ( x )

**Practice Problems**

** Example 1.** Given f ( x ) = x^{2} + 1, and g ( x ) = 1 – x, find the following:

(a) ( f ∘ g ) ( x )

(b) ( g ∘ f ) ( x )

**Solution**

**(a) ( f ∘ g ) ( x )**

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

= f ( 1 – x )

= ( 1 – x )^{2} + 1

= 1 – 2x + x^{2} + 1

= x^{2} – 2 x + 2 Answer

**(b) ( g ∘ f ) ( x )**

**Solution**

( g ∘ f ) ( x )

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

= g ( x^{2} + 1 )

= 1 – x^{2} + 1

= 2 – x^{2} Answer

**Example 2.** If f ( x ) = ln ( log x ) and g ( x ) = 10^{e–7} Then ( f ∘ g ) ( x )=?

**Solution**

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

= f ( 10^{e–7} )

= ln ( log 10^{e–7} )

= ln e^{–7}

= –7 Answer

**NOTE:** Here we use the following facts:

log 10 = 1 and

ln e = 1