6.1 Relations

Definition 6.1. Let \(A\) and \(B\) be two sets. If \(a\in A\) and \(b\in B\) then \((a,b)\) is called an ordered pair.
In this case if \((a,b)\) and \((c,d)\) are ordered pairs then \((a,b)=(c,d)\) if and only if \(a=c\) and \(b=d\).

The set of all ordered pairs \((a,b)\) where \(a\in A\) and \(b\in B\) is called Cartesian product of \(A\) and \(B\) denoted by \(A\times B\) that \[ A\times B = \{(a,b):a\in A, b\in B\}\] In general \(A\times B \neq B\times A\).

Example 6.2.

Let \(A=\{2,3,4,5\}\) and \(B=\{4,6\}\). Then \[A\times B =\{(2,4),(2,6),(3,4),(3,6),(4,4),(4,6),(5,4),(5,6)\}\] \[B\times A= \{(4,2),(4,3),(4,4),(4,5),(6,2),(6,3),(6,4),(6,5)\}\]

Definition 6.3. If \(A\) and \(B\) are two sets then a relation from set \(A\) to set \(B\) is a subset of \(A\times B\) which pairs elements of \(A\) with those of \(B\) according to some rule.

Example 6.4.

Let \(A=\{4,6,9,11\}\) and \(B=\{2,3,11\}\), with the relation from \(A\) to \(B\) defined by “is a multiple of”. Every pair must be tested, not just the obvious ones: \[\{(4,2),\ (6,2),\ (6,3),\ (9,3),\ (11,11)\}.\] Note that \(6\) appears twice, being a multiple of both \(2\) and \(3\). A relation may pair one element of \(A\) with several elements of \(B\) — that freedom is exactly what distinguishes a relation from a function.

We can illustrate a relation using arrow diagram.

3124691AB11

Consider the relation is equal to from \(X\) to \(Y\).

92x1bYX21xb

Here we should be concerned with relations of the type where each element in the first set is related to one element in the second set.

This relation is called a function or a mapping.

yxabcXYFunction
yzx2abcXYNot a function because of c
yzxabcXYNot a function
yzxabcdXYFunction

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.