## The Lesson

A composite function is a function of a function. A composite function combines two or more functions so that the output of one function becomes the input of another. Imagine a function f that relates an input x to an output f(x). The output is passed into another function g, which relates it to an output gf(x). The composite function gf relates the input x straight to the output gf(x). The composite function is denoted gf(x), (g ∘ f)(x) or g(f(x)).

## A Real Example of a Composite Function

It is easier to understand composite functions with an example.

## f(x) = 2x and g(x) = x + 1

Consider two functions:

f(x) = 2x

g(x) = x + 1

• The function f(x) = 2x takes each input and doubles it.
• The function g(x) = x + 1 takes each input and adds 1 to it.
The mapping diagrams below show these functions. ## The Composite Function gf(x)

Now let's consider the composite function of f(x) = 2x and g(x) = x + 1.
• The function f relates an input x to an output 2x (it doubles the input).
• The output 2x is the input of the function g, which relates it to an output 2x + 1 (it adds 1 to the input).
The mapping diagram below shows this. The composite of f(x) = 2x and g(x) = x + 1 is: ## The Order of Composite Functions Matter

In the example above, the output of f(x) became the input of g(x). The composite function was gf(x) = 2x + 1. Consider what happens if the output of g(x) became the input of f(x).
• The function g relates an input x to an output x + 1 (it adds 1 to the input).
• The output x + 1 is the input of the function f, which relates it to an output 2(x + 1) (it doubles the input).
The mapping diagram below shows this. The composite of g(x) = x + 1 and f(x) = 2x is: fg(x) is not the same as gf(x). The order of the functions matter.
gf(x)fg(x)

## Lesson Slides

The slider below explains more about composite functions.

## A Note on Notation

The image below shows a composite function gf(x), where a function f is passed to a function g: The composite function is gf(x).
• f is applied to the input x.
• g is applied to the function f.
The composite function is written right to left...
• write the f that is applied to it to its left
• write the g that is applied to it to its left
This is the opposite of the image above where the input moves left to right through the functions. If the functions are applied in the opposite order... ...the composite function is fg(x).

## Composite Functions with More Than Two Functions

A composite function can be made from more than two functions Imagine there are three functions: f(x), g(x) and h(x). If f is passed into g, which is passed into h...
f( )g( )h( )
The composite function will be hgf(x) or (h ∘ g ∘ f)(x) or h(g(f(x))).

## Composite Function of a Function and its Inverse

If a composite function is made of a function and its inverse function, the output is the input x:
ff−1 = f−1f = x