If you watched the function notation video on the main functions page, you got a taste of a concept called composite functions or composition of functions. The idea is that, instead of just plugging numbers in functions, you can also plug in more sophisticated things including other functions. That's basically all this is going on.
If you want a complete lecture on this topic, we recommend this video. He also gives you some information about operations on functions, which is good to review at this point.
video by Prof Leonard 

Getting Started
Let's get started by looking at an example.
For the functions \(f(x)=3x^2\) and \(g(x)=x+3\), by now you know that \(f(3)=3(3)^2=27\) and \(g(2)=2+3=5\). But what is \(f(x+3)\)? Well, if you compare \(f(x+3)\) and \(f(x)\), you notice that we replaced \(x\) in \(f(x)\) with \(x+3\) to get \(f(x+3)\). So since we replace \(x\) with \(x+3\) in \(f(x)\), we do the same replacement in the function \(f(x)=3x^2\) to get \(f(x+3)=3(x+3)^2\).
Similarly, we can find \(g(3x^2)\) by replacing x with \(3x^2\) to get \(g(3x^2)=3x^2+3\).
Given the same two functions \(f(x)=3x^2\) and \(g(x)=x+3\), we can write the same two composition of functions as \(f(g(x))\) and \(g(f(x))\).
Here is a great video explaining composite functions with lots of examples.
video by MIP4U 

Another way to write the composition of the two functions \(f(x)\) and \(g(x)\) is \( f(g(x)) = (f \circ g)(x)\). You will also see this written as \(f \circ g\) without the \((x)\).
Be careful with composition, \(f(g(x)) \neq g(f(x))\) most of the time. There will be times that they are equal but those are very special cases (like with inverse functions).
Time for some practice.
Unless otherwise instructed, for \( f(x) = 3x  1 \) and \( g(x) = 2x^2 + x + 1 \), find \( f \circ g \) and \( g \circ f \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = 3x  1 \) and \( g(x) = 2x^2 + x + 1 \), find \( f \circ g \) and \( g \circ f \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = 3x  4 \) and \( g(x) = x^3  3 \), find \( f \circ g \) and \( g \circ f \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = 3x  4 \) and \( g(x) = x^3  3 \), find \( f \circ g \) and \( g \circ f \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = 5x + 2 \) and \( g(x) = x^3  4 \), calculate \( f(g(2)) \) and \( g(f(1)) \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = 5x + 2 \) and \( g(x) = x^3  4 \), calculate \( f(g(2)) \) and \( g(f(1)) \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = 2x  3 \) and \( g(x) = 5x + 1 \), find \( f \circ g \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = 2x  3 \) and \( g(x) = 5x + 1 \), find \( f \circ g \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = x + 3 \) and \( g(x) = x^2  5 \), find \( f \circ g \) and \( g \circ f \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = x + 3 \) and \( g(x) = x^2  5 \), find \( f \circ g \) and \( g \circ f \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = 3x + 2 \) and \( g(x) = x^2 + 1 \), find \( f \circ g \) and \( g \circ f \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = 3x + 2 \) and \( g(x) = x^2 + 1 \), find \( f \circ g \) and \( g \circ f \).
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = x^2  3 \) and \( g(x) = \sqrt{x1} \), find \( f \circ g \) and \( g \circ f \).
Problem Statement 

Unless otherwise instructed, for \( f(x) = x^2  3 \) and \( g(x) = \sqrt{x1} \), find \( f \circ g \) and \( g \circ f \).
Solution 

close solution

Log in to rate this practice problem. 

For \(f(x)=x^2+x\), \(g(x)=4x\), find \(f \circ g\) and \(g \circ f\).
Problem Statement 

For \(f(x)=x^2+x\), \(g(x)=4x\), find \(f \circ g\) and \(g \circ f\).
Solution 

video by PatrickJMT 

close solution

Log in to rate this practice problem. 

For \(f(x)=x^22x+3\), \(g(x)=2x+1\), find \(f \circ g\) and \(g \circ f\).
Problem Statement 

For \(f(x)=x^22x+3\), \(g(x)=2x+1\), find \(f \circ g\) and \(g \circ f\).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

\(f(x)=2x3\), \(g(x)=6x^24x+5\), find \(f(g(7))\), \(g(f(2))\), \(f(g(3))\), \(f(f(4))\).
Problem Statement 

\(f(x)=2x3\), \(g(x)=6x^24x+5\), find \(f(g(7))\), \(g(f(2))\), \(f(g(3))\), \(f(f(4))\).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

For \(f(x)=x^2+5\), \(g(x)=6x15\), find \((f \circ g)(2)\) and \((g \circ f)(2)\).
Problem Statement 

For \(f(x)=x^2+5\), \(g(x)=6x15\), find \((f \circ g)(2)\) and \((g \circ f)(2)\).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

For \(f(x)=3x/5+4\), \(g(x)=2x^25x+9\), find \((f \circ g)(2)\), \((g \circ f)(4)\), \((f \circ g)(1/2)\), \((f \circ f)(4/5)\).
Problem Statement 

For \(f(x)=3x/5+4\), \(g(x)=2x^25x+9\), find \((f \circ g)(2)\), \((g \circ f)(4)\), \((f \circ g)(1/2)\), \((f \circ f)(4/5)\).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

For \(f(x)=1/(x+5)\), \(g(x)=3/x5\), find \(f \circ g\) and \(g \circ f\).
Problem Statement 

For \(f(x)=1/(x+5)\), \(g(x)=3/x5\), find \(f \circ g\) and \(g \circ f\).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

For \(f(x)=x^3x+1\), \(g(x)=2x^2\), \(h(x)=\sqrt{x}\), find \( f(g(h(x))) \).
Problem Statement 

For \(f(x)=x^3x+1\), \(g(x)=2x^2\), \(h(x)=\sqrt{x}\), find \( f(g(h(x))) \).
Solution 

video by MIP4U 

close solution

Log in to rate this practice problem. 

For \(f(x)=x/(x+1)\), \(g(x)=x^{10}\), \(h(x)=x+3\), find \(f \circ g \circ h\).
Problem Statement 

For \(f(x)=x/(x+1)\), \(g(x)=x^{10}\), \(h(x)=x+3\), find \(f \circ g \circ h\).
Solution 

video by Krista King Math 

close solution

Log in to rate this practice problem. 

For \(h(x)=3x\), \(g(t)=2t2h(t)\), \(f(n)=5n^2+h(n)\), find \(h(g(8))\).
Problem Statement 

For \(h(x)=3x\), \(g(t)=2t2h(t)\), \(f(n)=5n^2+h(n)\), find \(h(g(8))\).
Solution 

video by Khan Academy 

close solution

Log in to rate this practice problem. 

Domain of Composite Functions 

To find the domain of composite functions, some care is required. Some instructors tell you to find the expression of the composite function and determine the domain from that. However, sometimes information is lost in the algebra and it is easy to get the incorrect answer.
The best way to determine the domain is to start with the inside function, determine the domain and range of it and then use it's range as the domain of the outside function.
Unless otherwise instructed, for \( f(x) = 1/x \) and \( g(x) = x + 3 \), find \( (f \circ g)(x) \), \( (g \circ f)(x) \) and the domains of each composite function.
Problem Statement 

Unless otherwise instructed, for \( f(x) = 1/x \) and \( g(x) = x + 3 \), find \( (f \circ g)(x) \), \( (g \circ f)(x) \) and the domains of each composite function.
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = \sqrt{x2} \) and \( g(x) = 1/(x+3) \), find \( f \circ g \) and it's domain.
Problem Statement 

Unless otherwise instructed, for \( f(x) = \sqrt{x2} \) and \( g(x) = 1/(x+3) \), find \( f \circ g \) and it's domain.
Solution 

close solution

Log in to rate this practice problem. 

Unless otherwise instructed, for \( f(x) = \sqrt{x5} \) and \( g(x) = 1/(8x) \), find \( g \circ f \) and it's domain.
Problem Statement 

Unless otherwise instructed, for \( f(x) = \sqrt{x5} \) and \( g(x) = 1/(8x) \), find \( g \circ f \) and it's domain.
Solution 

close solution

Log in to rate this practice problem. 

For \(f(x)=x+1/x\), \(g(x)=(x+1)/(x+2)\), find \(f \circ g\), \(g \circ f\), \(f \circ f\), \(g \circ g\) and their domains.
Problem Statement 

For \(f(x)=x+1/x\), \(g(x)=(x+1)/(x+2)\), find \(f \circ g\), \(g \circ f\), \(f \circ f\), \(g \circ g\) and their domains.
Solution 

video by Krista King Math 

close solution

Log in to rate this practice problem. 

For \(\displaystyle{f(x)=x+\frac{1}{x}; }\) \(\displaystyle{ g(x)=\frac{x+1}{x+2}}\) find the domains of \(f\circ g,~~ g\circ f,~~f\circ f,~~ g\circ g\).
Problem Statement 

For \(\displaystyle{f(x)=x+\frac{1}{x}; }\) \(\displaystyle{ g(x)=\frac{x+1}{x+2}}\) find the domains of \(f\circ g,~~ g\circ f,~~f\circ f,~~ g\circ g\).
Solution 

video by Krista King Math 

close solution

Log in to rate this practice problem. 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)= \frac{1}{x}; g(x)=\sqrt{x+4}}\).
Problem Statement 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)= \frac{1}{x}; g(x)=\sqrt{x+4}}\).
Solution 

video by PatrickJMT 

close solution

Log in to rate this practice problem. 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)=\sqrt{x8}; g(x)=x^2}\).
Problem Statement 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)=\sqrt{x8}; g(x)=x^2}\).
Solution 

video by PatrickJMT 

close solution

Log in to rate this practice problem. 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)=\frac{1}{x}; }\) \(\displaystyle{ g(x)=\frac{1}{(x+2)(x3)}}\).
Problem Statement 

Find the domain of \(g(f(x))\) where \(\displaystyle{f(x)=\frac{1}{x}; }\) \(\displaystyle{ g(x)=\frac{1}{(x+2)(x3)}}\).
Solution 

video by PatrickJMT 

close solution

Log in to rate this practice problem. 

Really UNDERSTAND Precalculus
To bookmark this page and practice problems, log in to your account or set up a free account.
Single Variable Calculus 

MultiVariable Calculus 

Do you have a practice problem number but do not know on which page it is found? If so, enter the number below and click 'page' to go to the page on which it is found or click 'practice' to be taken to the practice problem.
 
Help Keep 17Calculus Free 

The 17Calculus and 17Precalculus iOS and Android apps are no longer available for download. If you are still using a previously downloaded app, your app will be available until the end of 2020, after which the information may no longer be available. However, do not despair. All the information (and more) is now available on 17calculus.com for free. 