Composition of Functions

By now, you probably know that functions are mathematical expressions that take inputs and return outputs. But what if you were to use one function, as the input for another function? Well, then you have used composition of functions. When you use one function as the input to another, you create a whole new function. A composite function.

Get started Sign up for free
Composition of Functions Composition of Functions

Create learning materials about Composition of Functions with our free learning app!

  • Instand access to millions of learning materials
  • Flashcards, notes, mock-exams and more
  • Everything you need to ace your exams
Create a free account

Millions of flashcards designed to help you ace your studies

Sign up for free

Convert documents into flashcards for free with AI!

Contents
Table of contents

    Definition of Composition of Functions

    Composition of Functions is the method of using one function as the input to another function, resulting in a new unique function.

    How exactly is this expressed mathematically? Well, if a composite function just takes one function as the input to another, you can express it like so

    \[ h(x) = f(g(x)) \]

    where \(h(x)\) is the composite function, and \( f(x) \) and \(g(x)\) are its constituent functions.

    Alternatively, we can use circle notation to denote composition of functions

    \[ h(x) = (f \circ g)(x) \]

    where \(h(x)\) is the composite function, and \( f(x) \) and \(g(x)\) are its constituent functions.

    Let's take a look at how you can use this method to form composite functions.

    Forming Composite Functions

    That's all well and good, but how exactly do you form these composite functions? Well, it's really not too difficult at all!

    Let's take the functions \( f(x) = 2x\) and \( g(x) = x + 2\). To find the composite function \( h(x) = f(g(x)) \) you just substitute \( g(x) \) into \( f(x) \) wherever you see an \( x \).

    \[ \begin {align} h(x) &= f(g(x))\\ &= 2g(x)\\ & = 2(x + 2)\\ & = 2x + 4.\end{align} \]

    Below is a graph showing plots of the functions \( f(x) \) and \( g(x) \), and the resulting composite function \( h(x) \). You can see from the graph that from composing our two original functions, you end up with a new, and unique function.

    Composition of functions graph of a linear composite function gotten by composing two other linear functions studysmarter

    Fig. 1. Graph of functions \(f(x)\), \(g(x)\), and composite function \(h(x)\).

    Let's take a look at another example to make sure you've got this!

    Consider the functions \( f(x) = 3x + 2 \) and \( g(x) = 5x + 4 \). Find the function \( h(x) = (f \circ g)(x) \).

    Solution:

    To find the composite, replace each \( x \) in function \( f(x) \) with the the function \( g(x) \).

    \[ \begin{align} h(x) &= (f \circ g)(x) \\ &= 3g(x) + 2 \\ &= 3(5x + 4) + 2 . \end{align}\]

    Then it's just a case of simplifying by expanding the brackets and collecting like terms.

    \[ \begin{align} h(x) &= 3(5x + 4) + 2 \\ &=15x + 12 + 2 \\ &= 15x + 14 . \end{align} \]

    Not too tricky right? Well, remember, there's a bit more to functions than just the expression itself. When forming composite functions, you often have to stop and consider the domain of the function as well. Let's see just how that works.

    Domains of Composite Functions

    For a function to hold true, the input to that function must be within the function's domain.

    The domain of a function is the set of all possible inputs to that function.

    This is equally true for composite functions. From this, you can deduce that for the composite function to hold true, the output of the inner function must be within the domain of the outer function.

    Let's take a look at an example to make this a little clearer.

    Given the functions

    \[ f(x) = \frac{1}{x-2}, \quad \{ x \in \mathbb{R} | x \neq 2 \} \]

    and

    \[ g(x) = x + 2, \quad \{ x \in \mathbb{R} \}, \]

    what is the domain of composite function \( f(g(x)) \)?

    Remember that \(\{ x \in \mathbb{R} \}\) means that \(x\) is a real number, and that \( \{ x \in \mathbb{R} | x \neq 2 \} \) means \(x\) can be any real number except \(2\).

    Solution:

    The outputs of the function \( g(x) \) must fall within the domain of \( f(x) \), therefore they must be a subsection of the set of all real numbers.

    \[ \{ x \in \mathbb{R}\}\]

    You also know that the output of function \( g(x) \) must not equal \( 2 \).

    \[ g(x) \neq 2 \]

    \[ \frac{1}{x-2} \neq 2 \]

    \[ x \neq 2.5\]

    Therefore the domain of the function \( f(g(x)) \) is everything except \(2.5\), or on other words

    \[ \{ x \in \mathbb{R} | x \neq 2.5 \}. \]

    What happens when you compose functions with fractions?

    Composition of Functions with Fractions

    When you compose functions, and one of them has a square root or a fraction (like a rational function), you need to be careful with the domain. Let's take a look at an example.

    Take the functions \( g(x) = \sqrt{x}\) and

    \[ f(x) = \frac{1}{x-2}.\]

    Find \( (f \circ g)(x) \) and the domain of the composite function.

    Solution:

    Notice that the function \(g(x)\) is a square root, so its domain is \([0, \infty)\). So already you know that the domain of the composition function isn't all real numbers. If you do the composition,

    \[ (f \circ g) (x) = \frac{1}{\sqrt{x}-2}.\]

    You know that you can't have a zero in the denominator, so the domain of \(f \circ g\) needs to have

    \[ \sqrt{x} - 2 \not= 0,\]

    which means

    \[ \sqrt{x} \not= 2,\]

    so

    \[ x \not= 4.\]

    Combining the restrictions on the domain of \(g(x)\) with the restriction that \(x \not= 4\) gives you that the composition \( (f \circ g)(x)\) has a domain of \( [0, 4) \cup (4, \infty)\).

    Composition of Functions with Multiple Variables

    Composition of functions can be undergone in functions with multiple variables just as with a single variable. These variables can be either shared or not shared by the individual functions, the process is still largely the same.

    It is important to note however that the final composite function will only contain variables present in the internal function.

    Let's take a look at an example to see how this works.

    First, let's look at two functions with different variables. Consider the functions

    \[ f(x) = \sqrt{x + 2} \]

    and

    \[ g(y) = 10y. \]

    Let's find the composition of these functions \( f(g(y)) \). Notice that the composite function is only a function of \( y \), and not of \( x \).

    Solution:

    As before, you substitute the value of \( g(y) \) for the \( x \) in \( f(x) \) to find the resultant composite function.

    \[ f(g(y)) = \sqrt{10y + 2} \]

    The domain of this composite function will also be in terms of \( y \). As you cannot take the square root of a negative (assuming you neglect imaginary numbers) the domain is as follows:

    \[ \begin{align} 10y + 2 &> 0\\ 10y &> -2 \\ y &>-0.2 . \end{align}\]

    So the whole composite function, including the function domain is

    \[f(g(y)) = \sqrt{10y + 2}, \quad\{y \in \mathbb{R}, y > -0.2 \}. \]

    Evaluating Compositions of Functions

    Once a composite function has been formed, evaluating it for a given input is simple. In fact, it's just the same as evaluating any other function!

    You simply substitute the input into the composite function and solve. Let's take a look at an example to make sure you've got this.

    Given the functions \( f(x) = 5x \) and \( g(x) = x + 4 \), evaluate the function \( h(x) = (f \circ g)(x)) \) at \( x = 3 \).

    Solution:

    First do the composition:

    \[ \begin{align} h(x) &= (f \circ g)(x)\\ &= 5(g(x))\\ & = 5(x + 4) \\ &= 5x + 20. \end{align} \]

    Then plug in \(x = 3\) to get

    \[ \begin{align} h(3) & = 5\cdot 3 + 20 \\ &=15 + 20\\ & = 35. \end{align}\]

    There is a special case of composite functions, that are very simple to evaluate that involve inverses.

    \[ f(f^{-1}(x)) = f^{-1}(f(x)) = x .\]

    Let's try working through an example to check this holds true.

    Given the function

    \[ f(x) = \frac{x}{x+1},\]

    show that \( f^{-1}(f(x)) = x \).

    Solution:

    First you find \( f^{-1}(x) \) by swapping \( x\) and \( y \):

    \[ f(x) = y = \frac{x}{x+1}, \]

    so

    \[ x = \frac{y}{y + 1}. \]

    Then you rearrange for \( y \) in terms of \( x \) to get:

    \[ \begin{align} \frac{(y+1)}{y} &= \frac{1}{x} \\ 1 + \frac{1}{y} &= \frac{1}{x} \\ \frac{1}{y} &= \frac{1}{x} - 1 \\ \frac{1}{y} &= \frac{1-x}{x} \\ y &= \frac{x}{1-x} . \end{align}\]

    Now, let's check and see if you have found the inverse correctly by evaluating \( h(x) = f\left(f^{-1}(x)\right) \):

    \[ \begin{align} h(x) &= \frac{x}{x+1}\\ & = \frac{\frac{x}{1-x}}{\frac{x}{1-x}+1} \\ &= \frac{x}{x+1-x} \\ & = x. \end{align} \]

    Since \(f\left(f^{-1}(x)\right) = x\) you know that you have found the inverse correctly.

    Decomposing Compositions of Functions

    It is possible to take a function and decompose it into constituent functions. This is essentially the same as performing function composition in reverse. Function decomposition is very easy to perform and just requires us to be able to identify constituent functions within the overall.

    Let's take a look at the function \( h(x) = 2x^2 + 4 \). Now, you can decompose this function by factorising.

    \[ h(x) = 2(x^2 + 2) \]

    Now, if the function was in the form \( f(g(x)) \), what would its parts be? Well, you can say that inside the brackets is one function, \( g(x) \), and out of the brackets is \( f(x) \).

    Let's try

    \[ f(x) = 2x \]

    and

    \[ g(x) = x^2 + 2. \]

    Evaluating \( f(g(x)) \) you get

    \[ \begin{align} f(g(x)) &= 2(x^2 + 2) \\ &= 2x^2 + 4 \\ &= h(x). \end{align}\]

    Therefore you have found the correct decomposition.

    Composition of Functions Examples

    Let's take a look at some example questions to see if you can use everything you've learned.

    Consider a rocket moving through space with a uniform acceleration, \( a \) and mass, \( m \), from an initial velocity, \( u \). Given that its velocity at time \( t \) is described by \( v = u + at \), and its kinetic energy is described by

    \[ E_K = \frac{1}{2} mv^2 ,\]

    find an expression for the rocket's kinetic energy at time \( t \).

    Solution:

    You can rewrite each of these equations to function notation, recognising that \( u \), \( a \), and \( m \) are all constants, \( t \) and \( v \) are your two independent variables, and \( v \) and \( E_K \) are your dependent variables. So in functional notation:

    \[ \begin{align} &v(t) = u + at \\ & E_K(v) = \frac{1}{2} mv^2 .\end{align}\]

    Now, you want to find \( E_K(v) \) terms of \( t \), so you create a composite function \( E_K(v(t)) \) to achieve this. So let's substitute the value of the function \( v(t) \) wherever there is a \( v \) in \( E_K(v) \). This gives you

    \[ E_K(v(t)) = \frac{1}{2} m(u + at) .\]

    Given the functions

    \[ f(x) = \frac{1}{x^2 + 6x + 9}, \quad \{ x \in \mathbb{N} | x \neq 3 \} \]

    and

    \[ g(x) = \sqrt{x}, \quad \{ x \in \mathbb{R}, \quad x\ge 0 \} ,\] what is the domain of composite function \( f(g(x)) \)?

    Solution:

    The output of \( g(x) \) must be within the domain of \( f(x) \). Therefore the outputs of \( g(x) \) must belong to the set \( \mathbb{N}\setminus \{3 \} \).

    That means the output of \( g(x) \) cannot be \( 3 \), since the output of \(g(x)\) must be within the domain of \(f(x)\) and the domain of \(f(x)\) does not include \(3\). Therefore

    \[ g(x) \neq 3, \]

    so

    \[ 3 \neq \sqrt{x} ,\]

    which means

    \[ x \neq 9. \]

    The output of \( g(x) \) must be a natural number, so the output must also be greater than zero. Therefore

    \[ \begin{align} & g(x) > 0 \\ & \sqrt{x} > 0\\ & x > 0. \end{align} \]

    That actually doesn't give you much new information since you already knew the output needed to be a natural number!

    Putting it all together, yur final domain for \( f(g(x) \) is therefore

    \[ \{ x \in \mathbb{N} | x \neq 9 \}. \]

    What about multivariable functions?

    Let's look at two functions with multiple shared variables. Consider the functions

    \[ f(x,y) = 2x + 9y \]

    and

    \[ g(x,y) = \frac{15x}{y - 10} .\]

    Let's find the composite function \( f(g(x,y),y) \).

    Solution:

    In this case, the \(y\) in the second spot of \( f(g(x,y),y) \) tells you that two things need to occur:

    1. the value of \( g(x,y) \) is substituted into \( f(x,y) \) where any \( x \) is present; and
    2. \(y\) remains where any \( y \) is present.

    Performing those two steps gives you

    \[ f(g(x,y),y) = 2 \left( \frac{15x}{y-10} \right) + 9y. \]

    Now, simplify by expanding brackets and collecting like terms:

    \[ \begin{align} f(g(x,y), y) &= \frac{30x}{y-10} + 9y \\ &= \frac{30x}{y-10} + \frac{9y(y-10)}{y-10}\\ & = \frac{30x + 9y^2 -90y}{y-10} . \end{align}\]

    Decompose the function

    \[ f(g(x)) = 4 \left( \frac{3x}{4x + 5} \right)^2 \]

    into constituent functions.

    Solution:

    You can see by observation that the inner function is

    \[ g(x) = \frac{3x}{4x + 5}, \]

    And the outer function is therefore

    \[ f(x) = 4x^2. \]

    Composition of Functions - Key takeaways

    • A new function can be formed by using one function as an input to another, this is called a composite function.
    • When considering the domain of a composition of two functions, it is important to consider the domain of the overall function, not simply of its constituent functions.
    • It is possible to decompose functions into two or more constituent functions.
    • The limit of a composite function at a point is the outer function evaluated at the limit of the inner function approaching that point.
    Frequently Asked Questions about Composition of Functions

    What is the composition of functions?

    Composition of functions is a method of combining functions that entails the output of one function being implemented as the input to another.

    How do you perform composition of functions?

    The output of one function is used as the input to another. In practise this looks like:

    h(x) = f(g(x))

    What are properties of composition of functions? 

    It largely depends on how "nice" the functions are.  About all you can say in general is that the range of the inner function will be the domain of the outer function.

    What are the limitations of composition of functions? 

    For the composition to be well defined, the range of the inner function must be included in the domain of the outer function.

    What is division composition of functions?

    You divide two composite functions exactly like you would two regular functions.

    Discover learning materials with the free StudySmarter app

    Sign up for free
    1
    About StudySmarter

    StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

    Learn more
    StudySmarter Editorial Team

    Team Math Teachers

    • 12 minutes reading time
    • Checked by StudySmarter Editorial Team
    Save Explanation Save Explanation

    Study anywhere. Anytime.Across all devices.

    Sign-up for free

    Sign up to highlight and take notes. It’s 100% free.

    Join over 22 million students in learning with our StudySmarter App

    The first learning app that truly has everything you need to ace your exams in one place

    • Flashcards & Quizzes
    • AI Study Assistant
    • Study Planner
    • Mock-Exams
    • Smart Note-Taking
    Join over 22 million students in learning with our StudySmarter App
    Sign up with Email

    Get unlimited access with a free StudySmarter account.

    • Instant access to millions of learning materials.
    • Flashcards, notes, mock-exams, AI tools and more.
    • Everything you need to ace your exams.
    Second Popup Banner