Sub topic 14
The Inverse of a Composite: Undo in Reverse Order
Assume you know function notation, composition, inverse functions, and how to solve equations for a variable. This chapter focuses on why the inverse of a composite reverses the order of the original functions.
The reverse-order rule
A composite function applies its functions from right to left:
\[ (f\circ g)(x)=f(g(x)). \]
The input first passes through \(g\), then through \(f\). To undo this process, undo \(f\) first and \(g\) second:
\[ (f\circ g)^{-1}=g^{-1}\circ f^{-1}. \]
This rule is the same as reversing steps in a procedure. If you put on shoes and then socks, you must remove the socks before the shoes.
| Forward process | Reverse process |
|---|---|
| \(x\to g(x)\to f(g(x))\) | \(y\to f^{-1}(y)\to g^{-1}(f^{-1}(y))\) |
Why the order reverses
Start with the forward composite:
\[ x \xrightarrow{g} g(x) \xrightarrow{f} f(g(x)). \]
Let \(y=f(g(x))\). To recover \(x\), apply \(f^{-1}\) to \(y\):
\[ f^{-1}(y)=g(x). \]
Then apply \(g^{-1}\):
\[ g^{-1}(f^{-1}(y))=x. \]
Therefore,
\[ (f\circ g)^{-1}(y)=(g^{-1}\circ f^{-1})(y). \]
The same conclusion follows from composition identities. Assuming the functions are invertible,
\[ (g^{-1}\circ f^{-1})\circ(f\circ g) =g^{-1}\circ(f^{-1}\circ f)\circ g =g^{-1}\circ I\circ g =I. \]
Here, \(I\) is the identity function, which returns its input unchanged.
Worked example
Let
\[ f(x)=2x+3,\qquad g(x)=x^3. \]
Their inverses are
\[ f^{-1}(x)=\frac{x-3}{2},\qquad g^{-1}(x)=\sqrt[3]{x}. \]
The inverse of \(f\circ g\) is therefore
\[ (f\circ g)^{-1}(x) =(g^{-1}\circ f^{-1})(x) =\sqrt[3]{\frac{x-3}{2}}. \]
Check the forward process at \(x=2\):
\[ g(2)=8,\qquad f(8)=19. \]
Now undo it:
\[ f^{-1}(19)=8,\qquad g^{-1}(8)=2. \]
def f(x):
return 2 * x + 3
def g(x):
return x ** 3
def f_inverse(y):
return (y - 3) / 2
def g_inverse(y):
return y ** (1 / 3)
value = f(g(2))
recovered = g_inverse(f_inverse(value))
print(value) # 19
print(recovered) # 2.0Domains and common errors
The formula requires both functions to have valid inverses on the relevant domains. The composite \(f\circ g\) accepts an input \(x\) only when \(x\) is in the domain of \(g\) and \(g(x)\) is in the domain of \(f\). Its inverse maps outputs back through the corresponding restricted domains.
A frequent error is writing
\[ (f\circ g)^{-1}=f^{-1}\circ g^{-1}. \]
That applies the undoing steps in the original order, so it generally does not return the starting input.
Exercise
If f(x) = 5x - 1 and g(x) = x + 4, write (f∘g)⁻¹(x).
Show answer
f⁻¹(x) = (x + 1)/5 and g⁻¹(x) = x - 4, so (f∘g)⁻¹(x) = g⁻¹(f⁻¹(x)) = (x + 1)/5 - 4.