Skip to content
Topos Uranos

Function operations, inverse functions and graph transformations

Summary

This lesson studies functions as objects that can be operated on. It defines the sum, the product, the quotient and the composition of real functions, together with their domains, and shows that composition is not commutative. From the lesson on sets, relations and functions it takes the associativity of composition, injectivity and the inverse function theorem, and it adds what is specific to real functions: the domain of a composition, monotonic functions, the inverse of a strictly monotonic function, the computation of the inverse by solving for the variable and restricting the domain, and the graph of the inverse, which is the reflection of the original one in the line y=xy = x. It then studies even and odd functions, the translations, stretches and reflections of a graph, and piecewise-defined functions and functions with absolute values.

Learning objectives

  1. Add, multiply, divide and compose functions, and determine the domain of each result from the domains of the functions being operated on.
  2. Decide whether a function is injective, surjective or bijective, and compute its inverse, restricting the domain when necessary.
  3. Recognize the symmetries of a graph: about the vertical axis, about the origin and about the line y=xy = x.
  4. Obtain the graph of a function from that of another by means of translations, stretches, reflections and absolute values, respecting the order in which they are applied.
  5. Interpret operations with functions and the inverse function in applied problems, such as the lens equation, in which the inverse exchanges the roles of the object and the image.

Operations with functions

In the lesson on algebraic functions a function was defined as a rule that assigns to each element of its domain exactly one image, and it was seen that algebraic functions are built from the variable by means of sums, products, quotients and roots. These operations can be understood as operations between functions: two functions are added, multiplied or divided pointwise, and one of them can be applied to the result of the other. If this is so, complicated functions are studied by decomposing them into simpler ones.

Let ff and gg be real functions of a real variable. Their sum f+gf + g, their difference f−gf - g and their product f⋅gf \cdot g are the functions that assign to each xx the sum, the difference and the product of the images; their quotient fg\frac{f}{g} assigns to each xx the quotient of the images:

f+g:x↦f(x)+g(x),f⋅g:x↦f(x)⋅g(x),fg:x↦f(x)g(x)f + g : x \mapsto f(x) + g(x), \qquad f \cdot g : x \mapsto f(x) \cdot g(x), \qquad \frac{f}{g} : x \mapsto \frac{f(x)}{g(x)}

For these expressions to make sense, xx must belong to both domains; in the quotient, moreover, the image g(x)g(x) cannot vanish. From this follow the domains of the operations:

dom⁡(f+g)=dom⁡(f)∩dom⁡(g),dom⁡(fg)={x∈dom⁡(f)∩dom⁡(g):g(x)≠0}\operatorname{dom}(f + g) = \operatorname{dom}(f) \cap \operatorname{dom}(g), \qquad \operatorname{dom}\left( \frac{f}{g} \right) = \{ x \in \operatorname{dom}(f) \cap \operatorname{dom}(g) : g(x) \neq 0 \}

The domain of the difference and that of the product coincide with that of the sum, and the product of a function by a number cc is the product by the constant function cc, whose domain is R\mathbb{R}. Now, the domain of an operation is determined from the functions being operated on, and not from the formula that results after simplifying. If f(x)=x2−1f(x) = x^2 - 1 and g(x)=x−1g(x) = x - 1, the quotient coincides with x+1x + 1 on its whole domain, but that domain excludes 11, because g(1)=0g(1) = 0: the graph of the quotient is the line y=x+1y = x + 1 without the point (1,2)(1, 2). Likewise, if f(x)=xf(x) = \sqrt{x} and g(x)=−xg(x) = \sqrt{-x}, the sum is defined only at x=0x = 0, the only common point of the domains. Excluded points like the first one will be called removable points in the lesson on sign charts and inequalities, and their effect on graphs will be studied in the lesson on rational functions.

Composition of functions

The most important operation between functions has no analogue among numbers: it consists in applying a function to the result of another. The composition of ff with gg, which is denoted by f∘gf \circ g and read “ff composed with gg”, is the function that applies first gg and then ff:

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

It can be thought of as a sequence of two machines: xx enters gg, which produces g(x)g(x), and that number enters ff, which produces f(g(x))f(g(x)). For the sequence to work, xx must belong to the domain of gg, and its image to the domain of ff:

dom⁡(f∘g)={x∈dom⁡(g):g(x)∈dom⁡(f)}\operatorname{dom}(f \circ g) = \{ x \in \operatorname{dom}(g) : g(x) \in \operatorname{dom}(f) \}

Note the order: in f∘gf \circ g the function written on the right acts first. Algebraic functions are compositions of simpler functions; for example, 1−x2\sqrt{1 - x^2} is the square root composed with 1−x21 - x^2, and recognizing that structure is what makes it possible to compute its domain.

ExampleTwo different compositions

Let f(x)=xf(x) = \sqrt{x} and g(x)=1−x2g(x) = 1 - x^2. Determine the functions f∘gf \circ g and g∘fg \circ f with their domains, and compare them. The figure represents each composition as a path through three number lines: that of xx, that of the first image and that of the second.

Proof

  1. (f∘g)(x)=1−x2,1−x2≥0\left( f \circ g \right)(x) = \sqrt{\resaltar{1 - x^2}}, \quad 1 - x^2 \geq 0

    The domain of gg is R\mathbb{R}, and that of ff consists of the nonnegative reals. To compute f∘gf \circ g, the image g(x)g(x) must be nonnegative; the values of xx that make it negative, such as x=2x = 2, do not pass through the second machine.

  2. (1−x)(1+x)≥0↔dom⁡(f∘g)=[−1,1]\resaltar{(1 - x)(1 + x)} \geq 0 \leftrightarrow \dato{fg}{\operatorname{dom}(f \circ g) = \icc{-1}{1}}

    We factor the difference of squares. By the lemma on the sign of a product, both factors must be nonnegative, because for both to be negative would require x>1x > 1 and x<−1x < -1 at the same time.

  3. (g∘f)(x)=1−(x)2=1−x,dom⁡(g∘f)=[0,∞)\left( g \circ f \right)(x) = 1 - \resaltar{\left( \sqrt{x} \right)^2} = \resaltar{1 - x}, \quad \dato{gf}{\operatorname{dom}(g \circ f) = \ico{0}{\infty}}

    For g∘fg \circ f, the number xx must belong to the domain of ff, and x\sqrt{x} always belongs to that of gg. On simplifying, the formula loses the trace of the root, but the domain keeps it.

  4. (f∘g)(12)=34=32,(g∘f)(12)=12\left( f \circ g \right)\left( \frac{1}{2} \right) = \sqrt{\frac{3}{4}} = \frac{\sqrt{3}}{2}, \quad \left( g \circ f \right)\left( \frac{1}{2} \right) = \frac{1}{2}

    The two compositions are different functions: they have different domains, and at one and the same point of both, such as x=12x = \frac{1}{2}, they take different values. Therefore composition is not commutative.

Although it is not commutative, composition is associative: when three functions are chained, it makes no difference whether the first two or the last two are grouped first. For functions between given sets this was proved in the lesson on sets, relations and functions of the first unit. The only thing specific to real functions is the domain, which here is not declared in advance but deduced from the formulas. Now, applying twice the definition of the domain of a composition, a number xx is in the domain of h∘(g∘f)h \circ (g \circ f) exactly when it is in that of ff, its image f(x)f(x) is in that of gg and g(f(x))g(f(x)) is in that of hh; and the same condition results for (h∘g)∘f(h \circ g) \circ f. Restricted to that common domain, the functions being chained are functions between sets, and the theorem of that lesson gives in both cases the value h(g(f(x)))h(g(f(x))). That is why one simply writes h∘g∘fh \circ g \circ f.

dom⁡(h∘g∘f)={x∈dom⁡(f):f(x)∈dom⁡(g)∧g(f(x))∈dom⁡(h)}\operatorname{dom}(h \circ g \circ f) = \{ x \in \operatorname{dom}(f) : f(x) \in \operatorname{dom}(g) \wedge g(f(x)) \in \operatorname{dom}(h) \}