s
Section 5.4 Functions
389
One-to-One Functions
The definition of a function guarantees a unique image for every member of the
domain. A given member of the range may have more than one preimage, however. In our very first example of a function (salary increases), both physical sciences and liberal arts were preimages of 1.5%. This function was not one-to-one.
example 35
Let f : Q S Q be defined by f (x) = 3x + 2. To test whether f is onto, let q [ Q.
We want an x [ Q such that f (x) = 3x + 2 = q. When we solve this equation for
x, we find that x = (q − 2)∙3 is the only possible value and is indeed a member
of Q. Thus, q is the image of a member of Q under f, and f is onto. However, the
function h: Z S Q defined by h(x) = 3x + 2 is not onto because there are many
values q [ Q, for example 0, for which the equation 3x + 2 = q has no integer
solution.
PRaCtiCe 28 Which of the functions found in Practice 23 are onto functions?
■
PRaCtiCe 29 Suppose a function f : 5T, F6
n S 5T, F6 is defined by a propositional wff P (see Example 31).
Give the two conditions on P under each of which f will fail to be an onto function.
■
DefInItIon one-to-one (injective) Function
A function f: S S T is one-to-one, or injective, if no member of T is the image
under f of two distinct elements of S.
The one-to-one idea here is the same as for binary relations in general, as
discussed in Section 5.1, except that every element of S must appear as a first component in an ordered pair. To prove that a function is one-to-one, we assume that
there are elements s 1 and s 2 of S with f (s 1 ) = f (s 2 ) and then show that s 1 = s 2 . To
prove that a function is not one-to-one, we produce a counterexample, an element
in the range with two preimages in the domain.
RemInDeR
To show that a function
f is one-to-one, assume
f(s 1 ) = f(s 2 ) and show that
s 1 = s 2 .
example 36
The function g: R S R defined by g(x) = x
3
is one-to-one because if x and y are
real numbers with g(x) = g( y), then x
3
= y
3
and x = y. The function f : R S R
given by f (x) = x
2
is not one-to-one because, for example, f (2) = f (−2) = 4.
However, the function h: N S N given by h(x) = x
2
is one-to-one because if x
and y are nonnegative integers with h(x) = h( y), then x
2
= y
2
; because x and y are
both nonnegative, x = y.
PRaCtiCe 30 Which of the functions found in Practice 23 are one-to-one functions?
■
Section 5.4 Functions
389
One-to-One Functions
The definition of a function guarantees a unique image for every member of the
domain. A given member of the range may have more than one preimage, however. In our very first example of a function (salary increases), both physical sciences and liberal arts were preimages of 1.5%. This function was not one-to-one.
example 35
Let f : Q S Q be defined by f (x) = 3x + 2. To test whether f is onto, let q [ Q.
We want an x [ Q such that f (x) = 3x + 2 = q. When we solve this equation for
x, we find that x = (q − 2)∙3 is the only possible value and is indeed a member
of Q. Thus, q is the image of a member of Q under f, and f is onto. However, the
function h: Z S Q defined by h(x) = 3x + 2 is not onto because there are many
values q [ Q, for example 0, for which the equation 3x + 2 = q has no integer
solution.
PRaCtiCe 28 Which of the functions found in Practice 23 are onto functions?
■
PRaCtiCe 29 Suppose a function f : 5T, F6
n S 5T, F6 is defined by a propositional wff P (see Example 31).
Give the two conditions on P under each of which f will fail to be an onto function.
■
DefInItIon one-to-one (injective) Function
A function f: S S T is one-to-one, or injective, if no member of T is the image
under f of two distinct elements of S.
The one-to-one idea here is the same as for binary relations in general, as
discussed in Section 5.1, except that every element of S must appear as a first component in an ordered pair. To prove that a function is one-to-one, we assume that
there are elements s 1 and s 2 of S with f (s 1 ) = f (s 2 ) and then show that s 1 = s 2 . To
prove that a function is not one-to-one, we produce a counterexample, an element
in the range with two preimages in the domain.
RemInDeR
To show that a function
f is one-to-one, assume
f(s 1 ) = f(s 2 ) and show that
s 1 = s 2 .
example 36
The function g: R S R defined by g(x) = x
3
is one-to-one because if x and y are
real numbers with g(x) = g( y), then x
3
= y
3
and x = y. The function f : R S R
given by f (x) = x
2
is not one-to-one because, for example, f (2) = f (−2) = 4.
However, the function h: N S N given by h(x) = x
2
is one-to-one because if x
and y are nonnegative integers with h(x) = h( y), then x
2
= y
2
; because x and y are
both nonnegative, x = y.
PRaCtiCe 30 Which of the functions found in Practice 23 are one-to-one functions?
■
