# Fuzzy relation – Definition, types and operations

## Cartesian product

Fuzzy relation defines the mapping of variables from one fuzzy set to another. Like crisp relation, we can also define the relation over fuzzy sets.

Let A be a fuzzy set on universe X and B be a fuzzy set on universe Y, then the Cartesian product between fuzzy sets A and B will result in a fuzzy relation R which is contained with the full Cartesian product space or it is subset of cartesian product of fuzzy subsets. Formally, we can define fuzzy relation as,

R = A x B

and

R ⊂ (X x Y)

where the relation R has membership function,

μ_{R}(x, y) = μ_{A x B}(x, y) = min( μ_{A}(x), μ_{B}(y) )

A binary fuzzy relation R(X, Y) is called **bipartite graph **if X ≠ Y.

A binary fuzzy relation R(X, Y) is called **directed graph** or **digraph** if X = Y. , which is denoted as R(X, X) = R(X^{2})

Let A = {a_{1}, a_{2}, …, a_{n}} and B = {b_{1}, b_{2}, .., b_{m}}, then fuzzy relation between A and B is described by the **fuzzy relation matrix **as,

We can also consider fuzzy relation as a mapping from the cartesian space (X, Y) to the interval [0, 1]. The strength of this mapping is represented by the membership function of the relation for every tuple μ_{R}_{(x, y)}

**Example:**

Given A = { (a_{1}, 0.2), (a_{2}, 0.7), (a_{3}, 0.4) } and B = { (b_{1}, 0.5), (b_{2}, 0.6)}, find the relation over A x B

## Fuzzy relation

Fuzzy relations are very important because they can describe interactions between variables.

**Example:** A simple example of a binary fuzzy relation on X = {1, 2, 3}, called ”approximately equal” can be defined as

R(1, 1) = R(2, 2) = R(3, 3) = 1

R(1, 2) = R(2, 1) = R(2, 3) = R(3, 2) = 0.8

R(1, 3) = R(3, 1) = 0.3

The membership function and relation matrix of R is given by

bar{R}(x, y) = begin{cases} 1, & if x = y \ 0.7, & if |x-y| = 1 \ 0.3, & if |x-y| = 2 end{cases}

## Operations on fuzzy relation:

For our discussion, we will be using following two relation matrices:

### Union:

R ∪ S = { (a, b), μ_{A ∪ B}(a, b) }

μ_{R ∪ S}(a, b) = max( μ_{R}(a, b), μ_{S}(a, b))

μ_{R ∪ S}(x_{1}, y_{1}) = max( μ_{R}( x_{1}, y_{1} ), μ_{S}( x_{1}, y_{1} ))

= max(0.8, 0.4) = 0.8

μ_{R ∪ S}(x_{1}, y_{2}) = max( μ_{R}( x_{1}, y_{2} ), μ_{S}( x_{1}, y_{2} ))

= max(0.1, 0.0) = 0.1

μ_{R ∪ S}(x_{1}, y_{3}) = max( μ_{R}( x_{1}, y_{3} ), μ_{S}( x_{1}, y_{3} ))

= max(0.1, 0.9) = 0.9

μ_{R ∪ S}(x_{1}, y_{4}) = max( μ_{R}( x_{1}, y_{4} ), μ_{S}( x_{1}, y_{4} ))

max(0.7, 0.6) = 0.7

.

.

.

μ_{R ∪ S}(x_{3}, y_{4}) = max( μ_{R}( x_{3}, y_{4} ), μ_{S}( x_{3}, y_{4} ) )

= max(0.8, 0.5) = 0.8

Thus, the final matrix for union operation would be,

### Intersection:

R ∩ S = { (a, b), μ_{A ∩ B}(a, b) }

μ_{R ∩ S}(a, b) = min( μ_{R}(a, b), μ_{S}(a, b) )

μ_{R ∩ S}(x_{1}, y_{1}) = min( μ_{R}( x_{1}, y_{1} ), μ_{S}( x_{1}, y_{1} ) )

= min(0.8, 0.4) = 0.4

μ_{R ∩ S}(x_{1}, y_{2}) = min( μ_{R}( x_{1}, y_{2} ), μ_{S}( x_{1}, y_{2} ) )

= max(0.1, 0.0) = 0.0

μ_{R ∩ S}(x_{1}, y_{3}) = min( μ_{R}( x_{1}, y_{3} ), μ_{S}( x_{1}, y_{3} ) )

= max(0.1, 0.9) = 0.1

μ_{R ∩ S}(x_{1}, y_{4}) = min( μ_{R}( x_{1}, y_{4} ), μ_{S}( x_{1}, y_{4} ) )

max(0.7, 0.6) = 0.6

.

.

.

μ_{R ∩ S}(x_{3}, y_{4}) = min( μ_{R}( x_{3}, y_{4} ), μ_{S}( x_{3}, y_{4} ) )

= max(0.8, 0.5) = 0.5

### Complement:

R^{c} = { (a, b), μ_{R}^{c}(a, b) }

μ_{R}^{c}(a, b) = 1 – μ_{R}(a, b)

μ_{R}^{c}(x_{1}, y_{1}) = 1 – μ_{R}(x_{1}, y_{1}) = 1 – 0.8 = 0.2

μ_{R}^{c}(x_{1}, y_{2}) = 1 – μ_{R}(x_{1}, y_{2}) = 1 – 0.1 = 0.9

μ_{R}^{c}(x_{1}, y_{3}) = 1 – μ_{R}(x_{1}, y_{3}) = 1 – 0.1 = 0.9

.

.

μ_{R}^{c}(x_{3}, y_{4}) = 1 – μ_{R}(x_{3}, y_{4}) = 1 – 0.8 = 0.2

The complement of relation R would be,

### Projection:

**The projection of bar{R} on X :**

∏_{X}(x) = sup( R(x, y) | y ∈ Y)

**The projection of bar{R} on Y : **

∏_{Y}(y) = sup( R(x, y) | x ∈ X)

sup: Supremum of the set

**The projection of R on X :**

∏_{X}(x_{1}) = 0.8

∏_{X}(x_{2}) = 0.8

∏_{X}(x_{3}) = 1.0

**The projection of R on Y :**

∏_{Y}(y_{1}) = 0.9

∏_{Y}(y_{2}) = 1.0

∏_{Y}(y_{3}) = 0.7

∏_{Y}(y_{4}) = 0.8

## Watch on YouTube: Fuzzy relation

### Fuzzy composition:

**Fuzzy composition **can be defined just as it is for crisp (binary) relations. Suppose R is a fuzzy relation on X × Y, S is a fuzzy relation on Y × Z, and T is a fuzzy relation on X × Z; then,

**Fuzzy Max–Min composition **is defined as:

T = R ∘ S = μ_{T}(x, z) = begin{matrix} vee\ y in Y end{matrix} ( μ_{R}(x, y) ∨ μ_{S}(y, z) )

= begin{matrix} max \ y in Y end{matrix} ( min ( μ_{R}(x, y) ∨ μ_{S}(y, z) ) )

**Fuzzy Max–Product composition **is defined as:

T = R ∘ S = μ_{T}(x, z) = begin{matrix} vee\ y in Y end{matrix} ( μ_{R}(x, y) ∙ μ_{S}(y, z) )

= begin{matrix} max \ y in Y end{matrix} ( ( μ_{R}(x, y) ∙ μ_{S}(y, z) ) )

## Test Your Knowledge:

Find max-Min composition and Max-Product composition for above given fuzzy relations

**Please post your answer / query / feedback in comment section below !**

Very well example topic with video. It’s very helpful.

Thank you Payal

Reffered too much content on various sources on this topic, but couldn’t find better than this.

Thanks for your words Himani

Wow thanks that was nice explanation about opretiom of fuzzy set.

Can you explain about fuzzy subghroup