Composition of Functions
Composition of Functions
Composition of Functions
Composition of Functions
Advanced
"Function Composition" is applying one function to the results of another:
f( ) g( )
It is written: (g º f)(x)
Which means: g(f(x))
f(input) = 2(input)+3
g(input) = (input)2
Let's start:
(g º f)(x) = g(f(x))
(g º f)(x) = (2x+3)2
(f º g)(x) = f(g(x))
https://www.mathsisfun.com/sets/functions-composition.html 1/6
3/17/2019 Composition of Functions
x x2 2x 2 +3
2
(input) 2(input)+3
(f º g)(x) = 2x2+3
Symbol
The symbol for composition is a small circle:
(g º f)(x)
(f º f)(x) = f(f(x))
(f º f)(x) = 2(2x+3)+3 = 4x + 9
(f º f)(x) = f(f(x))
https://www.mathsisfun.com/sets/functions-composition.html 2/6
3/17/2019 Composition of Functions
= f(2x+3)
= 2(2x+3)+3
= 4x + 9
Domains
It has been easy so far, but now we must consider the Domains of the functions.
f(x) The domain is the set of all the values that go into
a function.
Range The function must work for all values we give it, so it
is up to us to make sure we get the domain correct!
Domain x
We can't have the square root of a negative number (unless we use imaginary numbers,
but we aren't), so we must exclude negative numbers:
{x | x ≥ 0}
[0,+∞)
Then also make sure that g(x) gets the correct Domain
(g º f)(x) = g(f(x))
= (√x)2
=x
Now, "x" normally has the Domain of all Real Numbers ...
g f
f( ) g( )
What we see at the end is a drilled hole, and we may think "that
should work for wood or metal".
But if we put wood into g º f then the first function f will make a
fire and burn everything down!
https://www.mathsisfun.com/sets/functions-composition.html 4/6
3/17/2019 Composition of Functions
De-Composing Function
We can go the other way and break up a function into a composition of other functions.
Example: (x+1/x)2
f(x) = x + 1/x
g(x) = x2
And we get:
(g º f)(x) = g(f(x))
= g(x + 1/x)
= (x + 1/x)2
This can be useful if the original function is too complicated to work on.
Summary
"Function Composition" is applying one function to the results of another.
Some functions can be de-composed into two (or more) simpler functions.
https://www.mathsisfun.com/sets/functions-composition.html 5/6
3/17/2019 Composition of Functions
https://www.mathsisfun.com/sets/functions-composition.html 6/6