1. Introduction to set theory and to methodology and philosophy of
mathematics and computer programming
Inverse relation
An overview
by Jan Plaza
c 2017 Jan Plaza
Use under the Creative Commons Attribution 4.0 International License
Version of April 4, 2017
2. Definition
The inverse (relation) to R , denoted R−1 , is { b, a : aRb}.
Fact
aR−1b iff bRa.
Example
a isAChildOf b iff b isAParentOf a
So, isAChildOf = isAParentOf−1
3. Definitions by formulas
R is defined as:
xRy iff x, y ∈ {1..4} ∧ x < y ∧ (x = 3 ∨ y = 3)
R−1 is defined as:
yR−1
x iff x, y ∈ {1..4} ∧ x < y ∧ (x = 3 ∨ y = 3)
or equivalently:
xR−1
y iff x, y ∈ {1..4} ∧ y < x ∧ (y = 3 ∨ x = 3)
In general, if Q is defined as:
xQy iff x ∈ X ∧ y ∈ Y ∧ A(x, y)
then Q−1 is defined as:
yQ−1
x iff x ∈ X ∧ y ∈ Y ∧ A(x, y)
or equivalently:
xQ−1
y iff x ∈ Y ∧ y ∈ X ∧ A(y, x)
4. Definitions by listing tuples
R = { 1, 3 , 2, 3 , 3, 4 }
R−1
= { 3, 1 , 3, 2 , 4, 3 }
Visualizations as tables
R R−1
x y x y
1 3 3 1
2 3 3 2
3 4 4 3
5. Visualizations as Cartesian plane graphs
Relation R – black dots. Relation R−1 – circles.
x
y
1 2 3 4
1
2
3
4
6. Visualizations as discrete Cartesian graphs
Relation R – big black dots. Relation R−1 – circles.
1
2
3
4
1 2 3 4
y
x
9. Definitions by truth matrices
Rows are numbered 1, 2, ... from the top; columns – also 1, 2, ..., from the left.
ai,j is the entry in row i and column j.
ai,j = iff i is related to j.
R R−1
⊥ ⊥ ⊥
⊥ ⊥ ⊥
⊥ ⊥ ⊥
⊥ ⊥ ⊥ ⊥
⊥ ⊥ ⊥ ⊥
⊥ ⊥ ⊥ ⊥
⊥ ⊥
⊥ ⊥ ⊥
Transposed matrix to M – symmetrical to M with respect to the diagonal.
The diagonal of a matrix runs from the left top to the right bottom.
a1,1, a2,2, a3,3, a4,4 are on the diagonal.
(We call it the diagonal because the other diagonal is not important.)
10. Exercise
1. What is the inverse relation to isAGrandparentOf?
2. Is isAGrandsonOf the inverse relation to isAGrandfatherOf?
3. What is the inverse relation to =R?
4. What is the inverse relation to <R?
5. What is the inverse relation to the full relation on R?
6. What is the inverse relation to the empty relation?
11. Proposition
1. (R−1)−1 = R.
2. Let R ⊆ X × X. Then (R−1)
c
= (Rc)−1.
3. If R1 ⊆ R2 then R−1
1 ⊆ R−1
2 .
Proposition
1. (R ∪ S)−1 =R−1 ∪ S−1.
2. (R ∩ S)−1 =R−1 ∩ S−1.
3. (R − S)−1 =R−1 − S−1.