We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > Boundless Algebra

Inverse and Composite Functions

Introduction to Inverse Functions

To find the inverse function, switch the [latex]x[/latex] and [latex]y[/latex] values, and then solve for [latex]y[/latex].

Learning Objectives

Calculate the formula of an function's inverse by switching [latex]x[/latex] and [latex]y[/latex] and then solving for [latex]y[/latex].

Key Takeaways

Key Points

  • An inverse function reverses the inputs and outputs.
  • To find the inverse formula of a function, write it in the form of [latex]y[/latex] and [latex]x[/latex], switch [latex]y[/latex] and [latex]x[/latex], and then solve for [latex]y[/latex].
  • Some functions have no inverse function, as a function cannot have multiple outputs.

Key Terms

  • inverse function: A function that does exactly the opposite of another

Definition of Inverse Function

An inverse function, which is notated [latex]f^{-1}(x) [/latex], is defined as the inverse function of [latex]f(x)[/latex] if it consistently reverses the [latex]f(x)[/latex] process. That is, if [latex]f(x)[/latex] turns [latex]a[/latex] into [latex]b[/latex], then [latex]f^{-1}(x)[/latex] must turn [latex]b[/latex] into [latex]a[/latex]. More concisely and formally, [latex]f^{-1}(x)[/latex] is the inverse function of [latex]f(x)[/latex] if: [latex-display]f({f}^{-1}(x))=x[/latex-display] Below is a mapping of function [latex]f(x)[/latex]  and its inverse function, [latex]f^{-1}(x)[/latex].  Notice that the ordered pairs are reversed from the original function to its inverse.  Because [latex]f(x)[/latex] maps [latex]a[/latex] to [latex]3[/latex], the inverse [latex]f^{-1}(x)[/latex] maps [latex]3[/latex] back to [latex]a[/latex].
The mapping f has a, b, and c on the left and 1, 2, 3 on the right, with the mappings a to 3, b to 1, c to 2. The mapping f-inverse (f^-1) has 1, 2, and 3 on the left and a, b, and c on the right, with the mappings 1 to b, 2 to c, 3 to a. Inverse functions: mapping representation: An inverse function reverses the inputs and outputs.
Thus the graph of [latex]f^{-1}(x)[/latex] can be obtained from the graph of [latex]f(x)[/latex] by switching the positions of the [latex]x[/latex] and [latex]y[/latex]-axes. This is equivalent to reflecting the graph across the line [latex]y=x[/latex], an increasing diagonal line through the origin.
image Inverse functions: graphic representation: The function graph (red) and its inverse function graph (blue) are reflections of each other about the line [latex]y=x[/latex] (dotted black line). Notice that any ordered pair on the red curve has its reversed ordered pair on the blue line. For example, [latex](0,1)[/latex] on the red (function) curve is reflected over the line [latex]y=x[/latex] and becomes [latex](1,0)[/latex] on the blue (inverse function) curve. Where one curve is on the line [latex]y=x[/latex], the curves intersect, as a reflection over the line leaves the point unchanged.

Write the Inverse Function

In general, given a function, how do you find its inverse function? Remember that an inverse function reverses the inputs and outputs.  So to find the inverse function, switch the [latex]x[/latex] and [latex]y[/latex] values of a given function, and then solve for [latex]y[/latex].

Example 1

Find the inverse of: [latex]f(x)=x^2[/latex] a.: Write the function as:  [latex]y=x^2[/latex] b.: Switch the [latex]x[/latex] and [latex]y[/latex] variables: [latex]x=y^2[/latex] c.: Solve for [latex]y[/latex]: [latex]\begin {align} x&=y^2 \\ \pm\sqrt{x}&=y \end {align}[/latex] Since the function [latex]f(x)=x^2[/latex] has multiple outputs, its inverse is not a function. Notice the graphs in the picture below.  Even though the blue curve is a function (passes the vertical line test), its inverse would not be. The red curve for the function [latex]f(x)=\sqrt{x}[/latex] is not the full inverse of the function [latex]f(x)=x^2[/latex]
The function f(x)=x^2 is a parabola (u-shaped curve) opening up with its vertex at the origin. The function f(x)=square root of x is half a parabola opening to the right, in the first quadrant only. The inverse is not a function: A function's inverse may not always be a function.  The function (blue) [latex]f(x)=x^2[/latex], includes the points [latex](-1,1)[/latex] and [latex](1,1)[/latex].  Therefore, the inverse would include the points: [latex](1,-1)[/latex] and [latex](1,1)[/latex] which the input value repeats, and therefore is not a function. For [latex]f(x)=\sqrt{x}[/latex] to be a function, it must be defined as positive.

Example 2

Find the inverse function of: [latex]f(x)=2^x[/latex] As soon as the problem includes an exponential function, we know that the logarithm reverses exponentiation.  The complex logarithm is the inverse function of the exponential function applied to complex numbers.  Let's see what happens when we switch the input and output values and solve for [latex]y[/latex]. a.: Write the function as: [latex]y = {2}^{x}[/latex] b.: Switch the [latex]x[/latex] and [latex]y[/latex] variables: [latex]x = {2}^{y}[/latex] c.: Solve for [latex]y[/latex]: [latex]\begin {align} {log}_{2}x &= {log}_{2}{2}^{y} \\{log}_{2}x &= y{log}_{2}{2} \\{log}_{2}x &= y \\{f}^{1}(x) &= {log}_{2}(x) \end {align}[/latex]
y=2^x is increasing from the x-axis in quadrants 2 and 1. x=2^y is increasing from the y-axis from quadrant 4 to 1. They are reflections of each other over the line y=x. Exponential and logarithm functions: The graphs of [latex]y=2^x[/latex] (blue) and [latex]x=2^y[/latex] (red) are inverses of one another. The black line represents the line of reflection, in which is [latex]y=x[/latex].
Test to make sure this solution fills the definition of an inverse function.
  1. Pick a number, and plug it into the original function. [latex]2\rightarrow f(x)\rightarrow 4[/latex].
  2. See if the inverse function reverses this process. [latex]4\rightarrow f^{-1}(x)\rightarrow 2[/latex]. ✓

Composition of Functions and Decomposing a Function

Functional composition allows for the application of one function to another; this step can be undone by using functional decomposition.

Learning Objectives

Practice functional composition by applying the rules of one function to the results of another function

Key Takeaways

Key Points

  • Functional composition applies one function to the results of another.
  • Functional decomposition resolves a functional relationship into its constituent parts so that the original function can be reconstructed from those parts by functional composition.
  • Decomposition of a function into non-interacting components generally permits more economical representations of the function.
  • The process of combining functions so that the output of one function becomes the input of another is known as a composition of functions. The resulting function is known as a composite function. We represent this combination by the following notation: [latex](f∘g (x)=f(g(x))[/latex]
  • The domain of the composite function [latex](f∘g)[/latex] is all [latex]x[/latex] such that [latex]x[/latex] is in the domain of [latex]g[/latex] and [latex]g(x)[/latex] is in the domain of [latex]f[/latex].

Key Terms

  • codomain: The target space into which a function maps elements of its domain. It always contains the range of the function, but can be larger than the range if the function is not subjective.
  • domain: The set of all points over which a function is defined.

Function Composition

The process of combining functions so that the output of one function becomes the input of another is known as a composition of functions. The resulting function is known as a composite function. We represent this combination by the following notation: [latex-display](f∘g)(x)=f(g(x))[/latex-display] We read the left-hand side as "[latex]f[/latex]" composed with [latex]g[/latex] at [latex]x[/latex], and the right-hand side as  "[latex]f[/latex] of [latex]g[/latex] of [latex]x[/latex]."  The two sides of the equation have the same mathematical meaning and are equal.  The open circle symbol, [latex]∘[/latex], is called the composition operator. Composition is a binary operation that takes two functions and forms a new function, much as addition or multiplication takes two numbers and gives a new number.

Function Composition and Evaluation

It is important to understand the order of operations in evaluating a composite function. We follow the usual convention with parentheses by starting with the innermost parentheses first, and then working to the outside. In general, [latex](f∘g)[/latex] and [latex](g∘f)[/latex] are different functions. In other words, in many cases [latex]f(g(x))\ne g(f(x))[/latex] for all [latex]x[/latex]. Note that the range of the inside function (the first function to be evaluated) needs to be within the domain of the outside function. Less formally, the composition has to make sense in terms of inputs and outputs.

Evaluating Composite Functions Using Input Values

When evaluating a composite function where we have either created or been given formulas, the rule of working from the inside out remains the same. The input value to the outer function will be the output of the inner function, which may be a numerical value, a variable name, or a more complicated expression.

Example 1

If [latex]f(x)=-2x[/latex] and [latex]g(x)=x^2-1[/latex], evaluate [latex]f(g(3))[/latex] and [latex]g(f(3))[/latex]. To evaluate [latex]f(g(3))[/latex], first substitute, or input the value of [latex]3[/latex] into [latex]g(x)[/latex] and find the output.  Then substitute that value into the [latex]f(x)[/latex] function, and simplify: [latex-display]g(3)=(3)^2-1=9-1=8[/latex-display] [latex-display]f(8)=-2(8)=-16[/latex-display] Therefore, [latex]f(g(3))=-16[/latex] To evaluate [latex]g(f(3))[/latex], find [latex]f(3)[/latex] and then use that output value as the input value into the [latex]g(x)[/latex] function: [latex-display]f(3)=-2(3)=-6[/latex-display] [latex-display]g(-6)=(-6)^2-1=36-1=35[/latex-display] Therefore, [latex]g(f(3))=35[/latex]

Evaluating Composite Functions Using a Formula

While we can compose the functions for each individual input value, it is sometimes helpful to find a single formula that will calculate the result of a composition [latex]f(g(x))[/latex] or [latex]g(f(x))[/latex]. To do this, we will extend our idea of function evaluation. In the next example we are given a formula for two composite functions and asked to evaluate the function.  Evaluate the inside function using the input value or variable provided.  Use the resulting output as the input to the outside function.

Example 2

If [latex]f(x) =-2x[/latex] and [latex]g(x)=x^2-1[/latex], evaluate [latex]f(g(x))[/latex] and [latex]g(f(x))[/latex]. First substitute, or input the function [latex]g(x)[/latex], [latex]x^2-1[/latex] into the [latex]f(x)[/latex] function, and then simplify: [latex-display]f(g(x))=-2(x^2-1)[/latex-display] [latex-display]f(g(x))=-2x^2+2[/latex-display] For [latex]g(f(x))[/latex], input the [latex]f(x)[/latex] function, [latex]-2x[/latex] into the [latex]g(x)[/latex] function, and then simplify: [latex-display]g(f(x))=(-2x)^2-1 [/latex-display] [latex-display]g(f(x))=4x^2-1[/latex-display]

Functional Decomposition

Functional decomposition broadly refers to the process of resolving a functional relationship into its constituent parts in such a way that the original function can be reconstructed (i.e., recomposed) from those parts by function composition. In general, this process of decomposition is undertaken either for the purpose of gaining insight into the identity of the constituent components (which may reflect individual physical processes of interest), or for the purpose of obtaining a compressed representation of the global function; a task which is feasible only when the constituent processes possess a certain level of modularity (i.e., independence or non-interaction). In general, functional decompositions are worthwhile when there is a certain "sparseness" in the dependency structure; i.e. when constituent functions are found to depend on approximately disjointed sets of variables. Also, decomposition of a function into non-interacting components generally permits more economical representations of the function.

Restricting Domains to Find Inverses

Domain restriction is important for inverse functions of exponents and logarithms because sometimes we need to find an unique inverse.

Learning Objectives

Determine inverses of functions by restricting their domains

Key Takeaways

Key Points

  • [latex]f^{-1}(x)[/latex] is defined as the inverse function of [latex]f(x)[/latex] if it consistently reverses the [latex]f(x)[/latex]process.
  • Informally, a restriction of a function [latex]f[/latex] is the result of trimming its domain.
  • [latex]f(x)={x}^{2}[/latex], without any domain restriction, does not have an inverse function, as it fails the horizontal line test.

Key Terms

  • domain: The set of points over which a function is defined.

Inverse Functions

[latex]f^{-1}(x)[/latex] is defined as the inverse function of [latex]f(x)[/latex] if it consistently reverses the [latex]f(x)[/latex] process. That is, if [latex]f(x)[/latex] turns [latex]a[/latex] into [latex]b[/latex], then [latex]f^{-1}x[/latex] must turn [latex]b[/latex] into [latex]a[/latex]. More concisely and formally, [latex]f^{-1}x[/latex] is the inverse function of [latex]f(x)[/latex] if [latex]f({f}^{-1}(x))=x[/latex].
image Inverse functions' domain and range: If [latex]f[/latex] maps [latex]X[/latex] to [latex]Y[/latex], then [latex]f^{-1}[/latex] maps [latex]Y[/latex] back to [latex]X[/latex].

Domain Restrictions: Parabola

Informally, a restriction of a function is the result of trimming its domain. Remember that: If [latex]f[/latex] maps [latex]X[/latex] to [latex]Y[/latex], then [latex]f^{-1}[/latex] maps [latex]Y[/latex] back to [latex]X[/latex].  This is not true of the function [latex]f(x)=x^2[/latex]. Without any domain restriction, [latex]f(x)=x^2[/latex] does not have an inverse function as it fails the horizontal line test. But if we restrict the domain to be [latex]x > 0[/latex] then we find that it passes the horizontal line test and therefore has an inverse function.  Below is the graph of the parabola and its "inverse."  Notice that the parabola does not have a "true" inverse because the original function fails the horizontal line test and must have a restricted domain to have an inverse.
The function f(x)=x^2 is a parabola (u-shaped curve) opening up with its vertex at the origin. The function f(x)=square root of x is half a parabola opening to the right, in the first quadrant only. Failure of horizontal line test: Graph of a parabola with the equation [latex]y=x^2[/latex], the U-Shaped curve opening up. This function fails the horizontal line test, and therefore does not have an inverse. The inverse equation, [latex]y=\sqrt{x}[/latex] (other graph) only includes the positive input values of the parabola's domain. However, if we restrict the domain to be [latex]x>0[/latex], then we find that it passes the horizontal line test and will match the inverse function.

Domain Restriction: Exponential and Logarithmic Functions

Domain restriction is important for inverse functions of exponents and logarithms because sometimes we need to find an unique inverse.  The inverse of an exponential function is a logarithmic function, and the inverse of a logarithmic function is an exponential function.

Example 1

Is  [latex]x=0[/latex] in the domain of the function [latex]f(x)=log(x)[/latex]?  If so, what is the value of the function when [latex]x=0[/latex]?  Verify the result. No, the function has no defined value for [latex]x=0[/latex]. To verify, suppose [latex]x=0[/latex] is in the domain of the function [latex]f(x)=log(x)[/latex]. Then there is some number [latex]n[/latex] such that [latex]n=log(0)[/latex]. Rewriting as an exponential equation gives: [latex]10n=0[/latex], which is impossible since no such real number [latex]n[/latex] exists. Therefore, [latex]x=0[/latex] is not in the domain of the function [latex]f(x)=log(x)[/latex].

Inverses of Composite Functions

A composite function represents, in one function, the results of an entire chain of dependent functions.

Learning Objectives

Solve for the inverse of a composite function

Key Takeaways

Key Points

  • The composition of functions is always associative. That is, if [latex]f[/latex], [latex]g[/latex], and [latex]h[/latex] are three functions with suitably chosen domains and co-domains, then [latex] f ∘ (g ∘ h) = (f ∘ g) ∘ h[/latex], where the parentheses serve to indicate that composition is to be performed first for the parenthesized functions.
  • Functions can be inverted and then composed, giving the notation of: [latex](f' \circ g' ) (x)[/latex].
  • Functions can be composed and then inverted, yielding the following notation: [latex]{(f\circ g)}'(x)[/latex].

Key Terms

  • composite function: A function of one or more independent variables, at least one of which is itself a function of one or more other independent variables; a function of a function

Composition and Composite Functions

In mathematics, function composition is the application of one function to the results of another.
On the left, the domain X, with a, b, c, and d, undergoes function f, mapping them to another group of elements Y (in the middle), 1, 2, 3, and 4. a and b are mapped to 1, c is mapped to 3, and d is mapped to 4. The elements of Y are mapped by function g to a group of elements Z on the right. 1 is mapped to @, 2 and 3 are mapped to #, and 4 is mapped to !! Composition of functions: [latex]g \circ f[/latex], the composition of [latex]f[/latex] and [latex]g[/latex]. For example, [latex](g\circ f)(c) = \#[/latex].
The functions [latex]g[/latex] and [latex]f[/latex] are said to commute with each other if [latex]g ∘ f = f ∘ g[/latex]. In general, the composition of functions will not be commutative. A composite function represents in one function the results of an entire chain of dependent functions. For example, if a school becomes larger, the supply of food in the cafeteria must become larger. This would entail ordering more sandwiches, which means ordering more ingredients, drinks, plates, etc. The entire chain of dependent functions are the ingredients, drinks, plates, etc., and the one composite function would be putting the entire chain together in order to calculate a larger population at the school.

Inverses and Composition

Let's go through the relationship between inverses and composition in this example. let's take two functions, compose and invert them. Find: [latex](f∘g)'(x)(f\circ g)' (x)[/latex] [latex]\begin {align}f(x)&={x}^{2} \\g(x)&=x+1 \end {align}[/latex] First, compose them by applying the function [latex]f[/latex] to the result of applying function [latex]g[/latex]: [latex]\begin {align}(f\circ g)(x)&=f(x+1)=(x+1)^2 \\y&=(x+1)^2 \\\sqrt {y}&=x+1 \\\sqrt{y}-1&=x \end {align}[/latex] [latex][/latex]Then, invert it by switching the [latex]x[/latex] and [latex]y[/latex] variables: [latex]\begin {align} \sqrt{x}-1&=y \\\sqrt{x}-1&=(f\circ g)' (x) \end {align}[/latex]

Licenses & Attributions

CC licensed content, Shared previously

CC licensed content, Specific attribution