This site is a work in progress. New lessons are added regularly. Contact us

Composition of Functions

Learning goals

  • Read gfg \circ f right to left, with ff acting first
  • Use associativity to drop parentheses from a chain
  • Check the domain against the range of the inner function
  • Show that composition need not commute, but sometimes does
  • Decompose a function, knowing the split is a choice
  • Write f2f^2 for fff \circ f, never for the square

Reading a composition right to left

Give the operation its symbol. The composition of ff and gg, written gfg \circ f, is the function

(gf)(x)=g(f(x)).(g \circ f)(x) = g(f(x)).

You feed xx to ff, and then feed the result f(x)f(x) to gg. The circle is the operation sign, exactly as ++ is the sign for addition, and gfg \circ f names a new function built from the two you started with.

The one thing to fix in your reading, because it causes more confusion than anything else in this lesson, is the order. In gfg \circ f the function on the right, ff, acts first, and the function on the left, gg, acts second. The notation runs right to left, opposite to the way you read a sentence. The reason is built into the definition: g(f(x))g(f(x)) has ff in the inner parentheses, and the inner operation always happens before the outer one. So gfg \circ f means “do ff, then gg,” never “do gg, then ff.”

The composite g of f as two machines in a rowInput x flows into box f, out as f of x, into box g, out as g of f of x, with a brace under the two boxes labeled g composed with f.xff(x)gg(f(x))g ∘ f
The composite g of f as a two-machine pipeline. The input x enters f and comes out as f(x); that value enters g and comes out as g(f(x)). The machines run left to right, but we write g of f because g acts on the output of f, so the name reads right to left and f goes first.

Worked example 1 Both orders of the same two functions

Let f(x)=x+1f(x) = x + 1 and g(x)=x2g(x) = x^2. Compute gfg \circ f and fgf \circ g, keeping track of which function acts first.

For gfg \circ f, the inner function is ff, so substitute f(x)=x+1f(x) = x + 1 into gg:

(gf)(x)=g(f(x))=(x+1)2=x2+2x+1.(g \circ f)(x) = g(f(x)) = (x + 1)^2 = x^2 + 2x + 1.

For fgf \circ g, the inner function is now gg, so substitute g(x)=x2g(x) = x^2 into ff:

(fg)(x)=f(g(x))=x2+1.(f \circ g)(x) = f(g(x)) = x^2 + 1.

The two results, x2+2x+1x^2 + 2x + 1 and x2+1x^2 + 1, are different functions; they agree only where 2x=02x = 0, that is at x=0x = 0. Swapping the order changed the answer, which is the first sign that composition, unlike addition, does not always let you reverse the two inputs.

Check your understanding

For f(x)=2xf(x) = 2x and g(x)=x3g(x) = x - 3, which expression is (gf)(x)(g \circ f)(x)?

Answer choices

The associative law

Addition of three numbers needs no parentheses: (a+b)+c(a + b) + c and a+(b+c)a + (b + c) are equal, so we simply write a+b+ca + b + c. Composition has the same property, and it is a genuine theorem worth proving, because it is what makes a chain of three or more functions unambiguous.

Composition is associative#

Let ff, gg, and hh be functions, and consider the two ways to group their composition, (hg)f(h \circ g) \circ f and h(gf)h \circ (g \circ f). Two functions are equal exactly when they have the same domain and agree at every input, the equality test from Function Notation, so we check the values and the domains.

For the values, apply each grouping to an input xx and unfold the definition one step at a time. The left grouping gives

((hg)f)(x)=(hg)(f(x))=h(g(f(x))),\big((h \circ g) \circ f\big)(x) = (h \circ g)(f(x)) = h\big(g(f(x))\big),

and the right grouping gives

(h(gf))(x)=h((gf)(x))=h(g(f(x))).\big(h \circ (g \circ f)\big)(x) = h\big((g \circ f)(x)\big) = h\big(g(f(x))\big).

Both collapse to the single expression h(g(f(x)))h(g(f(x))), so the two functions agree wherever they are defined.

For the domains, read off what each grouping requires. Building h(g(f(x)))h(g(f(x))) is legal exactly when xdomfx \in \operatorname{dom} f so that f(x)f(x) exists, then f(x)domgf(x) \in \operatorname{dom} g so that g(f(x))g(f(x)) exists, then g(f(x))domhg(f(x)) \in \operatorname{dom} h so that the outer hh applies. These three conditions are the same for both groupings, so the two functions have the same domain as well as the same values. By the equality test they are the same function.

Because the grouping never matters, we drop the parentheses and write hgfh \circ g \circ f. The same holds for any number of functions, which is why an iterated composition like ffff \circ f \circ f is unambiguous and needs no bracketing to say what it means.

The identity function

Addition has the number 00: adding it changes nothing, since a+0=aa + 0 = a. Composition has a function that plays the same role, the identity function

id(x)=x,\operatorname{id}(x) = x,

which hands back its input untouched. Composing with it changes nothing, but stating that carefully means being honest about the domain, because the equality test demands more than a matching formula.

The identity function is neutral for composition#

Let ff be a function, and let id(x)=x\operatorname{id}(x) = x. We show fid=ff \circ \operatorname{id} = f and idf=f\operatorname{id} \circ f = f, taking id\operatorname{id} on the correct set each time.

Take id\operatorname{id} with the same domain as ff. Then for every xdomfx \in \operatorname{dom} f,

(fid)(x)=f(id(x))=f(x),(f \circ \operatorname{id})(x) = f(\operatorname{id}(x)) = f(x),

and the domain of fidf \circ \operatorname{id} is {xdomf:id(x)domf}\{x \in \operatorname{dom} f : \operatorname{id}(x) \in \operatorname{dom} f\}, which is all of domf\operatorname{dom} f because id(x)=x\operatorname{id}(x) = x already lies there. Same domain, same values, so fid=ff \circ \operatorname{id} = f.

Now take id\operatorname{id} on a set that contains the outputs of ff, such as its codomain. Then for every xdomfx \in \operatorname{dom} f,

(idf)(x)=id(f(x))=f(x),(\operatorname{id} \circ f)(x) = \operatorname{id}(f(x)) = f(x),

and the domain is {xdomf:f(x)domid}\{x \in \operatorname{dom} f : f(x) \in \operatorname{dom} \operatorname{id}\}, which is again all of domf\operatorname{dom} f because every output of ff is in that set. So idf=f\operatorname{id} \circ f = f.

The care is the whole point. Sharing the formula xx is not enough for two functions to be equal; the equality test also demands the same domain. That is why id\operatorname{id} must be taken on the right set, the domain of ff on one side and a set holding its outputs on the other. Take it on too small a set and the composition would lose inputs and become a different function.

Order matters, but not never

The one law that addition has and composition lacks is commutativity. For numbers, a+b=b+aa + b = b + a always. For functions, gfg \circ f and fgf \circ g are usually different, and Worked Example 1 already showed why: running the same two machines in opposite orders can produce different outputs. With f(x)=x+1f(x) = x + 1 and g(x)=x2g(x) = x^2,

(gf)(x)=(x+1)2=x2+2x+1,(fg)(x)=x2+1,(g \circ f)(x) = (x + 1)^2 = x^2 + 2x + 1, \qquad (f \circ g)(x) = x^2 + 1,

and these differ by 2x2x, which is zero only at the single point x=0x = 0. So gffgg \circ f \ne f \circ g here.

But “usually different” is not “never equal,” and the difference is worth stating exactly, because overshooting it is the classic error. Some pairs genuinely commute. Take the two translations f(x)=x+1f(x) = x + 1 and g(x)=x+2g(x) = x + 2. Then

(fg)(x)=(x+2)+1=x+3=(gf)(x),(f \circ g)(x) = (x + 2) + 1 = x + 3 = (g \circ f)(x),

and the same works for any two translations f(x)=x+af(x) = x + a and g(x)=x+bg(x) = x + b, since both orders give x+a+bx + a + b and addition of the shifts does not care about order. So the correct statement names both cases: composition is not always commutative. For a general pair gffgg \circ f \ne f \circ g, while for special pairs the two are equal. Writing “composition is never commutative” is simply false, as the translations show; commuting is the exception, not the rule.

A little vocabulary ties the laws together. An operation that is associative and has an identity, but need not supply an inverse for every element or commute, gives its objects the structure algebraists call a monoid. Under composition the functions form one such monoid. The missing piece, an inverse that undoes a function, is what the next lesson supplies for the functions that have one.

Check your understanding

For which pair do the two compositions agree, (fg)(x)=(gf)(x)(f \circ g)(x) = (g \circ f)(x) for every xx?

Answer choices

The domain of a composition

Here is the idea the substitution procedure hides, and it is the most important thing in the lesson. When you build (gf)(x)=g(f(x))(g \circ f)(x) = g(f(x)), two things must be true for the answer to exist: ff must accept xx, and gg must accept the number f(x)f(x) that comes out. Writing that down gives the domain of the composition.

The domain of gfg \circ f#

By definition (gf)(x)=g(f(x))(g \circ f)(x) = g(f(x)), so this value exists exactly when every step inside it is legal. Reading from the inside out, first f(x)f(x) must be defined, which requires xdomfx \in \operatorname{dom} f. Given that, gg is then applied to the number f(x)f(x), which is legal exactly when f(x)domgf(x) \in \operatorname{dom} g. Both conditions must hold, and if they do the value g(f(x))g(f(x)) exists, so

dom(gf)={xdomf:f(x)domg}.\operatorname{dom}(g \circ f) = \{\, x \in \operatorname{dom} f : f(x) \in \operatorname{dom} g \,\}.

This is not domfdomg\operatorname{dom} f \cap \operatorname{dom} g. The second condition constrains f(x)f(x), an output of ff, so testing it requires knowing which numbers ff actually produces, the range of ff, not its domain. A value of xx can lie in both domf\operatorname{dom} f and domg\operatorname{dom} g yet be excluded, because f(x)f(x) escapes domg\operatorname{dom} g. The reverse also happens: a value of xx outside domg\operatorname{dom} g can still belong, as long as xdomfx \in \operatorname{dom} f and f(x)domgf(x) \in \operatorname{dom} g.

So computing the domain of a composition is where the range of the inner function finally earns its keep. Two examples make the point, and the second is the payoff of the whole chapter’s insistence that the domain is part of a function’s data.

Worked example 2 A square root inside a reciprocal

Let f(x)=xf(x) = \sqrt{x} and g(x)=1x2g(x) = \dfrac{1}{x - 2}. Find a formula for gfg \circ f and its domain.

The formula is a direct substitution:

(gf)(x)=g(x)=1x2.(g \circ f)(x) = g(\sqrt{x}) = \frac{1}{\sqrt{x} - 2}.

Now the domain. First ff must accept xx, and x\sqrt{x} needs x0x \ge 0. Second gg must accept the output x\sqrt{x}, and gg rejects only the input 22, so we need x2\sqrt{x} \ne 2. Since x=2\sqrt{x} = 2 exactly when x=4x = 4,

dom(gf)={x0 and x4}.\operatorname{dom}(g \circ f) = \{\, x \ge 0 \text{ and } x \ne 4 \,\}.

Compare that with the wrong shortcut. The intersection domfdomg\operatorname{dom} f \cap \operatorname{dom} g would throw out x=2x = 2 (the value gg forbids) and keep x=4x = 4. The truth is the reverse: x=2x = 2 is fine, because 22\sqrt{2} \ne 2, while x=4x = 4 is excluded, because 4=2\sqrt{4} = 2 is the one input gg cannot take. The excluded input is found through the range of ff, not by intersecting the two domains.

The domain of g of f as the inputs of f whose image lands in the domain of gTop line the domain of f with 0, 4, and 9 all included as closed points; bottom line the values g accepts with an open circle at 2; arrows send 0 to 0, 9 to 3, and 4 to the forbidden value 2, so 4 is excluded from the composition domain, not from the domain of f.dom f: the inputs x ≥ 0049023values g accepts: everything except 2f4 maps to 2
The domain of g of f is the part of dom f whose image lands where g is defined. Here f(x) = sqrt(x) sends the inputs x greater than or equal to 0 (top, and 4 is one of them) into the values g accepts (bottom, everything except 2). The inputs 0 and 9 map to 0 and 3 and survive; the input 4 is in dom f but maps to the barred value 2 (dashed), so 4 is removed from dom(g of f), not from dom f. Hence dom(g of f) is x greater than or equal to 0 with x not equal to 4.

Worked example 3 When the formula lies about the domain

Let f(x)=xf(x) = \sqrt{x} and g(x)=x2g(x) = x^2. Find gfg \circ f, and decide whether it is the identity function.

Substituting gives a formula that simplifies all the way down:

(gf)(x)=g(x)=(x)2=x.(g \circ f)(x) = g(\sqrt{x}) = (\sqrt{x})^2 = x.

The formula is just xx, so it is tempting to say gfg \circ f is the identity. It is not. Its domain is

dom(gf)={xdomf:xdomg}={x0},\operatorname{dom}(g \circ f) = \{\, x \in \operatorname{dom} f : \sqrt{x} \in \operatorname{dom} g \,\} = \{\, x \ge 0 \,\},

since ff requires x0x \ge 0 and gg accepts every real output. So gfg \circ f is the rule xxx \mapsto x on the domain x0x \ge 0, and the identity function has domain all real numbers. By Function Notation’s equality test, which demands the same domain and not merely the same formula, these are different functions. The simplified xx threw away the record of where x\sqrt{\phantom{x}} refused to run, and only the domain remembers it.

The other order behaves differently still. Here (fg)(x)=x2=x(f \circ g)(x) = \sqrt{x^2} = \lvert x \rvert, defined for every real xx because x20x^2 \ge 0 always, so dom(fg)\operatorname{dom}(f \circ g) is all real numbers while dom(gf)\operatorname{dom}(g \circ f) is only x0x \ge 0. Neither composition is the identity on all of R\mathbb{R}, and the two even have different domains, a reminder that dom(fg)\operatorname{dom}(f \circ g) and dom(gf)\operatorname{dom}(g \circ f) are in general different sets. Whether these two rules “undo” each other, and what that requires, is the business of the next lesson; here we only read off the domains.

Check your understanding

Let f(x)=xf(x) = \sqrt{x} and g(x)=1x3g(x) = \dfrac{1}{x - 3}. What is the domain of gfg \circ f?

Answer choices

Decomposing a function, and why the answer is not unique

Composition also runs backward as a question. Given a function hh, can you write it as gfg \circ f for simpler pieces ff and gg? This is decomposition, and it is the move that lets you see a complicated rule as a short pipeline of easy steps.

Take h(x)=3x+1h(x) = \sqrt{3x + 1}. The natural split peels off the outermost operation, the square root, and calls the inside a separate step: let f(x)=3x+1f(x) = 3x + 1 and g(x)=xg(x) = \sqrt{x}. Then

(gf)(x)=g(3x+1)=3x+1=h(x).(g \circ f)(x) = g(3x + 1) = \sqrt{3x + 1} = h(x). \checkmark

But this is not the only way, and that is the important part. Here are two more decompositions of the very same hh:

f(x)=x, g(x)=3x+1g(f(x))=3x+1,f(x) = x,\ g(x) = \sqrt{3x + 1} \quad\Rightarrow\quad g(f(x)) = \sqrt{3x + 1}, f(x)=3x, g(x)=x+1g(f(x))=3x+1.f(x) = 3x,\ g(x) = \sqrt{x + 1} \quad\Rightarrow\quad g(f(x)) = \sqrt{3x + 1}.

All three are correct, since each composes to hh. So “decompose hh” has many right answers, not one, exactly as the previous lesson’s “which transformation produced this graph” had many. When a problem asks you to decompose a function it is asking for a valid split. Among the valid splits there is usually a most natural one, peel off the outermost operation, but no split is the unique correct answer. A question that treats one decomposition as “the” answer has no single answer, so we never phrase it that way.

Worked example 4 Two decompositions of one function

Write h(x)=(2x5)3h(x) = (2x - 5)^3 as a composition gfg \circ f in two genuinely different ways.

The natural split peels off the cube. Let f(x)=2x5f(x) = 2x - 5 be the inside and g(x)=x3g(x) = x^3 be the cube:

(gf)(x)=g(2x5)=(2x5)3=h(x).(g \circ f)(x) = g(2x - 5) = (2x - 5)^3 = h(x). \checkmark

A different split absorbs the doubling into the inner step and leaves the subtraction with the cube. Let f(x)=2xf(x) = 2x and g(x)=(x5)3g(x) = (x - 5)^3:

(gf)(x)=g(2x)=(2x5)3=h(x).(g \circ f)(x) = g(2x) = (2x - 5)^3 = h(x). \checkmark

Both are valid decompositions of the same hh. Neither is more correct than the other; they simply draw the line between “inner step” and “outer step” in different places. A later course leans on exactly this idea, composing the rates of change of the pieces along a decomposition to differentiate hh, the chain rule. The point here is only that the decomposition that course walks along is a choice, not a fixed feature of hh.

Transformations were compositions all along

The previous lesson wrote every transformed graph in the shape

y=af(b(xh))+k,y = a\,f\big(b(x - h)\big) + k,

and split it into an inside that acts on the input and an outside that acts on the output. Name those two pieces as functions. Let

B(x)=b(xh),A(y)=ay+k.B(x) = b(x - h), \qquad A(y) = a y + k.

Then BB is the input map, AA is the output map, and the transformed rule is a composition of three functions:

y=A(f(B(x)))=(AfB)(x).y = A\big(f(B(x))\big) = (A \circ f \circ B)(x).

The transformation was a composition the whole time. Reading right to left, BB acts first, then ff, then AA, which is exactly the story the previous lesson told: the inside happens before ff, and the outside after. Two of that lesson’s hardest points are now single facts about composition.

Its discovery that “stretch then shift” differs from “shift then stretch” is the non-commutativity of composition. Take the output maps “stretch by 22,” written S(y)=2yS(y) = 2y, and “shift up 33,” written T(y)=y+3T(y) = y + 3. Stretching then shifting is TST \circ S, and shifting then stretching is STS \circ T:

(TS)(y)=2y+3,(ST)(y)=2(y+3)=2y+6.(T \circ S)(y) = 2y + 3, \qquad (S \circ T)(y) = 2(y + 3) = 2y + 6.

These are different because SS and TT do not commute, the same reason gffgg \circ f \ne f \circ g in general. The order of two transformations is nothing but the order of a composition, and composition does not let you swap that order for free.

Its other rule, that input maps “run backward because you solve for xx,” is the statement that BB is applied first. In AfBA \circ f \circ B the rightmost map BB acts before ff, so to find which xx produces a given input to ff you must undo BB, that is solve B(x)=uB(x) = u for xx. Solving is undoing the first-applied map, and on the input side the first-applied map is BB. So the whole previous lesson was a special case of this one. Transforming a graph is composing ff with an input map on one side and an output map on the other, and every ordering subtlety there was composition’s non-commutativity here.

Worked example 5 A transformation read as a composition

Write y=2f(3x6)+1y = 2f(3x - 6) + 1 in the form AfBA \circ f \circ B, and identify AA and BB.

Factor the inside so it matches b(xh)b(x - h), and read the outside directly:

3x6=3(x2),soB(x)=3(x2),A(y)=2y+1.3x - 6 = 3(x - 2), \qquad \text{so} \qquad B(x) = 3(x - 2), \quad A(y) = 2y + 1.

Now check that composing them rebuilds the rule. Applying BB first, then ff, then AA:

(AfB)(x)=A(f(3(x2)))=2f(3x6)+1.(A \circ f \circ B)(x) = A\big(f(3(x - 2))\big) = 2\,f(3x - 6) + 1. \checkmark

So the transformation is the composition AfBA \circ f \circ B with B(x)=3(x2)B(x) = 3(x - 2) acting on the input and A(y)=2y+1A(y) = 2y + 1 acting on the output. The input map BB sits on the right because it acts first, exactly the “solve for xx” order of the previous lesson.

Iterating a function, and a warning about ff squared

Because composition is associative, composing a function with itself repeatedly is unambiguous, and it has its own notation. Write

f2=ff,f3=fff,f^2 = f \circ f, \qquad f^3 = f \circ f \circ f,

and so on, the small superscript counting how many times ff is applied. Read f2(x)=f(f(x))f^2(x) = f(f(x)): apply ff, then apply ff again to the result.

Here is the notation warning. That superscript clashes with the other thing a superscript can mean, squaring the output, (f(x))2=f(x)f(x)(f(x))^2 = f(x) \cdot f(x). The two are different functions. For f(x)=2x1f(x) = 2x - 1,

f2(x)=f(f(x))=2(2x1)1=4x3,f^2(x) = f(f(x)) = 2(2x - 1) - 1 = 4x - 3,

while

(f(x))2=(2x1)2=4x24x+1,(f(x))^2 = (2x - 1)^2 = 4x^2 - 4x + 1,

and these are different functions. By Function Notation’s equality test, coinciding at a stray input is not the same as being equal. Here the two functions meet only at x=1x = 1, where both equal 11, and differ everywhere else. Which meaning f2f^2 carries is a matter of convention, and this lesson uses f2f^2 for the composition fff \circ f; when we mean the square of the output we write (f(x))2(f(x))^2. One more warning for the next lesson: there f1f^{-1} will mean the inverse of ff under composition, the function that undoes it, and it will never mean 1f\dfrac{1}{f}. A superscript on a function name is about composition, not multiplication.

Worked example 6 Iterating a linear function

Let f(x)=2x1f(x) = 2x - 1. Compute f2f^2 and f3f^3.

Apply ff to f(x)f(x), wrapping the whole input in the rule:

f2(x)=f(f(x))=2(2x1)1=4x3.f^2(x) = f(f(x)) = 2(2x - 1) - 1 = 4x - 3.

Apply ff once more, now to f2(x)f^2(x):

f3(x)=f(f2(x))=2(4x3)1=8x7.f^3(x) = f(f^2(x)) = 2(4x - 3) - 1 = 8x - 7.

A pattern is already visible: each step doubles the coefficient and the constant follows, giving fn(x)=2nx(2n1)f^n(x) = 2^n x - (2^n - 1), which reads 2x12x - 1, 4x34x - 3, 8x78x - 7 for n=1,2,3n = 1, 2, 3. None of these equals the output square (f(x))2=4x24x+1(f(x))^2 = 4x^2 - 4x + 1, which is not even linear; iterating a function and squaring its value are unrelated operations that happen to share a symbol.

Combining functions without chaining them

Composition is not the only way to build a new function from two others, and it should not be confused with the arithmetic ways. You can add, subtract, multiply, or divide two functions by combining their outputs at each input, (f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x), (fg)(x)=f(x)g(x)(fg)(x) = f(x)\,g(x), and (fg)(x)=f(x)g(x)\left(\tfrac{f}{g}\right)(x) = \tfrac{f(x)}{g(x)}. These evaluate both functions at the same xx and then combine the two numbers, so both functions see the original input. Composition is different in kind: it chains them, feeding the output of one as the input of the other, so only ff sees xx and gg sees f(x)f(x). The domain rules differ to match. A sum or product is defined where both functions are, domfdomg\operatorname{dom} f \cap \operatorname{dom} g, the very intersection that is the wrong answer for composition. A quotient fg\tfrac{f}{g} additionally removes the inputs where g(x)=0g(x) = 0. These arithmetic combinations are a lesson of their own, studied in an earlier course. The point here is only that combining outputs and chaining inputs are not the same operation, and composition is the one this lesson is about.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

For most of the nineteenth century there was really only one operation to study. The groups mathematicians handled were groups of permutations. A permutation is a rearrangement of a list. Two of them combine by carrying out one and then the other. That combining is composition and nothing else. Nobody thought of it as an example of anything. There was nothing else it could be an example of.

Arthur Cayley, an English mathematician, took the step away in 1854. He earned his living as a lawyer. His two short papers on groups kept the laws an operation obeys and let go of the objects obeying them. In place of a recipe for shuffling a list he printed a table. Each cell holds the result of combining the element on its row with the element on its column. The rearranging had vanished and the structure remained.

What made this a genuine leap was finding the same laws elsewhere. Square blocks of numbers obey them too, under their own odd rule for multiplying. Laws that hold for objects with nothing in common are laws about the operation.

This lesson makes the identical move one floor down. We took composition, a procedure you already knew, and asked which laws it obeys. It is associative, it carries an identity, and it is not generally commutative. The one law missing is an inverse for every function. The next lesson supplies it wherever it can.