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

מדריכי לימוד > College Algebra

Domain of a Composition

Learning Objectives

  • Find the domain of a composite function
  • Decompose a composite function
As we discussed previously, the domain of a composite function such as [latex]f\circ g[/latex] is dependent on the domain of [latex]g[/latex] and the domain of [latex]f[/latex]. It is important to know when we can apply a composite function and when we cannot, that is, to know the domain of a function such as [latex]f\circ g[/latex]. Let us assume we know the domains of the functions [latex]f[/latex] and [latex]g[/latex] separately. If we write the composite function for an input [latex]x[/latex] as [latex]f\left(g\left(x\right)\right)[/latex], we can see right away that [latex]x[/latex] must be a member of the domain of [latex]g[/latex] in order for the expression to be meaningful, because otherwise we cannot complete the inner function evaluation. However, we also see that [latex]g\left(x\right)[/latex] must be a member of the domain of [latex]f[/latex], otherwise the second function evaluation in [latex]f\left(g\left(x\right)\right)[/latex] cannot be completed, and the expression is still undefined. Thus the domain of [latex]f\circ g[/latex] consists of only those inputs in the domain of [latex]g[/latex] that produce outputs from [latex]g[/latex] belonging to the domain of [latex]f[/latex]. Note that the domain of [latex]f[/latex] composed with [latex]g[/latex] is the set of all [latex]x[/latex] such that [latex]x[/latex] is in the domain of [latex]g[/latex] and [latex]g\left(x\right)[/latex] is in the domain of [latex]f[/latex].

A General Note: Domain of a Composite Function

The domain of a composite function [latex]f\left(g\left(x\right)\right)[/latex] is the set of those inputs [latex]x[/latex] in the domain of [latex]g[/latex] for which [latex]g\left(x\right)[/latex] is in the domain of [latex]f[/latex].

How To: Given a function composition [latex]f\left(g\left(x\right)\right)[/latex], determine its domain.

  1. Find the domain of g.
  2. Find the domain of f.
  3. Find those inputs, x, in the domain of g for which g(x) is in the domain of f. That is, exclude those inputs, x, from the domain of g for which g(x) is not in the domain of f. The resulting set is the domain of [latex]f\circ g[/latex].

Example: Finding the Domain of a Composite Function

Find the domain of

[latex]\left(f\circ g\right)\left(x\right)\text{ where}f\left(x\right)=\frac{5}{x - 1}\text{ and }g\left(x\right)=\frac{4}{3x - 2}[/latex]

Answer: The domain of [latex]g\left(x\right)[/latex] consists of all real numbers except [latex]x=\frac{2}{3}[/latex], since that input value would cause us to divide by 0. Likewise, the domain of [latex]f[/latex] consists of all real numbers except 1. So we need to exclude from the domain of [latex]g\left(x\right)[/latex] that value of [latex]x[/latex] for which [latex]g\left(x\right)=1[/latex].

[latex]\begin{array}{l}\frac{4}{3x - 2}=1\hfill \\ 4=3x - 2\hfill \\ 6=3x\hfill \\ x=2\hfill \end{array}[/latex]

So the domain of [latex]f\circ g[/latex] is the set of all real numbers except [latex]\frac{2}{3}[/latex] and [latex]2[/latex]. This means that

[latex]x\ne \frac{2}{3}\text{ or }x\ne 2[/latex]

We can write this in interval notation as

[latex]\left(-\infty ,\frac{2}{3}\right)\cup \left(\frac{2}{3},2\right)\cup \left(2,\infty \right)[/latex]

Example: Finding the Domain of a Composite Function Involving Radicals

Find the domain of

[latex]\left(f\circ g\right)\left(x\right)\text{ where}f\left(x\right)=\sqrt{x+2}\text{ and }g\left(x\right)=\sqrt{3-x}[/latex]

Answer: Because we cannot take the square root of a negative number, the domain of [latex]g[/latex] is [latex]\left(-\infty ,3\right][/latex]. Now we check the domain of the composite function

[latex]\left(f\circ g\right)\left(x\right)=\sqrt{(\sqrt{3-x})+2}[/latex]

To determine the domain of this function we need to ensure that [latex]\sqrt{3-x}+2\ge{0}[/latex]. As long as we define x values for which [latex]\sqrt{3-x}[/latex] is positive, we will still have a positive output when we add [latex]2[/latex], so the domain of the composition is found by solving [latex]3-x\ge{0}[/latex]. The domain of [latex]\left(f\circ g\right)\left(x\right) = (-\infty,3][/latex].

Analysis of the Solution

This example shows that the domain of [latex]f\circ g[/latex] can contain values that are not in the domain of [latex]f[/latex], though they must be in the domain of [latex]g[/latex]. You cannot rely on an algorithm to find the domain of a composite function. Rather, you will need to first ask yourself "what is the domain of the inner function", and determine whether this set will comply with the domain restrictions of the outer function. In this case, the set [latex](-\infty,3][/latex] ensures a positive output for the inner function, which will in turn ensure a positive output for the composite function.

Try It

Find the domain of

[latex]\left(f\circ g\right)\left(x\right)\text{ where}f\left(x\right)=\frac{1}{x - 2}\text{ and }g\left(x\right)=\sqrt{x+4}[/latex]

Answer: [latex]\left[-4,0\right)\cup \left(0,\infty \right)[/latex]

Try it now

We can use graphs to visualize the domain that results from a composition of two functions. Graph the two functions below with Desmos.
  1. [latex]f(x)=\sqrt{3-x}[/latex]
  2. [latex]g(t) = \sqrt{x+4}[/latex]
Next, create a new function, [latex]h(x) = g(f(x))[/latex].  Based on the graph, what is the domain of this function? Explain why [latex]g(f(x))[/latex] and [latex]f(x)[/latex] have the same domain. Now define another composition, [latex]p(x) = f(g(x)[/latex].  What is the domain of this function? Explain why you can evaluate [latex]g(10)[/latex], but not [latex]p(10)[/latex].

Decompose a Composite Function

In some cases, it is necessary to decompose a complicated function. In other words, we can write it as a composition of two simpler functions. There may be more than one way to decompose a composite function, so we may choose the decomposition that appears to be most expedient.

Example: Decomposing a Function

Write [latex]f\left(x\right)=\sqrt{5-{x}^{2}}[/latex] as the composition of two functions.

Answer: We are looking for two functions, [latex]g[/latex] and [latex]h[/latex], so [latex]f\left(x\right)=g\left(h\left(x\right)\right)[/latex]. To do this, we look for a function inside a function in the formula for [latex]f\left(x\right)[/latex]. As one possibility, we might notice that the expression [latex]5-{x}^{2}[/latex] is the inside of the square root. We could then decompose the function as

[latex]h\left(x\right)=5-{x}^{2}\text{ and }g\left(x\right)=\sqrt{x}[/latex]

We can check our answer by recomposing the functions.

[latex]g\left(h\left(x\right)\right)=g\left(5-{x}^{2}\right)=\sqrt{5-{x}^{2}}[/latex]

Try It

Write [latex]f\left(x\right)=\frac{4}{3-\sqrt{4+{x}^{2}}}[/latex] as the composition of two functions.

Answer: Possible answer:

[latex]g\left(x\right)=\sqrt{4+{x}^{2}}[/latex]

[latex-display]h\left(x\right)=\frac{4}{3-x}[/latex-display] [latex-display]f=h\circ g[/latex-display]

Licenses & Attributions

CC licensed content, Original

CC licensed content, Shared previously

  • College Algebra. Provided by: OpenStax Authored by: Abramson, Jay et al.. Located at: https://openstax.org/books/college-algebra/pages/1-introduction-to-prerequisites. License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/[email protected].
  • Question ID 15772. Authored by: Master,Course. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 1600. Authored by: WebWork-Rochester, mb Lippman,David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.