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:
- Reflexivity:
- $(a,a)βπ$ .
- $\color{tomato} aβΌa$
- Symmetry
- If $(a,b)βπ$, then $(b,a)βπ$.
$\color{tomato}aβΌb βΆ bβΌa$
-
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:
- The subsets are pairwise disjoint:
Aβ©B=β
\text{ for all } A,B \text{ in the partition.}
- 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:
- Reflexive: Every number is related to itself, as no steps are needed:
aπ‘a
-
Antisymmetric: If $aπ‘b$ and $bπ‘a$, then $a = b$, as there cannot be a step "backwards" in succession.
-
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 } πΉ^{πΈ}.