Function Composition
It's really easy for mathematicians to make things seem much harder than they actually are. This often comes down to either confusing vocabulary or confusing notation. While these words or symbols will always have a purpose and will end up making life easier, when you're first learning them it can be hard to keep it all straight.
The topic that this lesson is on, function composition, is one of those topics. It can seem complicated at first, so let's start small and ease you into it.
Function Notation
We'll begin by reviewing what function notation is.
Basically, it's just another way of writing an equation. Instead of saying y = 4x - 1, we can say f(x) = 4x - 1. This notation now gives this function a name, f, and allows us to substitute anything we want into it.
Instead of f(x), what if it was f(w)? That means f(w) is just 4w - 1.
We don't just have to use symbols, either. How about f(6)? Now we just put a 6 in that spot: 4(6) - 1 = 23.
We could even use random shapes if we want! How about f(:))? I just plug that smiley face right in, which means f(:)) = 4:) - 1.
Let's up the difficulty a little bit. Instead of substituting in a single term, what if we tried an expression with multiple terms? Maybe f(-2m+3)? Just because it's a bigger expression doesn't mean we do anything different. Where there used to be an x (or a smiley, or a 6, or a w), now I put -2m + 3. That gives us this: 4(-2m + 3) - 1, which we can then simplify with the distributive property and combining like terms to end up with our answer: -8m + 11.
Composition of Functions
So, as you can see, we can substitute any old thing into a function. So, why not another function? That's exactly what composition of functions is - we take one function and plug it into another one. If we defined another function, let's say g(x) to be 3x 2, we can then evaluate f(g(x)) by doing exactly what we have been doing for the last few minutes and just plug one function into another!
f(x) = 4x -1
g(x) = 3x2
Evaluate f(g(x))
Start by plugging one function into another one
We start with the outside function, f: 4 times something - 1, but everywhere that we would normally have put an x, we now substitute in the function g(x). So instead of 4x - 1, or 4w- 1, or 4 :) - 1, we have 4(g(x)) - 1. But since we know that g(x) is just 3x2, we can substitute that in as well, which makes f(g(x)) equal to 4(3x2) - 1. Simplifying again gives us our final answer as 12x 2 - 1.
And that's it! But composing functions can be difficult because seeing all those letters - f and g and x - can be daunting. Even when you get that part, it can be easy to do the problem backward and substitute the functions into each other the wrong way. So, let's look at an example or two, and see if we can address those two common mistakes and prevent them from happening to you.