Graphing a composite function
Domain and Range of Composite Functions
What happens to the domain and range of a composite function? Well, if we have the function g(x), we have some domain and some range for g(x). Separately we've got a domain for f(x) and a range for g(x). If I write f(g(x)), then the output of g(x), which is the range, has to be somewhere in the domain of f(x). Otherwise, we could get a number here that f(x) really doesn't know what to do with. What does all this really mean? Consider the function f(x)=sin(x).
The domain of sin(x) is going to be all of x, and the range is going to be between -1 and 1. Now let's look at the function g(x) equals the absolute value of x, or g(x)=abs(x). Again the domain is all of x, and the range is everything greater than 1 or equal to 0. If I take those two - here's my range of sin(x) - what happens to g(f(x))? So g is the absolute value, so I'll have abs(sin(x)).
What's the domain and range of that composite function? If I'm graphing g(f(x)), I'm graphing the absolute value of sin(x), so the graph looks like this. I have a range here that goes from 0 to 1 and a domain that covers all of x. Well, this makes sense. What if I look at f(g(x)), so the function is going to be sine of the absolute value of x, sin(abs(x)).
The range is everything greater than or equal to zero.
For the absolute value of x, you can take anything as input, so the domain is going to be all values of x, and the range of abs(x) is going to be zero and up, so anything that's a positive number. Now, sine can take anything, so the range of abs(x) is within the domain of sin(x), but what happens to the output? What is the range of this composite function? Let's graph it - is that unexpected? Now the range is in between -1 and 1, which just so happens to be the range of f(x).
Lesson Summary
To recap, we know functions map numbers to other numbers, like y=f(x). The domain and range tell us the possible values for the input and output of a function.
Composite functions take the output of one function and use it as input for another function, and we write this f(g(x)). We're going to evaluate f(g(x)) from the inside out, so we're going to evaluate g(x) before we evaluate f(x). And we also know that f(g(x)) does not equal g(f(x)).