How to Verify Inverse Functions

Check that two functions are inverses by composition: f(g(x)) = x and g(f(x)) = x. Worked examples, a graphical check, and where domains trip people up.

How to Verify Inverse Functions

Your homework says "prove these two functions are inverses" and you need a method that works every time without guessing. The composition test is the only reliable way to verify inverse functions: compute f(g(x)) and g(f(x)) and check that both simplify to exactly x. If either fails, the pair is not inverse.

The Composition Test

What the Test Requires

To verify inverse functions you compute two compositions. Given f(x) and g(x), find f(g(x)) and then g(f(x)). If both equal x for every x in the domain of the inner function, then f and g are inverses. OpenStax Precalculus 2e (Section 1.7, published 2023 by OpenStax, Rice University) defines this as the definition of inverse functions: f(g(x)) = x and g(f(x)) = x.

How to Apply the Notation

Use the exact notation: f(g(x)) means plug g(x) into every x in f. If you are given f(x) = 2x + 3 and g(x) = (x - 3)/2, then f(g(x)) = 2((x - 3)/2) + 3 = x - 3 + 3 = x. Then g(f(x)) = (2x + 3 - 3)/2 = (2x)/2 = x. Both return x, so they are inverses.

Why Both Compositions Are Needed

One composition can return x even when the functions are not truly inverses. A function might undo another on part of its domain but fail everywhere. For example, f(x) = x² and g(x) = √x give f(g(x)) = (√x)² = x for x ≥ 0. But g(f(x)) = √(x²) = |x|, not x. The pair fails the second composition. The OpenStax Precalculus 2e Section 1.7 treatment emphasizes that both f(g(x)) = x and g(f(x)) = x must hold for the pair to be inverses. Skip either test and you miss the failure.

Worked Examples: Linear, Radical, and Rational

Linear Example

f(x) = 2x + 3 and g(x) = (x - 3)/2. Compute f(g(x)) = 2((x - 3)/2) + 3 = x - 3 + 3 = x. Compute g(f(x)) = (2x + 3 - 3)/2 = (2x)/2 = x. Both equal x, so they are inverses. This is the standard example from OpenStax Precalculus 2e Section 1.7 because it is simple and shows the method.

Radical Example

f(x) = √x (domain x ≥ 0) and g(x) = x² (domain x ≥ 0). Compute f(g(x)) = √(x²) = x for x ≥ 0. Compute g(f(x)) = (√x)² = x for x ≥ 0. Both equal x on the restricted domain, so they are inverses. Note that without the domain restriction, f(x)=x² has no inverse because it fails the horizontal line test.

Rational Example

f(x) = 1/x and g(x) = 1/x. Compute f(g(x)) = 1/(1/x) = x (for x ≠ 0). Compute g(f(x)) = 1/(1/x) = x. Both equal x, so f is its own inverse, a self-inverse function. The graph is symmetric about y=x.

Graphical Check

A graph can show whether two functions might be inverses. The graph of an inverse function is a reflection of the original across the line y = x. Plot f(x) and g(x) on the same axes. If the two curves are mirror images across y = x, that is strong visual evidence. But the graphical check is not a proof, it can mislead when the domains are restricted or when functions are not one-to-one. Always confirm with the composition test.

The horizontal line test tells you if a function has an inverse at all. If any horizontal line crosses the graph more than once, the function is not one-to-one and does not have an inverse function. For example, f(x) = x² fails the horizontal line test, so it has no inverse without a domain restriction.

Domain Caveats

Match Domain and Range

The domain of the inverse function equals the range of the original function. When you verify inverse functions, you must check that the composition holds on the entire relevant domain. The most common mistake is ignoring domain restrictions, especially for quadratics and trigonometric functions.

Restrict When Needed

For f(x) = x², the inverse is not a single function. To get an inverse, restrict the domain to [0,∞) and use g(x) = √x. The composition test then works. The same applies to trigonometric functions: f(x) = sin(x) on [-π/2, π/2] has inverse arcsin(x) (also written sin⁻¹(x)), with range [-π/2, π/2]. The OpenStax Precalculus 2e Section 3.3 (2023 revision) covers inverse trigonometric functions with their principal value ranges. Always state the domain restriction before claiming an inverse exists.

Exponential and Logarithmic Pair

The inverse of f(x) = eˣ is g(x) = ln(x). The domain of g is x > 0, which equals the range of f. The composition test: e^(ln(x)) = x for x >Both hold on their respective domains, so they are inverses.

Common Questions

How do I check if two functions are inverses?

Compute both compositions f(g(x)) and g(f(x)). If both simplify to exactly x for all x in the domain of the inner function, they are inverses.

What does f(g(x)) = x mean?

It means that when you apply g first then f, you get back your original input. This is the composition test for inverse functions.

Are these functions inverses if only one composition works?

No. Both f(g(x)) = x and g(f(x)) = x must hold. If only one works, the functions are not inverses of each other.

What if my function has a restricted domain?

Perform the composition test on the restricted domain.