Skip to main content

Section 7.2 One-to-One, Onto, Inverse Functions

In this section we will look at specific properties of functions. We will learn how to prove a function is one-to-one and/or onto its codomain. These properies are important as they are the exact properties we need in order for a function to have an inverse function.

Definition 7.2.1.

A function, f:XY, is one-to-one or injective if for all x1,x2X, if f(x1)=f(x2) then x1=x2.
Equivalently, f is one-to-one if x1x2 implies f(x1)f(x2). We note, this is just the contrapositive of the definition.
Although it is easier to prove a function is one-to-one using the definition, the contrapositive can be helpful for deciding if a function is one-to-one.

Proving a Function is One-to-One.

To prove f:XY is one-to-one:
  • Assume f(x1)=f(x2).
  • Show x1=x2.
To prove f:XY is not one-to-one:
  • Find a counterexample.
  • In particular, find x1,x2X with x1x2 and f(x1)=f(x2).

Example 7.2.2. Arrow Diagram: Not One-to-One.

Figure 7.2.3. A function which is not one-to-one
The function given in Figure 7.2.3 in not one-to-one since c and d both map to the same value in Y.

Example 7.2.4. Proving One-to-One.

Let f:RR be given by f(x)=3x+2. Prove f is one-to-one.

Proof.

Assume f(x1)=f(x2). Then
3x1+2=3x2+23x1=3x2x1=x2
which is what we wanted to show.

Example 7.2.5. Disproving One-to-One.

Let f:ZZ be given by f(x)=x21. Disprove f is one-to-one.
We need a counterexample with x1x2 and f(x1)=f(x2). Let x1=2,x2=2.
Then f(2)=41=3 and f(2)=41=3. So f(x1)=f(x2), but 22.

Definition 7.2.6.

A function, f:XY, is onto Y or surjective if for all yY there exists xX such that f(x)=y.
Although we need the definition for onto to be able to write a proof, the concept of onto is easier to understand without the definition. Basically, we need every yY to get mapped to by some xX. We can also think about onto in terms of sets. A function is onto Y if Y is the range of f.

Proving a Function is Onto.

To prove f:XY is onto Y:
  • Let y be a general element of Y. You should not be using any information about the function at this point.
  • Find xX such that f(x)=y. Finding x may involve scratchwork.
  • In your proof, state x, show xX, and show f(x)=y.
To prove f:XY is not onto Y:
  • Find a counterexample.
  • In particular, find yY such that no xX will map to y.

Example 7.2.7. Arrow Diagram: Not Onto.

Figure 7.2.8. A function which is not onto Y
The function given in Figure 7.2.8 in not onto Y since 2 is not mapped to by any value in X.

Example 7.2.9. Proving Onto.

Let f:RR be given by f(x)=3x+2. Prove f is onto R.

Proof.

Let yR.
[Scratchwork: we want to find x so that f(x)=y. So we want 3x+2=y, or x=y23.]
Let x=y23. Then since yR,xR. Furthermore,
f(x)=f(y23)=3(y23)+2=y2+2=y,
which is what we wanted to show.

Example 7.2.10. Disproving Onto.

Let f:ZZ be given by f(x)=3x+2. Prove f is not onto Z.
Let yZ.
We saw in the previous example x=y23. But x is not necessarily in Z. So for our counterexample, let y=1. Then we would need x=13Z.
Hence no element in Z will map to y=1. Therefore, f is not onto Z.

Example 7.2.11. Prove or Disprove Onto.

Let f:RR be given by f(x)=x21. Prove or disprove f is onto R.
Let y=2. Then if f is onto R, we could find x with f(x)=2.
But if f(x)=2, then x21=2, or x2=1. We know there are no real solutions to this equation. Hence no element in R will map to y=2. Therefore, f is not onto R.

Activity 7.2.1.

f:RRf(x)=5x.

(a)

Prove or disprove f is one-to-one.

(b)

Prove or disprove f is onto R.

Activity 7.2.2.

f:ZZf(n)=5n.

(a)

Prove or disprove f is one-to-one.

(b)

Prove or disprove f is onto Z.

Activity 7.2.3.

g:Z{0,1,2}g(n)=rrn

(a)

Prove or disprove g is one-to-one.

(b)

Prove or disprove g is onto {0,1,2}.

Activity 7.2.4.

h:Z×ZZh(a,b)=ab.

(a)

Prove or disprove h is one-to-one.

(b)

Prove or disprove h is onto Z.

Activity 7.2.5.

d:ZZ×Zd(a)=(a,a).

(a)

Prove or disprove d is one-to-one.

(b)

Prove or disprove d is onto Z×Z.

Definition 7.2.12.

A function f:XY is a one-to-one correspondence or bijection if f is one-to-one and onto Y.
We showed in the above examples that f:RR given by f(x)=3x+2 is one-to-one and onto R. Thus, it is an example of a one-to-one correspondence.
If it exists, we say f1 is the inverse of f.

Example 7.2.14. Inverse Function.

Since f:RR given by f(x)=3x+2 is one-to-one and onto, it has an inverse. We can find the inverse as we did in calculus.
Let y=3x+2, solve for x.
We get x=y23. Thus f1(x)=x23.

Proof.

Show f1 is one-to-one: assume f1(y1)=f1(y2). Then f1(y1)=f1(y2)=x for some xX. Thus, f(x)=y1 and f(x)=y2. Since f is a function, y1=y2.
Show f1 is onto X. Let xX. Then there exists yY such that f(x)=y since f is a function from X. Now, f1(y)=x. Therefore, there exists yY such that f1(y)=x.

Reading Questions Check Your Understanding

1.

    True or false: f:RR,f(x)=5x2 is one-to-one.
  • True.

  • False.

2.

    True or false: f:RR,f(x)=5x2 is onto R.
  • True.

  • False.

3.

    True or false: f:ZZ,f(x)=5x2 is one-to-one.
  • True.

  • False.

4.

    True or false: f:ZZ,f(x)=5x2 is onto Z.
  • True.

  • False.

5.

    True or false: f:RR,f(x)=x33 is one-to-one.
  • True.

  • False.

6.

    True or false: f:RR,f(x)=x33 is onto R.
  • True.

  • False.

7.

    True or false: f:ZZ,f(x)=x33 is one-to-one.
  • True.

  • False.

8.

    True or false: f:ZZ,f(x)=x33 is onto Z.
  • True.

  • False.

9.

    True or false: f:Z×ZZ,f(x,y)=x is one-to-one.
  • True.

  • False.

10.

    True or false: f:Z×ZZ,f(x,y)=x is onto Z.
  • True.

  • False.

11.

    True or false: f:Z×ZZ×Z,f(x,y)=(y,x) is one-to-one.
  • True.

  • False.

12.

    True or false: f:Z×ZZ×Z,f(x,y)=(y,x) is onto Z×Z.
  • True.

  • False.

Exercises Exercises

1.

All but two of the following are correct ways to express the fact that a function f is onto. Find the two that are incorrect.
  1. f is onto if and only if every element in its codomain is the image of some element in its domain.
  2. f is onto if and only if every element in its domain has a corresponding image in its codomain.
  3. f is onto if and only if yY,xX such that f(x)=y.
  4. f is onto if and only if xX,yY such that f(x)=y.
  5. f is onto if and only if the range of f is the same as the codomain of f.

2.

Let X={1,5,9} and Y={3,4,7}.
  1. Define f:XY by specifying that f(1)=4,f(5)=7,f(9)=4.
    Is f one-to-one? Is f onto? Explain your answers.
  2. Define g:XY by specifying that g(1)=7,g(5)=3,g(9)=4.
    Is g one-to-one? Is g onto? Explain your answers.

3.

Let X={1,2,3}, Y={1,2,3,4} and Z={1,2}.
  1. Define a function f:XY that is one-to-one but not onto.
  2. Define a function g:XZ that is onto but not one-to-one.
  3. Define a function h:XX that is neither one-to-one nor onto.
  4. Define a function k:XX that is one-to-one and onto, but is not the identity function.

4.

Define f:ZZ by f(n)=4n5.
  1. Prove or disprove f is one-to-one.
  2. Prove or disprove f is onto Z.

5.

Define g:RR by g(x)=4x5.
  1. Prove or disprove g is one-to-one.
  2. Prove or disprove g is onto R.

6.

Define F:P({a,b,c})Z by
F(A)= the number of elements in A.
  1. Prove or disprove F is one-to-one.
  2. Prove or disprove F is onto Z.

7.

Define G:R×RR×R by
G(x,y)=(2y,x).
  1. Prove or disprove G is one-to-one.
  2. Prove or disprove G is onto R×R.

8.

Define H:R×RR×R by
H(x,y)=(x+1,2y).
  1. Prove or disprove H is one-to-one.
  2. Prove or disprove H is onto R×R.
You have attempted 1 of 13 activities on this page.