FUNCTIONS
INTRODUCTION
• One of the most important concepts in mathematics is
that of a function.
• Related to the notion of a function is that of an
algorithm.
• Suppose that to each element of a set A we assign a
unique element of a set B; the collection of such
assignments is called a function from A into B. The set
A is called the domain of the function, and the set B is
called the target set or codomain.
Definitions and Examples
• Let A and B be two sets. A function f from A to B,
written f : A → B, is a rule which associates to each a
∈ A a unique element f (a) ∈ B.
• It is quite common to visualize the function rule as
being encapsulated in a ‘function machine’. This is a
‘black box’, illustrated below, which has the property
that if an element a ∈ A is fed into the machine, it
produces as output the associated element f (a) ∈ B.
• Functions are ordinarily denoted by symbols. For
example, let f denote a function from A into B.
Then we write
– f: A → B
• which is read: “f is a function from A into B,” or “f
takes (or maps) A into B.” If a ∈ A, then f (a) (read:
“f of a”) denotes the unique element of B which f
assigns to a; it is called the image of a under f, or
the value of f at a.
• The set of all image values is called the range or
image of f. The image of f : A → B is denoted by
Ran(f ), Im(f ) or f (A).
• Frequently, a function can be expressed by means
of a mathematical formula. For example, consider
the function which sends each real number into its
square. We may describe this function by writing
– f (x) = x2 or x → x2 or y = x2
• In the first notation, x is called a variable and the
letter f denotes the function. In the second notation,
the barred arrow → is read “goes into.”
• In the last notation, x is called the independent
variable and y is called the dependent variable since
the value of y will depend on the value of x.
• EXAMPLES
• (a) Consider the function f (x) = x3, i.e., f
assigns to each real number its cube. Then the
image of 2 is 8, and so we may write f (2) = 8.
• (b)
• The figure in the previous slide defines a function f
from A = {a, b, c, d} into B = {r, s, t , u} in such that f
(a) = s, f (b) = u, f (c) = r, f (d) = s
The image of f is the set of image values, {r, s, u}.
Note that t does not belong to the image of f
because t is not the image of any element under f.
• Let A be any set. The function from A into A which
assigns to each element in A the element itself is
called the identity function on A and it is usually
denoted by 1A, or simply 1. In other words, for every
a ∈ A,1A(a) = a.
Functions as Relations
• There is another point of view from which
functions may be considered. First of all, every
function f: A → B gives rise to a relation from A
to B called the graph of f and defined by
– Graph of f = {(a, b) | a ∈ A, b = f (a)}
• Two functions f : A → B and g: A → B are defined
to be equal, written f = g, if f (a) = g(a) for every
a ∈ A; that is, if they have the same graph.
Functions as Relations contd.
• Definition: A function f: A → B is a relation from A to B
(i.e., a subset of A×B) such that each a ∈ A belongs to a
unique ordered pair (a, b) in f.
• EXAMPLE 3.2
• (a) Let f: A → B be the function defined in Example 3.1 (b).
Then the graph of f is as follows:
• {(a, s), (b, u), (c, r), (d, s)}
• (b) Consider the following three relations on the set A =
{1, 2, 3}:
• f = {(1, 3), (2, 3), (3, 1)}, g= {(1, 2), (3, 1)}, h= {(1, 3), (2, 1),
(1, 2), (3, 1)}
ONE-TO-ONE, ONTO, AND INVERTIBLE
FUNCTIONS
• A function f : A → B is said to be one-to-one
(written 1-1) if different elements in the domain A
have distinct images. Another way of saying the
same thing is that f is one-to-one if f (a) = f (a’)
implies a = a’
• . A function f: A → B is said to be an onto function
if each element of B is the image of some element
of A. In other words, f : A → B is onto if the image
of f is the entire codomain, i.e., if f (A) = B. In such
a case we say that f is a function from A onto B or
that f maps A onto B
• A function f: A → B is invertible if its inverse
relation f−1 is a function from B to A. In general,
the inverse relation f−1 may not be a function.
The following theorem gives simple criteria
which tells us when it is.
• Theorem: A function f: A → B is invertible if
and only if f is both one-to-one and onto.
• If f : A → B is one-to-one and onto, then f is called
a one-to-one correspondence between A and B.
This terminology comes from the fact that each
element of A will then correspond to a unique
element of B and vice versa.
• Some texts use the terms injective for a one-to-
one function, surjective for an onto function, and
bijective for a one-to-one correspondence.