Lesson Objectives

- Demonstrate an understanding of function notation
- Learn about function composition

## Composition of Functions

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) "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) = 2x

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) = 2x

f(g(x)) = 2(2x - 1)

f(g(x)) = 2(4x

f(g(x)) = 8x

f(g(x)) = 8x

Example 2: Find each value or expression

f(x) = 3x

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) = 3x

f(g(x)) = 3(x - 5)

f(g(x)) = 3(x

f(g(x)) = 3x

f(g(x)) = 3x

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) = x

g(x) = 2x

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) = x

f(g(x)) = (2x

f(g(x)) = 4x

f(g(x)) = 4x

Now we can plug in a 3 for x:

f(g(3)) = 4(3)

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) = 2x

g(3) = 2(3)

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) = x

f(36) = (36)

f(36) = 1296 - 7 = 1289

f(g(3)) = 1289

As you can see, we obtain the same answer either way.

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) "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) = 2x

^{2}- 5x - 1g(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) = 2x

^{2}- 5x - 1f(g(x)) = 2(2x - 1)

^{2}- 5(2x - 1) - 1f(g(x)) = 2(4x

^{2}- 4x + 1) - 5(2x - 1) - 1f(g(x)) = 8x

^{2}- 8x + 2 - 10x + 5 - 1f(g(x)) = 8x

^{2}- 18x + 6Example 2: Find each value or expression

f(x) = 3x

^{3}- 1g(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) = 3x

^{3}- 1f(g(x)) = 3(x - 5)

^{3}- 1f(g(x)) = 3(x

^{3}- 15x^{2}+ 75x - 125) - 1f(g(x)) = 3x

^{3}- 45x^{2}+ 225x - 375 - 1f(g(x)) = 3x

^{3}- 45x^{2}+ 225x - 376In 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) = x

^{2}- 7g(x) = 2x

^{2}+ 18Find: 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) = x

^{2}- 7f(g(x)) = (2x

^{2}+ 18)^{2}- 7f(g(x)) = 4x

^{4}+ 72x^{2}+ 324 - 7f(g(x)) = 4x

^{4}+ 72x^{2}+ 317Now we can plug in a 3 for x:

f(g(3)) = 4(3)

^{4}+ 72(3)^{2}+ 317f(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) = 2x

^{2}+ 18g(3) = 2(3)

^{2}+ 18g(3) = 2(9) + 18 = 18 + 18 = 36

Since g(3) is 36, we can plug this in for x in f(x).

f(x) = x

^{2}- 7f(36) = (36)

^{2}- 7f(36) = 1296 - 7 = 1289

f(g(3)) = 1289

As you can see, we obtain the same answer either way.

#### Skills Check:

Example #1

Perform the indicated operation. $$g(x)=x^2 + 2x$$ $$f(x)=x + 4$$ $$\text{Find}: g(f(7))$$

Please choose the best answer.

A

$$3$$

B

$$0$$

C

$$-11$$

D

$$143$$

E

$$67$$

Example #2

Perform the indicated operation. $$f(x)=2x - 4$$ $$g(x)=x^3 + 4$$ $$\text{Find}: f(g(-2))$$

Please choose the best answer.

A

$$-2$$

B

$$2$$

C

$$4$$

D

$$-12$$

E

$$-6$$

Example #3

Perform the indicated operation. $$g(x)=4x - 2$$ $$h(x)=x^2 - 3x$$ $$\text{Find}: g(h(1))$$

Please choose the best answer.

A

$$20$$

B

$$-50$$

C

$$-21$$

D

$$-10$$

E

$$5$$

Congrats, Your Score is 100%

Better Luck Next Time, Your Score is %

Try again?

Ready for more?

Watch the Step by Step Video Lesson Take the Practice Test