# Relations & Functions

Relations and functions are part of algebra. Relations are similar to sets, but there are things to know before understanding the concept of relations. Let’s go step by step to understand this concept better.

## What are Ordered Pairs?

If we have two elements in a simple bracket, like (a,b) and (b,a). Then they both have different meanings. I am trying to say that (a,b) ≠ (b,a). To prove this we will use XY coordnates and plot them.

If a = 1 and b =2, then plot (1,2) and (2,1). As shown below:

## Equality of Ordered Pairs

If we say that (x,y) = (a,b) then, x = a, and y = b. But that does not necessarily mean that x should be equal to y or a should be equal to b.

## What is a Cartesian product?

The Cartesian product of sets A & B is defined as:

A X B = {(x,y)| x ∈ A, y ∈ B}

If A = Ø or if B = Ø

Then, A X B = Ø

## How to Find the Cartesian Product of Two Sets?

If we have two sets;

A = {a,b}

B = {1.2.3}

And to find A X B, our focus should be on the sequence of the order.

So, A X B ≠ B X A

Let’s find A X B = {a,b} X {1,2,3}

A X B = { (a,1), (a,2), (a,3), (b,1), (b,2), (b,3)}

Now, let’s find B X A

B X A = {1,2,3} X {a,b}

B X A = {(1,a), (1,b), (2,a), (2,b), (3,a), (3,b)}

As you can notice, A X B ≠ B X A

Remember, this is not a set (where, {1,2} and {2,1} are the same in case of sets, as the order does not matter). The order of the pair matters in the case of the cartesian products of ordered pairs.

Question. If B X A = {(1,a), (1,b), (2,a), (2,b), (3,a), (3,b)}. Find B.

Solution. In questions like this, we will pay attention to the order of the element. Here, B is first in order. So, pick up the first elements of the cartesian product, without repeating any element.

B = {1,2,3} Similarly, you can find A (It will be {a,b})

To summarize, if the cartesian product is given, we can find sets.

**Test Yourself**

If we have three sets as

A = {1,2}

B = {3,4}

C = {5,6}

Find A X B X C. (Hint: Solve A X B first, then multiply the result with C)

Email your solution at contact@LearnWithAnjali.com