2.4 Composition of Functions: $f \circ g$

1. Definition of Composite Functions

For two functions $f$ and $g$, the composite function $f \circ g$ is created by utilizing the output of one function as the input for another.

$(f \circ g)(x) = f(g(x))$

This translates to evaluating $g(x)$ first, and plugging that result entirely into $f(x)$. Generally, operations are not commutative, establishing that $f \circ g \ne g \circ f$.

EXAMPLE 1

Let $f(x) = 2x^2 - 1$ and $g(x) = x + 1$.

(a) $(f \circ g)(x)$: Plug $g$ into $f$: $f(x+1) = \mathbf{2(x+1)^2 - 1}$.
(b) $(g \circ f)(x)$: Plug $f$ into $g$: $g(2x^2-1) = (2x^2 - 1) + 1 = \mathbf{2x^2}$.
(c) $(f \circ g)(1)$: Evaluated by substituting $x=1$ into the composed formula from (a): $2(2)^2 - 1 = \mathbf{7}$. Alternatively, direct substitution: $g(1) = 2$, then $f(2) = 2(2)^2 - 1 = \mathbf{7}$.
(d) $(g \circ f)(1)$: $f(1) = 1$, then $g(1) = \mathbf{2}$.

EXAMPLE 2

Let $f(x) = \frac{x+1}{2}$ and $g(x) = \sqrt{x}$.

(a) $(f \circ g)(x) = f(\sqrt{x}) = \mathbf{\frac{\sqrt{x}+1}{2}}$.
(b) $(g \circ f)(x) = g\left(\frac{x+1}{2}\right) = \mathbf{\sqrt{\frac{x+1}{2}}}$.
(c) Self-composition $(f \circ f)(x) = f\left(\frac{x+1}{2}\right) = \frac{\frac{x+1}{2}+1}{2} = \mathbf{\frac{x+3}{4}}$.
(d) Self-composition $(g \circ g)(x) = g(\sqrt{x}) = \sqrt{\sqrt{x}} = \mathbf{\sqrt[4]{x}}$.
(e) Triple composition $(f \circ f \circ f)(x) = f\left(\frac{x+3}{4}\right) = \frac{\frac{x+3}{4}+1}{2} = \mathbf{\frac{x+7}{8}}$.

2. The Identity Function $i(x)$

The identity function maps an input strictly to itself: $i(x) = x$. Composing any function with the identity function yields the original function:

$(f \circ i)(x) = f(x)$ $(i \circ f)(x) = f(x)$

3. Domain Constraints for Compositions (HL)

For a composition to be defined, the range of the initial inner function must strictly sit inside the domain of the outer function.

  • For $(f \circ g)(x)$: $g$ is applied first. Presupposition: $R_g \subseteq D_f$.
  • For $(g \circ f)(x)$: $f$ is applied first. Presupposition: $R_f \subseteq D_g$.