Precalculus · Textbook draft · 10 minute reading

Composition and Inverse Functions

Track domains through a process and recover inputs when a function is one-to-one.

Before you begin

  • Function notation and transformations.

Learning objectives

  • Compute compositions with their domain restrictions.
  • Construct and verify inverse functions.
  • Restrict a domain to obtain an invertible branch.

A machine first doubles a measurement and adds one, then takes its square root. We can describe the two steps separately as g(x)=2x+1g(x)=2x+1 and f(u)=uf(u)=\sqrt u. Their composition performs the steps in order, and the restrictions from the later step determine which earlier inputs can enter the whole process.

Composition follows the actual inputs

The composition (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)) has domain

{x∈dom⁡g:g(x)∈dom⁡f}.\{x\in\operatorname{dom}g:g(x)\in\operatorname{dom}f\}.

In the machine example, gg accepts every real input but ff requires 2x+1≥02x+1\ge0. Thus (f∘g)(x)=2x+1(f\circ g)(x)=\sqrt{2x+1} has domain [−1/2,∞)[-1/2,\infty).

Reversing the steps gives (g∘f)(x)=2x+1(g\circ f)(x)=2\sqrt x+1 on [0,∞)[0,\infty). These compositions disagree in both formula and domain. Composition is generally not commutative.

For f(u)=1/(u−3)f(u)=1/(u-3) and g(x)=x2g(x)=x^2, the composite 1/(x2−3)1/(x^2-3) excludes ±3\pm\sqrt3. Each component’s restriction has a precise place: gg must be evaluable, then its output must avoid the forbidden input 3 of ff.

One-to-one functions retain enough information to reverse

A function is one-to-one when distinct inputs have distinct outputs. Equivalently, f(u)=f(v)f(u)=f(v) implies u=vu=v. Its graph passes the horizontal-line test. If outputs are repeated, recovering an input from an output would require a choice.

The function f(x)=3x−4f(x)=3x-4 is one-to-one on R\mathbb R. Solving y=3x−4y=3x-4 for xx gives x=(y+4)/3x=(y+4)/3. Relabeling the inverse input gives

f−1(x)=x+43.f^{-1}(x)=\frac{x+4}{3}.

The superscript −1-1 denotes an inverse function here, not a reciprocal. The reciprocal of 3x−43x-4 would be 1/(3x−4)1/(3x-4) and would perform a different operation.

We verify both compositions: f−1(f(x))=xf^{-1}(f(x))=x on the original domain, and f(f−1(y))=yf(f^{-1}(y))=y on the original range. The inverse domain is the original range; its range is the original domain.

A domain restriction selects an inverse branch

The square function on all real numbers is not one-to-one: 22 and −2-2 share output 4. Restricting the domain to [0,∞)[0,\infty) gives the inverse x\sqrt x. Restricting it to (−∞,0](-\infty,0] instead gives inverse −x-\sqrt x, with inverse domain still [0,∞)[0,\infty).

For f(x)=(x−2)2+1f(x)=(x-2)^2+1 on [2,∞)[2,\infty), the range is [1,∞)[1,\infty). Solving y−1=(x−2)2y-1=(x-2)^2 and using x−2≥0x-2\ge0 gives f−1(y)=2+y−1f^{-1}(y)=2+\sqrt{y-1}. The domain restriction selects the sign in the root calculation.

The graph of an inverse exchanges the two coordinates, reflecting the original graph in y=xy=x. If the original coordinates have different physical units, the inverse also exchanges their roles. A conversion from time to temperature becomes a calculation of time from an attained temperature.

Algebraic inverses require their exclusions

For f(x)=(2x+1)/(x−3)f(x)=(2x+1)/(x-3) with x≠3x\ne3, solve

y(x−3)=2x+1,(y−2)x=3y+1.y(x-3)=2x+1,\qquad (y-2)x=3y+1.

Hence the inverse is f−1(y)=(3y+1)/(y−2)f^{-1}(y)=(3y+1)/(y-2) for y≠2y\ne2. The excluded inverse input 2 is the output the original formula cannot attain: setting f(x)=2f(x)=2 leads to 1=−61=-6.

These computations also show one-to-one behavior. Each allowed output gives exactly one allowed input. Checking the resulting input against x≠3x\ne3 completes the inversion; the equation (3y+1)/(y−2)=3(3y+1)/(y-2)=3 would again require 1=−61=-6.

Exercises

  1. For f(x)=x2+1f(x)=x^2+1 and g(x)=x−2g(x)=x-2, calculate both compositions.
  2. Find the domain of 1/(x−2)\sqrt{1/(x-2)}.
  3. Invert f(x)=5x+7f(x)=5x+7 on R\mathbb R and check one composition.
  4. Invert f(x)=(x+1)2f(x)=(x+1)^2 restricted to x≤−1x\le-1.
  5. Explain why f−1f^{-1} is not the same as 1/f1/f for f(x)=2xf(x)=2x.
  6. Find the inverse and inverse domain of f(x)=1/(x+4)f(x)=1/(x+4).
Worked solutions
  1. f(g(x))=(x−2)2+1f(g(x))=(x-2)^2+1 and g(f(x))=x2−1g(f(x))=x^2-1, both on R\mathbb R.
  2. The reciprocal must be defined and nonnegative. Since its numerator is positive, require x>2x>2.
  3. f−1(x)=(x−7)/5f^{-1}(x)=(x-7)/5, and [(5x+7)−7]/5=x[(5x+7)-7]/5=x.
  4. Since x+1≤0x+1\le0, the inverse is −1−y-1-\sqrt y for y≥0y\ge0.
  5. The inverse is x/2x/2, while the reciprocal is 1/(2x)1/(2x) on x≠0x\ne0. One reverses the assignment; the other reciprocates its output.
  6. Solving y=1/(x+4)y=1/(x+4) gives x=1/y−4x=1/y-4. Thus f−1(y)=1/y−4f^{-1}(y)=1/y-4, with y≠0y\ne0.
Your study progress · Optional

Keep your place

Mark this lesson complete after you've read it, attempted its exercises, and explained its central idea in your own words.

Progress is not saved unless you choose to mark the lesson complete.

Saved only in this browser's local storage. No required account, server transmission, or analytics. You can reset your saved progress on the course page. Clearing browser data also clears the record.