Evaluating composite functions: using graphs | Mathematics III | High School Math | Khan Academy
- So we have the graphs of two functions here. We have the graph (y) equals (f(x)) and we have the graph (y) is equal to (g(x)). And what I wanna do in this video is evaluate what (g(f(...)). Let me do the (f(...)) in another color. (f(-5)) is... (f(-5)) is...
And it can sometimes seem a little daunting when you see these composite functions. You're evaluating the function (g) at (f(-5)). 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 (-5) into that function. We're going to input (-5) into that function and it's going to output (f(-5)). It's going to output (f(-5)) 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(f(-5))), (g(f(-5))). Let's just do it step by step.
So the first thing we wanna figure out is what is the function (f) when (x = -5)? What is (f(-5))? Well, we just have to see when (x) is equal to (-5). When (x) is equal to (-5), the function is right over here. Let's see, let me see if I can draw a straight line.
So then (x = -5). The function is right over here. It looks like (f(-5) = -2). It's equal to (-2). You see that right over there. So, (f(-5) = -2).
And so we can now think of this. Instead of saying (g(f(-5))), we could say well (f(-5)) is just (-2), is just (-2). So this is going to be equivalent to (g(-2)), (g(-2)), (g(-2)).
We're gonna take (-2) into (g) and we're gonna output (g(-2)). So we're taking that output, (-2), and we're inputting it into (g). So when (x = -2), when (x = -2), what is (g)?
So we see, when (x = -2), (g)... the graph is right over there, (g(-2) = 1). So this is going to be (1).
So (g(f(-5))) sounds really complicated; we were able to figure out is (1) 'cause you input (-5) into (f), it outputs (-2). And then you input (-2) into (g), it outputs (1) and we're all done.