If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Modeling with composite functions

Sal determines the correct functions to compose (and the correct order) in order to model a given relationship, and vice versa.

Want to join the conversation?

  • aqualine ultimate style avatar for user Lillithian
    So, could it be phrased as (H°T)(r)? Or how would it be formatted in that form?
    (12 votes)
    Default Khan Academy avatar avatar for user
  • leafers ultimate style avatar for user Anonymous
    Why wouldn't the answer be T(H(k))?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      You need to match up the correct input/output values. Remember, the inner function is done 1st and then the output of the inner function is used as input to the outer function.

      Sal is creating a function that defines the "height of the tree as a function of its altitude".
      This means the input to the function is "altitude" and the output needs to be "height of the tree".
      Which function has an output of "height of tree". Its H. So, this has to be the outer function.
      Which function has an input of "altitude"? Its T. So, we have to use function T 1st. It creates as output "the average temperature", which happens to be the input for H.

      If you tried to do T(H(k)), it won't work. Function H comes first. The input for H has to be temperature, but Sal needs an input that is "altitude".
      Hope this helps.
      (23 votes)
  • male robot donald style avatar for user MrTechnie
    For the second question (), wouldn't both expressions H(T(r)) and H(B(r)) represent the height of a tree as a function of its altitude?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Tanner P
      Not necessarily. The function B takes x (height of tree) as an input instead of r (altitude). Even if it did take r (altitude) as an input, B would output number of birds nesting. However, that's not what H depends on: it depends on avg. temp., which is outputted by T instead.
      That's a lot of "outputs" and "inputs" but I hope this helps!
      (2 votes)
  • blobby green style avatar for user Arbaaz Ibrahim
    Why isn't the answer to the second question, H(k(T(r))) or H(T)?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user kubleeka
      k is a variable, not a function, so the first option is nonsensical.

      H(T) is actually correct, you just haven't written the input variable for T. There are contexts where it's okay to not write the input variable, and just write T instead of T(r), but it's best to maintain the habit of writing them out when you're still learning about function composition.
      (2 votes)
  • aqualine tree style avatar for user annie.zhao10
    For the second question about the trees, the first input is also the height of a tree, so why don't we use x? Is it because it is an input that was created with H(k), if so does H(k)=x
    (0 votes)
    Default Khan Academy avatar avatar for user
  • boggle blue style avatar for user bob
    like there are inverse trig functions like arcsine(sin^-1) and cossine(cos^-1) is there something as a inverse function
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user cossine
      So there are inverse functions. An inverse function just inverse of a function. In fact sin^-1 is the inverse function of sine. You could also take the inverse of non-trigonometric functions.

      There should be a section on Khan Academy.
      (2 votes)
  • blobby green style avatar for user Arbaaz Ibrahim
    How would you interpret H(T(r))?
    (0 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user kubleeka
      You're inputting a location, r, and getting out a height of a tree there. So it would be the height of trees as a function of location.

      We need to make sure that all of the intermediate steps make sense, but they do in this case. T accepts location and outputs temperature, and H accepts temperature and outputs height.
      (4 votes)
  • blobby green style avatar for user bukiboy100
    So why can "the average number of fans per game as a function of the number of rainy days in a season" be written as "N(W(P(r))", while "the average number of fans per game as a function of the team's average daily practice time" is written "N(W(x))". Shouldn't there be another w in the latter function as it is called, "N(w)" in the problem?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leafers seedling style avatar for user CCDM
      You are correct that N(W(P(r))) is the average number of fans per game as a function of the number of rainy days in a season. You are also correct that N(W(x)) is average number of fans as a function of teams daily practice time. I know alot of variables are being thrown around here and it looks confusing but N(w) could have been written with any name for the independent variable w. When we decided to substitute in W(x) for the independent variable w in N(w), the "w" went away in N(w) and was replaced by W(x). Now you could say N(W(x)) = N(x) if you wish.
      (0 votes)
  • blobby green style avatar for user Ninetailscf
    So even with two composite functions {A(x) & B(a)} it's still possible to say that B is a function of x so long as B(A(x)). Is this always true?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • winston baby style avatar for user Meerah Tahir
    In the video at when sal is discussing the secong example he does not discuss the choices but if we were to solve them is it possible to solve H(B(r)) and T(K(h)) when we can't input r into B as the only input of B is x? Are we going to say it is unspecified?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] "Carter has noticed a few "quantitative relationships related "to the success of his football team "and has modeled them with the following functions." All right, this is interesting. So he has this function, which he denotes with the capital N and it's the winning, and the input of it is the winning percentage, W and the output is the average number of fans per game. So, he's making some type of model that says, look the number of fans per game are gonna be in some way dependent on what your winning percentage is. And, I'm assuming he's modeled the higher the winning percentage, the more fans are gonna show up at a game. Now this is, W, the input is the average daily practice time, x, and the output is the winning percentage. All right, that makes sense. Probably once again, probably some type of a positive effect of practicing more is going to create a higher winning percentage. And this other function, number of rainy days, r and then average practice time. Yup, well the more rainy days you have well that's going to lower your average practice time. So, I definitely see how practice time, P, would be a function of number of rainy days. "The expression N(W(x)) represents which of the following?" Well before we even look at the choices, let's think about what's happening. This is another way of denoting we're gonna take x, we're gonna take x right over here, and we are going to input it into W and we're going to get out W(x) and then we're going to input that into the function N. And, we are going to get out, N(W(x)). So, what does the function W do? What does the function W do, right over here? Well, that's winning percentage as a function of practice time. So, you input practice, practice time, and it gives you, it somehow predicts a winning percentage, winning percentage. And, then you take that winning percentage and you input it into function N. Function N is going to output the number of fans per game, based on winning percentage. So this is number of fans. So when you take the composite function, you're actually creating a function that starts with practice time as the input and shows the number of fans that are gonna be dependent on your practice time. So this is interesting. So, we should look for a choice that says, how does the number of fans that show up at a game how is that dependent on practice time, x? All right. "The team's winning percentage as a function "of the average daily practice time." Now that would be just W(x). If they said just W(x) that'd be winning percentage as a function of average daily practice time. So, I can cross that one out. The average number of fans per game, all right this is interesting because that's what the final output's going to be in terms of the average number of fans per game, that is the output of the function N, the function N right over here. "The average number of fans per game "as a function of the number of rainy days in a season," Nope. We're not doing that. We're doing it as a function of practice time. You could construct that. In fact, if you wanted to do this that would be N as a function of W as a function of P of r. So, that would have been this choice where you input the number of rainy days from that you're able to figure out practice time and then you input practice time to figure out win perecentage and then you input win percentage to figure out the number of fans in the crowd. But that's not what we're doing here. We're just starting with daily practice time and getting to fans per game. So let me rule this one out. And if you found this one a little bit, what I just did a little bit confusing I encourage you to try to set up a diagram like I just did in the beginning. Instead of saying, oh well, we could start with r to get, use that as input to get average daily practice time and then use that as an input into W to get winning percentage. Then use that as an input into N to get average number of fans per game, but that's not what they're describing for N(W(x)). "The average number of fans per game "as a function of the team's average daily practice time." Yeah, that's what's going on. You have your average practice time, x being inputted into the function W. So your average practice time is going inputted into W and it outputs winning percentage, which you then input into N to get the average number of fans per game. The average number of fans per game as function of the team's average daily practice time. So, yup, I definitely like that choice. Let's do another one of these. This is interesting. "Deniz studied the park near her home "where she identified several quantitative relationships "and modeled them with the following functions." So, B, it inputs the height of a tree in terms of x and it outputs the number of birds nesting in that tree. H, input the average temperature at a specific location and it outputs the height of the tree at that location. And T, the altitude of a specific location and then, if that's the input, and then the output is the average temperature at that location. All right, this is interesting. "According to Deniz's findings, "which of the following expressions represents "the height of a tree as a function of its altitude?" So we want to figure out, we want to output the height of a tree and we want to input, the altitude of a specific location. So, let's think about it. If we take our altitude at a specific location, r and we input it into the function T, out of that we're going to get T(r). T, I'll be writing a little bit neater. We're gonna get T(r), which would represent average temperature at that location, average temp, and then if we take the average temperature at that location and input it into function H, and then we input it into function H, we are going to get the height of a tree at that location. So, we're going to get H(T(r)) and so this is going to be height of tree at that location, height of tree. And so, there you have it, H(T(r)). You start with r, altitude at a specific location. Input it into function T. T's gonna spit out the average temperature of that location. You input that into H. It's gonna get you the height of the tree at that location. So, H(T(r)). H(T(r)) is this choice right over there.