Lecture 11
Lecture 11
Lecture # 11
Recall the Cartesian Product
Ali A
Babar B
Kashif C
Ali A
Babar B
Kashif C
3
FUNCTIONS
A function f from a set X to a set Y is a
relationship between elements of X and
elements of Y such that each element of X is
related to a unique element of Y, and is
denoted f : X Y.
the value of f at x,
or
the image of x under f
ARROW DIAGRAM OF A FUNCTION
The definition of a function implies that the
arrow diagram for a function f has the
following two properties:
a. . 1
b. . 2
c. . 3
. 4
X Y
Domain A B Co-domain
f
f(4.3)
4.3 4
8
Examples
A pre-image The image
Domain Co-domain of 1 of “a”
Ali A “a” 1
Babar B “bb“ 2
Kashif C “cccc” 3
Dawood D “dd” 4
Ammara F “e” 5
a. b.
.1
2. .1
.2 2.
4. .2
.4 4.
5. .4
.6 5.
.6
X Y X Y
NOT A FUNCTION NOT A FUNCTION
Not a valid function!
“a” 1
“bb“ 2
“cccc” 3
“dd” 4
“e” 5
RANGE OF A FUNCTION
Let f: XY. The range of f consists of those
elements of Y that are images of elements of
X.
Symbolically:
Range of f
= {y Y | y = f(x), for some x X}
Range of a Function
The range of f is the set of all images of
elements of A.
Range
a 1
e 2
i 3
o 4
u 5
Some function…
13
REMARKS
The range of a function f is always a subset of
the co-domain of f.
1. X Y
2 . . 1
4 . . 2
5 . . 4
. 6
2. Range of g = {1, 2, 6}
3. Range of h = {1, 4}
GRAPH OF A FUNCTION
Let f be a real-valued function of a real
variable. i.e. f: R R. The graph of f is
the set of all points (x, y) in the Cartesian
coordinate plane with the property that x is in
the domain of f and y = f(x).
EXAMPLE
We have the function
y = x2
x y=f(x)
-3 9
-2 4 (-3,9) (3,9)
-1 1
0 0 (x , f(x))
+1 1
+2 4 (-2,4) (2,4)
+3 9
(-1,1) (1,1)
O (o,o) x
VERTICAL LINE TEST FOR THE GRAPH
OF A FUNCTION
For a graph to be the graph of a function, any
given vertical line in its domain intersects the
graph in at most one point. For y = x2
y
y=x2
O x
-4
b v b v
X Y
X Y
EXERCISE
Find four binary relations from X = { a, b }to Y
= { u, v } that are not functions.
SOLUTION 1. a. .u
2.
a. .u
b. b. .v
.v
X Y X Y
3. X Y X Y
4.
a. u. a. u.
b. v. b. v.
EXERCISE
How many functions are there from a set with three
elements to a set with four elements?
SOLUTION
Let X = {x1, x2, x3} and
Y = {y1, y2, y3, y4}
SOLUTION:
Number of functions from
A to B = n.n.n. … .n (m times)
= nm
FUNCTIONS NOT WELL DEFINED
Determine whether f is a function from Z to R
if
1
a. f (n) n b. f (n) 2
n 4
c. f (n) n d. f (n) n2 1
SOLUTION
a) f is NOT well defined since each integer n
has two images +n and –n.
2 22 4
h 1
4 4 4
Hence an element of Q has more than one
images under h. Accordingly h is not well
defined.
REMARK
Mathematical Formulation of Function’s
Properties:
x1, x2 X,
SOLUTION:
Sincex2 0 x R
x2 + 1 1 x R
i.e. g(x) = x2 + 1 1 x R