Mathematics roadmap · فارسی

Composition and inverses: following stages and recovering inputs

A sensor might convert temperature to voltage, then a display converts voltage to a number. Predicting the display means feeding one stage's output into the next. Recovering temperature from the display also requires knowing whether information was lost. Composition follows two rules; inversion recovers the unique input from an output. This is a modern motivation, not a historical invention claim.

Goal: compute compositions with correct domains, distinguish inverses from reciprocals, and explain the need for one-to-one behavior. Prerequisites: domain, graph transformations.

1. Starting question

Starting with 4, is adding three then doubling the same as doubling then adding three?

Diagnostic answer

The first gives 2(4+3)=14, the second 2×4+3=11. Order can change the outcome; the same stages need not commute.

2. Notation and execution order

In (f∘g)(x)=f(g(x)), g acts first because its output occupies f's input slot. If g(x)=x+3 and f(x)=2x, then (f∘g)(x)=2x+6 but (g∘f)(x)=2x+3. The circle means composition, not multiplication; the product would be 2x(x+3).

The composition's domain contains x that belong to g's domain and have g(x) in f's domain. That second requirement can remove inputs even when they seem valid in the separate formulas.

For g(x)=√(x+1) and f(u)=1/(u−2), f(g(x)) requires x≥−1 and √(x+1)≠2, excluding x=3. Domain: [-1,3) ∪ (3,∞). In the reverse order, g(f(x))=√(1/(x−2)+1) requires x≠2 and (x−1)/(x−2)≥0. A sign check across 1 and 2 gives (-∞,1] ∪ (2,∞). Same stages, different domains.

3. When is the inverse a function?

If different inputs share an output, that output cannot reveal the original input. A one-to-one function avoids this ambiguity: f(a)=f(b) implies a=b. Its graph passes the horizontal-line test: no horizontal line intersects it more than once.

The inverse f⁻¹ maps f's range to f's domain. If a larger codomain was declared, inverting on that entire codomain also requires surjectivity: every codomain member must actually be attained. Here we restrict the original codomain to the range when taking inverses.

Composition sends input through g then f; an inverse follows a one-to-one function's arrow backward.

The backward arrow defines a unique rule only when distinct inputs have not merged into one output.

4. Construct and check an inverse

For y=3x−5, solve for x: y+5=3x, then x=(y+5)/3. Rename the inverse's input x: f⁻¹(x)=(x+5)/3. Check both directions:

f⁻¹(f(x))=(3x−5+5)/3=x; and f(f⁻¹(y))=3(y+5)/3−5=y.

Each check must use its appropriate domain. f⁻¹(x) differs from 1/f(x). Here the latter is 1/(3x−5), undefined at x=5/3, whereas the inverse is defined at every real input.

The function f(x)=x² on ℝ has no inverse function: inputs 2 and -2 both yield 4. Restricting its domain to [0,∞) gives inverse √x. Choosing (-∞,0] instead gives inverse −√x. Writing ±√x offers two outputs and is not an inverse function.

5. The inverse graph

A point (a,b) on f becomes (b,a) on the inverse, reflecting across y=x. Domain and range exchange roles. Reflecting the full parabola produces a two-branch relation; the horizontal-line test before inversion predicts the vertical-line test after reflection.

6. Independent practice

  1. For f(x)=x² and g(x)=x−1, find both compositions and evaluate at 3.
Answer 1

f(g(x))=(x−1)² gives 4; g(f(x))=x²−1 gives 8. Both have real domains but are unequal.

  1. Find the domain of √(1/(x−4)).
Answer 2

Require x≠4 and 1/(x−4)≥0. The numerator is positive and never zero, so the denominator must be positive: x>4.

  1. Invert f(x)=(x−2)/4 and check both directions.
Answer 3

From y=(x−2)/4, obtain x=4y+2, so the inverse is 4x+2. Checks: ((4x+2)−2)/4=x and 4((x−2)/4)+2=x. Domain and range are both real.

  1. Invert f(x)=(x−1)²+2 with domain [1,∞).
Answer 4

The range is [2,∞). Since x−1≥0, the equation y−2=(x−1)² gives x=1+√(y−2). Thus f⁻¹(x)=1+√(x−2), domain [2,∞), range [1,∞). The domain determined the root branch.

  1. Why does a constant function on a two-member domain lack an inverse function?
Answer 5

Both inputs share the output. Sending that output back to both inputs violates a function's unique-output rule. Restricting the domain to one member creates a different problem.

7. Continue and review

Proceed to polynomial, rational and piecewise functions when you can impose both composition-domain conditions and justify an inverse branch. Later verify by composition that the inverse of 2x+7 is (x−7)/2. Refute f⁻¹=1/f with a numerical example.

Sources and authorship

Examples and diagram are original. Further reading: OpenStax, composition, inverse functions. Online check: 2026-11-17. Diagram provenance.