6.3: One-to-One Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
We distinguish two special families of functions: the one-to-one functions and the onto functions. We shall discuss one-to-one functions in this section, and onto functions in the next.
Definition: Injection
A function f:A→B is said to be one-to-one if
x1≠x2⇒f(x1)≠f(x2)
for all elements x1,x2∈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.
Any well-defined 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.
Example 6.3.1
The identity function on any nonempty set A iA:A→A,iA(x)=x, maps any element back to itself. It is clear that all identity functions are one-to-one.
Example 6.3.2
The function h:A→A defined by h(x)=c for some fixed element c∈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(x1)=f(x2)⇒x1=x2
Example 6.3.3
Is the function f:R→R defined by f(x)=3x+2 one-to-one?
- Solution
-
Assume f(x1)=f(x2), which means 3x1+2=3x2+2. Thus 3x1=3x2, which implies that x1=x2. Therefore f is one-to-one.
exercise 6.3.1
Determine whether the function g:R→R defined by g(x)=5−7x is one-to-one.
exercise 6.3.2
Determine whether the function h:[2,∞)→R defined by h(x)=√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 x1<x2⇒f(x1)<f(x2), and decreasing if x1<x2⇒f(x1)>f(x2). 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∈(a,b).
- A function is decreasing over an open interval (a,b) if f′(x)<0 for all x∈(a,b).
Therefore, if the derivative of a function is always positive, or always negative, then the function must be one-to-one.
Example 6.3.4
The function p:R→R defined by p(x)=2x3−5 is one-to-one, because p′(x)=6x2>0 for any x∈R∗. Likewise, the function q:(−π2,π2)→R defined by q(x)=tanx is also one-to-one, because q′(x)=sec2x>0 for any x∈(−π2,π2).
exercise 6.3.3
Use both methods to show that the function k:(0,∞)→R defined by k(x)=lnx is one-to-one.
Example 6.3.5
The function h:R→R given by h(x)=x2 is not one-to-one because some of its images are identical. For example, h(3)=h(−3)=9. It is a many-to-one function. Likewise, the absolute value function |x| is not one-to-one.
The functions p:[0,∞)→R defined by p(x)=x2 and q:[0,∞)→R defined by q(x)=|x| are one-to-one. Whether a function is one-to-one depends not only on its formula, but also on its domain. Consequently, sometimes we may be able to convert a many-to-one function into a one-to-one function by modifying its domain.
Example 6.3.6
Construct a one-to-one function from [1,3] to [2,5].
- Solution
-
There are many possible solutions. In any event, start with a graph. We can use a straight line graph. The domain [1,3] lies on the x-axis, and the codomain [2,5] lies on the y-axis. Hence the graph should cover the boxed region in Figure 6.3.1.
Figure 6.3.1: Three candidates for one-to-one functions from [1,3] to [2,5]. All three graphs do not produce duplicate images. We need to cover all x-values from 1 to 3 in order for the function to be well-defined. This leaves only the first two graphs as legitimate examples.
To determine the formula for f, we need to derive the equation of the line. Take the first graph as our choice. The line joins the point (1,2) to the point (3,4). Thus, its equation is y−2x−1=4−23−1=1. The last step is to write the answer in the form of f(x)=…. We have to express y in terms of x. We find y=x+1. Hence, f:[1,3]→[2,5],f(x)=x+1 is an example of a one-to-one function.
exercise 6.3.4
Construct a one-to-one function from [1,3] to [2,5] based on the second graph in Example 6.3.6.
exercise 6.3.5
Construct a one-to-one function from [3,8] to [2,5].
example 6.3.7
Determine whether the function g:Z43→Z43 defined by g(x)≡11x−5(mod43) is one-to-one.
- Solution
-
Assume g(x1)=g(x2). This means 11x1−5≡11x2−5(mod43), which implies 11x1≡11x2(mod43). Notice that 4⋅11=44≡1 (mod 43), hence 11−1≡4 (mod 43). Multiplying 4 to both sides of the last congruence yields 44x1≡44x2(mod43), which is equivalent to, since 44≡1 (mod 43), x1≡x2(mod43). Therefore, x1=x2 in Z43. This proves that g is one-to-one.
exercise 6.3.6
Is the function h:Z15→Z15 defined by h(x)≡4x−11(mod15) a one-to-one function?
exercise 6.3.7
Show that the function k:Z15→Z15 defined by k(x)≡5x−11(mod15) is not one-to-one by finding x1≠x2 such that k(x1)=k(x2).
Example 6.3.8
In the last exercise, we should not rely on the non-existence of 5−1 in Z15 to prove that k is not one-to-one. One must consider the interaction between the domain, the codomain, and the definition of the function. For example, despite the fact that 5−1 does not exist in Z15, the function p:Z3→Z15 defined by p(x)≡5x−11(mod15) is one-to-one, because p(0)=4, p(1)=9, and p(2)=14 are distinct images.
The last example illustrates the trickiness in a function with different moduli in its domain and codomain. Use caution when you deal with such functions! Sometimes, infinite sets also pose a challenge. Because there is an infinite supply of elements, we may obtain results that appear to be impossible for finite sets.
Example 6.3.9
The function f:Z→Z defined by f(n)={n2 if n is even n+12 if n is odd is not one-to-one, because, for example, f(0)=f(−1)=0. The function g:Z→Z defined by g(n)=2n is one-to-one, because if g(n1)=g(n2), then 2n1=2n2 implies that n1=n2.
exercise 6.3.8
Show that the function h:Z→N defined by h(n)={2n+1 if n≥0, −2n if n<0, is one-to-one.
Example 6.3.10
Let A be the set of all married individuals from a monogamous community who are neither divorced nor widowed. Then the function s:A→A defined by s(x)= spouse of x is one-to-one. The reason is, it is impossible to have x1≠x2 and yet s(x1)=s(x2).
Summary and Review
- A function f is said to be one-to-one if f(x1)=f(x2)⇒x1=x2.
- No two images of a one-to-one function are the same.
- 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 x1≠x2 such that f(x1)=f(x2).
Exercise 6.3.1
Which of the following functions are one-to-one? Explain.
- f:R→R, f(x)=x3−2x2+1.
- g:[2,∞)→R, f(x)=x3−2x2+1.
Exercise 6.3.2
Which of the following functions are one-to-one? Explain.
- p:R→R, h(x)=e1−2x.
- q:R→R, p(x)=|1−3x|.
Exercise 6.3.3
Construct a one-to-one function f:(1,3)→(2,5) so that f:[1,3)→[2,5) is still one-to-one.
Exercise 6.3.4
Construct a one-to-one function g:[2,5)→(1,4].
Exercise 6.3.5
Determine which of the following are one-to-one functions.
- f:Z→Z; f(n)=n3+1
- g:Q→Q; g(x)=n2
- h:R→R; h(x)=x3−x
- k:R→R; k(x)=5x
Exercise 6.3.6
Determine which of the following are one-to-one functions.
- p:℘({1,2,3,…,n})→{0,1,2,…,n}; p(S)=|S|
- q:℘({1,2,3,…,n})→℘({1,2,3,…,n}); q(S)=¯S
Exercise 6.3.7
Determine which of the following functions are one-to-one.
- f1:{1,2,3,4,5}→{a,b,c,d}; f1(1)=b, f1(2)=c, f1(3)=a, f1(4)=a, f1(5)=c
- f2:{1,2,3,4}→{a,b,c,d,e}; f2(1)=c, f2(2)=b, f2(3)=a, f2(4)=d
- f3:Z→Z; f5(n)=−n
- f4:Z→Z; f4(n)={2n if n<0, −3n if n≥0,
Exercise 6.3.8
Determine which of the following functions are one-to-one.
- g1:{1,2,3,4,5}→{a,b,c,d,e}; g1(1)=b, g1(2)=b, g1(3)=b, g1(4)=a, g1(5)=d
- g2:{1,2,3,4,5}→{a,b,c,d,e}; g2(1)=d, g2(2)=b, g2(3)=e, g2(4)=a, g2(5)=c
- g3:N→N; g3(n)={n+12 if n is odd n2 if n is even
- g4:N→N; g4(n)={n+1 if n is odd n−1 if n is even
Exercise 6.3.9
List all the one-to-one functions from {1,2} to {a,b,c,d}.
- Hint
-
List the images of each function.
Exercise 6.3.10
Is it possible to find a one-to-one function from {1,2,3,4} to {1,2}? Explain.
Exercise 6.3.11
Determine which of the following functions are one-to-one.
- f:Z10→Z10; h(n)≡3n (mod 10).
- g:Z10→Z10; g(n)≡5n (mod 10).
- h:Z36→Z36; h(n)≡3n (mod 36).
Exercise 6.3.12
Determine which of the following functions are one-to-one.
- r:Z36→Z36; r(n)≡5n (mod 36).
- s:Z10→Z10; s(n)≡n+5 (mod 10).
- t:Z10→Z10; t(n)≡3n+5 (mod 10).
Exercise 6.3.13
Determine which of the following functions are one-to-one.
- α:Z12→Z7; α(n)≡2n (mod 7).
- β:Z8→Z12; β(n)≡3n (mod 12).
- γ:Z6→Z12; γ(n)≡2n (mod 12).
- δ:Z12→Z36; δ(n)≡6n (mod 36).
Exercise 6.3.14
Give an example of a one-to-one function f from N to N that is not the identity function.