Tyler has tutored math at two universities and has a master's degree in engineering.
Sometimes a math function depends on the outcome of another function. This lesson breaks down this chain reaction, called a composite function, and how to evaluate them.
Painting in Art Class
As part of a school project, Ashley and Brad were painting posters. The posters were white. Ashley had red paint and yellow paint. Brad had blue paint. They each painted many signs. After a while, they were tired of painting by themselves, so they began painting as a team. Ashley handed a white poster to Brad, and he painted it blue. For the next poster, Ashley painted it red and quickly handed it to Brad. When Brad added blue paint to the red paint, the poster became purple. Ashley painted the next poster yellow and gave it to Brad. When Brad added his blue paint, the poster became green.
When each person was painting one color, they got the same answer. But when Ashley painted first and Brad painted second, the final poster might get a completely different color depending on the colors they used.
Defining Composite Functions
In math we have special formulas, called functions, that tell us an answer when we plug in a specific number. However, like the paintings, we can put functions together so that one function gives us a different answer depending on the answer of another. Composite functions use the output of one function as the input of another. This is like a function within a function.
Writing Composite Functions
Let's look at two normal functions: f(x) = x + 2 and g(x) = 3x. If we wanted to make a composite function, we would have to put one function inside the other. To make a composite function where we put g(x) inside the function f(x), we can write it f(g(x)).
Notice that instead of simply putting an x in the function, we substitute the entire g(x) function. When we do that, we have f(g(x)) = (3x) + 2. On the left, you'll see that the g function is inside the f function. On the right, you'll see that instead of the x we substituted 3x.
We can do this other ways too. We could substitute the f function inside the g function. When you put the f function inside the g function, you get g(f(x)) = 3(x+2).
You can even make a composite function of itself. We can make f(f(x)) = (x+2) +2 or g(g(x)) = 3(3x). In each case, we take the whole function and substitute it where we see x.
Over 79,000 lessons in all major subjects
Get access risk-free for 30 days,
just create an account.
Now that we've made composite functions, we need to know how to evaluate them. If we were asked to evaluate f(g(5)), we could do this two ways. We could substitute the 5 into the composite function. f(g(5)) = 3*5 + 2
To evaluate this, we do the multiplication first, leaving us f(g(5)) = 15 + 2. This simplifies to 17.
Another way to do this is to evaluate the functions separately. Remember, we are evaluating the functions from the inside out.
We evaluate g(5) = 3*5.
This simplifies to g(5) = 15. Then we take that answer, 15, and substitute it into the f function.
f(15) = 15 + 2
f(15) = 17
Either way, we use the answer of one function inside another function. Using them together is how we evaluate composite functions.
Composite Function Summary
A math function will always act the same way, but multiple functions can be combined as composite functions so that one function depends on the other.
Remember Ashley and Brad? It was important what color poster Ashley handed Brad, because that would determine what color it was at the end. It's kind of like a chain reaction: what happens in the first function determines what happens in the other. Just remember, the key is to work from the inside out. Evaluate the inside function first. Take that answer as your starting point for the next function. With composite functions, we can take two ordinary functions and get some very extraordinary answers.
When this lesson is over, you should be confident in your ability to define, write and evaluate composite functions.
Did you know… We have over 200 college
courses that prepare you to earn
credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the
first two years of college and save thousands off your degree. Anyone can earn
credit-by-exam regardless of age or education level.