Definition:
- A binary relation, R, consists of a set A, called domain of R, a set B, called codomain of R, and a subset of graph of R
- We write R:A→B to indicate that R is a relation from A to B
- “aRb: the pair (a,b) is in the graph of R, means a and b belongs to R
- For every ordered tuple pair, (x,y)∈R,x∈A,y∈B and is subset of A×B
Graph of R:
Types of relation:
- Reflexive:
- if (x,x)∈R for all x∈S
- 10 mod 3 = 10 mod 3
- every point has a path to itself
- Symmetric:
- if whenever (x,y)∈R then (y,x)∈R
- x → y and y → x
- xRy→yRx
- Every path has a reverse path
- Transitive:
- whenever (x,y)∈R,(y,z)∈R and (x,z)∈R
-
- every 2-step path has a 1-step path
Inverse relation:
- The inverse, R−1 of a relation R:A→B is the relation from B to A defined by the rule b R−1 a⟺a R b