What are Composite Functions?


Let’s tackle another algebraic concept: composite functions.

A composite function is a function within a function. The concept takes two functions, f(x) and g(x), and embeds one function’s results within the other.

Let’s try to break this all down into bite-sized pieces.

The basics of composite functions.

Let’s start at the very beginning.

The concept of composite functions is not a new one. We are familiar with embedding a number within a function and solving that function. The same principle used in those calculations is also used in composite functions.

If we have the function f(x)=2x2+5x, and we want to evaluate that function at f(2), we must replace all x’s with a 2. Once we do that, we can evaluate the function and get our answer.

Before we go into how to compose two functions, let’s talk about the basic terminology around composite functions.

Let’s say we have two functions, f(x) and g(x).

If we want to take the results of g(x) and embed them into the function of f(x), we would say that f is composed of g of x, or f(g(x)). Another way to say this is (f⚬g)(x). I’ve also seen it written simply as f⚬g.

If we are trying to find f(g(x)), then f is our outer function, and g(x) is our inner function. Another way to say this is that f is composed of g(x).

If we are trying to find g(f(x)), then g is our outer function, and f(x) is our inner function. Another way to say this is that g is composed of f(x).

And order does matter as f(g(x)) does not equal g(f(x)). If you are asked to compose two functions in a certain order, stick with that order.

The only time when f(g(x)) and g(f(x)) are equal is when they are inverses of one another.

Let’s look at the example above again. Let’s say we will embed the function g(x) within the original function f(x)=2x2+5x. We want to calculate f(g(x)) or (f⚬g)(x).

Where we initially solved our function by replacing all x’s with a 2, we will now replace all x’s with the function g(x).

What are the steps to composing two functions?

Let’s take our example function just one step further.

We will now look at g(x) and replace it within our composite function.

In our example, f(x)=2x2+5x. The function g(x)=2x. Our mission is to find f(g(x)).

The first step is to identify which function is the inner function and which one is the outer function.

In this example, the inner function is g(x). The outer function is f(x).

The next step is to replace all x’s in the outer function with the inner function of our composite function. Since the inner function is g(x), we will replace all x’s in the outer function with this function.

If the function were g(f(x)), the inner function f(x) would replace all x values in the outer function, g(x).

But, in this case, all x’s would be replaced with g(x).

After this step, we will replace g(x) with 2x.

Our third step is to calculate the function and combine terms where necessary. This is the same process we did when x was equal to 2. We calculate through and combine all like terms until we reach our result. In this case, f(g(x))=8×2+10x.

Now let’s do a few example problems.

The first example problem will start to change things around a bit. Instead of finding f(g(x)), we will find the composite function of g(f(x)).

The first step is identifying the inner function in our composite function. In this case, the inner function is f(x).

Once we identify the inner function, we write out the outer function and replace all x’s with f(x). This step helps us identify where our values will go once we move further into the process.

We then replace the f(x) in our function with x+1. We should now have g(f(x))=(x2+3)+1.

We then move on to calculations. This one is simple because we have to add the constants.

The final answer is g(f(x))=x2+4.

Let’s look at another example. This one involves f(x)=x2+3 and g(x)=x+1.

The goal is to find f(g(x)). Our inner function is g(x). We write the function f(x) and then replace all x’s with g(x). We do this so that we keep everything organized.

We then replace the g(x) with its value, x+1. Once we do that, we can move on to calculating the result.

The result of composing the two functions is f(g(x))=x2+2x+5.

The next example seems tricky. The functions are f(x)=(1-x)/(2+x) and g(x)=x-5.

The goal is to find f(g(x)) and the inner function is g(x).

We replace all x’s in the outer function with g(x).

Just a side note: If you are comfortable identifying the inner and outer functions, you can skip a step. Go straight to replacing all x’s in the outer function with the values of the inner function directly.

We then replace g(x) terms with the value x-5. We can then calculate our composed function and combine all like terms.

Our result is f(g(x))=(6-x)/(x-3).

The last example we will go over involves the functions f(x)=(x2-9)/(x2-1) and g(x)=x+4.

Because we are looking for the results of f(g(x)), our inner function is g(x) and the outer function is f(x).

We replace all x’s in the outer function with g(x).

Once we have done this, we can replace all g(x) terms with x+4.

We can then move on to calculating our result. This one is a bit trickier, but it shouldn’t be too bad if you keep everything organized.

The result of composing our two functions is f(g(x))=(x2+8x+7)/(x2+8x+15).

Composing functions can be tricky. The key to getting them right is to stay organized throughout the process.

And I know that there are people out there that want shortcuts. The best way to get through these problems is to understand each step and take time with them. Don’t rush.

Congratulate yourself for working hard. You deserve a pat on the back. 😁

Danielle

Just a nerd who loves math. Trying to help the world one problem at a time.

Recent Posts