girgit.org

Relations and Functions

Running a function backwards: invertible functions

The big ideaA function f : X → Y is invertible if some function g : Y → X undoes it in both directions, \( g \circ f = I_X \) and \( f \circ g = I_Y \); this happens exactly when f is one-one and onto, and then g is called \( f^{-1} \).

In simple words

A coat check at a wedding hall. You hand in your coat and get a token. Later you hand back the token and get your own coat. This works only if no two coats share a token, and every token belongs to some coat. Then the hall can always run things backwards: token to coat, coat to token.

Undoing a function

A function f : X → Y is invertible if there is a function g : Y → X with

\[ g \circ f = I_X \quad \text{and} \quad f \circ g = I_Y, \]

where \( I_X \) and \( I_Y \) are the identity functions on X and Y (they leave everything unchanged). In words: do f and then g, and you are back where you started; do g and then f, and you are back too. This g is the inverse of f, written \( f^{-1} \) (read "f inverse").

Invertible exactly when bijective

The key fact: f is invertible if and only if f is one-one and onto. Here is why, in arrow-diagram terms.

  • To reverse f, turn every arrow round. If f were many-one, some y would have two arrows coming in, and the reversed rule would send y to two places: not a function.
  • If f were not onto, some y would have no arrow coming in, and the reversed rule would have nowhere to send it: not a function either.
  • If f is bijective, every y has exactly one arrow coming in, so turning the arrows round gives a perfectly good function.

Try it: guess first, then turn the arrows round and rewire f until the reversed rule works.

This fact is a shortcut: to show f is invertible, you may just prove it is one-one and onto, without ever finding \( f^{-1} \).

How to find the inverse

  1. Write y = f(x).
  2. Solve for x in terms of y.
  3. Call the result \( f^{-1}(y) \), and check both compositions give the identity.

Worked examples

  1. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = 5x − 7. y = 5x − 7 gives \( x = \frac{y + 7}{5} \). So \( f^{-1}(y) = \frac{y + 7}{5} \). Check: \( f^{-1}(f(x)) = \frac{(5x - 7) + 7}{5} = x \) and \( f(f^{-1}(y)) = 5 \cdot \frac{y + 7}{5} - 7 = y \).
  2. f : \( \mathbf{N} \to Y \), f(x) = 3x + 2, where Y = {5, 8, 11, 14, …} is the range. Choosing Y as the range makes f onto, and it is clearly one-one. Any y in Y is 3x + 2 for some natural x, so \( x = \frac{y - 2}{3} \), and \( f^{-1}(y) = \frac{y - 2}{3} \). For example \( f^{-1}(14) = 4 \). Had we taken the co-domain to be all of \( \mathbf{N} \), f would not be onto (nothing gives 1) and would have no inverse.
  3. f : \( \mathbf{R} - \{1\} \to \mathbf{R} - \{2\} \), \( f(x) = \frac{2x + 1}{x - 1} \). From \( y(x - 1) = 2x + 1 \): \( xy - y = 2x + 1 \), so \( x(y - 2) = y + 1 \), and \( x = \frac{y + 1}{y - 2} \). This works for every y ≠ 2, which is exactly the co-domain, so \( f^{-1}(y) = \frac{y + 1}{y - 2} \). (And f(x) can never be 2: that would need 2x + 1 = 2x − 2.)

Guess first: is \( x^2 \) invertible?

Guess: does f(x) = x² have an inverse, namely \( \sqrt{x} \)?

See what happens
It depends on the domain and co-domain. On \( \mathbf{R} \to \mathbf{R} \), no: f is many-one (f(3) = f(−3) = 9, so which should 9 go back to?) and not onto (−9 has nothing to go back to). But restrict to f : [0, ∞) → [0, ∞), and f is a bijection with inverse \( f^{-1}(y) = \sqrt{y} \). Choosing a piece of the domain where a function is one-one, and the matching range as co-domain, is exactly how inverse trigonometric functions are made in the next chapter.

Try it: drag the point along each graph and watch its mirror; then try x² on all of R.

More facts JEE uses

Not in the current textbook, but JEE asks it:

  • The inverse is unique, and \( (f^{-1})^{-1} = f \).
  • Inverse of a composition: if f : X → Y and g : Y → Z are invertible, then \( (g \circ f)^{-1} = f^{-1} \circ g^{-1} \). To undo "f then g", undo g first, then f: shoes off before socks. Check with f(x) = x + 2, g(x) = 3x: \( (g \circ f)(x) = 3x + 6 \), whose inverse is \( \frac{y - 6}{3} = \frac{y}{3} - 2 \), and \( f^{-1}(g^{-1}(y)) = \frac{y}{3} - 2 \). They agree.
  • For a real function, the graph of \( f^{-1} \) is the mirror image of the graph of f in the line y = x, since (a, b) is on one exactly when (b, a) is on the other.
  • \( f^{-1}(y) \) is not \( \frac{1}{f(y)} \). The −1 means "undo", not "one over".

Remember

  • Invertible ⟺ bijective (one-one and onto).
  • \( f^{-1} \circ f = I_X \) and \( f \circ f^{-1} = I_Y \): check both.
  • Find \( f^{-1} \) by solving y = f(x) for x.
  • \( (g \circ f)^{-1} = f^{-1} \circ g^{-1} \): reverse order.

Try it. f : \( \mathbf{R} \to \mathbf{R} \), \( f(x) = \frac{4x - 3}{2} \). Show f is invertible and find \( f^{-1} \).

Answer
f is a straight line with non-zero slope, so it is one-one and onto, hence invertible. From \( 2y = 4x - 3 \): \( x = \frac{2y + 3}{4} \), so \( f^{-1}(y) = \frac{2y + 3}{4} \). Check: \( f^{-1}(f(0)) = f^{-1}(-1.5) = \frac{-3 + 3}{4} = 0 \).

Words to know

Invertible function
A function that some other function undoes from both sides.
Inverse \( f^{-1} \)
The undoing function: \( f^{-1}(y) = x \) exactly when f(x) = y.
Identity function
The "do nothing" function, \( I(x) = x \).
Restricting the domain
Using only part of the inputs, to make a function one-one.

Which function has an inverse?

  1. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = x² + 3
  2. f : \( \mathbf{R} \to \mathbf{R} \), f(x) = x³
  3. f : \( \mathbf{N} \to \mathbf{N} \), f(x) = x + 1

f(x) = 2x + 3 on \( \mathbf{R} \). What is \( f^{-1}(11) \)?

  1. 25
  2. 4
  3. \( \frac{1}{25} \)

f and g are bijections from \( \mathbf{R} \) to \( \mathbf{R} \). Which equals \( (g \circ f)^{-1} \)?

  1. \( g^{-1} \circ f^{-1} \)
  2. \( f^{-1} \circ g^{-1} \)
  3. \( g \circ f \)