Function Composition
Function composition refers to the pointwise application of one function to another, which produces a third function. When we compose the function with , we obtain . Sometimes, is also denoted as .
Contents
Existence of Composite
To ensure that this is well-defined, we must check that makes sense. For example, if and , then is not properly defined, because we cannot have . As such, the condition that we have to check is that the codomain of lies within the domain of . In a later section, we will look at the case when this condition is not satisfied.
For now, we will make the assumption that the range of is equal to the domain of , which satisfies this condition. We consider the functions and , which allows us to define function .
Let's look at the following example of function composition, where the functions and are given by and Let's see how we can find certain values of by plugging in
This gives us a pictorial sense of what is happening. Algebraically, we evaluate that
We can do the same for and show that
Observe that , which is a common mistake made. We say that function composition is not commutative.
If and , what is
We need to find for :
\[\begin{align} f \circ g (1) &= f( 2) = 3 \\ f \circ g (2) &= f(1) = 1 \\
f \circ g (3) &= f( 4) = 4 \\
f \circ g(4) &= g(3) = 2. \end{align} \]Thus, .
Consider the functions and given by and . What is
We have
The function is the number of chairs that are produced each month if the factory operates hours each day. The function is the monthly profit earned by selling chairs each month. What is the monthly profit earned by letting the factory operate 8 hours each day?
If the factory operates 8 hours each day, the amount of chairs produced is .
If chairs were sold, then the monthly profit is .Note: More generally, we know that the monthly profit of operating hours each day is .
Consider the functions and given by and . What is and
We have
\[\begin{align} f \circ g(x) &= f \left ( \frac{1}{x} \right) = \frac{1}{x} + 1 = \frac{ x+1} { x} \\
g \circ f(x) &= g (x+1) = \frac{ 1}{ x+1}. \ _\square \end{align}\]
Bonus question: If and are defined by and , then find
We have
Codomain of does not lie within Domain of
As shown above with the example of and , if the codomain of does not lie within the domain of , then the function might not make sense.
However, what we could do is to restrict the domain further such that the range of values of lies within the domain of Simply put, we are getting rid of values which do not make sense:
Since is only defined on the non-negative real numbers, the range of has to be the non-negative real numbers, or . This implies that , which is the restricted domain that will allow us to define .
Hence, .
Consider the functions given by , and given by . Define on a suitable domain.
The image of is all real numbers, which is not a subset of the domain of . Hence, we have to restrict the domain of . We require that , or that , which implies .
On this restricted domain, we have .
Hence, .
Consider the functions and . What is
In this case, since we are not given the domain, we will assume that it is the real numbers. Also, we know that is not defined for , so the domain of is . We have to restrict the domain of such that , or that . Hence, the domain to use is .
On this restricted domain, we have .
Hence, .
Consider the functions given by and given by . What is
The image of is all real numbers, which is not a subset of the domain of . Hence, we have to restrict the domain of . We require or equivalently which implies
On this restricted domain, we have Therefore, it follows that where
Consider the functions and . What is
The given function can be rewritten as
From we know that is not defined for and , so the domain of is . We have to restrict the domain of such that or equivalently . Hence, the domain to use is .
On this restricted domain, we have
Hence, where
Consider the functions and given by . What is
The value of is either positive or zero, and a denominator cannot be zero. Hence, the domain of for is
So, we must restrict the domain of such that or equivalently which implies that the domain to use is
On this restricted domain, we have
Hence, where
Consider the functions and What is
The value of is positive and the value of is either positive or zero. Hence, it follows that the domain of for is
So, the range of is or which implies that the domain to use is
On this restricted domain, we have
Hence, where
Consider and . Solve the equation
We have
As
we have
Bonus questions:
1) If and then find .
2) If and then find .
We have
Iterated Function Composition
If the range of a function is a subset of the domain of a function, then we can compose this function with itself. If so, we use to denote . More generally, we say that is composed with itself times, i.e.
A function which satisfies is called an involution. This means that the function is its own inverse.
Consider the function given by What is
We have
\[\begin{align} f(x) &= x + 1 \\
f^2 (x) &= f( x + 1) = x + 1 + 1 = x + 2\\
f^3 (x) &= f(x + 2) = x+2 + 1 = x + 3. \end{align} \]This strongly suggests that , which we can prove using induction.
Consider the function Then find and
Given let us first find
You can see that is an identity function as
In some questions where you have to find multiple composite functions, if you get as Identity function which means you are lucky enough and you need not solve the whole problem. If then
For example, take the above problem where we got that is an Identity function. In is repeated 3 times or it can be written as where 3 is an odd number. So,
In 4 is an even number, so
Bonus question : Consider the previous problem. If then find and
Given
Here, so we cannot apply any shortcut and must go through fundamentals:
Consider the function given by . What is
We have
\[\begin{align} g(x) &= \frac{1}{x} \\
g^2(x) &= g \left( \frac{1}{x} \right) = \frac{1}{\hspace{3mm} \frac{1}{x}\hspace{3mm} } = x \\ g^3 (x) &= g(x) = \frac{ 1}{x}. \end{align} \]Thus, we have
and satisfies the following for all functions
What is the value of