6. Relations - JulTob/Mathematics GitHub Wiki

Relations: Applications and Functions

🌌 Relations and Equivalence in Mathematics 🌌

Relations describe connections or interactions between elements of sets.

While sets represent collections of objects, relations describe how these objects interact or connect.

A relation is a mathematical tool that links elements, creating a framework where elements interact according to specific rules.


πŸ”· Relations Between Sets $(𝓑)$

🏡 A relation $𝓑$ between the elements of sets $𝔸$ and $𝔹$, is a subset of the Cartesian product of the sets.

\color{lime}
π“‘βŠ†π”ΈΓ—π”Ή

In simpler terms, it describes pairs of elements within the sets that are related in some way:

  • if $(𝕒,𝕓) ∈ 𝓑$, we say that

    • $𝓑$ is satisfied by $(𝕒,𝕓)$
    • $𝕒$ is related to $𝕓$ by $𝓑$
  • When $𝔸$ and $𝔹$ are the same set, $π“‘βŠ†π”ΈΓ—π”Έ$, and we call $𝓑$ a relation on $𝔸$.

[!NOTE] Notation: $a𝓑b$ means $(a,b) ∈ 𝓑$.

πŸ“’ Relations

Subset Relation:

𝓑 =ο½›(U,V) ∈ 𝒫(A)×𝒫(A) ∣ UβŠ†V}

Describes the subset relation between subsets of $A$.

Membership Relation:

𝓑 = \{ (a,S) ∈ A×𝒫(A) ∣ a∈S \}

Relates elements $a$ to subsets $S$ where $a∈S$.

πŸ”· Important Classes of Relations

Functions

Functions are a specific type of relation where each element in $𝔸$ is related to exactly one element in $𝔹$.

Equivalences

Equivalence relations group elements into classes, where members share a defined relationship.

Relationship: "Has the same color." The equivalence classes are groups of mugs, where each group contains only mugs of a single color.

  • πŸŸ₯ The "red" equivalence class contains all red mugs.
  • 🟦 The "blue" equivalence class contains all blue mugs.

⚜️ Properties of Relations

A relation $𝓑$ on a set $A$ can have the following properties:

  • πŸ”΅ Reflexive

    • $(a,a)∈R$ for all $a∈A$
    • Every element relates to itself.
  • 🟒 Symmetric

    • If $(a,b)∈R$, then $(b,a)∈R$
    • Relation holds both ways.
  • 🟑 Antisymmetric

    • If $(a,b)∈R$ and $(b,a)∈R$, then $a=b$.
    • The relation holds in one direction unless the elements are identical.
  • 🟠 Transitive

    • If $(a,b)∈R$ and $(b,c)∈R$, then $(a,c)∈R$.
    • The relation extends through intermediary elements.

🧊 Reflexive

A relation $𝓑$ is reflexive if every element in the set is related to itself:

(π“Š, π“Š) ∈ 𝓑 
π“Šπ“‘π“Š \text{  for all } π“ŠβˆˆU
π“Š~π“Š 

Graphically, this corresponds to the diagonal in the Cartesian plane where $𝓍=π“Ž$.

Example: In the set of real numbers $ℝ$, the relation $≀$ is reflexive because every number is less than or equal to itself:

x≀x \, \text{for all}\, xβˆˆβ„

⭐️ Symmetric

A relation $𝓑$ is symmetric if, for any two elements $π“Š$ and $𝓋$:

π“Š 𝓑 𝓋  ⟹ 𝓋 𝓑 π“Š
  • If $π“Š$ is related to $𝓋$, then $𝓋$ is also related to $π“Š$.

In the set of people, the relation "is a sibling of" is symmetric because if Alice is a sibling of Bob, then Bob is a sibling of Alice.

πŸ”₯ Antisymmetric

A relation $𝓑$ is antisymmetric if, for any two elements $π“Š$ and $𝓋$:

π“Š 𝓑 𝓋 ∧ 𝓋 𝓑 π“Š ⟢ π“Š = 𝓋 

The $≀$ relation on real numbers is antisymmetric:
If $π‘₯ ≀ 𝑦$ and $𝑦 ≀ π‘₯$, then $π‘₯ = 𝑦$.


πŸ›Ή Transitive

A relation $𝓑$ is transitive if, whenever $π“Š$ is related to $𝓋$ and $𝓋$ to $π“Œ$:

π“Š 𝓑 𝓋 ∧ 𝓋 𝓑 π“Œ ⟹ π“Š 𝓑 π“Œ 

In a family tree, if Alice is an ancestor of Bob and Bob is the ancestor of Charlie, then Alice is the ancestor of Charlie.


🌌 Equivalence Relations

🏡 $𝓔$ is an equivalence relation on $A$ if it satisfies:

  1. Reflexivity:
  • $(a,a)βˆˆπ“”$ .
  • $\color{tomato} a∼a$
  1. Symmetry
  • If $(a,b)βˆˆπ“”$, then $(b,a)βˆˆπ“”$.

$\color{tomato}a∼b ⟢ b∼a$

  1. Transitivity

  • If $(a,b)βˆˆπ“”$ and $(b,c)βˆˆπ“”$, then $(a,c)βˆˆπ“”$.

$\color{tomato}(a∼b β‹€ b∼c) ⟢ a∼c$

$(a,b)βˆˆπ“”$ $\color{tomato}:= (a∼b)$

[!IMPORTANT]

\text{For a relation } 𝓔 \text{ in } π•Œ: 
𝓔 \text{ is an equivalence relation if it satisfies reflexivity, symmetry, and transitivity.}

𝒬 on π•Œ is equivalent if Reflexive π“Šπ“”π“Š Symmetric π“Šπ“”π“‹βŸΆπ“‹π“”π“Š Transitive π“Šπ“”π“‹β‹€π“‹π“”π“ŒβŸΆπ“Šπ“”π“Œ


⚜️ Equivalence Classes

An equivalence relation organizes elements of a set into disjoint groups where every element in a group is related to each other. These groups are called equivalence classes:

[π“Š] = ο½› 𝓋 : π“Šπ“”π“‹ }
  • $[a] =ο½› b∈A ∣ (a,b)βˆˆπ“”ο½$ All elements in $[a]$ are equivalent to $a$ (under 𝓔).

πŸ“’ Modular Arithmetic**

For example, in modular arithmetic, equivalence classes are defined by remainders:

β„€/m = \{0,1,2,\ldots,(m-1)\}

In modular arithmetic, numbers are grouped into equivalence classes based on a modulus $m$. For instance, numbers $a$ and $b$ are equivalent modulo $m$ if they have the same remainder when divided by $m$:

a ≑ b \, (\text{mod} \, m) \iff a - b = kΒ·m \, \text{for some} \, k \in β„€

The set of integers modulo $m$ is denoted β„€/m.

  • In modulo 3 $(β„€/3)$, the integers are grouped into three equivalence classes based on their remainders when divided by 3:
    \{…,-6,-3,0,3,6,…\}, \{…,-5,-2,1,4,7,…\}, \{…,-4,-1,2,5,8,…\}
    

Another example involves real numbers modulo $\tau=2\pi$:

a≑b\,(\text{mod}\,2\pi) ⟺ a = b + k\tau, \text{for } kβˆˆβ„€
a ≑ b mod πŸπœ‹ ⟺ βˆƒkβˆˆβ„€, a = b + k𝜏

ℝ/𝜏 = {r∈(-πœ‹,πœ‹)} Γ³ {r∈(0,2πœ‹)}

πŸ“’ Parallel Lines

  • Two lines are equivalent if they are parallel.
L = \{p_aΒ·x + p_bΒ·y + p_0\}, \text{where } p \neq 0.
L = \{p_aΒ·x + p_bΒ·y + p_1\}, \text{where } p \neq 0.

πŸ“’ Multiples

pβ„€ = { kp | kβˆˆβ„€}

🌌 Order Relations

An order relation introduces a way to compare elements of a set based on precedence or hierarchy.

Total vs Partial Order

A relation $𝓑$ on a set $π•Œ$ is a total order if every pair of elements is comparable:

\text{For all } π“Š, 𝓋 ∈ π•Œ, \text{either } π“Šπ“‘π“‹ \text{ or } π“‹π“‘π“Š.

A partial order, by contrast, does not require all pairs of elements to be comparable.


πŸ“’ Subset Relation:

The subset relation on sets is an example of a partial order:

𝔸 βŠ‚ 𝔹 \iff \text{every element of } 𝔸 \text{ is also an element of } 𝔹

This is $\color{gold}partial$ because, for two sets, $𝔸$ and $𝔹$, it’s possible that neither is a subset of the other.

πŸ“’ Total Order on Numbers

The standard relation $≀$ on real numbers $ℝ$ is a total order:

\text{For all } π‘₯, 𝑦 ∈ ℝ, \text{either } π‘₯ ≀ 𝑦 \text{ or } 𝑦 ≀ π‘₯.

πŸ“’ Lexicographic Order:

A common total order is the lexicographic order, often used in dictionaries. For pairs (π‘Ÿβ‚, π‘Ÿβ‚‚) and (π‘Ÿβ‚β€™, π‘Ÿβ‚‚β€™) in ℝ×ℝ:

(π‘Ÿβ‚, π‘Ÿβ‚‚) β‰Ό (π‘Ÿβ‚β€™, π‘Ÿβ‚‚β€™) \iff π‘Ÿβ‚ β‰Ί π‘Ÿβ‚β€™ \, \text{or} \, (π‘Ÿβ‚ = π‘Ÿβ‚β€™ \text{ and } π‘Ÿβ‚‚ β‰Ό π‘Ÿβ‚‚β€™)

πŸ”° Functions as Relations

A function is a relation between two sets, where each element in the domain is mapped to exactly one element in the codomain.

𝙡: 𝔸 β†’ 𝔹
βˆ€a∈A, βˆƒ!b∈B \text{ such that } F(a)=b.

A function $𝙡$ goes from set $𝔸(domain)$ to set $𝔹(codomain)$. For each element $𝓍$ in $𝔸$, there is a unique element $π“Ž$ in $𝔹$ such that $\color{gold}π“Ž = 𝙡(𝓍)$.

  • πŸ“’ A function that maps a person to their birth year is an example of a function where each person (domain) has a unique birth year (codomain).

Inverse Function:

If a function $𝙡$ is invertible, the inverse function $𝙡^{-1}$ reverses the mapping:

𝙡^{-1}(π“Ž)=\{π“βˆˆπ”Έ ∣ 𝙡(𝓍)=π“Ž\}

πŸ“’ Special Functions:

  • Identity function: Maps every element to itself.
  • Constant function: Maps every element of the domain to the same single element in the codomain.

🌌 Partitions of a Set

A partition divides a set $π•Œ$ into non-overlapping subsets such that:

  1. The subsets are pairwise disjoint:
A∩B=βˆ… \text{ for all } A,B \text{ in the partition.}
  1. The union of the subsets equals the original set:
⋃A = π•Œ

Relation Between Partitions and Equivalence Relations

Every equivalence relation defines a partition of the set, and conversely, every partition can define an equivalence relation. For $𝓍, π“Ž ∈ π•Œ$:

π“π’¬π“ŽβŸΊβˆƒπ”ΈβˆŠβ„™: {𝓍,π“Ž}βŠ‚π”Έ

πŸ“’ Partition of Integers

Partition the set of integers into intervals:

β„™=\{ [i-1,i) ∣ iβˆˆβ„€\}

Elements $𝓍$ and $π“Ž$ belong to the same subset if they share the same integer part.


πŸ“’ Counting Numbers as a Succession

Consider the succession relation defined for the natural numbers, where each number is connected to the next:

0 \to 1 \to 2 \to 3 \to \dots
ℕ⁰  =
0 β†’ π“ˆ(0)  β†’ π“ˆ(π“ˆ(0))    …
0 β†’   1   β†’      2     …

a ≀ b ⇔ βˆƒn : a →ⁿ b | nβˆŠβ„•

We define a relation $𝓑$ between two numbers $a$ and $b$ such that:

  • $a𝓑b$ if and only if there exists a sequence of steps starting at $a$ that leads to $b$. For example:
    • $0𝓑2$ because $0 \to 1 \to 2$.
    • $1𝓑3$ because $1 \to 2 \to 3$.

This relation is reflexive, antisymmetric, and transitive, making it a total order:

  1. Reflexive: Every number is related to itself, as no steps are needed:
   a𝓑a
  1. Antisymmetric: If $a𝓑b$ and $b𝓑a$, then $a = b$, as there cannot be a step "backwards" in succession.

  2. Transitive: If $a𝓑b$ and $b𝓑c$, then $a𝓑c$, since the steps can be chained together.


Total Order Relations

A relation $𝓑$ is a total order if, for any two elements $𝓍$ and $π“Ž$:

π“π“‘π“Ž \text{ or } π“Žπ“‘π“.

Total order relations are often denoted using symbols:

  • β‰Ό: Precedes, or antecedent.
  • ≽: Succeeds, or posterior.

In this notation:

a𝓑b \iff a≽b \iff bβ‰Όa.

[!NOTE] β‰Ίβ‡”β‰Όβˆ§β‰ 


πŸ“’ Subset Relations

The subset relation is an example of a total order within nested sets:

β„•βŠ‚β„€βŠ‚β„šβŠ‚β„.

Intervals

Given an ordered set $(π•Œ,β‰Ό)$, with $a,bβˆŠπ•Œ$ and $aβ‰Όb$, intervals can be defined as follows:

  • Open Interval:

    (a,b) = \{π“βˆˆπ•Œβˆ£ a≺𝓍≺b\}
    
  • Closed Interval:

    [a,b] = \{π“βˆˆπ•Œβˆ£ a≼𝓍≼b\}
    
  • Semi-Open Intervals:

    [a,b) = \{π“βˆˆπ•Œβˆ£ a≼𝓍≺b\}
    (a,b] = \{π“βˆˆπ•Œβˆ£ a≺𝓍≼b\}
    

Initial and Final Intervals

For an ordered set $(π•Œ,β‰Ό)$, initial and final intervals can be defined as:

  • Initial Intervals:

    (←,a) = \{π“βˆˆπ•Œβˆ£ 𝓍≺a\}
    (←,a] = \{π“βˆˆπ•Œβˆ£ 𝓍≼a\}
    
  • Final Intervals:

    (a,β†’) = \{π“βˆˆπ•Œβˆ£ 𝓍≻a\}
    [a,β†’) = \{π“βˆˆπ•Œβˆ£ 𝓍≽a\}
    

Visualizing Intervals in Succession

Intervals can be defined within this ordered set. For example:

  • The closed interval $[1,4]$ includes all numbers between 1 and 4:
    [1,4] = \{1, 2, 3, 4\}.
    
  • An open interval $(1,4)$ excludes the endpoints:
    (1,4) = \{2, 3\}.
    

In terms of relations:

β‰Ί \iff β‰Ό \land \neq

This ordered structure reflects how natural numbers are connected, and the intervals help visualize subsets of numbers within this succession.


Bounds in Ordered Sets

Given an ordered set $(π•Œ,β‰Ό)$ and a subset $π”ΈβŠ‚π•Œ$:

  • Upper Bound: An element $π“Š$ is an upper bound of $𝔸$ if:

    βˆƒπ“Š : βˆ€π“βˆˆπ”Έ, π“β‰Όπ“Š.
    
  • Lower Bound: An element $π“Š$ is a lower bound of $𝔸$ if:

    βˆƒπ“Š : βˆ€π“βˆˆπ”Έ, π“β‰½π“Š.
    

If $𝔸$ has both upper and lower bounds, it is called bounded.


Bounds in Ordered Sets

Given an ordered set $(π•Œ,β‰Ό)$ and a subset $π”ΈβŠ‚π•Œ$:

  • Upper Bound: An element $π“Š$ is an upper bound of $𝔸$ if:

    βˆƒπ“Š : βˆ€π“βˆˆπ”Έ, π“β‰Όπ“Š.
    
  • Lower Bound: An element $π“Š$ is a lower bound of $𝔸$ if:

    βˆƒπ“Š : βˆ€π“βˆˆπ”Έ, π“β‰½π“Š.
    

If $𝔸$ has both upper and lower bounds, it is called bounded.

  • Maximum:

    Max(𝔸) = Mβˆˆπ”Έ : βˆ€π“βˆˆπ”Έ, 𝓍≼M.
    
  • Minimum:

    min(𝔸) = mβˆˆπ”Έ : βˆ€π“βˆˆπ”Έ, 𝓍≽m.
    
  • Supremum (Least Upper Bound): The smallest element among all upper bounds, if it exists.

  • Infimum (Greatest Lower Bound): The largest element among all lower bounds, if it exists.

MÑximo, minimo, supremo, ínfimo: Únicos


Well-Ordered Sets

A set is well-ordered, or a relation $β‰Ό$ is a well-ordering, if every non-empty subset has a minimum element. The minimum is often referred to as the "first element of $𝔸$".


Maximal and Minimal Elements

  • Maximal:

    Maxml(𝔸) = Mβˆˆπ”Έ : βˆ„π“βˆˆπ”Έ, 𝓍≠M \text{ and } M≼𝓍.
    
  • Minimal:

    Minml(𝔸) = mβˆˆπ”Έ : βˆ„π“βˆˆπ”Έ, 𝓍≠m \text{ and } m≽𝓍.
    

Maximal and minimal elements coincide with the maximum and minimum if they exist.


Functions Between Sets

A function is a relation between two sets where each element of the initial set is related to exactly one element in the final set:

π™΅βŠ‚π”ΈΓ—π”Ή \text{ such that } βˆ€π“βˆˆπ”Έ, βˆƒ!π“Žβˆˆπ”Ή : 𝙡(𝓍)=π“Ž.

In functional notation:

  • Domain: $𝔸$ (initial set).
  • Codomain: $𝔹$ (target set).
  • Image: $𝙡(𝔸)$, the subset of $𝔹$ consisting of outputs of $𝙡$.
  • Inverse Image:
    𝙡⁻¹(π“Ž) = \{π“βˆˆπ”Έ ∣ 𝙡(𝓍)=π“Ž\}.
    

The set of all functions from $𝔸$ to $𝔹$ is denoted:

𝓕(𝔸,𝔹) \text{ or } 𝔹^{𝔸}.