Let A and B be two non-empty sets.
If f ⊆ A × B, then f is called a relation from A into B (or simple A to B).
In particular, any relation from A to A is called a binary relation on A.
Ex : Let A = {1, 2, 3} and B = {a, b}
We have
A × B = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}
B × A = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)}
A × A = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3,3)}
B × B = {(a, a), (a, b), (b, a), (b, b)}
(i) f = {(1, a)} is a relation from A to B, because f ⊆ A × B.
(ii) g = {(1, b), (2, a), (2, b), (3, b)} is also a relation from A to B, because of g ⊆ A × B.
(iii) h = {(a, 1), (b, 2)} is not a relation from A to B, but it is a relation from B to A.
(iv) i = {(1, 3), (2, 2), (3, 1), (3,3)} is a binary relation on A.
(v) j = {(a, b), (b, a)} is a binary relation on B.