Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Verify That Two Functions Are Inverses

Two functions are inverses when each one undoes the other. You prove it by composing them in both orders: if both f(g(x))f(g(x)) and g(f(x))g(f(x)) simplify to xx, then g=f−1g = f^{-1}.

Recognize the task

The question gives two formulas and asks "are these inverses?", "verify that g=f−1g = f^{-1}", or you want to check an inverse you just found. Typical pairs: 5x−25x - 2 and x+25\frac{x + 2}{5}, x3x^3 and x3\sqrt[3]{x}, x2x^2 on [0,∞)[0, \infty) and x\sqrt{x}. Test: you have both formulas; no solving is needed, only substitution.
The test is explained in the lesson section Verifying Inverses via Composition.

Two ways to do it

Compose both waysproof
f(g(x))=xandg(f(x))=xf(g(x)) = x \quad \text{and} \quad g(f(x)) = x
Both identities must hold on the right domains (inverse composition property).
Swap test pointsquick check
f(a)=b  ⇒  g(b)=af(a) = b \;\Rightarrow\; g(b) = a
A failure proves they are not inverses; a success at a few points only suggests it (inverse tables).

Steps

StepOn f(x)=5x−2f(x) = 5x - 2 and g(x)=x+25g(x) = \dfrac{x + 2}{5}
1Compute f(g(x)) and simplify. Put the whole formula of gg in place of xx in ff.Substitution ↗5⋅x+25−2=(x+2)−2=x5 \cdot \frac{x + 2}{5} - 2 = (x + 2) - 2 = x ✓
2Compute g(f(x)) and simplify. Now the other order: ff goes inside gg.Substitution ↗(5x−2)+25=5x5=x\frac{(5x - 2) + 2}{5} = \frac{5x}{5} = x ✓
3Check the domains. Each identity must hold on the whole domain of the inner function; the domain of gg must be the range of ff.both domains are R\mathbb{R} ✓
4State the conclusion. Both compositions give xx, so the functions are inverses. If either one fails, they are not.g=f−1g = f^{-1}

Worked examples

Example 1 · a linear pair

passes
f(x)=2x+6f(x) = 2x + 6, g(x)=x2−3g(x) = \frac{x}{2} - 3
f(g(x))=2(x2−3)+6=xf(g(x)) = 2\left(\frac{x}{2} - 3\right) + 6 = x
first order
g(f(x))=2x+62−3=xg(f(x)) = \frac{2x + 6}{2} - 3 = x
second order
g=f−1g = f^{-1}
both give xx

Example 2 · a pair that fails

fails
f(x)=3x+1f(x) = 3x + 1, g(x)=x3−1g(x) = \frac{x}{3} - 1
f(g(x))=3(x3−1)+1=x−2f(g(x)) = 3\left(\frac{x}{3} - 1\right) + 1 = x - 2
not xx
not inverses; f−1(x)=x−13f^{-1}(x) = \frac{x - 1}{3}
one failure is enough

Example 3 · a pair that needs a domain

restricted
f(x)=x2f(x) = x^2 on [0,∞)[0, \infty), g(x)=xg(x) = \sqrt{x}
f(g(x))=(x)2=xf(g(x)) = (\sqrt{x})^2 = x for x≥0x \geq 0
first order
g(f(x))=x2=∣x∣=xg(f(x)) = \sqrt{x^2} = |x| = x for x≥0x \geq 0
∣x∣=x|x| = x on this domain
inverses on [0,∞)[0, \infty)
the restriction is essential
If the check fails, redo the algebra on the finding the inverse page.

See it happen

Composing a function with its inverse is a round trip: gg moves the input somewhere and ff brings it straight back, so the composite is the identity x↦xx \mapsto x. Both round trips must work, starting from either side. On a graph, inverse pairs are mirror images in the line y=xy = x; compare a pair in the inverse function visualizer.

Common mistakes

Checking only one composition

✗ f(x)=x2f(x) = x^2, g(x)=xg(x) = \sqrt{x}: f(g(x))=xf(g(x)) = x, so they are inverses on R\mathbb{R}
✓ g(f(x))=∣x∣g(f(x)) = |x|, and g(f(−2))=2g(f(-2)) = 2; they are inverses only on [0,∞)[0, \infty)

Testing a single point

✗ f(x)=2x+1f(x) = 2x + 1, g(x)=x−2g(x) = x - 2: f(1)=3f(1) = 3 and g(3)=1g(3) = 1, so g=f−1g = f^{-1}
✓ f(g(x))=2x−3≠xf(g(x)) = 2x - 3 \neq x: not inverses

Using the reciprocal as the inverse

✗ g(x)=15x−2g(x) = \frac{1}{5x - 2} is the inverse of 5x−25x - 2
✓ f(g(1))=53−2=−13≠1f(g(1)) = \frac{5}{3} - 2 = -\frac{1}{3} \neq 1: not inverses