Compose and invert functions

Track input compatibility, reverse a process, restrict a domain and verify an inverse.

What to practice

  • Track input compatibility, reverse a process, restrict a domain and verify an inverse.

A heating system reads the air temperature, and a controller turns that reading into a fan speed. No single rule links the room's temperature to the fan, yet the link exists because one function's output became the next function's input. Composition names that chain. An inverse runs it backward: given the fan speed, which reading produced it? This chapter builds, simplifies and decomposes compositions, then reverses functions correctly, including when a domain must first be restricted.

Two habits carry the whole chapter. Read a composition from the inside out, and keep track of which inputs are allowed at every stage.

Composition passes one output forward

The composition of ff with gg is written f∘gf\circ g and defined by

(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x))

Here gg acts first, and its output becomes the input of ff: written left to right, worked right to left.

Order matters. Composition is not commutative, so f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different functions. With f(x)=x2f(x)=x^2 and g(x)=x+3g(x)=x+3, you get f(g(x))=(x+3)2f(g(x))=(x+3)^2 but g(f(x))=x2+3g(f(x))=x^2+3. At x=1x=1 the first gives 16 and the second gives 4.

The identity function I(x)=xI(x)=x returns every input unchanged, so f(I(x))=I(f(x))=f(x)f(I(x))=I(f(x))=f(x). It plays the role for composition that 0 plays for addition and 1 plays for multiplication. You will use it to define inverses.

Domain of a composition

An input xx belongs to the domain of f∘gf\circ g only when it passes two checks:

  1. xx is in the domain of gg, so g(x)g(x) exists.
  2. g(x)g(x) is in the domain of ff, so ff can accept it.

For f(x)=1xf(x)=\frac{1}{x} and g(x)=x−2g(x)=x-2, every real number passes the first check. The second check fails when g(x)=0g(x)=0, so the domain of f(g(x))=1x−2f(g(x))=\frac{1}{x-2} is all real numbers except 2. You set ff's forbidden input equal to g(x)g(x) and solved; the excluded number is not 0 itself.

Worked example 10.1: read a composition through a table and a graph

Values of a function can come from any representation. The table gives selected values of gg, and Figure 10.1 shows the graph of ff, which consists of line segments.

xx−2−10123
g(x)g(x)31−1042

Graph of a function f made of three line segments on the closed interval from x equals negative 2 to x equals 4. The segments join the points (negative 2, 1), (0, 3), (2, 2) and (4, negative 2), and both endpoints are drawn as closed dots. The grid has unit spacing.

Figure 10.1. A piecewise-linear function ff defined on −2≤x≤4-2\leq x\leq 4. Original graph.

  1. Find f(g(3))f(g(3)). The table gives g(3)=2g(3)=2. On the graph, f(2)=2f(2)=2. So f(g(3))=2f(g(3))=2.
  2. Find g(f(3))g(f(3)). Now ff acts first. The segment from (2,2)(2,2) to (4,−2)(4,-2) falls 2 units for each unit to the right, so f(3)=0f(3)=0. The table gives g(0)=−1g(0)=-1, so g(f(3))=−1g(f(3))=-1.
  3. Try g(f(1))g(f(1)). The segment from (0,3)(0,3) to (2,2)(2,2) gives f(1)=2.5f(1)=2.5. The table has no entry at 2.5 and says nothing about values between its entries, so g(f(1))g(f(1)) cannot be determined from the information given.

A table is a list of facts, not permission to interpolate.

Worked example 10.2: a simplified formula can hide a restriction

Let f(x)=x2−1f(x)=x^2-1 and g(x)=x+2g(x)=\sqrt{x+2}. Find each composition and its domain.

f(g(x))f(g(x)). Substitute: f(g(x))=(x+2)2−1f(g(x))=(\sqrt{x+2})^2-1. The square root needs x≥−2x\geq -2, and ff accepts every real output, so the domain is x≥−2x\geq -2. On that domain, (x+2)2=x+2(\sqrt{x+2})^2=x+2, and

f(g(x))=x+1,x≥−2f(g(x))=x+1,\quad x\geq -2

This is not the same function as y=x+1y=x+1. Two functions are equal only when they have the same domain and agree at every input in it. The graph of f∘gf\circ g is a ray starting at (−2,−1)(-2,-1), not a full line, and f(g(−3))f(g(-3)) is undefined even though −3+1=−2-3+1=-2.

g(f(x))g(f(x)). Here g(f(x))=x2−1+2=x2+1g(f(x))=\sqrt{x^2-1+2}=\sqrt{x^2+1}. Since x2+1>0x^2+1>0 for every real xx, this domain is all real numbers. The two compositions have different formulas and different domains.

Worked example 10.3: relate two quantities through a middle quantity

Constructed practice data: a pool is filled for 0≤t≤60\leq t\leq 6 hours, and its water depth is d(t)=0.3td(t)=0.3t meters. Because the pool's sides slope outward, the volume of water at depth dd meters is V(d)=50d+4d2V(d)=50d+4d^2 cubic meters. Write volume as a function of time and find the volume after 5 hours.

  1. Track units. dd turns hours into meters; VV turns meters into cubic meters. So V(d(t))V(d(t)) turns hours into cubic meters.
  2. Substitute. V(d(t))=50(0.3t)+4(0.3t)2=15t+0.36t2V(d(t))=50(0.3t)+4(0.3t)^2=15t+0.36t^2 for 0≤t≤60\leq t\leq 6.
  3. Evaluate. V(d(5))=15(5)+0.36(25)=84V(d(5))=15(5)+0.36(25)=84. Check through the chain: d(5)=1.5d(5)=1.5 and V(1.5)=75+9=84V(1.5)=75+9=84 cubic meters.
  4. State the domain. The composite inherits the time interval, so its largest volume is V(d(6))=102.96V(d(6))=102.96 cubic meters.

Volume and time were never directly related by a given formula, but composition built that relationship through depth.

Take a function apart

Decomposing a function means writing it as f(g(x))f(g(x)). Look for an inner expression that is computed first and then processed as a block. Decompositions are not unique, so choose one that serves the task.

Transformations from Chapter 6 are compositions in disguise. The horizontal shift g(x)=f(x−4)g(x)=f(x-4) is f(p(x))f(p(x)) with the inner function p(x)=x−4p(x)=x-4. The vertical dilation 3f(x)3f(x) is m(f(x))m(f(x)) with the outer function m(x)=3xm(x)=3x. Changes made to the input are inner functions; changes made to the output are outer functions.

Worked example 10.4: two decompositions of one function

Write h(x)=(3x−4)5+2h(x)=(3x-4)^5+2 as a composition in two different ways.

  • Decomposition 1. Inner g(x)=3x−4g(x)=3x-4, outer f(x)=x5+2f(x)=x^5+2. Check: f(g(x))=(3x−4)5+2f(g(x))=(3x-4)^5+2. This version shows hh as a transformation of x5x^5: the inner function changes the input, and +2+2 shifts the output.
  • Decomposition 2. Inner g(x)=(3x−4)5g(x)=(3x-4)^5, outer f(x)=x+2f(x)=x+2. The check gives the same hh.

An outer identity function always gives a decomposition, but a useless one; a useful decomposition splits the work into meaningful stages.

An inverse reverses the mapping

A function is one-to-one when every output comes from exactly one input. A one-to-one function ff has an inverse function f−1f^{-1} that undoes it:

f(a)=bmeansf−1(b)=af(a)=b\quad\mathrm{means}\quad f^{-1}(b)=a

The notation is not an exponent. In general f−1(x)≠1f(x)f^{-1}(x)\neq\frac{1}{f(x)}.

Inverses come with four linked facts.

  • Identity. f−1(f(x))=xf^{-1}(f(x))=x for every xx in the domain of ff, and f(f−1(x))=xf(f^{-1}(x))=x for every xx in the domain of f−1f^{-1}.
  • Swapped sets. The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.
  • Reflected graph. The point (a,b)(a,b) is on the graph of ff exactly when (b,a)(b,a) is on the graph of f−1f^{-1}, so the graphs are reflections over the line y=xy=x.
  • Swapped variables. To find a formula, write y=f(x)y=f(x), exchange xx and yy, and solve for yy.

Read an inverse from pairs, tables and graphs

For a table, exchange the input and output rows; the new table describes f−1f^{-1} only if no output was repeated. For a graph, f−1(b)f^{-1}(b) is the xx-coordinate of the point where the horizontal line y=by=b meets the graph. If some horizontal line meets the graph twice, ff is not one-to-one on that domain. A function that is always increasing or always decreasing on its domain passes this test automatically.

Worked example 10.5: reverse the operations of a rational function

Find the inverse of f(x)=x+4x−3f(x)=\frac{x+4}{x-3}, x≠3x\neq 3.

  1. Swap. Write x=y+4y−3x=\frac{y+4}{y-3}.
  2. Clear the fraction. x(y−3)=y+4x(y-3)=y+4, so xy−3x=y+4xy-3x=y+4.
  3. Collect the yy-terms. xy−y=3x+4xy-y=3x+4, so y(x−1)=3x+4y(x-1)=3x+4.
  4. Solve. f−1(x)=3x+4x−1f^{-1}(x)=\frac{3x+4}{x-1}, with x≠1x\neq 1.

The restriction is meaningful. As xx grows, f(x)f(x) approaches 1 but never equals it, so 1 is not in the range of ff; therefore 1 cannot be in the domain of f−1f^{-1}. Check one pair: f(4)=81=8f(4)=\frac{8}{1}=8, and f−1(8)=287=4f^{-1}(8)=\frac{28}{7}=4.

Restrict a domain to make an inverse

A function that repeats outputs has no inverse on its full domain. Restrict it to an interval on which it is always increasing or always decreasing, and the restricted function is invertible.

Worked example 10.6: choose a branch of a quadratic

Let f(x)=(x−1)2+2f(x)=(x-1)^2+2. Since f(0)=f(2)=3f(0)=f(2)=3, ff is not one-to-one. Its vertex is (1,2)(1,2), so restrict to x≥1x\geq 1, where ff is increasing. The restricted range is y≥2y\geq 2.

  1. Swap. x=(y−1)2+2x=(y-1)^2+2.
  2. Isolate the square. (y−1)2=x−2(y-1)^2=x-2, so y−1=±x−2y-1=\pm\sqrt{x-2}.
  3. Choose the sign. The inverse's outputs are the original inputs, which satisfy y≥1y\geq 1. Keep the positive root.

f−1(x)=1+x−2,x≥2f^{-1}(x)=1+\sqrt{x-2},\quad x\geq 2

Figure 10.2 shows both curves. If you had chosen the branch x≤1x\leq 1 instead, the inverse would be 1−x−21-\sqrt{x-2} for x≥2x\geq 2.

Square grid from negative 1 to 8 on both axes. A solid curve shows y equals f of x for x at least 1, rising steeply from a closed dot at (1, 2). A dotted gray curve continues the parabola to the left of x equals 1 and is labeled unused branch, x less than 1. A dashed curve shows y equals f inverse of x, starting at a closed dot at (2, 1) and rising slowly to the right. A thin dotted line shows y equals x. Square markers at (3, 6) on f and (6, 3) on the inverse are joined by a thin dashed segment that crosses y equals x at a right angle.

Figure 10.2. A restricted quadratic and its inverse are reflections over y=xy=x; the pair (3,6)(3,6) and (6,3)(6,3) shows the exchange. Original graph.

What goes wrong without the restriction? f(−1)=6f(-1)=6, but 1+6−2=31+\sqrt{6-2}=3, not −1-1. The formula returns the right-branch input that also produces 6.

Verify an inverse in both orders

Compose in both directions and watch the domains.

  • f(f−1(x))=(x−2)2+2=xf(f^{-1}(x))=(\sqrt{x-2})^2+2=x for x≥2x\geq 2.
  • f−1(f(x))=1+(x−1)2=1+∣x−1∣f^{-1}(f(x))=1+\sqrt{(x-1)^2}=1+|x-1|, which equals xx only when x≥1x\geq 1.

The absolute value is where the restriction does its work. Without x≥1x\geq 1, the second composition is not the identity.

Contexts can restrict an inverse further

The conversion F=1.8C+32F=1.8C+32 turns degrees Celsius into degrees Fahrenheit, and its inverse C=F−321.8C=\frac{F-32}{1.8} turns them back. Mathematically both accept every real number, but no temperature is below absolute zero, −273.15-273.15 °C. The context therefore restricts the inverse's domain to F≥−459.67F\geq -459.67. In context, an inverse's input and output units swap.

Common errors to repair

  • Working left to right. In f(g(x))f(g(x)), evaluate the inner function gg first.
  • Reading the inverse as a reciprocal. f−1(5)f^{-1}(5) asks which input gives 5; it is not 1f(5)\frac{1}{f(5)}.
  • Simplifying away a restriction. Record the domain before you simplify, as in Worked example 10.2.
  • Keeping both signs. After taking a square root, choose the sign that matches the restricted domain.
  • Assuming order does not matter. Test one input in both f(g(x))f(g(x)) and g(f(x))g(f(x)).

An explained incorrect solution. A student is asked for the domain of f(g(x))f(g(x)), where f(x)=1x−4f(x)=\frac{1}{x-4} and g(x)=x2g(x)=x^2, and writes: "f(g(x))=1x2−4f(g(x))=\frac{1}{x^2-4}. Since ff cannot accept 4, the domain is x≠4x\neq 4." The formula is right, but the reasoning applied ff's restriction to xx instead of to g(x)g(x). The excluded inputs are those with g(x)=4g(x)=4, that is, x2=4x^2=4. The correct domain is all real numbers except −2-2 and 22. At x=4x=4, the composite is 112\frac{1}{12}, so 4 belongs in the domain after all.

Try it

10.1 (guided). Use the table and Figure 10.1 from Worked example 10.1. (a) g(f(4))g(f(4)): from the graph, f(4)=f(4)= ; then g(g()=)= ____. (b) Find f(g(1))f(g(1)). (c) Find f(g(−1))f(g(-1)).

10.2. Let f(x)=x−3f(x)=\sqrt{x-3} and g(x)=7−2xg(x)=7-2x. Find the domain of f(g(x))f(g(x)).

10.3. Find the inverse of h(x)=2−xx+5h(x)=\frac{2-x}{x+5}, x≠−5x\neq -5, and state its domain.

10.4. Let f(x)=9−x2f(x)=9-x^2 for x≥0x\geq 0. Find f−1(x)f^{-1}(x) and its domain, evaluate f−1(5)f^{-1}(5), and verify that f(f−1(5))=5f(f^{-1}(5))=5.

Check your try-it work

10.1. (a) f(4)=−2f(4)=-2 and g(−2)=3g(-2)=3, so g(f(4))=3g(f(4))=3. (b) g(1)=0g(1)=0 and f(0)=3f(0)=3, so f(g(1))=3f(g(1))=3. (c) g(−1)=1g(-1)=1, and the segment from (0,3)(0,3) to (2,2)(2,2) gives f(1)=2.5f(1)=2.5, so f(g(−1))=2.5f(g(-1))=2.5. Here the graph supplies the in-between value; in Worked example 10.1 the table could not.

10.2. Every real number is allowed in gg. The square root needs g(x)−3≥0g(x)-3\geq 0, so 7−2x≥37-2x\geq 3, which gives x≤2x\leq 2. Students who solve x−3≥0x-3\geq 0 have applied the restriction to xx instead of to g(x)g(x).

10.3. Swap to get x=2−yy+5x=\frac{2-y}{y+5}. Then xy+5x=2−yxy+5x=2-y, so y(x+1)=2−5xy(x+1)=2-5x and h−1(x)=2−5xx+1h^{-1}(x)=\frac{2-5x}{x+1} with x≠−1x\neq -1. As a check, h(0)=25h(0)=\frac{2}{5} and h−1(25)=01.4=0h^{-1}\left(\frac{2}{5}\right)=\frac{0}{1.4}=0.

10.4. On x≥0x\geq 0, ff is decreasing with range y≤9y\leq 9. Swap: x=9−y2x=9-y^2, so y2=9−xy^2=9-x. The inverse's outputs must be at least 0, so f−1(x)=9−xf^{-1}(x)=\sqrt{9-x} for x≤9x\leq 9. Then f−1(5)=4=2f^{-1}(5)=\sqrt{4}=2 and f(2)=9−4=5f(2)=9-4=5.

Retrieve and review

Without the book, write the two domain checks for f∘gf\circ g and the four facts that link ff and f−1f^{-1}, then sketch Figure 10.2 and mark one exchanged pair. At your next session, redo Worked example 10.6 with the branch x≤1x\leq 1 and verify the inverse in both orders. A week later, decompose (2x+1)3−5(2x+1)^3-5 in two ways and say which shows a transformation of x3x^3. Chapter 11 applies these ideas to exponential and logarithmic functions, and Chapter 15 restricts trigonometric functions to define their inverses.

Practice

Attempt the printed Chapter 10 practice set before reading any solution. It contains twelve multiple-choice questions, Questions 155–166, followed by Written tasks 9–10.

  • No calculator: Questions 155–163. Show the inner value before the outer one, and state domains exactly.
  • Graphing calculator required: Questions 164–166 and both written tasks. Report decimal answers correct to three places unless a question says otherwise.

Allow about 25 minutes for the multiple-choice questions and about 16 minutes for each written task. Then check your work in "Chapter 10: answers and explanations" in the answer section. For each miss, use the repair note printed with the explanation and return to the named heading before trying a fresh question.

Use this chapter companion

Review the lesson, attempt the original practice, then check the explanation. Your printed study guide remains complete without the website.

Independence

Skill by Skill Prep is independent. SAT® and AP® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website or book. PSAT/NMSQT® is a registered trademark of the College Board and the National Merit Scholarship Corporation, which are not affiliated with, and do not endorse, this site. Bluebook™ is a trademark of the College Board. ACT® is a trademark of ACT Education Corp., which is not affiliated with and does not endorse this website or book. Desmos is a trademark of Desmos Studio PBC. Practice results describe these questions, not official scores or admission predictions.

Last updated .