Video: Composite Functions

In this video, we will learn how to form a composite function by composing two or more linear, quadratic, exponential, or radical functions.

17:11

Video Transcript

In this video, we will learn how to form a composite function by composing two or more linear, quadratic, exponential, or radical functions. We’ll begin by discussing what a composite function actually is and what it represents. And we’ll then work through a series of examples of finding general expressions for composite functions and evaluating them for particular values. We’ll also see how to find the domain of a composite function. Before we begin, you should already be familiar and comfortable with function notation and the definition of the domain and range of a function.

So, what actually is a composite function? Well, let’s discuss this in the context of a practical scenario. Suppose you visit a shop which is having a 20-percent-off sale. You also have a voucher for 10 pounds off, which you were given for your birthday. You have a look around the shop and you decide to buy an item which costs 150 pounds. Let’s have a look at how your discounts will be applied. Now, the way most shops work is that the shop assistant would apply the 20-percent discount first. So, your item, which originally cost 150 pounds, will now cost 80 percent of this. We can find 80 percent of an amount by multiplying by the decimal 0.8. So, after the 20-percent discount, your item will now cost 120 pounds.

You’ll then hand over your gift voucher, and the shop assistant will take 10 pounds off the price. So, the final price that you pay will be 110 pounds. Now, each of these discounts can actually be represented using functions. Suppose 𝑥 represents the price of an item. Then, the function 𝑓 of 𝑥 equals 0.8𝑥 can be used to represent a 20-percent discount, as this function calculates 80 percent of an original value. The function 𝑔 of 𝑥 equals 𝑥 minus 10 can be used to represent a discount of 10 pounds. When we apply the 20-percent discount, that’s applying the function 𝑓 of 𝑥. And when we subtract the 10 pounds, that’s applying the function 𝑔 of 𝑥 to the result.

What we’ve actually done is apply a composite function, and it’s the function known as 𝑔 of 𝑓 of 𝑥. We take a value 𝑥, apply the function 𝑓, and then apply the function 𝑔 to the result. The notation for this is as written on screen. We sometimes have a small circle between the two letters used to represent the functions although sometimes you will see it without this circle. So, that’s the logic behind composite functions. We’re applying one function and then applying another function to the result. Let’s look at how to do this formally in an example.

If 𝑓 of 𝑥 equals three minus 𝑥 squared and 𝑔 of 𝑥 equals two 𝑥 plus four, find 𝑓 of 𝑔 of one.

Now, let’s just be clear on the notation used in the question. 𝑓 of 𝑔 of one means the composite function 𝑓 of 𝑔 of 𝑥 evaluated at 𝑥 equals one. We may also see this written with a small circle between the two letters. Now, what we need to remember is that the composite function 𝑓 of 𝑔 of 𝑥 means the function we get when we apply 𝑔 first and then apply 𝑓 to the result. It doesn’t mean the product of the functions 𝑓 and 𝑔. We’re going to look at two ways of answering this question. In the first method, we’re going to substitute 𝑥 equals one right at the start. So, we’re going to find 𝑔 of one and then evaluate 𝑓 for this value. 𝑔 of 𝑥 is the function two 𝑥 plus four, so 𝑔 of one will be two multiplied by one plus four, which is equal to six.

We’re now going to take this value and evaluate the function 𝑓. So, 𝑓 of 𝑔 of one will become simply 𝑓 of six. 𝑓 of 𝑥 is the function three minus 𝑥 squared, so 𝑓 of six will be three minus six squared. That’s three minus 36, which is equal to negative 33. So, in this method, we evaluated 𝑔 of one, first of all, and then we took this as our input for the second function. Overall, we found that 𝑓 of 𝑔 of one is equal to negative 33. The second approach we could take is to find a general algebraic expression for the composite function 𝑓 of 𝑔 of 𝑥 and then evaluate it when 𝑥 is equal to one. This is probably more complicated in this case, but this method would be useful if we were asked to find 𝑓 of 𝑔 of 𝑥 for multiple different 𝑥-values.

So, let’s see what this looks like. We’re looking to find the general composite function 𝑓 of 𝑔 of 𝑥. Remember, 𝑔 of 𝑥 is the function two 𝑥 plus four. So, replacing 𝑔 of 𝑥 with two 𝑥 plus four, we’re now looking to find the function 𝑓 of two 𝑥 plus four. What we do then is we take the expression two 𝑥 plus four as our input to the function 𝑓. 𝑓 of 𝑥 is the function three minus 𝑥 squared. So, 𝑓 of two 𝑥 plus four is the function three minus two 𝑥 plus four all squared. We can keep our composite function in this form or we can distribute the parentheses and simplify, if we wish. And it will give 𝑓 of 𝑔 of 𝑥 equals negative four 𝑥 squared minus 16𝑥 minus 13.

We now have a general expression for 𝑓 of 𝑔 of 𝑥. But remember, we were asked to evaluate this when 𝑥 equals one. So, the final step is to substitute 𝑥 equals one. This gives negative four minus 16 minus 13, which is equal to negative 33, the same answer as we found using our previous method. So in both cases, we found that 𝑓 of 𝑔 of one is equal to negative 33. The first method is probably more straightforward for this particular question. But if we needed to evaluate 𝑓 of 𝑔 of 𝑥 for multiple 𝑥-values, then the second method may well be more efficient.

Now that we’ve seen how to formally compose functions, you may be wondering whether it makes a difference what order we use. So, is the function 𝑓 of 𝑔 of 𝑥 the same as the function 𝑔 of 𝑓 of 𝑥? Well, let’s look at a practical scenario to investigate this. Let’s return to the scenario we started off with, where you have a 10-pound voucher for a shop that is having a 20-percent-off sale. We earlier saw that we could represent these two discounts as functions. 𝑓 of 𝑥 equals 0.8𝑥, and 𝑔 of 𝑥 equals 𝑥 minus 10. We also saw that if we were buying an item that cost 150 pounds, then if the 20-percent discount were applied before the 10-pound voucher, this item would cost 110 pounds.

Now, this could be represented by the composite function 𝑔 of 𝑓 of 𝑥. 𝑓 of 𝑥 is the function 0.8𝑥, so this would be 𝑔 of 0.8𝑥. We then take 0.8𝑥 as our input to the function 𝑔 of 𝑥. So subtracting 10 from this, we have that 𝑔 of 𝑓 of 𝑥 is equal to 0.8𝑥 minus 10. Suppose, instead, that the shop assistant took your 10-pound voucher off the price first before applying the 20-percent discount. Well, 10 pounds of 150 pounds is 140 pounds, and then 80 percent of 140 or 0.8 times 140 is 112. So, in this scenario, the item would cost 112 pounds.

Notice that this is not the same as if the discounts had been applied in the other order. This time, the overall process could be represented by the composite function 𝑓 of 𝑔 of 𝑥. We first apply 𝑔 of 𝑥, subtracting 10 from the price. And we’re then going to apply 𝑓 to this. 𝑓 of 𝑥 is the function 0.8𝑥, so 𝑓 of 𝑥 minus 10 is 0.8 multiplied by 𝑥 minus 10 or 0.8𝑥 minus eight. We see then that the two composite functions 𝑔 of 𝑓 of 𝑥 and 𝑓 of 𝑔 of 𝑥 do not give the same result. 𝑔 of 𝑓 of 𝑥 is 0.8𝑥 minus 10, and 𝑓 of 𝑔 of 𝑥 is 0.8𝑥 minus eight. So, we see that it does make a difference which way around the discounts were applied. And therefore, the order does matter when we’re talking about composition of functions.

Now, there are certain special circumstances under which 𝑓 of 𝑔 of 𝑥 can equal 𝑔 of 𝑓 of 𝑥, such as if the functions are inverses of one another. And it may be true, in particular cases, that 𝑓 of 𝑔 of 𝑥 equals 𝑔 of 𝑓 of 𝑥 for particular values of 𝑥, but certainly not for all values of 𝑥. So, we can say that, in general, 𝑓 of 𝑔 of 𝑥 is not equal to 𝑔 of 𝑓 of 𝑥. And we must therefore be very careful which order we compose functions in. Let’s continue and look at a couple of other examples.

In the given figure, the red graph represents 𝑦 equals 𝑓 of 𝑥, while the blue represents 𝑦 equals 𝑔 of 𝑥. What is 𝑓 of 𝑔 of two?

We recall, first of all, that the notation 𝑓 of 𝑔 of two means we take the 𝑥-value two, apply the function 𝑔, first of all, and then apply the function 𝑓 to the result. Let’s begin then by finding the value of 𝑔 of two. Remember, 𝑔 is represented by the blue graph. So, we find two on the 𝑥-axis, move up to the blue graph ⁠— that’s this point here ⁠— and we see that the 𝑦-value, which will be 𝑔 of two, is one. So, by applying 𝑔 of 𝑥 to the value two, we obtain the value one. We’re now going to apply the function 𝑓 to the result. 𝑓 of 𝑔 of two becomes 𝑓 of one. We’ve replaced 𝑔 of two with the value we found of one.

We then return to the figure, and this time we’re looking at the red graph. We find one on the 𝑥-axis, move up to the red graph — that’s this point here — and we see that the 𝑦-value, representing 𝑓 of one, will be three. So, we find that 𝑔 of two is one, and then 𝑓 of 𝑔 of two, which is 𝑓 of one, is three. So, we’ve completed the problem. Now, just to demonstrate an important point, suppose we’ve done this in the opposite order. Suppose we thought that 𝑓 of 𝑔 of two meant we apply the function 𝑓 first.

Well, looking at two on the 𝑥-axis and going up to the red graph for 𝑓, we see that 𝑓 of two is equal to four. If we then applied the function 𝑔 to the result, which, in the correct notation, would be 𝑔 of 𝑓 of two, so that’s 𝑔 of four. We find four on the 𝑥-axis, go up to the blue graph, and we see that the 𝑦-value here is four. 𝑔 of 𝑓 of two then is four, whereas 𝑓 of 𝑔 of two is three. And so, we see that the order is extremely important when we’re composing functions. The correct answer, 𝑓 of 𝑔 of two, is three.

In our next example, we’ll see how to determine the domain of a composite function.

If the function 𝑓 of 𝑥 equals 17 over 𝑥, where 𝑥 is not equal to zero, and the function 𝑔 of 𝑥 equals 𝑥 squared minus 361, determine the domain of 𝑓 of 𝑔 of 𝑥.

We recall, firstly, that this notation, 𝑓 and then a small circle and then 𝑔 of 𝑥, means the composite function found when we apply the function 𝑔 first and then apply the function 𝑓 to the result. We’re asked to determine the domain of this composite function. And we recall then that the domain of a function is the set of all values on which the function acts. Notice that, in the definition of the function 𝑓 of 𝑥, we’re told that this is valid for 𝑥 not equal to zero. And this is because if we were to try to evaluate 𝑓 of zero, we would have 17 over zero, which is undefined. So, the domain of the function 𝑓 of 𝑥 is all real numbers except zero.

For the function 𝑔 of 𝑥, no restrictions have been given because there are no values that cause problems. We can square any value and then we can subtract 361 without running into problems with values being undefined. We’ll consider two approaches to this question. The first is to find an algebraic expression for the composite function 𝑓 of 𝑔 of 𝑥. So, we start with an 𝑥-value, apply the function 𝑔 of 𝑥, which will give 𝑥 squared minus 361, and then take this as our input to the function 𝑓. 𝑓 of 𝑥 is the function where we divide 17 by our input. So, 𝑓 of 𝑥 squared minus 361 is 17 over 𝑥 squared minus 361. And so, we have a general expression for the composite function 𝑓 of 𝑔 of 𝑥.

Now, notice that this will be undefined when the denominator of the fraction is equal to zero. That’s when 𝑥 squared minus 361 is equal to zero. We can solve this equation by adding 361 to each side and then taking the square root. The square root of 361 is 19, so we find that 𝑓 of 𝑔 of 𝑥 will be undefined when 𝑥 equals plus or minus 19. This means our function 𝑓 of 𝑔 of 𝑥 can act on all values except positive or negative 19, so we can express its domain in two ways. We can either write 𝑥 is not equal to positive or negative 19. Or we can write the domain as the set of all real numbers minus the set containing the two elements negative 19 and positive 19. Either of these two styles of notation would be absolutely fine.

Now, another way to approach this problem would be to use the fact that our second function 𝑓 of 𝑥 can’t act on the value zero. If 𝑓 of zero is undefined, then this means that the composite function 𝑓 of 𝑔 of 𝑥 will be undefined when 𝑔 of 𝑥 is equal to zero. That is, when the first function gives the value of zero, which we then attempt to input into our second function. 𝑔 of 𝑥 is the function 𝑥 squared minus 361. So, to find where 𝑔 of 𝑥 is equal to zero, we’d be solving this quadratic equation. But this just brings us to the same stage of working out as we had here in our previous method. So, either of these approaches would be absolutely fine. And in both cases, we conclude that the domain of the composite function 𝑓 of 𝑔 of 𝑥 is all of the real numbers apart from negative 19 and positive 19.

Let’s review some of the key points that we’ve seen in this video. Composition of functions means that we apply one function and then we apply another function to the result. We can represent this diagrammatically. If we apply the function 𝑓 of 𝑥 followed by the function 𝑔 of 𝑥, then this can be written as the composite function 𝑔 of 𝑓 of 𝑥. We also noticed that in order to be able to compose functions at all, the range of the first function, that’s its output values, must be a suitable domain for the second.

We’ve also seen that the order in which we compose functions is incredibly important. In general, the composite function 𝑓 of 𝑔 of 𝑥 is not equal to the composite function 𝑔 of 𝑓 of 𝑥. That is, if we apply 𝑔 first and then apply 𝑓 to the result, we don’t get the same answer as if we apply 𝑓 first and then apply 𝑔 to the result. To help us remember which function to apply first when working with composite functions, we always work from the center of the parentheses out. In the case of 𝑓 of 𝑔 of 𝑥, we start with an 𝑥-value, apply the function 𝑔, and then apply the function 𝑓 to the result. Whereas in the function 𝑔 of 𝑓 of 𝑥, we start with an 𝑥-value, apply the function 𝑓, and then apply the function 𝑔 to the result.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.