Computer Science I / Functions
Practice question · Multiple choice

A function has an inverse exactly when it is bijective. Why do both injectivity and surjectivity turn out to be necessary?

Hints
  1. f(x) = x squared on the reals sends 2 and -2 to 4. What should the inverse of 4 be?
  2. Now consider a codomain element nothing maps to. What is the inverse there?
Show the answer

B. Because an inverse must be a function on the whole codomain.

Why

The two conditions rule out the two ways an inverse fails to be a function: without injectivity the inverse of 4 must be both 2 and −2, and without surjectivity it is undefined somewhere in the codomain. Which is why restricting a domain manufactures an inverse, x² on the non-negatives is bijective, and every inverse trigonometric function is defined exactly this way.

Read the lesson: Functions →

Practise Functions

The app has 4 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Functions