Skip to content

Mathematics and Statistics · Ch 1 — Sets and Relations

Relations

5

Relations

A relation captures the idea that some pairs of objects are connected by a rule while others are not — "is the price of", "is older than", "is the capital of". Formally, a relation links elements of one set to elements of another, and every such link is an ordered pair, so a relation is naturally a set of ordered pairs.

Definition. 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:

R⊆A×B.R \subseteq A \times B.

If (a,b)∈R(a, b) \in R, we say "aa is related to bb" and write a R ba\,R\,b. A relation from a set AA to itself (a subset of A×AA \times A) is called a relation on AA.

Because a relation is just a subset of A×BA \times B, and A×BA \times B has n(A) n(B)n(A)\,n(B) elements, the total number of possible relations from AA to BB is 2 n(A) n(B)2^{\,n(A)\,n(B)} (every subset of A×BA \times B is a relation).

Describing a relation. A relation can be given by listing its ordered pairs (roster form) or by a rule. For example, with A={1,2,3}A = \{1, 2, 3\} and B={4,5,6}B = \{4, 5, 6\}, the rule "b=a+3b = a + 3" gives the relation

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

Domain, range and codomain. For a relation RR from AA to BB:

Note

Domain, range, codomain

  • The domain of RR is the set of all first components of its pairs: {a:(a,b)∈R for some b}\{a : (a, b) \in R \text{ for some } b\} — a subset of AA.
  • The range of RR is the set of all second components: {b:(a,b)∈R for some a}\{b : (a, b) \in R \text{ for some } a\} — a subset of BB.
  • The codomain of RR is the whole set BB. …
Definition 1Relation

A relation RR from AA to BB is any subset of A×BA \times B; (a,b)∈R(a,b) \in R means aa is …

Definition 2Domain

The set of all first components of the ordered pairs in RR (a sub …

Definition 3Range

The set of all second components of the ordered pairs in RR (a subset of the …

Definition 4Codomain

The full second set BB from which second components may be drawn; the range is a subset …