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

Evaluating composite functions: using graphs

Given the graphs of the functions f and g, Sal evaluates g(f(-5)).

Want to join the conversation?

  • female robot amelia style avatar for user Jessica
    , How did he get -2?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • starky ultimate style avatar for user Taniya
      First we try to solve for f(-5).
      We know that y = f(x).
      If y = f(x), then by asking what is the value of f(-5), we mean what will be the value of y if we take x as -5.
      from the blue color graph we know that when x = -5, y = -2, Therefore we can say that if f(x) = y then f(-5) = -2.
      Hope that helps!
      (23 votes)
  • mr pink green style avatar for user Vivienne_Li
    sorry, but how did he pick where the -2 point would match up on the graph? Looking back, couldn't 4 have had the same chance??
    (7 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user Ini
      You probably don't need this now but someone else might so.
      I'm assuming this from when he solved f(-5).
      To get this answer, you use the blue graph which is representing the values of f(x),
      You get -5 on the x-axis and trace it down to where the blue curve intersects the line you traced down
      When you trace the intersection point to the y-axis, you get -2 which is Sal's answer
      (2 votes)
  • duskpin ultimate style avatar for user Samuel Lee
    Isn't there another way to write g(f(-5))?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user Prisha Rai
    At , how do we get that g(-2) is equal to one?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user JM K
    Okay, so all this composite function things are very neat, but in the mathematical world, where would this come to use?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • mr pink red style avatar for user Aryleen Garcia
    where did you get -5? for f(x)
    (2 votes)
    Default Khan Academy avatar avatar for user
  • primosaur seedling style avatar for user jake jin
    given f(x)=-x+6 and g(x)=f(x+3), how to write an equation for function g?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user loumast17
      What does f(x+3) mean? well if instead you were doing say f(3), how would that look? well f(3) means plug in 3 for wherever there's an x in -x+6. so f(3) = -(3)+6 = 3.

      So f(x+3) means plug x+3 in for x. so f(x+3) = -(x+3)+6 = -x - 3 + 6 = -x+3. So that means g(x) = f(x+3) = -x + 3. I hope this helped.
      (2 votes)
  • blobby green style avatar for user Diana C
    What if we do (f+g)(4). How do we find that using only the graph?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leafers seedling style avatar for user CCDM
      Well, I believe you are asking for f(g(4))...If so, you would look up g(4) from graph and find -2. Then look up f(-2) from graph and see that it is 4 and there you go. Hope this is useful to you...
      (1 vote)
  • blobby green style avatar for user Kayla
    How could I apply this to a real life scenario?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leafers seedling style avatar for user CCDM
      Well, lets say you had one curve which was the cost per item c(x) of producing an agriculturally based product as a function of quantity produced, x. This curve would have a negative slope because generally it costs less per item as you make more of them (efficiency). However, lets say that the quantity produced was also a function of rainfall where say too little and too much rainfall produced low quantities and the curve x(r) was more parabolic shaped at least for a limited domain. You could plug in x(r) for x in c(x) and find the cost per item as a function of rainfall. This is just one example, there are many more...
      (1 vote)
  • stelly yellow style avatar for user lemonomadic
    All right, so, we have so far discussed 2 composite functions together, is it possible that we have multiple composite functions together?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- So we have the graphs of two functions here. We have the graph y equals f of x and we have the graph y is equal to g of x. And what I wanna do in this video is evaluate what g of, f of, let me do the f of it another color, f of negative five is, f of negative five is. And it can sometimes seem a little daunting when you see these composite functions. You're evaluating the function g at f of negative five. What does all this mean? We just have to remind ourselves what functions are all about. They take an input and they give you an output. So really, what we're doing is we're going to take, we have the function f. We have the function f. We're going to input negative five into that function. We're going to input negative five into that function and it's going to output f of negative five. It's going to output f of negative five and we can figure what that is. And then that's going to be the input into the function g. So that's going to be the input into the function g and so we're going to, and then the output is going to be g of f of negative five, g of f of negative five. Let's just do it step by step. So the first thing we wanna figure out is what is the function f when x is equal to negative five? What is f of negative five? Well we just have to see when x is equal to negative five. When x is equal to negative five, the function is right over here. Let's see, let me see if I can draw a straight line. So then x is equal to negative five. The function is right over here. It looks like f of negative five is equal to negative two. It's equal to negative two. You see that right over there. So, f of negative five is negative two. And so we can now think of this instead of saying g of f of negative five, we could say well f of negative five is just negative two, is just negative two. So this is going to be equivalent to g of negative two, g of negative two, g of negative two. We're gonna take negative two into g and we're gonna output g of negative two. So we're taking that output, negative two and we're inputting into g. So when x is negative two, when x is negative two, what is g? So we see, when x is negative two, g, the graph is right over there, g of negative two is one. So this is going to be one. So g of f of negative five sounds really complicated, we were able to figure out is one 'cause you input negative five into f, it outputs negative two. And then you input negative two into g, it outputs one and we're all done.