You are on page 1of 7

Suppose you are given the two functions f (x) = 2x + 3 and g(x) = x

2
+ 5. Composition
means that you can plug g(x) into f (x). This is written as "( f o g)(x)", which is pronounced as
"f-compose-g of x". And "( f o g)(x)" means " f (g(x))". That is, you plug something in for x,
then you plug that value into g, simplify, and then plug the result into f. The process here is just
like what we saw on the previous page, except that now we will be using formulas to find
values, rather than just reading the values from lists of points.
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find (g o f )(1).
When I work with function composition, I usually convert "( f o g)(x)" to the more
intuitive " f (g(x))" form. This is not required, but I certainly find it helpful. In this case, I
get:
(g o f )(1) = g( f(1))
This means that, working from right to left (or from the inside out), I am plugging x = 1
into f(x), evaluating f(x), and then plugging the result into g(x). I can do the calculations
bit by bit, like this: Since f(1) = 2(1) + 3 = 2 + 3 = 5, and since g(5) = (5)
2
+ 5 =
25 + 5 = 20, then (g o f )(1) = g( f(1)) = g(5) = 20. Doing the calculations all
together (which will be useful later on when we're doing things symbolically), it looks like
this:
(g o f )(1) = g( f (1))
= g(2( ) + 3) ... setting up to insert the original input
= g(2(1) + 3)
= g(2 + 3)
= g(5)
= ( )
2
+ 5 ... setting up to insert the new input
= (5)
2
+ 5
= 25 + 5
= 20
Note how I wrote each function's rule clearly, leaving open parentheses for where the
input (x or whatever) would go. This is a useful technique. Whichever method you use
(bit-by-bit or all-in-one), the answer is:
(g o f )(1) = g( f (1)) = 20
I just computed (g o f )(1); the composition can also work in the other order:
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find ( f o g)(1).
First, I'll convert this to the more intuitive form, and then I'll simplify:
( f o g)(1) = f (g(1))
Working bit-by-bit, since g(1) = (1)
2
+ 5 = 1 + 5 = 4, and since f(4) = 2(4) + 3 = 8
+ 3 = 11, then ( f o g)(1) = f (g(1)) = f(4) = 11. On the other hand, working all-in-one
(right to left, or from the inside out), I get this:
( f o g)(1) = f (g(1))
= f (( )
2
+ 5) ... setting up to insert the original input
= f ((1)
2
+ 5)
= f (1 + 5)
= f (4)
= 2( ) + 3 ... setting up to insert the new input
= 2(4) + 3
= 8 + 3
= 11
Either way, the answer is: Copyright Elizabeth Stapel 2002-2011 All Rights Reserved
( f o g)(1) = f (g(1)) = 11
A verbal note: "f o g" is not pronounced as "fogg" and "g o f " is not pronounced as "goff". They
are pronounced as "f-compose-g" and "g-compose-f ", respectively. Don't make yourself sound
ignorant by pronouncing these wrongly!
As you have seen above, you can plug one function into another. You can also plug a function
into itself:
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find ( f o f )(1).
( f o f )(1) = f ( f (1))
= f (2( ) + 3) ... setting up to insert the original input
= f (2(1) + 3)
= f (2 + 3)
= f (5)
= 2( ) + 3 ... setting up to insert the new input
= 2(5) + 3
= 10 + 3
= 13
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find (g o g)(1).
(g o g)(1) = g(g(1))
= g(( )
2
+ 5) ... setting up to insert the original input
= g((1)
2
+ 5)
= g(1 + 5)
= g(4)
= ( )
2
+ 5 ... setting up to insert the new input
= (4)
2
+ 5
= 16 + 5
= 11
In each of these cases, I wrote out the steps carefully, using parentheses to indicate where my
input was going with respect to the formula. If it helps you to do the steps separately, then
calculate g(1) outside of the other g(x) as a separate step. That is, do the calculations bit-by-
bit, first finding g(1) = 4, and then plugging 4 into g(x) to get g(4) = 11.
You can also evaluate compositions symbolically. It is simpler to evaluate a composition at a
point because you can simplify as you go, since you'll always just be plugging in numbers and
simplifying. Evaluating a symbolic compositon, where you're first plugging x into some function
and then plugging that function into some other function, can be much messier. But the process
works just as the at-a-number composition does, and using parentheses to be carefully explicit
at each step will be even more helpful.
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find ( f o g)(x).
In this case, I am not trying to find a certain numerical value. Instead, I am trying to find
the formula that results from plugging the formula for g(x) into the formula for f(x). I will
write the formulas at each step, using parentheses to indicate where the inputs should
go:
( f o g)(x) = f (g(x))
= f (x
2
+ 5)
= 2( ) + 3 ... setting up to insert the input formula
= 2(x
2
+ 5) + 3
= 2x
2
+ 10 + 3
= 2x
2
+ 13
If you plug in "1" for the x in the above, you will get ( f o g)(1) = 2(1)
2
+ 13 = 2 + 13 = 11,
which is the same answer we got before. Previously, we'd plugged a number into g(x), found a
new value, plugged that value into f(x), and simplified the result. This time, we plugged a
formula into f(x), simplified the formula, plugged the same number in as before, and simplified
the result. The final numerical answers were the same. If you've done the symbolic composition
(the composition with the formulas) correctly, you'll get the same values either way, regardless
of the value you pick for x. This can be a handy way of checking your work.
Here's another symbolic example: Copyright Elizabeth Stapel 2002-2011 All Rights Reserved
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find (g o f )(x).
(g o f )(x) = g( f(x))
= g(2x + 3)
= ( )
2
+ 5 ... setting up to insert the input
= (2x + 3)
2
+ 5
= (4x
2
+ 12x + 9) + 5
= 4x
2
12x 9 + 5
= 4x
2
12x 4

There is something you should note from these two symbolic examples. Look at the results I
got:
( f o g)(x) = 2x
2
+ 13
(g o f )(x) = 4x
2
12x 4
That is, ( f o g)(x) is not the same as (g o f )(x). This is true in general; you should assume
that the compositions ( f o g)(x) and (g o f )(x) are going to be different. In
particular, composition is not the same thing as multiplication. The open dot "o" is not the same
as a multiplication dot "", nor does it mean the same thing. While the following is true:
f(x) g(x) = g(x) f(x) [always true for multiplication]
...you cannot say that:
( f o g)(x) = (g o f )(x) [generally false for composition]
That is, you cannot reverse the order in composition and expect to end up with the correct
result. Composition is not flexible like multiplication, and is an entirely different process. Do not
try to multiply functions when you are supposed to be plugging them into each other.
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find ( f o f )(x).
( f o f )(x) = f ( f (x))
= f (2x + 3)
= 2( ) + 3 ... setting up to insert the input
= 2(2x + 3) + 3
= 4x + 6 + 3
= 4x + 9
Given f(x) = 2x + 3 and g(x) = x
2
+ 5, find (g o g)(x).
(g o g)(x) = g(g(x))
= ( )
2
+ 5 ... setting up to insert the input
= (x
2
+ 5)
2
+ 5
= (x
4
10x
2
+ 25) + 5
= x
4
+ 10x
2
25 + 5
= x
4
+ 10x
2
20

Sometimes you have to be careful with the domain and range of the composite function.
Given f (x) = sqrt(x) and g(x) = x 2, find the domains of ( f o g)(x) and (g o f
)(x).
Since f (x) involves a square root, the inputs have to be non-negative. This means that
the domain (the set of x-values) for f (x) is "all x > 0". Then, in (g o f )(x), where I'm
plugging x first into f (x) = sqrt(x), the domain is at least restricted to "all x > 0". Let's
see what the two compositions look like:
( f o g)(x) = f (g(x))
= f (x 2)
= sqrt( )
= sqrt(x 2)
The domain for the square root is all inputs that make "x 2" non-negative. That is, all
x such that x 2 > 0. Solving this for x, I get that the domain of ( f o g)(x) is "all x >
2".
Now to do the other composition:
(g o f )(x) = g( f (x))
= g( sqrt(x) )
= ( ) 2
= ( sqrt(x) ) 2
= sqrt(x) 2
The domain for this is all inputs
that make the square root
defined. Since there is only "x"
inside the square root, then:
the domain of (g o f
)(x) is "all x > 0".

If your initial functions are just plain old polynomials, then their domains are "all x", and so will
be the domain of the composition. It's pretty much only if your dealing with denominators (where
you can't divide by zero) or square roots (where you can't have a negative) that the domain ever
becomes an issue.

Usually composition is used to combine two functions. But sometimes you are asked to go
backwards. That is, they will give you a function, and they'll ask you to come up with the two
original functions that they composed. For example: Copyright Elizabeth Stapel 2002-2011 All Rights
Reserved
Given h(x) = (x + 1)
2
+ 2(x + 1) 3, determine two functions f (x) and g(x)
which, when composed, generate h(x).
This is asking you to notice patterns and to figure out what is "inside" something else. In
this case, this looks similar to the quadratic x
2
+ 2x 3, except that, instead of squaring
x, they're squaring x + 1. In other words, this is a quadratic into which they've plugged
x + 1. So let's make g(x) = x + 1, and then plug this function into f (x) = x
2
+ 2x 3:
( f o g)(x) = f (g(x))
= f (x + 1)
= ( )
2
+ 2( ) 3
= (x + 1)
2
+ 2(x + 1) 3
Then h(x) may be stated as the composition of f (x) = x
2
+ 2x 3 and g(x) = x +
1.
Given h(x) = sqrt(4x + 1), determine two functions f (x) and g(x) which, when
composed, generate h(x).

ADVERTISEMENT


Since the square root is "on" (or "around") the "4x + 1", then the 4x + 1 is put inside the
square root. I need to take x, do "4x + 1" to it, and then take the square root of the
result:
g(x) = 4x + 1, f(x) = sqrt(x), and h(x) = ( f o g)(x).
First you learned (back in grammar school) that you can add, subtract, multiply, and divide
numbers. Then you learned that you can add, subtract, multiply, and divide polynomials. Now
you will learn that you can also add, subtract, multiply, and divide functions. Performing these
operations on functions is no more complicated than the notation itself. For instance, when they
give you the formulas for two functions and tell you to find the sum, all they're telling you to do is
add the two formulas. There's nothing more to this topic than that, other than perhaps some
simplification of the expressions involved.
Given f(x) = 3x + 2 and g(x) = 4 5x,

find (f + g)(x), (f g)(x), (fg)(x), and (f / g)(x).
To find the answers, all I have to do is apply the operations (plus, minus, times, and
divide) that they tell me to, in the order that they tell me to.
(f + g)(x) = f(x) + g(x) = [3x + 2] + [4 5x] = 3x 5x + 2 + 4 = 2x + 6
(f g)(x) = f(x) g(x) = [3x + 2] [4 5x] = 3x + 5x + 2 4 = 8x 2
(fg)(x) = [f(x)][g(x)] = (3x + 2)(4 5x) = 12x + 8 15x
2
10x
= 15x
2
+ 2x + 8

Given f(x) = 2x, g(x) = x + 4, and h(x) = 5 x
3
,

find (f + g)(2), (h g)(2), (f h)(2), and (h / g)(2).
To find the answers, I can either work symbolically (like in the previous example) and
then evaluate, or I can find the values of the functions at x = 2 and then work from
there. It's probably simpler in this case to evaluate first, so:
f(2) = 2(2) = 4
g(2) = (2) + 4 = 6
h(2) = 5 (2)
3
= 5 8 = 3
Now I can evaluate the listed expressions:
(f + g)(2) = f(2) + g(2) = 4 + 6 = 10
(h g)(2) = h(2) g(2) = 3 6 = 9
(f h)(2) = f(2) h(2) = (4)(3) = 12
(h / g)(2) = h(2) g(2) = 3 6 = 0.5
If you work symbolically first, and plug in the x-value only at the end, you'll still get the same
results. Either way will work. Evaluating first is usually easier, but the choice is up to you.

You might also like