0% found this document useful (0 votes)
53 views

Lecture 11

The document defines and provides examples of ordered pairs, ordered n-tuples, Cartesian products of sets, binary relations, and how to represent relations using coordinate and arrow diagrams. Ordered pairs consist of two elements where the order matters. Binary relations are subsets of Cartesian products that relate elements of one set to another. Coordinate and arrow diagrams can visually represent the relationships between elements defined by a binary relation.

Uploaded by

aamirali1061a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Lecture 11

The document defines and provides examples of ordered pairs, ordered n-tuples, Cartesian products of sets, binary relations, and how to represent relations using coordinate and arrow diagrams. Ordered pairs consist of two elements where the order matters. Binary relations are subsets of Cartesian products that relate elements of one set to another. Coordinate and arrow diagrams can visually represent the relationships between elements defined by a binary relation.

Uploaded by

aamirali1061a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

LECTURE # 11

ORDERED PAIR

An ordered pair (a, b) consists of two elements “a” and “b” in which “a” is
the first element and “b” is the second element.
The ordered pairs (a, b) and (c, d) are equal if, and only if, a = c and b = d.
Note that (a, b) and (b, a) are not equal unless a = b.

EXERCISE

Find x and y given (2x, x + y) = (6, 2)


SOLUTION:
Two ordered pairs are equal if and only if the
corresponding components are equal. Hence, we obtain the equations:
2x = 6 ………………(1)
and x+y=2 ……………..(2)
Solving equation (1) we get x = 3 and when substituted in (2) we get y = -1.

ORDERED n-TUPLE

The ordered n-tuple, (a1, a2, …, an) consists of elements a1, a2, ..an together
with the ordering: first a1, second a2, and so forth up to an.
In particular, an ordered 2-tuple is called an ordered pair, and an ordered 3-
tuple is called an ordered triple.
Two ordered n-tuples (a1, a2, …, an) and (b1, b2, …, bn) are equal if and only
if each corresponding pair of their elements is equal, i.e., a i = bi, for all
i = 1, 2, …, n. 1
CARTESIAN PRODUCT OF TWO SETS

Let A and B be sets. The Cartesian product of A and B, denoted A  B (read


“A cross B”) is the set of all ordered pairs (a, b), where a is in A and b is in
B.
Symbolically:
A B = {(a, b)| a  A and b  B}
NOTE
If set A has m elements and set B has n elements then A B has
m  n elements.

EXAMPLE:
Let A = {1, 2}, B = {a,b, c} then
A B = {(1,a), (1,b), (1,c), (2,a), (2, b), (2, c)}
B A = {(a,1), (a,2), (b, 1), (b, 2), (c, 1), (c, 2)}
A A = {(1, 1), (1,2), (2, 1), (2, 2)}
B B = {(a,a), (a,b), (a,c), (b,a), (b, b), (b, c), (c,a), (c,b),(c,c)}

REMARK:
From above example you can easily see that Cartesian product is
Not commutative.
1. ABBA for non-empty and unequal sets A and B.
2. A=A=
3. | A  B| = |A|  |B|
The third remark says that the number of elements in the Cartesian product
is equal to the product of the number f elements in the sets.
2
CARTESIAN PRODUCT OF MORE THAN TWO SETS

The Cartesian product of sets A1, A2, …, An, denoted


A1 A2  … An, is the set of all ordered n-tuples (a 1, a2, …, an)
where a1 A1, a2 A2,…, an An.
Symbolically:
A1 A2  … An={(a1, a2, …, an) | ai Ai, for i=1, 2, …, n}

EXAMPLE

Let A = {1, 2}, B = {a, b, c}, C = {x, y}, then


ABC= {(1, a, x), (1, a, y), (1, b, x), (1, b, y),
(1, c, x), (1, c, y), (2, a, x), (2, a, y),
(2, b, x), (2, b, y), (2, c, x), (2, c, y) }
Also (A  B)  C = {(u, v) | u  A  B and v  C}
Now A  B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
and (A  B)  C ={((1, a), x), ((1, a), y), ((1, b), y), ((1, b), x) ,((1, b), y),
((1, c), x), ((1, c), y), ((2, a), x),((2, a), y), ((2, a), y),
((2, b), x), ((2, b), y), ((2, c), x), ((2, c), y) }
Note that A  B  C and (A  B)  C are entirely different sets and you can
also see that

(A  B)  C  (A  ( B  C)
3
BINARY RELATION

Let A and B be sets. A (binary) relation R from A to B is a subset of A  B.


When (a, b) R, we say a is related to b by R, written a R b.
Otherwise if (a, b) R, we write a R b. a R b means that a is not related to b
by R.
EXAMPLE: Let A = {1, 2}, B = {1, 2, 3}
Then A  B = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3)}
Let R1={(1,1), (1, 3), (2, 2)}
R2={(1, 2), (2, 1), (2, 2), (2, 3)}
R3={(1, 1)}
R 4= A  B
R 5= 
All being subsets of A  B are relations from A to B.

DOMAIN OF A RELATION

DOMAIN OF A RELATION
The domain of a relation R from A to B is the set of all first elements of the
ordered pairs which belong to R denoted Dom(R)
Symbolically:
Dom (R) = {a A| (a,b) R}

4
RANGE OF A RELATION

RANGE OF RELATION
The range of A relation R from A to B is the set of all second elements of
the ordered pairs which belong to R denoted Ran(R).
Symbolically:
Ran(R) = {b B|(a,b)  R}
NOTE
The domain of a relation from A to B is a subset of A, and its range is a
subset of B.

EXERCISE

Let A = {1, 2}, B = {1, 2, 3},


Define a binary relation R from A to B as follows:
R = {(a, b) A  B | a < b}
Then
a. Find the ordered pairs in R.
b. Find the Domain and Range of R.
c. Is 1R3, 2R2?
SOLUTION

Given A = {1, 2}, B = {1, 2, 3},

First of all we will write down the set A  B and then from this set we will
see which order pair satisfy the given condition of less than given in
R. So
5
A  B = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3)}
SOLUTION

a. R = {(a, b) A  B | a < b}
R = {(1,2), (1,3), (2,3)}
b. Dom(R) = {1,2} and Ran(R) = {2, 3}
c. Since (1,3) R so 1R3
But (2, 2) R so 2R3

EXAMPLE

Let A = {eggs, milk, corn} and B = {cows, goats, hens}


Define a relation R from A to B by (a, b) R iff a is produced by b.
Then R = {(eggs, hens), (milk, cows), (milk, goats)}
Thus, with respect to this relation
eggs R hens, milk R hens.
milk R cows, corn R goats etc.
EXERCISE

Find all binary relations from {0,1} to {1}


SOLUTION: Let A = {0,1} & B = {1}
Then A  B = {(0,1), (1,1)}
All binary relations from A to B are in fact all subsets of A  B, which are:
R 1= 
R2={(0,1)}
R3={(1,1)} 6

R4={(0,1), (1,1)} = A  B
REMARK

If |A| = m and |B| = n


Then as we know that the number of elements in A  B are m  n.
Now as we know that the total number of
and the total number of relations from A to B are 2 m  n.

RELATION ON A SET

A relation on the set A is a relation from A to A.


In other words, a relation on a set A is a subset of A  A.

EXAMPLE:
Let A = {1, 2, 3, 4}
Define a relation R on A as
(a,b)  R iff a divides b {symbolically written as a  b}
Then R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)}
REMARK:
For any set A
1. A  A is known as the universal relation.
2.  is known as the empty relation.

7
EXERCISE

Define a binary relation E on the set of the integers Z, as follows:


for all m,n Z, m E n  m – n is even.
a. Is 0E0? Is 5E2? Is (6,6) E? Is (-1,7) E?
b. Prove that for any even integer n, nE0.
SOLUTION
E = {(m,n) Z Z | m – n is even}
a. (i) (0,0)  Z Z and 0-0 = 0 is even
Therefore 0E0.
(ii) (5,2)  Z Z but 5-2 = 3 is not even
so 5E2

(iii) (6,6)  E since 6-6 = 0 is an even integer.


(iv) (-1,7) E since (-1) – 7 = -8 is an even integer.

b. For any even integer, n, we have


n – 0 = n, an even integer
so (n, 0) E or equivalently n E 0

8
COORDINATE DIAGRAM (GRAPH) OF A RELATION

Let A = {1, 2, 3} and B = {x, y}


Let R be a relation from A to B defined as
R = {(1, y), (2, x), (2, y), (3, x)}
The relation may be represented in a coordinate diagram as follows:

y
B
x

1 2 3
A

EXAMPLE

Draw the graph of the binary relation C from R to R defined as follows:


for all (x, y) R  R, (x, y) C  x2 + y2 = 1
SOLUTION
All ordered pairs (x, y) in relation C satisfies the equation x 2+y2=1, which
when solved for y gives
y   1 x2
Clearly y is real, whenever –1  x  1
Similarly x is real, whenever –1  y  1
Hence the graph is limited in the range –1  x  1 and –1  y  1 9
The graph of relation is
y

(0,1)

(1,0)
(-1,0) (0,0)

(0,-1)

which is a circle with center at (0,0) & radius 1.

ARROW DIAGRAM OF A RELATION

Let A = {1, 2, 3}, B = {x, y} and R = {1,y), (2,x), (2,y), (3,x)}


be a relation from A to B.
The arrow diagram of R is:

1 R
x

2
y
3

A B

Note that we simply extend an arrow corresponding to each order pair in the
relation R from the first element to the second. For example we have an
arrow from 1 to y because we have order pair (1,y) in R. 10
DIRECTED GRAPH OF A RELATION

Let A = {0, 1, 2, 3}
and R = {(0,0), (1,3), (2,1), (2,2), (3,0), (3,1)}
be a binary relation on A.
The directed graph of R is obtained by representing points of A only once,
and drawing an arrow from each point of A to each related point. If a point
is related to itself, a loop is drawn that extends out from the point and goes
back to it.
Let A = {0, 1, 2, 3}
and R = {(0,0), (1,3), (2,1), (2,2), (3,0), (3,1)} is a binary relation on A

1
0

2 3

DIRECTED GRAPH

MATRIX REPRESENTATION OF A RELATION


Let A = {a1, a2, …, an} and B = {b1, b2, …, bm}. Let R be a
relation from A to B. Define the n  m order matrix M by

1 if (ai , bi )  R
m(i, j )  
0 if (ai , bi )  R

for i=1,2,…,n and j=1,2,…,m 11


EXAMPLE

Let A = {1, 2, 3} and B = {x, y}


Let R be a relation from A to B defined as
R ={(1,y), (2,x), (2,y), (3,x)}

First of all our Matrix will be of order 3 2 because we have relation from a
set of three elements to the set of two elements. So we write the elements of
A corresponding to the three rows of our matrix and elements of B
corresponding to the columns and the ijth element of the matrix is 1 if ith
element of A is related under R to the jth element of B other wise it is 0.
Hence we have the following matrix representation.

Then the matrix representation of R is

For the relation matrix.


x y
1 0 1
M  2 1 1
3 1 0 32
EXAMPLE

For the relation matrix.


1 2 3
1 1 0 1
M  2 1 0 0
3 0 1 1

1. List the set of ordered pairs represented by M.


12
2. Draw the directed graph of the relation.
SOLUTION

The relation corresponding to the given Matrix is


• R = {(1,1), (1,3), (2,1), (3,1), (3,2), (3,3)}

And its Directed graph is given below

2.

1 2

EXERCISE

Let A = {2, 3, 5, 6, 8}

Let a, b, n ∈ Z with n > 0. Then a is congruent to b modulo n; a ≡


b (mod n) provided that n divides a − b
The congruence modulo 3 relation T is defined on A as follows:
for all integers m, n A, m T n  3 | (m – n)
1. Write T as a set of ordered pairs.
2. The directed graph representation.
3. The matrix representation.
13
SOLUTION

1.Note that 2 T 2 because 2-2=0 and 30.


Also 2T5 because 2-5 = -3 which is divisible by 3.
And 2T8 because 2-8 = -6 which is divisible by 3.
Similarly, 3T3, 3T6, 5T2, 5T5, 5T8, 6T3, 6T6, 8T2, 8T5 and 8T8.
Hence
T = {(2,2), (2,5), (2,8), (3,3), (3,6), (5,2), (5,5), (5,8), (6,3), (6,6), (8,2),
(8,5), (8,8)}

DIRECTED GRAPH AND


MATRIX REPRESENTATION
A = {2,3,5,6,8} and
T = {(2,2), (2,5), (2,8), (3,3), (3,6), (5,2), (5,5),(5,8), (6,3), (6,6), (8,2),
(8,5), (8,8)}

3
2

8
8 6

14
2 3 5 6 8
2 1 0 1 0 1
3 0 1 0 1 0 
5 1 0 1 0 1
 
6 0 1 0 1 0
8 1 0 1 0 1  55

is the required MATRIX REPRESENTATION

EXERCISE

Define a binary relation S from R to R as follows:


for all (x, y) RR, x S y  x  y.
a. Is (2,1)  S? Is (2,2)  S? Is 2S3? Is (-1) S (-2)?
b. Draw the graph of S in the Cartesian plane.
SOLUTION
a. (2,1)  S because 2 1
(2,2) S because 2 2
2S3 because 23
(-1) S (-2) because -1 -2

Now we will plot the graph of the given relation in the next slide.

15
b. S = {(x,y) R  R | {x  y}

y y=x

GRAPH OF S O
S consists of all points on and below the line y = x.
EXERCISE
Let A = {2, 4} and B = {6, 8, 10} and define relations R and S from A to B
as follows:
for all (x,y) A  B, x R y  x | y
for all (x,y) A  B, x S y  y – 4 = x
State explicitly which ordered pairs are in A  B, R, S, RS and RS.
SOLUTION
A  B = {(2,6), (2,8), (2,10), (4,6), (4,8), (4,10)}
R = {(2,6), (2,8), (2,10), (4,8)}
S = {(2,6), (4,8)}
R  S = {(2,6), (2,8), (2,10), (4,8)}= R
16
R  S = {(2,6), (4,8)}= S

You might also like