| Let f: A if f(a1) = f(a2), then a1 = a2 Equivalently, if a1 |
Conversely, a function f: A
B
is not a one-to-one function ![]()
elements
a1 and a2 in A such that f(a1)
= f(a2) and a1
a2.
In terms of arrow diagrams, a one-to-one function takes distinct points of the domain to distinct points of the co-domain. A function is not a one-to-one function if at least two points of the domain are taken to the same point of the co-domain. Consider the following diagrams:
A one-to-one function A function that is not one-to-one
One-To-One Functions on Infinite Sets
To prove a function is one-to-one, the method of direct proof is generally used. Consider the example:
Example: Define f : R
R
by the rule
f(x) = 5x - 2 for all x
R
Prove that f is one-to-one.
Proof: Suppose x1 and x2 are real numbers such that f(x1) = f(x2). (We need to show x1 = x2 .)
5x1 - 2 = 5x2 - 2
Adding 2 to both sides gives
5x1 = 5x2
Dividing by 5 on both sides gives
x1 = x2
We have proven that f is one-to-one.
On the other hand, to prove a function that is not one-to-one, a counter example has to be given.
Example: Define h: R
R
is defined by the rule h(n) = 2n2.
Prove that h is not one-to-one by giving a counter
example.
Counter example:
Let n1 = 3 and n2 = -3. Then
h(n1) = h(3) = 2 * 32 = 18 and
h(n2) = h(-3) = 2 * (-3)2 = 18
Hence
h(n1) = h(n2)
but n1
n2,
and therefore h is not one-to-one.
| Let f: A f is onto |
Conversely, a function f: A
B
is not onto ![]()
y
in B such that
x
A,
f(x)
y.
In arrow diagram representations, a function is onto if each element of the co-domain has an arrow pointing to it from some element of the domain. A function is not onto if some element of the co-domain has no arrow pointing to it. Consider the following diagrams:

An onto function A function that is not onto
Proving or Disproving That Functions Are Onto
Example: Define f : R
R
by the rule f(x) = 5x - 2 for all x
R.
Prove that f is onto.
Proof: Let y
R.
(We need to show that
x
in R such that f(x) = y.)
If such a real number x exists, then 5x -2 = y and x = (y + 2)/5. x is a real number since sums and quotients (except for division by 0) of real numbers are real numbers. It follows that
f(x) = 5((y + 2)/5) -2 by the substitution and the definition of f
= y + 2 -2
= y by basic algebra
Hence, f is onto.
Example: Define g: Z
Z
by the rule g(n) = 2n - 1 for all n
Z.
Prove that g is not onto by giving a counter example.
Counter example:
The co-domain of g is Z
by the definition of g and 0
Z.
However, g(n)
0
for any integer n.
If g(n) = 0, then
2n -1 = 0
2n = 1 by adding 1 on both sides
n = 1/2 by dividing 2 on both sides
But 1/2 is not an integer. Hence there is no integer n for g(n) = 0 and so g is not onto.
A function f : A
B
can be both one-to-one and onto at the same time. This means
that given any element a in A, there is a unique corresponding element
b = f(a) in B. Also given any element b in
B, there is an element a in A such that f(a)
= b as f is onto and there is only one such
b as f is one-to-one. In this case, the function
f sets up a pairing between elements of A and elements of
B that pairs each element of A with exactly one element of B and each element
of B with exactly one element of A. This pairing is called one-to-one
correspondence or bijection.
When depicted by arrow diagrams, it is illustrated as below:

A function which is a one-to-one correspondence
If there is a function f which has a one-to-one correspondence from a set A to a set B, then there is a function from B to A that "undoes" the action of f. This function is called the inverse function for f.
| Suppose f: A f -1(b) = a f -1 is the inverse function of f. |
The diagram below shows the fact that an inverse function sends each element back to where it came from.

A function f and its inverse function f-1
Finding an inverse function for a function given by a formula:
Example: Define f: R
R
by the rule f(x) = 5x
- 2 for all x
R.
It has been already shown above that f is one-to-one
and onto. Hence f is a one-to-one correspondence and
has an inverse function f -1.
Solution: By the definition of f -1,
f -1(y) = x such that f(x) = y
But ; f(x) = y
5x-2 =
y by
the definition of f
x
= (y + 2)/5 by
basic algebra
Hence f -1(y) = (y + 2)/5.
Take
a Section Quiz
Go
to next section review
Go
to Class Agenda