Difference between revisions of "Relation"
m |
m |
||
Line 2: | Line 2: | ||
[[Function|Functions]], [[Equivalence relation|equivalence relations]] and [[Ordering|orderings]] are special kinds of relation | [[Function|Functions]], [[Equivalence relation|equivalence relations]] and [[Ordering|orderings]] are special kinds of relation | ||
+ | {{Refactor notice}} | ||
+ | ==Definition== | ||
+ | A relation {{M|\mathcal{R} }} between two sets is a subset of the [[Cartesian product]] of two sets<ref name="Analysis">Analysis - Part I: Elements - Krzysztof Maurin</ref>, that is: | ||
+ | * {{M|\mathcal{R}\subseteq X\times Y}} | ||
+ | We say that {{M|\mathcal{R} }} is a ''relation in {{M|X}}''<ref name="Analysis"/> if: | ||
+ | * {{M|\mathcal{R}\subseteq X\times X}} (note that {{M|\mathcal{R} }} is sometimes<ref name="Analysis"/> called a ''graph'') | ||
+ | ** For example {{M|<}} is a relation in the set of {{M|\mathbb{Z} }} (the integers) | ||
+ | |||
+ | If {{M|(x,y)\in\mathcal{R} }} then we: | ||
+ | * Say: ''{{M|x}} is in relation {{M|\mathcal{R} }} with {{M|y}}'' | ||
+ | * Write: {{M|x\mathcal{R}y}} for short. | ||
+ | ==Operations== | ||
+ | Here {{M|\mathcal{R} }} is a relation between {{M|X}} and {{M|Y}}, that is {{M|\mathcal{R}\subseteq X\times Y}}, and {{M|\mathcal{S}\subseteq Y\times Z}} | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Name | ||
+ | ! Notation | ||
+ | ! Definition | ||
+ | |- | ||
+ | | NO IDEA | ||
+ | | {{M|1=P_X\mathcal{R} }}<ref name="Analysis"/> | ||
+ | | {{M|1=P_X\mathcal{R}=\{x\in X\vert\ \exists y:\ x\mathcal{R}y\} }} - a [[Function|function]] is (among other things) a case where {{M|1=P_Xf=X}} | ||
+ | |- | ||
+ | ! Inverse relation | ||
+ | | {{M|\mathcal{R}^{-1} }}<ref name="Analysis"/> | ||
+ | | {{M|1=\mathcal{R}^{-1}:=\{(y,x)\in Y\times X\vert\ x\mathcal{R}y\} }} | ||
+ | |- | ||
+ | ! Composing relations | ||
+ | | {{M|\mathcal{R}\circ\mathcal{S} }}<ref name="Analysis"/> | ||
+ | | {{M|1=\mathcal{R}\circ\mathcal{S}:=\{(x,z)\in X\times Z\vert\ \exists y\in Y[x\mathcal{R}y\wedge y\mathcal{S}z]\} }} | ||
+ | |} | ||
+ | |||
+ | ==Simple examples of relations== | ||
+ | # The ''empty relation''<ref name="Analysis"/>, {{M|\emptyset\subset X\times X}} is of course a relation | ||
+ | # The ''total relation''<ref name="Analysis"/>, {{M|1=\mathcal{R}=X\times X}} that relates everything to everything | ||
+ | # The ''identity relation''<ref name="Analysis"/>, {{M|1=\text{id}_X:=\text{id}:=\{(x,y)\in X\times X\vert x=y\}=\{(x,x)\in X\times X\vert x\in X\} }} | ||
+ | #* This is also known as<ref name="Analysis"/> ''the diagonal of the square {{M|X\times X}}'' | ||
+ | |||
+ | ==Types of relation== | ||
+ | Here {{M|\mathcal{R}\subseteq X\times X}} | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Name | ||
+ | ! Set relation | ||
+ | ! Statement | ||
+ | ! Notes | ||
+ | |- | ||
+ | ! Reflexive<ref name="Analysis"/> | ||
+ | | {{M|\text{id}_X\subset\mathcal{R} }} | ||
+ | | {{M|\forall x\in X[x\mathcal{R}x]}} | ||
+ | | Every element is related to itself (example, equality) | ||
+ | |- | ||
+ | ! Symmetric<ref name="Analysis"/> | ||
+ | | {{M|\mathcal{R}\subset\mathcal{R}^{-1} }} | ||
+ | | {{M|\forall x\in X\forall y\in X[x\mathcal{R}y\implies y\mathcal{R}x]}} | ||
+ | | (example, equality) | ||
+ | |- | ||
+ | ! Transitive<ref name="Analysis"/> | ||
+ | | {{M|\mathcal{R}\circ\mathcal{R}\subset\mathcal{R} }} | ||
+ | | {{M|\forall x,y,z\in X[(x\mathcal{R}y\wedge y\mathcal{R}z)\implies x\mathcal{R}z]}} | ||
+ | | (example, equality, {{M|<}}) | ||
+ | |- | ||
+ | ! Identitive<ref name="Analysis"/> | ||
+ | | {{M|\mathcal{R}\cap\mathcal{R}^{-1}\subset\text{id}_X}} | ||
+ | |} | ||
+ | {{Todo|See<ref name="Analysis"/> page 8}} | ||
+ | |||
+ | ==References== | ||
+ | <references/> | ||
+ | |||
+ | =OLD PAGE= | ||
==Notation== | ==Notation== | ||
Rather than writing {{M|(x,y)\in R}} to say {{M|x}} and {{M|y}} are related we can instead say {{M|xRy}} | Rather than writing {{M|(x,y)\in R}} to say {{M|x}} and {{M|y}} are related we can instead say {{M|xRy}} |
Revision as of 21:36, 21 June 2015
A set R is a binary relation if all elements of R are ordered pairs. That is for any z∈R ∃x and y:(x,y)
Functions, equivalence relations and orderings are special kinds of relation
Contents
[hide]Definition
A relation R between two sets is a subset of the Cartesian product of two sets[1], that is:
- R⊆X×Y
We say that R is a relation in X[1] if:
- R⊆X×X (note that R is sometimes[1] called a graph)
- For example < is a relation in the set of Z (the integers)
If (x,y)∈R then we:
- Say: x is in relation R with y
- Write: xRy for short.
Operations
Here R is a relation between X and Y, that is R⊆X×Y, and S⊆Y×Z
Name | Notation | Definition |
---|---|---|
NO IDEA | PXR[1] | PXR={x∈X| ∃y: xRy} - a function is (among other things) a case where PXf=X |
Inverse relation | R−1[1] | R−1:={(y,x)∈Y×X| xRy} |
Composing relations | R∘S[1] | R∘S:={(x,z)∈X×Z| ∃y∈Y[xRy∧ySz]} |
Simple examples of relations
- The empty relation[1], ∅⊂X×X is of course a relation
- The total relation[1], R=X×X that relates everything to everything
- The identity relation[1], idX:=id:={(x,y)∈X×X|x=y}={(x,x)∈X×X|x∈X}
- This is also known as[1] the diagonal of the square X×X
Types of relation
Here R⊆X×X
Name | Set relation | Statement | Notes |
---|---|---|---|
Reflexive[1] | idX⊂R | ∀x∈X[xRx] | Every element is related to itself (example, equality) |
Symmetric[1] | R⊂R−1 | ∀x∈X∀y∈X[xRy⟹yRx] | (example, equality) |
Transitive[1] | R∘R⊂R | ∀x,y,z∈X[(xRy∧yRz)⟹xRz] | (example, equality, <) |
Identitive[1] | R∩R−1⊂idX |
TODO: See[1] page 8
References
- ↑ Jump up to: 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 Analysis - Part I: Elements - Krzysztof Maurin
OLD PAGE
Notation
Rather than writing (x,y)∈R to say x and y are related we can instead say xRy
Basic terms
Proof that domain, range and field exist may be found here
Domain
The set of all x which are related by R to some y is the domain.
Dom(R)={x|∃ y:xRy}
Range
The set of all y which are a relation of some x by R is the range.
Ran(R)={y|∃ x:xRy}
Field
The set Dom(R)∪Ran(R)=Field(R)
Relation in X
To be a relation in a set X we must have Field(R)⊂X
Images of sets
Image of A under R
This is just the set of things that are related to things in A, denoted R[A]
R[A]={y∈Ran(R)|∃x∈A:xRa}
Inverse image of B under R
As you'd expect this is the things that are related to things in B, denoted R−1[B]
R−1[B]={x∈Dom(R)|∃y∈B:xRy}
Important lemma
It is very important to know that the inverse image of B under R is the same as the image under R−1
Properties of relations
Symmetric
A relation R in A is symmetric if for all a,b∈A we have that aRb⟹bRa - a property of equivalence relations
Antisymmetric
A binary relation R in A is antisymmetric if for all a,b∈A we have aRb and bRA⟹a=b
Symmetric implies elements are related to each other, antisymmetric implies only the same things are related to each other.
Reflexive
For a relation R and for all a∈A we have aRa - a is related to itself.
Transitive
A relation R in A is transitive if for all a,b,c∈A we have [aRb and bRc⟹aRc]
Asymmetric
A relation S in A is asymmetric if aSb⟹(b,a)∉S, for example < has this property, we can have a<b or b<a but not both.