The composition of functions, denoted as $f \circ g$ (read as “f composed with g” or “f of g”), is defined as applying one function to the result of another. Mathematically:
$$(f \circ g)(x) = f(g(x))$$
In simpler terms, you first apply the function $g$ to $x$, and then you apply the function $f$ to the result, $g(x)$.
For the composition $f(g(x))$ to be defined, the range of $g$ must be a subset of the domain of $f$.
$$r_g \subseteq d_f$$
This ensures that the output of $g(x)$ is a valid input for $f(x)$. If this condition is not met, the composite function is not defined for all $x$ in the domain of $g$.
The domain of the composite function $f \circ g$ is the same as the domain of the inner function $g$, provided the range condition is met.
$$dom(f \circ g) = dom(g)$$
Let $f(x) = x^2$ and $g(x) = x + 1$.
Find $(f \circ g)(x)$:
$$(f \circ g)(x) = f(g(x)) = f(x + 1) = (x + 1)^2 = x^2 + 2x + 1$$
Find $(g \circ f)(x)$:
$$(g \circ f)(x) = g(f(x)) = g(x^2) = x^2 + 1$$
Notice that in general, $f \circ g \neq g \circ f$.
Let $f: \mathbb{R} \rightarrow \mathbb{R}$, $f(x) = 2x - 1$ and $g: \mathbb{R} \rightarrow \mathbb{R}$, $g(x) = 3x^2$.
Find $f \circ g$:
$$f(g(x)) = f(3x^2) = 2(3x^2) - 1 = 6x^2 - 1$$
$dom(f \circ g) = \mathbb{R}$
$ran(f \circ g) = [-1, \infty)$
Find $g \circ f$:
$$g(f(x)) = g(2x - 1) = 3(2x - 1)^2 = 3(4x^2 - 4x + 1) = 12x^2 - 12x + 3$$
$dom(g \circ f) = \mathbb{R}$
$ran(g \circ f) = [0, \infty)$
| Function Composition | Rule | Domain | Range | Condition |
|---|---|---|---|---|
| $(f \circ g)(x) = f(g(x))$ | Evaluate $f$ at $g(x)$ | $dom(g)$ such that $g(x) \in dom(f)$ | Depends on $f$ and $g$ | $r_g \subseteq d_f$ |
| $(g \circ f)(x) = g(f(x))$ | Evaluate $g$ at $f(x)$ | $dom(f)$ such that $f(x) \in dom(g)$ | Depends on $f$ and $g$ | $r_f \subseteq d_g$ |
Free exam-style questions on Composition of Functions with instant AI feedback.
Consider the functions $f(x) = \frac{1}{x-a}$ and $g(x) = \sqrt{x}$, where $a$ is a real number. Analyse the conditions on $a$ for which the…
Let $f(x) = x + 2$ and $g(x) = x^2 - 1$. Define the composite function $f(g(x))$ and state its rule.
Let $f(x) = \frac{1}{x-2}$ and $g(x) = \sqrt{x+1}$. Explain why the composite function $f(g(x))$ is defined, but $g(f(x))$ is not defined fo…