Skip to content

Mathematics · Ch 2 — Relations and Functions

Relations — Definition, Pictorial Diagrams, Domain, Co-domain and Range

2.3

Relations — Definition, Pictorial Diagrams, Domain, Co-domain and Range

Relation. Let AA and BB be two non-empty sets. A relation RR from AA to BB is any subset of the Cartesian product A×BA \times B. If (a,b)∈R(a, b) \in R, we say aa is related to bb under RR, and write a R ba\,R\,b.

Since A×BA \times B itself has n(A)×n(B)n(A) \times n(B) elements when A,BA, B are finite, and a relation is any subset of it, the total number of possible relations from AA to BB is 2n(A)×n(B)2^{n(A)\times n(B)} (the number of subsets of a set with n(A)×n(B)n(A)\times n(B) elements) — including the empty relation R=∅R = \varnothing and the universal relation R=A×BR = A \times B itself.

Ways to describe a relation. A relation can be given (i) as a set of ordered pairs (roster form), e.g. R={(1,2),(2,4),(3,6)}R = \{(1,2), (2,4), (3,6)\}; (ii) by a defining rule/condition on A×BA \times B (set-builder form), e.g. R={(x,y):x∈A,y∈B,y=2x}R = \{(x,y) : x \in A, y \in B, y = 2x\}; or (iii) pictorially, by an arrow diagram.

Arrow (pictorial) diagram. Sets AA and BB are each drawn as a closed curve with their elements marked as points inside. For every ordered pair (a,b)∈R(a, b) \in R, an arrow is drawn from the point aa in AA to the point bb in BB. Unlike a function's diagram, an element of AA under a general relation may have no arrow leaving it, exactly one arrow, or more than one arrow — there is no restriction at all on how many times an element of AA can appear as a first component.

Domain, co-domain and range of a relation. Let RR be a relation from AA to BB.

  • The domain of RR is the set of all first components of the ordered pairs in RR: Dom(R)={a:(a,b)∈R for some b∈B}\text{Dom}(R) = \{a : (a,b) \in R \text{ for some } b \in B\}. It is a subset of AA (not necessarily equal to AA).
  • The co-domain of RR is the set BB itself, fixed in advance as part of specifying the relation — it need not consist only of elements that are actually related to something. …