# Relations

### Relations

**Definition:** A relation R is the subset of the cartesian product of X x Y, where X and Y are two non-empty elements. It is derived by stating the relationship between the first element and second element of the ordered pair of X × Y. The set of all primary elements of the ordered pairs is called a domain of R and the set of all second elements of the ordered pairs is called a range of R.

For two sets X = {a, b, c} and Y = {apple, ball, cat}, the cartesian product have 9 ordered pairs, which can be written as;

X × Y = {(a, apple), (a, ball), (a, cat), (b, apple), (b, ball), (b, cat), (c, apple), (c, ball), (c, cat)}

With this we can obtain a subset of X x Y by introducing a relation R, between the elements of X and Y as;

R = {(a,b) : a is the first letter of word b, a ∊ X, b ∊ Y}

Therefore, the relation between X and Y can be represented as;

R = {(a,apple),(b,ball),(c,cat)}

**Example**: Let X={a,b} and Y = {c,d}. Find the number of relations from X to Y.

**Solution**: X × Y = {(a,c),(a,d),(b,c),(b,d)}

Number of subsets, n (X × Y) = 2^{4 }. Therefore, the number of relations from X to Y is 2^{4}.