Suppose R is a relation from set A to B and S is a relation from set B to C, the combination of both the relations is the relation which consists of ordered pairs (a, c) where a Є A and c Є C and there exist an element b Є B for which (a, b) Є R and (b, c) Є S. This is represented as RoS.
A relation R is defined as (a, b) Є R from set A to set B, then the inverse relation is defined as (b, a) Є R from set B to set A. Inverse Relation is represented as R1
R^{1} = {(b, a)  (a, b) Є R}.
Let R be a relation from set A to B, then the complementary Relation is defined as {(a, b)} where (a, b) is not Є R.
Relations can be represented as Matrices and Directed graphs.
Relation as Matrices:
A relation R is defined as from set A to set B, then the matrix representation of relation is M_{R }= [m_{ij}] where
mi_{j }= { 1, if (a, b) Є R
0, if (a, b) Є R }
PropertiesA directed graph consists of nodes or vertices connected by directed edges or arcs. Let R is relation from set A to set B defined as (a,b) Є R, then in directed graphit is represented as edge(an arrow from a to b) between (a,b).
PropertiesExample:
The directed graph of relation R = {(a, a), (a, b), (b, b), (b, c), (c, c), (c, b), (c, a)} is represented as
Since, there is loop at every node, it is reflexive but it is neither symmetric nor antisymmetric as there is an edge from a to b but no opposite edge from b to a and also directed edge from b to c in both directions. R is not transitive as there is an edge from a to b and b to c but no edge from a to c.
65 videos120 docs94 tests

1. What is a matrix representation of a relation? 
2. How do you represent a directed graph as an adjacency matrix? 
3. Can a matrix representation of a relation be used to find the transitive closure of a directed graph? 
4. How can matrix representations of relations be used in data analysis and machine learning? 
5. What are the advantages of using a matrix representation for graphs and relations? 

Explore Courses for Civil Engineering (CE) exam
