# Composite Functions – Definitions and Examples

Composite functions are functions obtained by using the output values of one function as the input values of another. That is, if we have two functions f and g, a composite function would be h=g(f(x)). Basically, a function is applied to the result of another function.

In this article, we will learn about composite functions. We will look at its definition and some examples of how to solve composite functions.

##### ALGEBRA

Relevant for

Learning about composite functions with examples.

See definition

##### ALGEBRA

Relevant for

Learning about composite functions with examples.

See definition

## Definition of composite functions

Consider the two functions $latex f(x)=2x+5$ and $latex g(x)=x-3$, where the domain of f is {1, 2, 3, 4} and the domain of g is equal to the range of f. We can illustrate this using the following mapping diagram:

The third function shown in the diagram, which has domain {1, 2, 3, 4} and range {4, 6, 8, 10}, is called the composite function. This function is denoted by $latex g(f(x))$ or $latex (g \circ f)(x)$.

We can obtain a single expression or “rule” for the composite function $latex g(f(x))$ in terms of x.

For this, we observe that the function f is closest to the variable x since f is the first function that operates on the set {1, 2, 3, 4}. Therefore, we can write:

$latex g(f(x))=g(2x+5)$

$latex =(2x+5)-3$

$latex g(f(x))=2x+2$

The composition of the functions is $latex g(f(x))=2x+2$ and has domain {1, 2, 3, 4} and range {4, 5, 8, 10}.

## Order of functions in a composition of functions

The order of functions is very important in function composition, since $latex f(g(x))$ is not equal to $latex g(f(x))$.

Taking the same example shown above, if function g were to operate first on the set {1, 2, 3, 4} and then function f operated on the range of g, we would have the following mapping diagram:

In this case, the composite function $latex f(g(x))$ has domain {1, 2, 3, 4} and range {1, 3, 5, 7}. The function $latex f(g(x))$ can be written as follows:

$latex f(g(x))=f(x-3)$

$latex =2(x-3)+5$

$latex =2x-6+5$

$latex f(g(x))=2x-1$

The composition of the functions is $latex f(g(x))=2x-1$ and has domain {1, 2, 3, 4} and range {1, 3, 5, 7}.

## Examples of composite functions

The following are some common examples of composite functions. Each example has a detailed solution, but try to solve the problems yourself before looking at the answer.

### EXAMPLE 1

If we have the functions $latex f(x)=2x+5$ and $latex g(x)=x+6$, find the value of $latex f(g(2))$.

To solve this, we have to start by evaluating $latex g(2)$. Therefore, we have:

$latex g(2)=(2)+6$

$latex g(2)=8$

Now, we use the obtained value as input in the function f. That is, we have:

$latex f(g(2))=f(8)$

$latex =2(8)+5$

$latex f(g(2))=21$

### EXAMPLE 2

Find the value of $latex g(f(3))$ if we have $latex f(x)=x^2-5$ and $latex g(x)=2x-7$.

In this case, we have to start by evaluating $latex f(3)$. Therefore, we have:

$latex f(3)=(3)^2-5$

$latex f(3)=4$

Now, we are going to use the value of f in the function g:

$latex g(f(3))=g(4)$

$latex =2(4)-4$

$latex g(f(3))=4$

### EXAMPLE 3

Find the composite function $latex h(x)=f(g(x))$ if we have $latex f(x)=3x+4$ and $latex g(x)=5x-6$.

To find the composition $latex f(g(x))$, we have to use the function $latex g(x)$ as input in the function $latex f(x)$. Therefore, we have:

$latex h(x)=f(g(x))$

$latex =f(5x-6)$

$latex =3(5x-6)+4$

$latex =15x-18+4$

$latex h(x)=15x-14$

### EXAMPLE 4

If we have the functions $latex f(x)=2x^2-3$ and $latex g(x)=3x+4$, find the composite function $latex h(x)=g(f(x))$.

We can find the composition of functions $latex g(f(x))$ by using the function $latex f(x)$ as the input in $latex g(x)$. Therefore, we have:

$latex h(x)=g(f(x))$

$latex =g(2x^2-3)$

$latex =3(2x^2-3)+4$

$latex =6x^2-9+4$

$latex h(x)=6x^2-5$

### EXAMPLE 5

Find the value of $latex f(g(5))$ if we have the functions $latex f(x)=x^2+x$ and $latex g(x)=4x-10$.

To find the value of $latex f(g(5))$, we have to start by evaluating $latex g(5)$. Therefore, we have:

$latex g(5)=4(5)-10$

$latex g(5)=10$

Now, we are going to use the value of g(5) in the function f:

$latex f(g(5))=f(10)$

$latex =(10)^2+10$

$latex f(g(5))=110$

### EXAMPLE 6

We have the functions $latex f(x)=-x^2+5x-10$ and $latex g(x)=x+2$. Find the composition $latex h(x)=f(g(x))$.

To find the composition $latex f(g(x))$, we use the function $latex g(x)$ as the input of the function $latex f(x)$. Thus, we have:

$latex h(x)=f(g(x))$

$latex =f(x+2)$

$latex =-(x+2)^2+5(x+2)-10$

$latex =-x^2-4x-4+5x+10-10$

$latex h(x)=-x^2+x-4$

## Composite functions – Practice problems

Solve the following practice problems by applying everything learned about composite functions. You can use the worked examples above as a guide.

#### Find an expression for the composition $latex h(g(x))$ if $latex g(x)=x^2$ and $latex h(x)=\frac{2}{x}$.

Interested in learning more about algebraic functions? Take a look at these pages: ### Jefferson Huera Guzman

Jefferson is the lead author and administrator of Neurochispas.com. The interactive Mathematics and Physics content that I have created has helped many students.  