Lecture04_2

Cartesian Product


The Cartesian product is a fundamental concept in set theory. It is denoted as A × B for two sets A and B. The Cartesian product is defined as the set of all ordered pairs (a, b), where a is an element of set A and b is an element of set B. Mathematically, it can be expressed as:A × B = {(a, b) | a ∈ A, b ∈ B}.

Binary Relations


A binary relation is formally defined as a subset of a Cartesian product between two sets. Specifically, if we have sets A and B, a binary relation R consists of selected elements from the Cartesian product A × B, which can be expressed as:R ⊆ A × B.

Example of Binary Relation

For a practical illustration, consider:

  • A represents a set of lecturers within a department.

  • B represents the different modules offered by the department.


The relation 'Teaches' can be represented through specific pairs highlighting which lecturer teaches which module. For instance, the relation might be defined as follows:R = {(Eduard, CS1860), (Gregory, CS1860), (Reuben, CS1821), (Matt, CS1821), (Carlos, CS1890), (Eduard, CS2860), (Reuben, CS1812)}. Here, R indicates which lecturer teaches which module, providing clear associations between lecturers and their respective courses.

Notation for Relations


In practice, rather than using the formal notation (a, b) ∈ R, we often simplify it to aRb. Consequently, for the aforementioned example, we would express:Eduard teaches CS1860 as Eduard R CS1860. This simplification enhances readability and understanding. Additionally, numerical relations can also be represented concisely, such as using 3 ≤ 5 instead of (3, 5) ∈ ≤.

Graphical Representation of Relations

Relations can be visually represented using directed edges from elements in set A to elements in set B. In these graphical representations, elements are depicted as points, and each pair in the relation corresponds to a directed edge drawn between the respective points. This approach provides an intuitive understanding of the relationships between different entities.

Matrix Representation

Another effective method for representing a binary relation is through a matrix. In this matrix format:

  • Rows correspond to elements of set A.

  • Columns correspond to elements of set B.












A '1' in the matrix indicates that the corresponding pair is included in the relation, while a '0' indicates it is not. For example, a matrix representing the relation might be organized as follows:[\ \begin{array}{c|ccccc}& ext{Eduard} & ext{Gregory} & ext{Reuben} & ext{Matt} & ext{Carlos} \\hlineext{CS1812} & 0 & 0 & 1 & 0 & 0 \ext{CS1821} & 1 & 1 & 0 & 1 & 0 \ext{CS1860} & 1 & 0 & 0 & 0 & 1 \ext{CS1890} & 0 & 0 & 0 & 0 & 1 \ext{CS2860} & 1 & 0 & 0 & 0 & 0 \\end{array}]

Inverse Relation

The inverse relation R⁻ of a binary relation R is defined such that:


  • If (a, b) ∈ R, then (b, a) ∈ R⁻.This definition indicates that the roles of the ordered pairs are reversed in the inverse relation. For example, if R consists of pairs where lecturers teach courses, the inverse relation could specify which courses are taught by which lecturers.

Example


For instance, if we have:R = {(Eduard, CS1860)}, implying Eduard teaches CS1860, then in the inverse relation, we would express CS1860 is taught by Eduard.

Complement Relation

The complement of a relation R, denoted as R̅, consists of all ordered pairs not included in R. This means:

  • If (a, b) ∈ R, then (a, b) ∉ R̅.

Example

For instance, if R represents the relation 'teaches', the complement relation would imply 'does not teach'. Hence, if Eduard teaches CS1860, then it follows that Reuben does not teach CS1860.

Relations on a Set


A relation defined on a set A is a subset of the Cartesian product A × A, expressed as:R ⊆ A × A.

Examples

  1. A relation might represent pairs of connected stations, where is_one_stop_from is defined for pairs in the set of stations.

  2. Similarly, a relation could embody friendships among individuals, where is_friend_of would be a subset of People × People.

Properties of Relations

Reflexive Relations

A relation R on a set A is termed reflexive if for every element a in A, it holds that (a, a) ∈ R. This indicates that every element is intrinsically related to itself.

Symmetric Relations

A relation R is defined as symmetric if for all a, b in A, the implication (a, b) ∈ R leads to (b, a) ∈ R. This characteristic reveals a mutual relationship between pairs within the set.

Transitive Relations

A relation is considered transitive if for all a, b, c in A, the conditions (a, b) ∈ R and (b, c) ∈ R together imply that (a, c) ∈ R. This property indicates an indirect relationship among elements.

Equivalence Relations

Equivalence relations can be characterized by three properties: reflexive, symmetric, and transitive. For example, the relation denoting neighbors can manifest as an equivalence relation when defined through a shared postcode among individuals.

Equivalence Classes

Given an equivalence relation R, elements can be grouped into equivalence classes, denoted as [a]R. This grouping encapsulates all elements related to a through R. The collective set of all equivalence classes formulates the quotient set A/R. For example, within banknotes, equivalence relations can arise based on denominations, such as five_pounds or ten_pounds, creating distinct classes sharing equivalent values.