Skip to main content

Composition and Inverse Functions

Two machines use the same pair of rules but apply them in opposite orders. Why can they give different outputs? We will track inputs through a composition, find its domain, and construct an inverse that reverses a rule.

  • Composition and inverse: Composition feeds one function’s output into another. An inverse reverses a one-to-one function on its range.

Core ideas​

Composition​

In (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)), apply gg first and check that its output is allowed by ff. If f(x)=xf(x)=\sqrt{x} and g(x)=x−2g(x)=x-2, the composition requires x≥2x\ge2.

Inverse functions​

An inverse reverses inputs and outputs. Solving y=2x+3y=2x+3 for xx gives f−1(y)=(y−3)/2f^{-1}(y)=(y-3)/2.

Restricting a domain​

The square function sends 22 and −2-2 to 44. Restricting its domain to x≥0x\ge0 leaves one input for each output and gives the inverse x\sqrt{x}.

Essential example​

Let g(x)=x−2g(x)=x-2 and f(x)=xf(x)=\sqrt{x}. Applying gg first subtracts two before taking the square root:

(f∘g)(x)=x−2,x≥2.(f\circ g)(x)=\sqrt{x-2},\qquad x\ge2.

Applying ff first takes the root before subtracting two:

(g∘f)(x)=x−2,x≥0.(g\circ f)(x)=\sqrt{x}-2,\qquad x\ge0.

At x=6x=6, the first rule gives 22 and the second gives 6−2\sqrt6-2. At x=1x=1, only the second composition is defined. Order affects both the values and the domain.

CompositionFirst ruleCondition on xx
f∘gf\circ gSubtract twox−2≥0x-2\ge0
g∘fg\circ fTake the square rootx≥0x\ge0

Undo one operation at a time​

For F(x)=3x−4F(x)=3x-4, the forward rule triples the input and subtracts four. The inverse adds four and divides by three. Thus F−1(y)=(y+4)/3F^{-1}(y)=(y+4)/3. Verify both orders:

F−1(F(x))=x,F(F−1(y))=y.F^{-1}(F(x))=x,\qquad F(F^{-1}(y))=y.

The notation F−1F^{-1} denotes the inverse function. The reciprocal 1/F(x)1/F(x) instead takes the reciprocal of each nonzero output.

Choose a one-to-one branch​

The square function on the whole real line has no inverse function because one output can come from two inputs. Restrict to x≥0x\ge0 and the inverse is x\sqrt{x}. Restrict to x≤0x\le0 and the inverse is −x-\sqrt{x}. Reflecting a chosen branch across y=xy=x swaps the coordinates. The domain of the inverse is the range of the chosen branch.

Read the domain of a repeated composition​

Let F(x)=1/(x−2)F(x)=1/(x-2) and consider F(F(x))F(F(x)). The inner rule excludes x=2x=2. The outer rule also excludes inputs equal to 22, so require F(x)≠2F(x)\ne2. Solving 1/(x−2)=21/(x-2)=2 gives the additional excluded input x=5/2x=5/2. At x=3x=3, the inner output is 11 and the outer output is −1-1. Tracking one stage at a time prevents a restriction from getting lost when the composed formula is simplified.

Keep and continue​

Keep the distinction between reversing a function and listing solutions of an equation. Next, solve quadratic equations whose solutions require complex numbers.

Course outline

Previous: Absolute-Value and Piecewise Functions

Next: Quadratics and Complex Numbers