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
    • We write to indicate that R is a relation from A to B
    • : the pair is in the graph of R, means and belongs to
    • For every ordered tuple pair, and is subset of

Graph of :

Types of relation:

  1. Reflexive:
    • if for all
      • 10 mod 3 = 10 mod 3
      • every point has a path to itself
  2. Symmetric:
    • if whenever then
      • x → y and y → x
      • Every path has a reverse path​
  3. Transitive:
    • whenever  and 
        • x → y → z and x → z
      • every 2-step path has a 1-step path

Function

Inverse relation:

  • The inverse, of a relation is the relation from to defined by the rule