We distinguish two special families of functions: one-to-one functions and onto functions. We shall discuss one-to-one functions in this section. Onto functions were introduced in section 5.2 and will be developed more in section 5.4. Recall that under a function each value in the domain has a unique
image in the range. For a one-to-one function, we add the requirement that each image in the range has a unique pre-image in the domain. Definition: One-to-One [Injection] A function \[{f}:{A}\to{B}\] is said to be one-to-one if \[f[x_1] = f[x_2] \Rightarrow x_1=x_2\] for all elements \[x_1,x_2\in A\]. A one-to-one function is also called an injection, and we call a function
injective if it is one-to-one. A function that is not one-to-one is referred to as many-to-one. The contrapositive of this definition is: A function \[{f}:{A}\to{B}\] is one-to-one if\[x_1\neq x_2 \Rightarrow f[x_1]\neq f[x_2]\] Any function is either one-to-one or many-to-one. A function cannot be one-to-many because no element can have multiple images. The difference
between one-to-one and many-to-one functions is whether there exist distinct elements that share the same image. There are no repeated images in a one-to-one function. The identity function on any nonempty set \[A\] \[{I_A}:{A}\to{A}, \qquad I_A[x]=x,\] maps any element back to itself. It is clear that all identity functions are one-to-one. Example \[\PageIndex{1}\label{eg:oneonefcn-01}\] The function \[ h : {A}\to{A}\] defined by \[h[x]=c\] for some fixed element \[c\in A\], is an example of a constant function. It is a function with only one image. This is the exact opposite of an identity function. It is clearly not one-to-one unless \[|A|=1\]. For domains with a small number of elements, one can
use inspection on the images to determine if the function is one-to-one. This becomes impossible if the domain contains a larger number of elements. In practice, it is easier to use the contrapositive of the definition to test whether a function is one-to-one: \[f[x_1] = f[x_2] \Rightarrow x_1 = x_2\] To prove
\[f:A \rightarrow B\] is one-to-one:One-to-One [Injective]
Definition: Identity Function
To prove a function is One-to-One
Example \[\PageIndex{2}\]
Prove the function \[ f : {\mathbb{R}}\to{\mathbb{R}}\] defined by \[f[x]=3x+2\] is one-to-one.
SolutionAssume \[f[x_1]=f[x_2]\], which means
\[3x_1+2 = 3x_2+2.\]
Thus \[3x_1=3x_2\]
so \[x_1=x_2\].
We have shown if \[f[x_1]=f[x_2]\] then \[x_1=x_2\]. Therefore \[f\] is one-to-one, by definition of one-to-one.
Hands-on exercise \[\PageIndex{1}\label{he:oneonefcn-01}\]
Prove the function \[ g : {\mathbb{R}}\to{\mathbb{R}}\] defined by \[g[x]=5-7x\] is one-to-one.
Hands-on exercise \[\PageIndex{2}\label{he:oneonefcn-02}\]
Determine whether the function \[ h : {[2,\infty]}\to{\mathbb{R}}\] defined by \[h[x]=\sqrt{x-2}\] is one-to-one.
Interestingly, sometimes we can use calculus to determine if a real function is one-to-one. A real function \[f\] is increasing if \[x_1 < x_2 \Rightarrow f[x_1] < f[x_2],\] and decreasing if \[x_1 < x_2 \Rightarrow f[x_1] > f[x_2].\] Obviously, both increasing and decreasing functions are one-to-one. From calculus, we know that
- A function is increasing over an open interval \[[a,b]\] if \[f'[x]>0\] for all \[x\in[a,b]\].
- A function is decreasing over an open interval \[[a,b]\] if \[f'[x] 0\] for any \[x\in \big[-\frac{\pi}{2},\frac{\pi}{2}\big]\].
Hands-on exercise \[\PageIndex{3}\label{he:oneonefcn-03}\]
Use both methods to show that the function \[k:{[0,\infty]}\to{\mathbb{R}}\] defined by \[k[x] = \ln x\] is one-to-one.
To prove a function is NOT one-to-one
To prove \[f:A \rightarrow B\] is NOT one-to-one:
- Exhibit one case [a counterexample] where \[x_1\neq x_2\] and \[f[x_1]=f[x_2].\]
- Conclude: we have shown there is a case where \[x_1\neq x_2\] and \[f[x_1]=f[x_2]\], therefore \[f\] is NOT one-to-one.
Example \[\PageIndex{5}\label{eg:oneonefcn-05}\]
Prove the function \[ h : {\mathbb{R}}\to{\mathbb{R}}\] given by \[h[x]=x^2\] is not one-to-one.
Solution
Consider \[a=3\] and \[b=-3\]. Clearly \[a \neq b\]. However, \[h[3]=9\] and \[h[-3]=9\] so \[h[a]=h[b].\]
we have shown there is a case where \[a \neq b\] and \[h[a]=h[b]\], therefore \[h\] is NOT one-to-one.Example \[\PageIndex{6}\label{eg:oneonefcn-06}\]
The function \[ f : {\mathbb{Z}}\to{\mathbb{Z}}\] defined by \[f[n] = \cases{ \frac{n}{2} & if $n$ is even \cr \frac{n+1}{2} & if $n$ is odd \cr}\] is not one-to-one, because, for example, \[f[0]=f[-1]=0\]. The function \[ g : {\mathbb{Z}}\to{\mathbb{Z}}\] defined by \[g[n] = 2n\] is one-to-one, because if \[g[n_1]=g[n_2]\], then \[2n_1=2n_2\] implies that \[n_1=n_2\].
hands-on exercise \[\PageIndex{4}\label{he:oneonefcn-04}\]
Show that the function \[ h : {\mathbb{Z}}\to{\mathbb{N}}\] defined by \[h[n] = \cases{ 2n+1 & if $n\geq0$, \cr -2n & if $n < 0$, \cr}\] is one-to-one.
Example \[\PageIndex{7}\label{eg:oneonefcn-7}\]
Let \[A\] be the set of all married individuals from a monogamous community who are neither divorced nor widowed. Then the function \[s:{A}\to{A}\] defined by \[s[x] = \mbox{ spouse of } x\] is one-to-one. The reason is, it is impossible to have \[x_1\neq x_2\] and yet \[s[x_1]=s[x_2]\].
Summary and Review
- A function \[f\] is said to be one-to-one if \[f[x_1] = f[x_2] \Rightarrow x_1=x_2\].
- No two images of a one-to-one function are the same.
- Know how to write a proof to show a function is one-to-one.
- To show that a function \[f\] is not one-to-one, all we need is to find two different \[x\]-values that produce the same image; that is, find \[x_1\neq x_2\] such that \[f[x_1]=f[x_2]\].
Exercises
Exercise \[\PageIndex{1}\label{ex:oneonefcn-01}\]
Which of the following functions are one-to-one? Explain.
[a] \[ f : {\mathbb{R}}\to{\mathbb{R}}\], \[f[x]=x^3-2x^2+1\].
[b] \[ g : {[\,2,\infty]}\to{\mathbb{R}}\], \[f[x]=x^3-2x^2+1\].
[a] No. For example, \[f[0]=f[2]=1\]
[b] Yes, since \[g'[x]=3x^2-4x=x[3x-4]>0\] for \[x>2\].Exercise \[\PageIndex{2}\label{ex:oneonefcn-02}\]
Decide if this function is one-to-one or not. Then prove your conclusion.
\[ p :{\mathbb{R}}\to{\mathbb{R}}\], \[p[x]=|1-3x|\].
Exercise \[\PageIndex{3}\label{ex:oneonefcn-03}\]
Decide if this function is one-to-one or not. Then prove your conclusion.
\[ q :{\mathbb{R}}\to{\mathbb{R}}\], \[q[x]=x^4\].
Solution
No. For example, \[2 \neq -2\], but \[q[2]=16\] and \[q[-2]=16\].
We have shown a case where \[x_1 \neq x_2\] and \[q[x_1]=q[x_2]\], so \[q\] is NOT one-to-one.Exercise \[\PageIndex{4}\label{ex:oneonefcn-04}\]
Decide if this function is one-to-one or not. Then prove your conclusion.
\[ f :{\mathbb{R}}\to{\mathbb{R}}\], \[f[x]=6-5x\].
Exercise \[\PageIndex{5}\label{ex:oneonefcn-05}\]
Determine which of the following are one-to-one functions.
- \[ f : {\mathbb{Z}}\to{\mathbb{Z}}\]; \[f[n]=n^3+1\]
- \[ g : {\mathbb{Q}}\to{\mathbb{Q}}\]; \[g[x]=n^2\]
- \[{k} : {\mathbb{R}}\to{\mathbb{R}}\]; \[k[x]=5^x\]
[a] One-to-one [b] Not one-to-one [c] One-to-one
Exercise \[\PageIndex{6}\label{ex:oneonefcn-06}\]
Determine which of the following are one-to-one functions and explain your answer.
- \[p :{\mathscr{P}[\{1,2,3,\ldots,n\}]}\to{\{0,1,2,\ldots,n\}}\]; \[p[S]=|S|\]
- \[ q :{\mathscr{P}[\{1,2,3,\ldots,n\}]}\to{\mathscr{P}[\{1,2,3,\ldots,n\}]}\]; \[q[S]=\overline{S}\]
Exercise \[\PageIndex{7}\label{ex:oneonefcn-07}\]
Determine which of the following functions are one-to-one.
- \[{f_1}:{\{1,2,3,4,5\}}\to{\{a,b,c,d\}}\]; \[f_1[1]=b\], \[f_1[2]=c\], \[f_1[3]=a\], \[f_1[4]=a\], \[f_1[5]=c\]
- \[{f_2}:{\{1,2,3,4\}}\to{\{a,b,c,d,e\}}\]; \[f_2[1]=c\], \[f_2[2]=b\], \[f_2[3]=a\], \[f_2[4]=d\]
[a] Not one-to-one [b] One-to-one
Exercise \[\PageIndex{8}\label{ex:oneonefcn-08}\]
Determine which of the following functions are one-to-one.
- \[{g_1}:{\{1,2,3,4,5\}}\to{\{a,b,c,d,e\}}\]; \[g_1[1]=b\], \[g_1[2]=b\], \[g_1[3]=b\], \[g_1[4]=a\], \[g_1[5]=d\]
- \[{g_2}:{\{1,2,3,4,5\}}\to{\{a,b,c,d,e\}}\]; \[g_2[1]=d\], \[g_2[2]=b\], \[g_2[3]=e\], \[g_2[4]=a\], \[g_2[5]=c\]
Exercise \[\PageIndex{9}\label{ex:oneonefcn-09}\]
List all the one-to-one functions from \[\{1,2\}\] to \[\{a,b,c,d\}\].
HintList the images of each function.
Solution
There are twelve one-to-one functions from \[\{1,2\}\] to \[\{a,b,c,d\}\]. The images of 1 and 2 under them are listed below. \[\begin{array}{|c||*{12}{c|}} \hline & f_1 & f_2 & f_3 & f_4 & f_5 & f_6 & f_7 & f_8 & f_9 & f_{10} & f_{11} & f_{12} \\ \hline\hline 1 & a & a & a & b & b & b & c & c & c & d & d & d \\ \hline 2 & b & c & d & a & c & d & a & b & d & a & b & c \\ \hline \end{array}\]
Exercise \[\PageIndex{10}\label{ex:oneonefcn-10}\]
Is it possible to find a one-to-one function from \[\{1,2,3,4\}\] to \[\{1,2\}\]? Explain.
Exercise \[\PageIndex{11}\label{ex:oneonefcn-11}\]
Determine which of the following functions are one-to-one.
- \[ f : {\mathbb{Z}_{10}}\to{\mathbb{Z}_{10}}\]; \[h[n]\equiv 3n\] [mod 10].
- \[ g : {\mathbb{Z}_{10}}\to{\mathbb{Z}_{10}}\]; \[g[n]\equiv 5n\] [mod 10].
- \[ h : {\mathbb{Z}_{36}}\to{\mathbb{Z}_{36}}\]; \[h[n]\equiv 3n\] [mod 36].
[a] One-to-one [b] Not one-to-one [c] Not one-to-one
Exercise \[\PageIndex{12}\label{ex:oneonefcn-12}\]
Decide if this function is one-to-one or not. Then prove your conclusion.
\[ k : {\mathbb{R}}\to{\mathbb{R}}\] defined by \[k[x]=3x^2-5\] is one-to-one.
Exercise \[\PageIndex{13}\label{ex:oneonefcn-13}\]
Decide if this function is one-to-one or not. Then prove your conclusion.
\[ f: {\mathbb{R}}\to{\mathbb{R}}\] defined by \[f[x]=57\] is one-to-one.
SolutionNo. For example, \[8 \neq 17\], but \[f[8]=57\] and \[f[17]=57\].
We have shown a case where \[x_1 \neq x_2\] and \[f[x_1]=f[x_2]\], so \[f\] is NOT one-to-one.Exercise \[\PageIndex{14}\label{ex:oneonefcn-14}\]
Give an example of a one-to-one function \[f\] from \[\mathbb{N}\] to \[\mathbb{N}\] that is not the identity function.
How do you find the number of one to one functions from A to B?
If a set A has m elements and set B has n elements, then the number of functions possible from A to B is nm. For example, if set A = {3, 4, 5}, B = {a, b}. If a set A has m elements and set B has n elements, then the number of onto functions from A to B = nm – nC1[n-1]m + nC2[n-2]m – nC3[n-3]m+….How many one
nPm=n! [n−m]! By substituting factorial of 0 as 1,we get: The number of one-one functions =4P4=4!What is the number of all one
Therefore, Total no. of one-one functions =3!How many functions can be defined from set A to B?
There are 9 different ways, all beginning with both 1 and 2, that result in some different combination of mappings over to B. The number of functions from A to B is |B|^|A|, or 32 = 9.