In the previous section, we saw some different types of functions. We also saw solved examples demonstrating how to check whether a function is one-one or onto. In this section, we will see a few more solved examples.
Solved example 17.10
Show that the function
f : N → N, given by f (1) = f (2) = 1 and f (x) = x – 1,
for every x > 2,
is onto but not one-one.
Solution:
To get a better understanding about the given function, it can be written as a piecewise function:
$$f(x) =
\begin{cases}
1, & \text{if $x$ is 1} \\[1.5ex]
1, & \text{if $x$ is 2} \\[1.5ex]
x-1 & \text{if $x$ > 2}
\end{cases}$$
1. f is a function from N to N.
• We know that f is a set. The elements of this set are ordered pairs of the form (x,y).
2. We take x from the set N. Set N is
the set of natural numbers.
3.
For each x value, we get the corresponding y value. This y value is also from set N.
4. Given that: f (1) = f (2) = 1
So we can write:
• the first ordered pair in f will be: (1, 1)
• the second ordered pair in f will be: (2, 1)
5. We see that, "1" is the image of both 1 and 2.
So f is not one-one.
6. Next, we will prove that, f is onto. For that, we need to prove that, all elements in the codomain (N) will be an image.
•
We already saw that, "1" will be an image. So we need not consider it again.
•
We must show the general case for the infinite number of natural numbers coming after "1"
7. Consider any natural number y (other than 1) from the set N.
•
Choose the input x such that x = y+1
•
y is not equal to 1. So y can be 2, 3, 4, 5, . . .
•
Then x will be always greater than 2. So the condition applicable is: f(x) = x-1
•
We get:
$\begin{array}{ll}{} &{f(x)} & {~=~} &{x-1} &{} \\
{\Rightarrow} &{f(y+1)} & {~=~} &{y+1-1} &{} \\
{\Rightarrow} &{f(y+1)} & {~=~} &{y} &{} \\
\end{array}$
8. We can write:
•
For every y in the set N, we have a (y+1). If we input that (y+1) in f, we will get y as the output.
•
That means, every element in N will be an image. So f is an onto function.
Solved example 17.11
Show that the function f : R → R,
defined as f (x) = x2 , is neither one-one nor onto.
Solution:
1. Let us write some elements in f.
(i) When x = 0, f(x) = f(0) = 02 = 0
So we get the element (0,0)
(ii) When x = 1, f(x) = f(1) = 12 = 1
So we get the element (1,1)
(iii) When x = -1, f(x) = f(-1) = (-1)2 = 1
So we get the element (-1,1)
2. From (ii) and (iii) of the above step, we see that:
"1" is the image of both 1 and -1.
• So f is not an one-one function.
3.
This will become more clear from the graph in fig.17.5 below.
Fig.17.5 |
Mark the points -1 and 1 on the x axis. Draw vertical green dashed lines upwards. Those vertical lines will meet the graph at two points. Through those points, draw a horizontal green dashed line. This horizontal line will meet the y axis at a point. This point "1" on the y axis is the image of both -1 and 1.
4. Next we prove that f is not on to.
•
Pick the point "-1" from the codomain. This "-1" cannot be the image of any number in the domain. This is because, we are squaring the input x. The square cannot be -ve.
•
That means, all elements of the codomain are not images. So f is not an onto function.
5. This will become more clear from the graph in fig.17.5 above.
•
We see that:
We can draw a horizontal dashed line through any -ve y value. But such a line will never meet the graph. So we will not be able to find an x value such that, it's image is a -ve value.
Solved example 17.12
Show that f : N → N, given by
$$f(x) =
\begin{cases}
x+1, & \text{if $x$ is odd} \\[1.5ex]
x-1, & \text{if $x$ is even}
\end{cases}$$
is both one-one and onto.
Solution:
•
f is a function from N to N.
• We know that f is a set. The elements of this set are ordered pairs of the form (x,y).
•
We take x from the set N. Set N is
the set of natural numbers 1,2,3, . . . up to infinity.
•
For each x value, we get the corresponding y value. This y value is also from set N.
1. In an one-one function, if f(x1) is to be equal to f(x2), then x1 must be equal to x2. This
condition can be used to prove that, a given function is an one-one function.
2. In our present case, suppose that, f(x1) is equal to f(x2). Then we can write:
$\begin{array}{ll}{} &{f(x_1)} & {~=~} &{f(x_2)} &{} \\
{\Rightarrow} &{x_1 + 1} & {~=~} &{x_2 -1 ~~\color{green}{\text{- - - I}}} &{} \\
{\Rightarrow} &{x_2 - x_1} & {~=~} &{2} &{} \\
\end{array}$
◼ Remarks:
•
Line marked as I:
In this line, we assume that x1 is odd and x2 is even.
♦ Since x1 is odd, f(x) will be (x1 + 1)
♦ Also, since x2 is even, f(x) will be (x2 - 1)
•
The difference between an odd number and an even number cannot be 2.
•
So we can write:
The condition of “x1 is odd and x2 is even” is not possible.
3. Again, suppose that, f(x1) is equal to f(x2), assuming x1 to be even and x2 to be odd. Then we can write:
$\begin{array}{ll}{} &{f(x_1)} & {~=~} &{f(x_2)} &{} \\
{\Rightarrow} &{x_1 - 1} & {~=~} &{x_2 + 1 ~~\color{green}{\text{- - - I}}} &{} \\
{\Rightarrow} &{x_1 - x_2} & {~=~} &{2} &{} \\
\end{array}$
◼ Remarks:
•
Line marked as I:
In this line, we assume that x1 is even and x2 is odd.
♦ Since x1 is even, f(x) will be (x1 - 1)
♦ Also, since x2 is odd, f(x) will be (x2 + 1)
•
The difference between an odd number and an even number cannot be 2.
•
So we can write:
The condition of “x1 is even and x2 is odd” is not possible.
4. Based on (2) and (3), we can write:
Either x1 and x2 both must be odd.
Or x1 and x2 both must be even.
5. Suppose that, both x1 and x2 are odd. Then we can write:
$\begin{array}{ll}{} &{f(x_1)} & {~=~} &{f(x_2)} &{} \\
{\Rightarrow} &{x_1 + 1} & {~=~} &{x_2 + 1} &{} \\
{\Rightarrow} &{x_1} & {~=~} &{x_2} &{} \\
\end{array}$
6. Suppose that, both x1 and x2 are even. Then we can write:
$\begin{array}{ll}{} &{f(x_1)} & {~=~} &{f(x_2)} &{} \\
{\Rightarrow} &{x_1 - 1} & {~=~} &{x_2 - 1} &{} \\
{\Rightarrow} &{x_1} & {~=~} &{x_2} &{} \\
\end{array}$
7. From (5) and (6), it is clear that:
If f(x1) is equal to f(x2), then it implies that x1 = x2.
•
So f is an one-one function.
8. Next, we will prove that, f is onto.
•
Suppose that, the input x value is odd. We know that, any odd number can be represented as (2r+1)
•
So we get:
f(x) = f(2r+1) = (2r +1 + 1) = 2r+2
•
But 2r +2 is an even number.
•
So we can write:
By suitably varying the value of r in the input odd number, we can obtain all even numbers as outputs.
9.
Suppose that, the input x value is even. We know that, any even number can be represented as (2r)
•
So we get:
f(x) = f(2r) = 2r - 1
•
But 2r - 1 is an odd number.
•
So we can write:
By suitably varying the value of r in the input even number, we can obtain all odd numbers as outputs.
10. From (8) and (9), it is clear that:
All numbers in the codomain N can become images. So f is an onto function.
Solved example 17.13
Show that an onto function f : {1, 2, 3} → {1, 2, 3} is always one-one.
Solution:
1. Given that, f is onto.
So one or more arrows will be converging on each and every element of the codomain {1,2,3}
2. We have to prove that, f is one-one. That is., only one arrow will be converging on each and every element of the codomain {1,2,3}
3. f is a function. So a single arrow will be diverging from each and every element of the domain {1,2,3}
4. Suppose that, f is not one-one. Then there are two possibilities.
(i) All three arrows diverging from the domain, converge on a single element in the codomain.
(ii) Two arrows diverging from the domain, converge on a single element in the codomain.
•
The third arrow from the domain, converges on one of the two remaining elements in the codomain.
5. Consider the possibility written in 4(i).
•
Here, two elements in the codomain are left without any converging arrows.
•
This contradicts with the statement that we wrote in (1). So thus possibility can be ruled out.
6. Consider the possibility written in 4(ii).
•
Here, one element in the codomain is left without any converging arrows.
•
This contradicts with the statement that we wrote in (1). So thus possibility can be ruled out.
7. We see that, both the possibilities that we wrote in (4), are ruled out. So f is an one-one function.
Solved example 17.14
Show that a one-one function f : {1, 2, 3} → {1, 2, 3} must be onto.
Solution:
1. Given that, f is one-one.
So, if any element in the codomain {1,2,3} is an image, then it will have only one arrow converging on it.
2. We have to prove that, there is an arrow converging on each and every element in the codomain {1,2,3}.
3. f is a function. So a single arrow will be diverging from each and every element of the domain {1,2,3}
4. Suppose that, f is not onto. Then there are two possibilities.
(i) All three arrows diverging from the domain, converge on a single element in the codomain.
(ii) Two arrows diverging from the domain, converge on a single element in the codomain.
The third arrow from the domain, converges on one of the two remaining elements in the codomain.
5. Consider the possibility written in 4(i).
This contradicts with the statement that we wrote in (1). So thus possibility can be ruled out.
6. Consider the possibility written in 4(ii).
This contradicts with the statement that we wrote in (1). So thus possibility can be ruled out.
7. We see that, both the possibilities that we wrote in (4), are ruled out. So f is an onto function.
Link to a few more solved examples is given below:
In the next section, we will see composition of functions and invertible functions.
No comments:
Post a Comment