Inverses of Functions

Chapter 5: Functions

Learning objectives

  • State precisely when a function has an inverse (iff bijective)
  • Compute the inverse function from a formula by solving for xx
  • Verify the defining identities f1f=idAf^{-1} \circ f = \text{id}_A and ff1=idBf \circ f^{-1} = \text{id}_B
  • Apply the rule (gf)1=f1g1(g \circ f)^{-1} = f^{-1} \circ g^{-1}

What does it mean to "undo" a function? If ff takes aa to bb, the inverse should take bb back to aa. For that to be a well-formed function we need two things: every bb in the codomain must have some preimage (so f1(b)f^{-1}(b) is defined for all bb) and only one preimage (so f1(b)f^{-1}(b) is unambiguous). Those are exactly surjectivity and injectivity. Bijection is the inevitable precondition for invertibility. Once you have an inverse, you have a powerful symmetry: encryption and decryption, encoding and decoding, undo and redo, Fourier transform and its inverse — all of these are bijection-and-inverse pairs in disguise.

The inverse function

Let f:ABf: A \to B be a bijection. Then there is a unique function f1:BAf^{-1}: B \to A, called the inverse of ff, satisfying

f1(f(a))=a for all aA,f(f1(b))=b for all bB.f^{-1}(f(a)) = a \text{ for all } a \in A, \quad f(f^{-1}(b)) = b \text{ for all } b \in B.

Equivalently: f1f=idAf^{-1} \circ f = \text{id}_A and ff1=idBf \circ f^{-1} = \text{id}_B. The inverse exists if and only if ff is bijective:

  • If ff is not injective, two preimages would compete and f1f^{-1} would not be well-defined.
  • If ff is not surjective, some bb would have no preimage and f1(b)f^{-1}(b) would be undefined.

Finding inverses (the formula method)

To compute f1f^{-1} when ff is given by a formula:

  • Write y=f(x)y = f(x).
  • Solve for xx in terms of yy.
  • The resulting expression is f1(y)f^{-1}(y).
  • Verify: check f(f1(y))=yf(f^{-1}(y)) = y and f1(f(x))=xf^{-1}(f(x)) = x.

Example: f(x)=3x+7f(x) = 3x + 7. Set y=3x+7y = 3x + 7, solve: x=(y7)/3x = (y - 7)/3. So f1(y)=(y7)/3f^{-1}(y) = (y - 7)/3. Verify: f(f1(y))=3y73+7=yf(f^{-1}(y)) = 3 \cdot \tfrac{y-7}{3} + 7 = y. \checkmark

Inverse of a composition

If f:ABf: A \to B and g:BCg: B \to C are bijections, then gfg \circ f is a bijection and

(gf)1=f1g1.(g \circ f)^{-1} = f^{-1} \circ g^{-1}.

Note the order reversal: to undo "first ff, then gg," you must first undo gg, then undo ff — like reversing the order in which you put on socks and shoes.

Mapping ArrowsInteractive figure — enable JavaScript to interact.

Pause and think: Why does f(x)=x2f(x) = x^2 on RR\mathbb{R} \to \mathbb{R} have no inverse? But if we restrict to f:[0,)[0,)f: [0, \infty) \to [0, \infty), an inverse exists — what is it? Which obstacle did the restriction remove?

Try it

  • Compute the inverse of f(x)=5x2f(x) = 5x - 2 and verify by composing in both directions.
  • Predict before computing: what is f1f^{-1} for f(x)=(x3)/2f(x) = (x - 3)/2?
  • Let f(x)=4x+1f(x) = 4x + 1 and g(x)=2x3g(x) = 2x - 3. Use the rule (gf)1=f1g1(g \circ f)^{-1} = f^{-1} \circ g^{-1} to compute (gf)1(g \circ f)^{-1} two ways and check they agree.
  • Show: if ff is injective but not surjective, then ff has a left inverse (a function gg with gf=idAg \circ f = \text{id}_A) but no two-sided inverse.
  • Prove (f1)1=f(f^{-1})^{-1} = f.

A trap to watch for

The notation f1f^{-1} is overloaded. For a function it can mean:

  • The inverse function, which requires ff to be bijective.
  • The preimage of a set: f1(T)={af(a)T}f^{-1}(T) = {a \mid f(a) \in T}, which is defined for every function (no bijection needed). We cover this in §5.5.

And in calculus, f1f^{-1} is sometimes written for the reciprocal 1/f1/f. Always check from context which meaning is intended.

What you now know

You can decide whether a function is invertible, compute its inverse by the formula method, verify both compositional identities, and apply the order-reversal rule for inverses of compositions. Section 5.4 turns to a different but related construction: the closure of a set under an operation, which is the smallest extension that "respects" the operation.

References

  • Velleman, D. J. (2019). How to Prove It (3rd ed.). Cambridge University Press, §5.3.
  • Hammack, R. (2018). Book of Proof, ch. 12.
  • Halmos, P. R. (1960). Naive Set Theory. Springer, §10.
  • Katz, J., Lindell, Y. (2014). Introduction to Modern Cryptography (2nd ed.). CRC Press, ch. 3 (block ciphers as keyed bijections).
  • Cooley, J. W., Tukey, J. W. (1965). "An algorithm for the machine calculation of complex Fourier series." Math. Comp. 19, 297-301.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.