The set theory helps us understand how a collection of like objects behave. Venn diagrams are useful when you have different sets of the same type. However, to work with sets of different kinds, you need to know the concept of relations and functions.

Suppose your are given two sets, A and B such that

A = {a,b,d,k, j,v} and
B = {Anu, Ben, Don, Kaushik, Sonia} We can define another set R such that

R = {(x,y) : x is the first letter in the word y; x ∈ A and y ∈ B}
= {(a,Anu), (b,Ben), (d,Don), (k,Kaushik)}

Every member of R is an ordered pair such that the first element x is from set A and second element y is from set B. However,not every element of A or B is included.

y is called the image of x.

The set R here, is an example of a relation.
Formally,

# Relation R on A and B is a subset of A x B,

where A x B is the Cartesian product of sets A and B.

## Cartesian Product of Sets

The cartesian product A x B is the set of ordered pairs (a,b) such that a is an element of A and b is an element of B. In the given example, the Cartesian product A x B will be

A x B = {(a, Anu), (a, Ben), (a, Don), (a, Kaushik), (a, Sonia), (b, Anu), (b, Ben), (b, Don), (b, Kaushik),               (b, Sonia), (d, Anu), (d, Ben), (d, Don), (d, Kaushik), (d, Sonia), (k, Anu), (k, Ben), (k, Don), (k,                Kaushik), (k, Sonia), (j, Anu), (j, Ben), (j, Don), (j, Kaushik), (j, Sonia), (v, Anu), (v, Ben), (v,                    Don), (v, Kaushik), (v, Sonia)}
n(A x B) = n(A) x n(B)
= a x b = 6 x 5 = 30

# R ⊆ A x B

We know that the number of subsets of a set containing n elements = 2^n
Since R ⊆ A x B,
hence the total number of relations that can be defined on A and B = 2^ab

Some useful properties involving Cartesian product:

## Domain and Range

For any relation R defined on A and B, we can define the domain and range as:

Domain of R is the set of all first elements, {x} of the ordered pairs (x,y).

In the above example, domain of R = {a,b,d,k}

Range of R is the set of all second elements, {y} of the ordered pairs (x,y).

In the above example, range of R = {Anu, Ben, Don, Kaushik} The set B, is called the codomain of R.
In the above example, codomain of R = {Anu, Ben, Don, Kaushik, Sonia}

Clearly,

#### Range ⊆ Codomain

That is it for today. For more details and worked out examples, check my video here.

Relations and Functions: Part 1

This site uses Akismet to reduce spam. Learn how your comment data is processed.