Skip to content
Home » operations on relations

operations on relations

Here is a clear, complete, exam-oriented explanation of Operations on Relations in Discrete Structures.


OPERATIONS ON RELATIONS

Let R and S be relations defined on sets.
The main operations on relations are:

  1. Inverse (or Converse) of a Relation
  2. Composition of Relations
  3. Union of Relations
  4. Intersection of Relations
  5. Difference of Relations
  6. Complement of a Relation

Each one is explained below with definitions and examples.


1. Inverse of a Relation (R⁻¹)

If
[
R \subseteq A \times B
]
then the inverse relation (R^{-1}) is:

[
R^{-1} = {(b,a) \mid (a,b) \in R}
]

We simply reverse each ordered pair.

Example

R = {(1,2), (3,4), (5,6)}

Then
[
R^{-1} = {(2,1), (4,3), (6,5)}
]


2. Composition of Relations (R ∘ S)

Let

  • ( R \subseteq A \times B )
  • ( S \subseteq B \times C )

Composition ( R \circ S ) relates A to C:

[
R \circ S = {(a,c) \mid \exists b \in B : (a,b) \in R \text{ and } (b,c) \in S}
]

This is similar to function composition.

Example

A = {1,2}
B = {3,4}
C = {5,6}

R = {(1,3), (2,4)}
S = {(3,5), (4,6)}

Then:

  • 1 → 3 (through R) and 3 → 5 (through S), so (1,5) is in ( R ∘ S )
  • 2 → 4 (through R) and 4 → 6 (through S), so (2,6) is in ( R ∘ S )

[
R \circ S = {(1,5), (2,6)}
]


3. Union of Relations (R ∪ S)

If
[
R, S \subseteq A \times B
]
then:

[
R \cup S = {(a,b) \mid (a,b) \in R \text{ or } (a,b) \in S}
]

Example

R = {(1,2), (3,4)}
S = {(3,4), (5,6)}

[
R \cup S = {(1,2), (3,4), (5,6)}
]


4. Intersection of Relations (R ∩ S)

[
R \cap S = {(a,b) \mid (a,b) \in R \text{ and } (a,b) \in S}
]

Example

R = {(1,2), (3,4)}
S = {(3,4), (5,6)}

[
R \cap S = {(3,4)}
]


5. Difference of Relations (R − S)

[
R – S = {(a,b) \mid (a,b) \in R \text{ and } (a,b) \notin S}
]

Example

R = {(1,2), (3,4)}
S = {(3,4)}

[
R – S = {(1,2)}
]


6. Complement of a Relation (R′)

Let U = A × B be the universal relation.

[
R’ = U – R
]

Meaning: all ordered pairs in ( A \times B ) not in R.

Example

A = {1,2}, B = {3,4}

(A × B = {(1,3),(1,4),(2,3),(2,4)})

Let R = {(1,3)}

Then
[
R’ = {(1,4),(2,3),(2,4)}
]


Quick Table Summary

OperationDefinitionMeaning
Inverse (R^{-1})Reverse pairs(a,b) becomes (b,a)
Composition (R ∘ S)“Link” relationsA → B → C
Union (R ∪ S)Any pair from R or SCombine
Intersection (R ∩ S)Pairs common to bothSimilar pairs
Difference (R − S)Pairs in R but not SRemove
Complement (R′)Universal − ROpposite relation