Math Detours · Grade 10 · Sharpen · 3

Functions as machines

Domain, range, composition and inverses, and why f⁻¹ is a reflection in y = x.

Name ____________________Date ____________

Tonight's idea

A function is a machine: feed in one number, get out exactly one number. The inputs it accepts are its domain; the outputs it can produce are its range. Unless told otherwise, the domain is every real that does not break the machine: no dividing by zero, no square-rooting a negative.

Composition is plugging one machine into another. \(f(g(x))\) means do \(g\) first, then \(f\). Order matters: with \(f(x) = x + 1\) and \(g(x) = 2x\), \(f(g(3)) = 7\) but \(g(f(3)) = 8\).

An inverse \(f^{-1}\) runs the machine backwards: \(f^{-1}(f(x)) = x\). Not every machine can. If \(f(2) = f(-2) = 4\), then \(f^{-1}(4)\) cannot decide between 2 and \(-2\). A function has an inverse only when different inputs give different outputs: no horizontal line hits the graph twice.

To find an inverse, write \(y = f(x)\), swap the letters, solve for \(y\). Swapping turns every point \((a, b)\) into \((b, a)\), which is a reflection in the line \(y = x\). So the graph of \(f^{-1}\) is the mirror image of \(f\)'s, and the domain of \(f^{-1}\) is the range of \(f\).

(1, 5)(5, 1) ff⁻¹y = x
Swapping \(x\) and \(y\) reflects every point in the line \(y = x\).

Watch one: two machines and a mirror

Let \(f(x) = 2x + 3\) and \(g(x) = x^2\). Then \(f(g(x)) = 2x^2 + 3\), but \(g(f(x)) = (2x + 3)^2\).

Inverse of \(f\): \(y = 2x + 3 \;\to\; x = 2y + 3 \;\to\; y = \tfrac{x - 3}{2}\). Check: \(f(5) = 13\) and \(f^{-1}(13) = 5\). And \(g\) has no inverse on all the reals, because \(g(2) = g(-2)\); restrict to \(x \geq 0\) and \(g^{-1}(x) = \sqrt{x}\).

See functions bend and slide at mathdetours.com/demos/transform.html.

Your turn

  1. Give the domain and range of \(f(x) = \sqrt{9 - x^2}\), \(\;g(x) = \dfrac{1}{x - 2}\), \(\;h(x) = x^2 + 4\). (Hint for \(f\): if \(y = \sqrt{9 - x^2}\) then \(x^2 + y^2 = 9\). What shape is that, and which half do you get?)
  2. Let \(f(x) = 3x - 1\) and \(g(x) = x^2 + 2\). Find \(f(g(2))\), \(g(f(2))\), and a simplified formula for \(f(f(x))\).
  3. Find the inverse of each and state its domain: \(f(x) = \dfrac{2x + 1}{3}\); \(\;h(x) = \sqrt{x - 1}\) for \(x \geq 1\).
  4. Celsius from Fahrenheit is \(C = \tfrac59(F - 32)\). Find the inverse function. Then find the temperature at which both scales read the same number, and say why that point lies on the line \(y = x\).

Stretch: the machine that undoes itself in three

Let \(f(x) = \dfrac{x - 3}{x + 1}\), with \(x\) ranging over the reals except \(-1\) and \(1\). (Why leave out 1? Work out \(f(1)\) and see what happens next.) Compute \(f(f(x))\) and simplify fully. Then compute \(f(f(f(x)))\). What do you get, and what does it tell you about \(f^{-1}\)?

Answers

  1. \(f\): domain \(-3 \leq x \leq 3\), range \(0 \leq y \leq 3\) (the top half of a circle). \(g\): domain \(x \neq 2\), range \(y \neq 0\). \(h\): all reals, range \(y \geq 4\).
  2. \(f(g(2)) = f(6) = 17\). \(g(f(2)) = g(5) = 27\). \(f(f(x)) = 3(3x - 1) - 1 = 9x - 4\).
  3. \(f^{-1}(x) = \dfrac{3x - 1}{2}\), all reals. \(h^{-1}(x) = x^2 + 1\) with domain \(x \geq 0\) (the range of \(h\)).
  4. \(F = \tfrac95 C + 32\). Same reading: \(C = \tfrac59(C - 32)\), so \(9C = 5C - 160\), \(C = -40\). A point with \(f(x) = x\) is on \(y = x\) by definition; it is where the graph crosses its own mirror line, so it is on \(f^{-1}\) too.

Stretch. \(f(f(x)) = \dfrac{\frac{x-3}{x+1} - 3}{\frac{x-3}{x+1} + 1} = \dfrac{(x - 3) - 3(x+1)}{(x-3) + (x+1)} = \dfrac{-2x - 6}{2x - 2} = -\dfrac{x + 3}{x - 1}\). The simplification is valid only for \(x \neq -1, 1\): at \(-1\) the first \(f\) is undefined, and \(f(1) = -1\), so the second is. Then \(f(f(f(x))) = \dfrac{-(x+3) - 3(x-1)}{-(x+3) + (x-1)} = \dfrac{-4x}{-4} = x\) on the reals minus \(\{-1, 1\}\). Three applications give the identity there, so on that set \(f^{-1} = f \circ f\): the inverse of \(f\) is \(f\) done twice. If you allow \(\infty\) as a value, with \(f(-1) = \infty\) and \(f(\infty) = 1\), the missing cycle \(-1 \to \infty \to 1 \to -1\) closes too.

← PreviousNext: Shift, stretch, flip →