Composition Of Functions

Function composition combines two functions by feeding the output of one into the input of another. Composition is central to differentiation via the Chain Rule.

Quick Reference

Notation Expression Meaning
Composite Function ( f g ) ( x ) f ( g ( x ) ) : evaluate g first, then f
Composite Domain Dom ( f g ) { x Dom ( g ) g ( x ) Dom ( f ) }
Commutativity In general, f g g f Order of composition matters

Definition of Composition

Given two functions f and g, the composite function f g (also called the composition of f and g) is defined by:

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

The domain of f g is the set of all x in the domain of g such that g ( x ) is in the domain of f:

Dom ( f g ) = { x Dom ( g ) g ( x ) Dom ( f ) }

Let f ( x ) = x and g ( x ) = x + 1 . Find ( f g ) ( x ) and ( g f ) ( x ) , and determine their domains.

Solution
  • ( f g ) ( x ) = f ( g ( x ) ) = f ( x + 1 ) = x + 1 .
    Domain: x + 1 0 x 1 , so Dom ( f g ) = [ 1 , + ) .
  • ( g f ) ( x ) = g ( f ( x ) ) = g ( x ) = x + 1 .
    Domain: x 0 , so Dom ( g f ) = [ 0 , + ) .

Notice that ( f g ) ( x ) ( g f ) ( x ) in general.