Composite Functions: A Complete Guide

Composite Functions Video Lesson

How to Find Composite Functions

To find a composite function:

  1. Identify the outer and inner functions.
  2. Write the outer function.
  3. Substitute each š‘„ with the inner function.
  4. Simplify if necessary.

For example, if g of x equals x squared and f of x equals x plus 3, calculate f of g of x.

how to find composite functions step by step

1. Identify the outer and inner functions

For the composite function f of g of x, the g of x is on the inside of f of x. It is the input to f of x.

When written like this as f of g of x, the outer function is the one written on the left and the inner function is on the right.

g of x equals x squared is the inner function and f of x equals x plus 3 is the outer function.

2. Write the outer function

We write the outer function of f of x equals x plus 3.

3. Substitute each š‘„ with the inner function

Every š‘„ found within f of x must be substituted with the inner function of g of x.

g of x equals x squared and so, we replace the š‘„ in f of x equals x plus 3 with an š‘„2.

f of g of x equals x squared plus 3.

how to do composite functions

In this next example, we will keep g of x equals x squared andf of x equals x plus 3 but this time calculate g of f of x.

example of how to write a composite function

1. Identify the outer and inner functions

For the composite function g of f of x, the f of x is on the inside of g of x. It is the input to g of x.

When written as g of f of x, the outer function is the one written on the left and the inner function is on the right.

f of x equals x plus 3 is the inner function and g of x equals x squared is the outer function.

2. Write the outer function

We write the outer function of g of x equals x squared.

3. Substitute each š‘„ with the inner function

Every š‘„ found within g of x must be substituted with the inner function of f of x.

f of x equals x plus 3 and so, we replace the š‘„ in g of x equals x squared with š‘„+3.

We must square all of š‘„+3 and so, we first put it in brackets: (š‘„+3).

g of f of x equals open paren x plus 3 close paren squared.

how to calculate a composition of functions

The Order of Composite Functions

The order of composite functions matters because a different order results in an entirely different function. Always substitute the inner function on the right into the outer function on the left. For example, if f(š‘„)=š‘„+3 and g(š‘„)=š‘„2, f(g(š‘„))=š‘„2+3 and g(f(š‘„))=(š‘„+3)2.

Always substitute the rightmost function into the function on its left.

For example, f of g of x means that g of x is substituted as an input into f of x.

g of f of x means that f of x is substituted as an input into g of x.

finding fg(x) composite function
finding gf(x) composite function

To remember the order of composite functions, draw a backwards-facing arrow from the rightmost function to the leftmost function.

Always substitute the function on the right into the function on the left.

the order of composite functions matters

Composite Functions with Numbers

Composite functions can be evaluated when a number is the input. Substitute the number into the functions from right to left. For example, if f(š‘„)=2š‘„+1 and g(š‘„)=š‘„2, then gf(3) is found by substituting 3 into f(š‘„)=2š‘„+1 to get 7. Then substitute 7 into g(š‘„)=š‘„2 to get 49. gf(3)=49.

calculating composite functions with numbers

When the input to a composite function is a number, the resulting answer is also a number.

If the input to a composite function is š‘„, the resulting answer will be another function.

When entering numbers into a composite function, it is important to evaluate each function from right to left.

In the example below, we first substitute 4 into g(š‘„) to get 2 and then substitute this output of 2 into f(š‘„) to get 11.

how to evaluate a composite function with numbers

What Are Composite Functions?

A composite function is a function that is within another function. One function is substituted as the input to another function. For example f[ g(š‘„) ] means that g(š‘„) is substituted into every š‘„ in the function of f(š‘„). The composite function f[ g(š‘„) ] is pronounced as ‘f of g of š‘„’.

For example, in the composite function below, g of x is substituted into f of x to form f of g of x.

A composite function is different to the functions it is composed of.

definition of composite functions

Composite Function Notation

Composite functions can be written in different notations.

A function, g of x substituted as the input to another function, f of x can be written as:

  • f of g of x
  • f of g of x
  • f of g of x
  • open paren f composed with g close paren of x

In mathematics, the circle symbol āˆ˜ is used to indicate the composition of functions. For example (fāˆ˜g)(š‘„) means to take the output of g and substitute it into f.

open paren f composed with g close paren of x is read as ‘f of g’ ‘f composed with g’, ‘f circle g’, ‘f round g’ or ‘f about g’.

Composite Function Arrow Diagram

An arrow diagram can be used to explain composite functions. The inputs to the first function are listed on the left. Arrows connect these inputs to their outputs in the middle. These outputs are then the inputs to the next function which has its outputs shown on the right.

For example, to find f of g of 2 using the arrow diagram below, follow the input of 2 shown with the red arrow.

The first arrow shows the function of g of x equals x squared. When we square 2 we get 4.

The second arrow leaves the 4 and reaches an output of 7. This is because the function f of x equals x plus 3 tells us to add three to the previous output. 4 + 3 = 7.

Therefore f of g of 2=7.

an arrow diagram showing the mapping of composite functions

Properties of Composite Functions

Composite functions have the following properties:

  • The inverse of the composition of functions is equal to the composition of the inverse of both functions. (fāˆ˜g)-1 = g-1āˆ˜f-1.
  • The composition of one-to-one functions is also one-to-one.
  • The composition of onto functions is also an onto function.
  • Composite functions are assosciative. That is fāˆ˜(gāˆ˜h) = (fāˆ˜g)āˆ˜h.
  • The composition of functions is generally not commutative. It cannot be assumed that f[g(x)] = g[f(x)].
  • A composite function containing at least one even function will be even.
  • A composite function composed of entirely odd functions will also be odd.

Composite Functions with 3 Functions

To find a composite function made of three functions, substitute the rightmost function into the middle function and then substitute this into the leftmost function. For example, if g(š‘„)=š‘„2, f(š‘„)=3š‘„+1 and h(š‘„)=1/š‘„ then h(g(f(š‘„)))=1/(3š‘„+1)2.

a composite function of three functions

Arrows can be drawn from right to left to help remember the order of composite functions. In the example of h(g(f(š‘„))), the f function is substituted into the g function to form g(f(š‘„)).

g(f(š‘„)) = (3š‘„-1)2.

This is then substituted into the h function of 1/š‘„. We replace the š‘„ with (3š‘„-1)2.

h(g(f(š‘„))) = 1/(3š‘„-1)2.

Composite Function Examples

Composite Function Example with Square Roots

If g(š‘„) = š‘„2 + 5š‘„ and f(š‘„) = āˆšš‘„, calculate g(f(š‘„)). Substitute āˆšš‘„ into every š‘„ found in the g(š‘„) function. g(f(š‘„)) = (āˆšš‘„)2+5āˆšš‘„. Here the āˆšš‘„ and square operation cancel out to leave g(f(š‘„)) = š‘„+5āˆšš‘„.

composite functions with square roots

Composite Function Example with Fractions

If g(š‘„)=1/š‘„ and f(š‘„)=1-š‘„, find g(f(š‘„)). Substitute the f function into the š‘„ in the g function. g(f(š‘„))=1/(1-š‘„). This composite function is written as a fraction.

composite functions example with fractions

Composite Function Example with Sin(š‘„)

If g(š‘„) = 2š‘„ + 1 and f(š‘„) = sin(š‘„), calculate f(g(š‘„)). Substitute 2š‘„+1 into every š‘„ found in the f(š‘„) function. f(g(š‘„)) = sin(2š‘„+1).

composite functions with a sin function

Composite Function Example with eš‘„

eš‘„ and ln(š‘„) are inverse functions. When written as a composite function, these two functions cancel each other out. If g(š‘„)=eš‘„ and f(š‘„)=ln(š‘„)-š‘„, calculate f(g(š‘„)). Each š‘„ in f(š‘„) is replaced with eš‘„ and so f(g(š‘„))=ln(eš‘„)-eš‘„. This simplifies to š‘„-eš‘„.

example of a composite function with e and ln

A Function Composed of Itself

A function, f(š‘„) can be composed with itself to form f(f(š‘„)), which can also be written as f2(š‘„). This means that the function is placed as the input to itself. For example if f(š‘„)=5š‘„-2, then in f(f(š‘„)), the š‘„ in f(š‘„)=5š‘„-2 will be replaced with 5š‘„-2. f(f(š‘„))=5(5š‘„-2)-2, which simplifies to 25š‘„-12.

a composite function of itself

The Domain of Composite Functions

To calculate the domain of a composite function gf(š‘„):

  1. Find the values that are excluded from the domain of the outer function, g(š‘„).
  2. Set f(š‘„) equal to these excluded values and solve for š‘„ to find the values that must be excluded from the domain.
  3. Find any further values that are excluded from the domain of the inner function, f(š‘„).
  4. Combine these results to form the overall domain of the composite function.

For example if f of x equals the square root of x plus 5 and g of x equals 1 over x, find the domain of g of f of x.

Step 1. Find the values that are excluded from the domain of g(š‘„)

In the function g(š‘„) , there cannot be a denominator of 0.

xā‰ 0 as we cannot divide by 0.

Step 2. Set f(š‘„) equal to these excluded values and solve for š‘„

the square root of x plus 5 is not equal to 0.

We solve this for š‘„ to find any further values that must be excluded from the domain.

We square both sides of the equation.

x plus 5 is not equal to 0

We then see that x is not equal to negative 5.

domain of composite functions

Step 3. Find any values that are excluded from the inner function, f(š‘„)

f of x equals the square root of x plus 5. We cannot square root a negative number.

Therefore x is greater than or equal to negative 5.

Step 4. Combine these results to determine the domain of the composite function

In f of x, the domain is that x is greater than or equal to negative 5.

However in step 2 we run into problems if x equals negative 5 because this leads to a denominator of zero in the composite function.

Therefore the final domain of the composite function is x is greater than negative 5.

Composite Functions From Graphs

To find the value of a composite function from a graph:

  1. Use the input of the composite function to read the output from the graph of the inner function.
  2. Use this output as the input of the graph of the outer function.

For example the functions of f(š‘„) and g(š‘„) are shown below.

Use the graphs to calculate the value of the composite function, g(f(5)).

how to find a composite function using a graph

Step 1. Use the input of the composite function to read the output from the graph of the inner function

The number input to the composite function is 5.

We read the graph of the inner function of f(š‘„) at the point where š‘„ = 5.

When š‘„ = 5, the f(š‘„) function has an output of 4.

Step 2. Use this output as the input of the graph of the outer function

We use the output of 4 from the first graph as the input to the outer function, g(š‘„).

When š‘„ = 4, g(š‘„) has an output of 5.

Therefore, g(f(š‘„)) = 5.

Here is another example.

how to find the value of a composite function using two graphs

To calculate g(f(2)), we first substitute 2 as an input into the f(š‘„) graph.

This gives us an output of 2 on the y-axis.

We then use this output of 2 from the f(š‘„) graph as an input to the g(š‘„) graph.

When š‘„ = 2, g(š‘„) has an output of 7.

Therefore g(f(2)) = 7.

Composite Functions Using a Table

To calculate the value of a composite function from a table:

  1. Read the output of the inner function from its table at the value required.
  2. Use this output as the input in the table of the outer function and read the new output.

For example, calculate the value of the composite function, g(f(3)) using the tables below.

finding composite functions from a table

Step 1. Read the output of the inner function from its table at the value required

The input of the composite function is š‘„ = 3.

From the first table, when š‘„ = 3 the value of f(š‘„) = 5.

Step 2. Use this output as the input in the table of the outer function and read the new output

The output of the f(š‘„) table was 5.

This is used as the input in the g(š‘„) table.

When š‘„ = 5, g(š‘„) = 17.

Therefore g(f(3)) = 17.