FUNCTIONS · STRUCTURE
Composition and inverse functions
Composition chains functions together. An inverse function reverses a function. Together, these ideas explain how multi-step processes are built and undone.
input
first output
final output
1. Function composition
The composition of \(g\) with \(f\) means “apply \(f\) first, then apply \(g\).”
Example
Let \(f(x)=2x+1\) and \(g(x)=x^2\). Then
The results differ because the functions are applied in different orders.
2. Domain of a composition
For \((g\circ f)(x)\) to exist, two conditions must hold: \(x\) must belong to the domain of \(f\), and the value \(f(x)\) must belong to the domain of \(g\).
Example: if \(f(x)=x-3\) and \(g(u)=\sqrt{u}\), then \((g\circ f)(x)=\sqrt{x-3}\), so \(x\ge3\).
3. What is an inverse function?
An inverse reverses the input-output relationship of a function. If \(f(a)=b\), then its inverse satisfies \(f^{-1}(b)=a\).
Here \(\operatorname{id}(x)=x\). The notation \(f^{-1}\) means inverse function, not \(1/f\).
When does an inverse exist?
A function has an inverse on its full codomain when it is bijective. At minimum, it must be one-to-one on the domain being inverted.
Horizontal line test
A real graph represents a one-to-one function exactly when every horizontal line intersects it at most once.
4. Finding an inverse algebraically
Find the inverse of \(f(x)=3x-5\).
5. Verifying an inverse
The strongest algebraic check is composition in both directions.
Both compositions return the identity, confirming the inverse.
6. Graphical interpretation
The graph of \(f^{-1}\) is the reflection of the graph of \(f\) across the line \(y=x\). Swapping every point \((a,b)\) to \((b,a)\) exactly reverses input and output.
Domain and range swap
\(D_{f^{-1}}=R_f\) and \(R_{f^{-1}}=D_f\).
Restriction may be necessary
For example, \(f(x)=x^2\) is not one-to-one on all real numbers, but restricting to \(x\ge0\) gives inverse \(f^{-1}(x)=\sqrt{x}\).
7. Common mistakes
Confusing inverse and reciprocal: \(f^{-1}(x)\neq1/f(x)\). Ignoring domain restrictions: an inverse may exist only after restricting the original domain. Reversing composition order: \((g\circ f)(x)\) means \(f\) first, then \(g\).
8. Practice
Let \(f(x)=x+4\) and \(g(x)=2x\). Find \((g\circ f)(x)\), \((f\circ g)(x)\), and \(f^{-1}(x)\).
Solution
\((g\circ f)(x)=2x+8\), \((f\circ g)(x)=2x+4\), and \(f^{-1}(x)=x-4\).