Labs ICT
โญ Pro Login

Relations

Understand relations, their properties, and representations.

What Is a Relation?

A relation R from set A to set B is a subset of the Cartesian product A ร— B. If (a, b) โˆˆ R, we write aRb and say "a is related to b".

Cartesian Product: A ร— B = {(a, b) | a โˆˆ A and b โˆˆ B}
If |A| = m and |B| = n, then |A ร— B| = m ร— n

Example: A = {1, 2}, B = {x, y}
A ร— B = {(1,x), (1,y), (2,x), (2,y)}

Representing Relations

1. Set of ordered pairs: R = {(1,2), (2,3), (3,4)}
2. Matrix:  M[i][j] = 1 if iRj, 0 otherwise
3. Directed Graph (Digraph): vertices = elements, edges = pairs

Properties of Relations on a Set

Reflexive:    โˆ€a โˆˆ A: aRa
              Every element relates to itself.

Symmetric:    โˆ€a, b โˆˆ A: aRb โ†’ bRa
              If a relates to b, then b relates to a.

Antisymmetric: โˆ€a, b โˆˆ A: (aRb โˆง bRa) โ†’ a = b
              If a relates to b and b relates to a, they are equal.

Transitive:   โˆ€a, b, c โˆˆ A: (aRb โˆง bRc) โ†’ aRc
              If a relates to b and b relates to c, then a relates to c.

๐Ÿงช Quick Quiz

A relation R on a set is reflexive if: