Lesson Video: Composite Functions | Nagwa Lesson Video: Composite Functions | Nagwa

Lesson Video: Composite Functions Mathematics

In this video, we will learn how to form a composite function by composing two or more 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.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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