Just as we can do operations with real
numbers, we can do operations with functions.
Let's look at a particular operation of
functions called composition.
Given two functions, f and g, the composite
function f composed with g is defined by this.
We read it f composed with g of x equals f of g of x.
The domain of the composite function is the
set of all numbers x in the domain of g such that g of x is in the domain of f.
Let's look at an example.
So, let's look at two functions: the first
one, f of x equals 3 x is a linear function,
and g of x equals 4 x squared plus 6 is a quadratic function.
The first thing we want to do is find the
composition of f with g at a particular
value of x when x is 4.
We'll see how this works.
We would like to find f composed with g at 4.
By the definition of composition, this is f
of g of 4, and let's think about what we need to do.
Here we're asked to find g of 4.
Let's do that here.
We know how to do this: g of 4 means when x
is 4 find the value of the function g.
So that's going to be 4 times 4 squared plus 6.
So, we have 16 times 4, 64, plus 6, 70.
We want to replace g of 4 with 70.
So now we're asked to find the f of 70.
F of 70 means to find the value of the
function f when x is 70, so let's look at f of x.
We want that x to be 70, and that is 210.
In the second part of this example, we're
asked to find g composed with g when x is negative 1.
So, we start by writing down what we're
asked to do: g composed with g of negative 1.
By definition this means to find g of g of negative 1.
Alright, so we need to work on the inside
part and find g of negative 1.
This means find the value of the function g when x is negative 1.
So, we look up there.
It's going to be 4 times negative 1 squared plus 6.
Be careful here when you square a negative
1, it's going to be positive 1, multiplied
by 4 is 4, and then add the 4 to the 6.
So, g of negative one is 10, and now we're
asked to find g of 10 or the value of the function g when x is 10.
You can look up here: we want to find the
value of this function when x is 10.
So, 10 squared is 100, times 4 gives us 400,
add 6 to that and we get our answer of 406.
In this next part, we don't have a
particular value of x in mind.
We'd like to find a rule for the
composition of these two functions.
So, let's start by finding, start by using
the definition: g composed with f of x is g of f of x.
Alright, so we know that f of x is 3 x, so
let's make the substitution, and we see that
what we want is to find g of 3 x.
So here I'm going to replace the x with 3 x,
very carefully paying attention to what's
inside the parentheses and what's going to be squared.
Alright, I need to do the exponent first so
this is 4 times 9 x squared plus 6, and if I
multiply here, I'll get 36 x squared plus 6.
We're also asked to state the domain of this
function, so let's start at the beginning.
You want to take any x in the domain of f: f
is a linear function so its domain is all real numbers.
This is going to give us an output of a
function value that is still going to be a
real number because the range of any linear
function is all real numbers.
So that means we're going to have to get
some real number out that we then like to
turn around and put into the function g.
Well, g is a quadratic function, and the
domain of a quadratic function is all real numbers.
So, we're not going to have any restrictions whatsoever.
The domain of the composition of these two
functions will be all real numbers.
So, one thing that you should be wondering
is: does it matter which order you do the f
and the g in a composition? So, let's find out.
Here we want to find the composition of f with g.
By definition this is f of g of x.
We know from above that g of x is 4 x
squared plus 6, so we make that substitution.
And we see that what we want now is to find
f of 4 x squared plus 6.
So, look at f of x, and everywhere you see
an x, replace it with 4 x squared plus 6.
We get 3 times 4 x squared plus 6. Distribute.
And we're also again asked to find the
domain, but we're dealing with the same two
functions, and we're going to take an x
value starting with g of x.
So, the domain of g of x is all real numbers.
We're going to take whatever we get it and
put it into the function f, a linear
function whose domain is all real numbers,
so again there aren't going to be any
restrictions in what x can be, and the
domain of this function is all real numbers again.
Remember I asked you a minute ago if it
mattered if you switch the order of the f
and the g, and you can clearly see that you
get a different answer in most cases.
Sometimes you won't, and that's a very
special type of function that will come up
later in your studies.