Unit 1 - Notes

MTH265 9 min read

Unit 1: Relations

1. Introduction to Relations

In discrete mathematics, a relation is a fundamental concept used to describe an association or connection between elements of two sets.

Basic Definitions

  • Cartesian Product: The Cartesian product of two sets and , denoted as , is the set of all possible ordered pairs where and .
  • Binary Relation: A binary relation from a set to a set is a subset of the Cartesian product .
    • If , we say that " is related to by ", often written as .
    • If , we write .
  • Relation on a Set: A relation from a set to itself (i.e., a subset of ) is simply called a "relation on ".
  • Domain and Range:
    • Domain: The set of all first elements of the ordered pairs in .
    • Range (or Image): The set of all second elements of the ordered pairs in .

Representation of Relations

Relations can be represented in multiple ways:

  1. Set Roster Notation: Listing the ordered pairs, e.g., .
  2. Matrix Representation (Zero-One Matrix): If has elements and has elements, can be represented by an matrix , where if and $0$ otherwise.
  3. Directed Graph (Digraph): For a relation on a single set , elements are represented as vertices (nodes), and ordered pairs are represented as directed edges (arrows) pointing from to .

2. Types of Relations

Relations on a set are categorized based on the properties they exhibit. Let be a relation on a set .

Reflexive Relations

A relation on a set is reflexive if every element in is related to itself.

  • Formal Definition: .
  • Matrix View: The main diagonal of the matrix consists entirely of 1s.
  • Digraph View: Every vertex has a self-loop.
  • Example: Let . is reflexive. is not reflexive because .
  • Note: Do not confuse with Irreflexive. A relation is irreflexive if (no element is related to itself).

Symmetric Relations

A relation on a set is symmetric if for every pair in , the reverse pair is also in .

  • Formal Definition: , if .
  • Matrix View: The matrix is symmetric ().
  • Digraph View: Every directed edge between two distinct vertices has an edge going in the opposite direction.
  • Example: Let . is symmetric.

Antisymmetric Relations

A relation on a set is antisymmetric if there are no distinct elements and such that is related to and is related to .

  • Formal Definition: , if and .
  • Matrix View: For , if , then . (The matrix never has a 1 across the diagonal from another 1).
  • Digraph View: There are no two-way directed edges between distinct vertices.
  • Example: The "less than or equal to" () relation on the set of integers. If and , then must equal .
  • Note: "Antisymmetric" is NOT the opposite of "Symmetric". A relation can be both (e.g., equality relation) or neither.

Transitive Relations

A relation on a set is transitive if whenever is related to , and is related to , then is related to .

  • Formal Definition: , if and .
  • Matrix View: If has a non-zero entry at , then must have a 1 at .
  • Digraph View: If there is a path from vertex to and a path from to , there must be a direct edge from to .
  • Example: Let . is transitive. The relation "divides" () on the set of positive integers is transitive.

3. Closure Properties of Relations

If a relation lacks a certain property (reflexivity, symmetry, or transitivity), we can add the minimum number of ordered pairs to make it possess that property. This new, expanded relation is called a closure.

Formally, the closure of with respect to a property is the smallest relation that contains and has property .

Reflexive Closure

To find the reflexive closure of , add all pairs for every element that are not already in .

  • Formula: , where (the diagonal relation).
  • Example: , . Reflexive closure .

Symmetric Closure

To find the symmetric closure of , add the reverse of every ordered pair in .

  • Formula: , where (the inverse relation).
  • Example: , . Symmetric closure .

Transitive Closure

Finding the transitive closure is more complex because adding a pair to satisfy transitivity might create new chains that require even more pairs.

  • Definition: The transitive closure of , often denoted , is the connectivity relation. It contains a pair if there is a path of any length from to in the digraph of .
  • Formula: (where is the cardinality of set ).
  • Algorithm: Warshall's Algorithm is an efficient computational method using matrices to compute the transitive closure of a relation.

4. Equivalence Relations

An equivalence relation is a relation that groups elements into categories where members of the same category share a specific common trait.

Definition

A relation on a set is an Equivalence Relation if and only if it is:

  1. Reflexive
  2. Symmetric
  3. Transitive
  • Example: The "equals" () relation is the prototypical equivalence relation.
  • Example: Congruence modulo . Let (integers). Define if divides . This relation is reflexive, symmetric, and transitive.

Equivalence Classes

If is an equivalence relation on a set , the equivalence class of an element , denoted by or simply , is the set of all elements in that are related to .

  • Definition: .
  • Properties of Equivalence Classes:
    1. (because is reflexive).
    2. If , then .
    3. If , then .

5. Partitions

A partition is a way of dividing a set into non-overlapping "chunks" that collectively cover the entire set.

Definition

A partition of a set is a collection of non-empty subsets of such that:

  1. Mutually Disjoint: for . (No two subsets overlap).
  2. Exhaustive: . (The union of all subsets equals the original set).

The Fundamental Theorem of Equivalence Relations

There is a direct, bijective relationship between equivalence relations and partitions:

  1. If is an equivalence relation on , the set of all distinct equivalence classes of forms a partition of .
  2. Conversely, given any partition of , there exists an equivalence relation on whose equivalence classes are exactly the subsets in the partition. (Two elements are related if they belong to the same subset).

6. Partial Ordering Relations

While equivalence relations abstract the concept of "equality," partial ordering relations abstract the concept of "hierarchy" or "sequence."

Definition

A relation on a set is a Partial Ordering (or partial order) if it is:

  1. Reflexive
  2. Antisymmetric
  3. Transitive
  • Notation: A set together with a partial ordering is called a Partially Ordered Set or Poset, denoted by .
  • Examples:
    • The "less than or equal to" () relation on the set of real numbers.
    • The "subset" () relation on the power set of a set.
    • The "divides" ( ) relation on the set of positive integers.

Comparability and Total Order

  • Comparable Elements: In a poset , two elements and are comparable if either or .
  • Incomparable Elements: If neither nor , they are incomparable. (This is why it's called a partial ordering).
  • Total Order (Linear Order): If every pair of elements in a poset is comparable, the relation is called a total ordering or linear ordering.
    • Example: is a totally ordered set.
    • Example: is only partially ordered because, for instance, neither nor is true.

Hasse Diagrams

A Hasse Diagram is a graphical representation of a poset. It simplifies the directed graph of the relation by removing redundant information.

  • How to construct a Hasse Diagram:
    1. Start with the directed graph of the poset.
    2. Remove all self-loops (implied by reflexivity).
    3. Remove all transitive edges (e.g., if there is an edge from and , remove the edge , as it's implied by transitivity).
    4. Arrange the vertices so that all arrows point strictly upwards.
    5. Remove the arrowheads (the upward direction is universally understood).
  • Elements in a Poset (Visible via Hasse Diagrams):
    • Maximal element: An element that is not smaller than any other element (top-most nodes).
    • Minimal element: An element that is not greater than any other element (bottom-most nodes).
    • Greatest element: An element greater than all other elements (only one can exist).
    • Least element: An element smaller than all other elements (only one can exist).