Lesson Objectives
  • Demonstrate an understanding of function notation
  • Learn about function composition

Function Composition


When we work with functions, we will come across the topic of function composition. Function composition involves plugging one function in as the input for another function. Let's suppose we have a function f:
f(x) = 2x - 1
At this point, we should know how to evaluate the function for a given value of x. If we wanted to know the function's value when x is 3, we could notate this as:
f(x) = 2x - 1
f(3) = 2(3) - 1
f(3) = 6 - 1 = 5
In other words, the function's value when x is 3 is written as f(3) and read as "f of 3". Since the result is 5, we can write our answer as:
f(3) = 5
If we wanted to try a different value for the variable, we can just change out the number inside of the parentheses. Let's suppose we wanted to know the function's value when x is -1.
f(-1) = 2(-1) - 1
f(-1) = -2 - 1 = -3
f(-1) = -3
When we look at function composition, we are plugging in a function for the variable instead of just a number. Let's suppose we had two functions, f, and g.
f(x) = 3x - 5
g(x) = 7x + 1
What do we do if we are asked for:
f(g(x)) = ?
All we need to do is plug g(x) in for x in f(x).
f(x) = 3x - 5
f(g(x)) = 3(7x + 1) - 5
f(g(x)) = 21x + 3 - 5 = 21x - 2
f(g(x)) = 21x - 2
If f and g are two functions, then:
(f ○ g)(x) = f[g(x)] » f composed of g
For this scenario, we plug g(x) in for x in f(x) and simplify.
(g ○ f)(x) = g[f(x)] » g composed of f
For this scenario, we plug f(x) in for x in g(x) and simplify.
Let's look at a few examples.
Example 1: Find each value or expression.
f(x) = 2x2 - 5x - 1
g(x) = 2x - 1
Find: f(g(x))
For this problem, we will plug g(x) in for x in our function f(x):
f(x) = 2x2 - 5x - 1
f(g(x)) = 2(2x - 1)2 - 5(2x - 1) - 1
f(g(x)) = 2(4x2 - 4x + 1) - 5(2x - 1) - 1
f(g(x)) = 8x2 - 8x + 2 - 10x + 5 - 1
f(g(x)) = 8x2 - 18x + 6
Example 2: Find each value or expression.
f(x) = 3x3 - 1
g(x) = x - 5
Find: f(g(x))
For this problem, we will plug g(x) in for x in our function f(x):
f(x) = 3x3 - 1
f(g(x)) = 3(x - 5)3 - 1
f(g(x)) = 3(x3 - 15x2 + 75x - 125) - 1
f(g(x)) = 3x3 - 45x2 + 225x - 375 - 1
f(g(x)) = 3x3 - 45x2 + 225x - 376
In addition to what we have already seen, we will have a variation of this problem type. Let's work through an example.
Example 3: Find each value or expression.
f(x) = x2 - 7
g(x) = 2x2 + 18
Find: f(g(3))
There are two ways to solve this type of problem. First, we could find f(g(x)) and then plug a 3 in for x.
f(x) = x2 - 7
f(g(x)) = (2x2 + 18)2 - 7
f(g(x)) = 4x4 + 72x2 + 324 - 7
f(g(x)) = 4x4 + 72x2 + 317
Now we can plug in a 3 for x:
f(g(3)) = 4(3)4 + 72(3)2 + 317
f(g(3)) = 4(81) + 72(9) + 317
f(g(3)) = 324 + 648 + 317
f(g(3)) = 1289
Alternatively, we can plug in a 3 for x in g(x) first. Once this is done, we can plug the result in for x in f(x).
g(x) = 2x2 + 18
g(3) = 2(3)2 + 18
g(3) = 2(9) + 18 = 18 + 18 = 36
Since g(3) is 36, we can plug this in for x in f(x).
f(x) = x2 - 7
f(36) = (36)2 - 7
f(36) = 1296 - 7 = 1289
f(g(3)) = 1289
As you can see, we obtain the same answer either way.

Skills Check:

Example #1

Perform each indicated operation. $$f(x)=3x - 1$$ $$g(x)=x^{2}- 4x$$ Find: $$(f \circ g)(x)$$

Please choose the best answer.

A
$$3x^{2}- 12x - 1$$
B
$$9x^{2}+ 18x + 5$$
C
$$-8x^{3}- 4x^{2}+ 10x + 3$$
D
$$4x^{2}+ 2x - 3$$
E
$$-5x^{4}+ 2x^{2}- 1$$

Example #2

Perform each indicated operation. $$f(x)=-2x + 3$$ $$g(x)=x^{3}- 4x$$ Find: $$(f \circ g)\left(\frac{x}{3}\right)$$

Please choose the best answer.

A
$$-x^{2}- \frac{3}{x - 2}$$
B
$$-24x^{3}+ 36x^{2}- 6$$
C
$$-x^{3}- 88x - 144$$
D
$$\frac{2x^{3}- 72x + 81}{27}$$
E
$$\frac{-2x^{3}+ 72x + 81}{27}$$

Example #3

Perform each indicated operation. $$f(x)=x^{2}- 2$$ $$g(x)=2x - 2$$ Find: $$(f \circ g)(6)$$

Please choose the best answer.

A
$$195$$
B
$$66$$
C
$$98$$
D
$$63$$
E
$$111$$
checkmark x-mark
checkmark x-mark
checkmark x-mark

Congrats, Your Score is 100%

Trophy, You Win!

Better Luck Next Time, Your Score is %

Try again?

retry Trophy, You Win!