5.2 Injective and Surjective Functions

Objectives:

  • Describe relationships between domains and codomains of functions

  • Relate the definitions of injectivity and surjectivity to whether a function has an inverse

5.2.1 Motivation: Inverse Functions

Example 5.2.1.

We investigate: what functions have inverses?

For each of the following functions, do the following:

  • Graph the function.

  • Reflect the graph of the function across the line y=x.

  • Give a formula for the reflected graph of the function.

  1. (a)

    f:, f(x)=ex

    Blank space for you to write your work.
  2. (b)

    g:, g(x)={xx<0x+1x0

    Blank space for you to write your work.
  3. (c)

    h:, h(x)=x2

    Blank space for you to write your work.

In grade school we are typically given two ways to express the inverse of a function:

  1. 1.

    If a function rule is given by f(x)=y, then the rule of the inverse function is given by f1(y)=x. (For example, for the function f(x)=2x, the point (3,8) is on the function. Similarly, the inverse function f1(x)=log2(x) has the point (8,3) since log2(8)=3.)

  2. 2.

    If the graph of a function f is given, then the graph of the inverse function is the same graph when reflected across the line y=x. This yields the exponential and logarithmic graphs, as you gave in part (a) of the last example.

Notice that parts (b) and (c) are strange when reflected across the line y=x.

  • The reflected graph in part (b) has a gap in the domain because the original function has a gap in the codomain. We say that the original function of part (b) is not surjective because its range is not equal to its codomain.

    x21122112

    Original function

    x21122112

    Reflected function

  • The reflected graph in part (b) fails the vertical line test (and hence is not a function) because the original function fails the horizontal line test. We say the original function of part (c) is not injective because there is more than one input corresponding to the same output.

    x21122112

    Original function

    x21122112

    Reflected function

5.2.2 Powerful Functions

This motivates the following definitions:

Definition 5.2.2.

Let f:XY be a function.

  1. (a)

    The function f is said to be injective (or one-to-one) if for all yf(X), there is a unique xX such that y=f(x).

  2. (b)

    The function f is said to be surjective (or onto) if for all yY, there exists xX such that y=f(x).

  3. (c)

    If f is both injective and surjective, we say that f is bijective.

Example 5.2.3.

Let f: be a function. Fill in the blank with the appropriate word.

  1. (a)

    The function f:X is   if and only if every horizontal line hits the graph of f at most once.

  2. (b)

    The function f:X is   if and only if every horizontal line hits the graph of f at least once.

Example 5.2.4.

Without using the examples already provided, give an example of a function that is injective but not surjective. Give the formula and sketch its graph.

Blank space for you to write your work.

Without using the examples already provided, give an example of a function that is surjective but not injective. Give the formula and sketch its graph.

Blank space for you to write your work.

Without using the examples already provided, give an example of a function that is neither injective nor surjective. Give the formula and sketch its graph.

Blank space for you to write your work.

5.2.3 Proving with Injective and Surjective Functions

Example 5.2.5.

Using the skeleton version of the proof below, complete the proof of the statement: the function f : + + defined by f(x)=x3 is injective.

A Skeleton Version of a Function f Being Injective.

Guidelines Example
Give the definition of f. Let f : + + be defined by the rule f(x)=x3.
Let x1,x2X and suppose f(x1)=f(x2). Let x1 and x2 be arbitrary real numbers and assume x13=x23.
(Recommended) State what you need to show in order to conclude that x1=x2. We want to show that x1=x2 - then at most one value of x is mapped to each value in the range of f.
Connect the two pieces: what you have (x13=x23) and what you need (x1=x2). ???
Conclude that f is injective. Since f(x1) is an arbitrary value in the range of f and we have shown that any x-value that maps to f(x1) is equal to x1, we know that f is injective as desired.
Blank space for you to write your work.

Example 5.2.6.

A student looks at the skeleton proof that a function f is injective and asks, “Wait, doesn’t this show that the function f is surjective as well?” How would you respond that this proof does not necessarily show that f is surjective?

Blank space for you to write your work.

Example 5.2.7.

Using the skeleton version of the proof below, complete the proof of the statement: the function f : + + defined by f(x)=x3 is surjective.

A Skeleton Version of a Function f Being Surjective.

Give the definition of f. Let f: be defined by the rule f(x)=x3.
Let yY. Let y be an arbitrary element of .
(Recommended) State that you want to show that there exists some xX such that f(x)=y. We want to show that there exists at least one x such that f(x)=y - that is, we want to find an x such that x3=y.
Connect the two pieces: what you have (y) and what you need (x). ???
Conclude that f is surjective. Since y is an arbitrary value in the codomain of f and we have shown that there exists an x-value that maps to y, we know that f is surjective as desired.
Blank space for you to write your work.

Example 5.2.8.

Determine whether the function f : defined by f(n)={n+1n is even2nn is odd is injective and/or surjective.