1.Relation 1 MZI

Table of contents

  1. Cartesian Product
  2. Definition and Basic Notation of Binary Relation
  3. Relation Presentations: Arrow diagram, matrix, and digraph
  4. Important Theorem

1. Cartesian Product

1.1 Definition

The Cartesian product is a way to combine two sets into a new set of pairs.

  • Cartesian product: for two sets AA and BB, the Cartesian product A×BA \times B is defined as A×B:={(a,b)∣a∈A,b∈B}A \times B:= \{(a, b) \mid a \in A, b \in B\}7.
  • Ordered pair: an element (a,b)(a, b) within a Cartesian product is called an ordered pair or a 2-tuple.
  • Equality of pairs: two ordered pairs (a,b)(a, b) and (c,d)(c, d) are equal if and only if a=ca = c and b=db = d 5 6.

📝 If A={1,2}A = \{1, 2\} and B={a,b,c}B = \{a, b, c\}, then A×B={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}A \times B = \{(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)\} 6.

1.2 Ordered n-tuples

The concept of a Cartesian product can be extended to any number of sets.

  • n-tuple: for nn sets A1,A2,…,AnA_1, A_2, \dots, A_n, the Cartesian product is A1×A2×⋯×An={(a1,a2,…,an)∣ai∈Ai for i=1,2,…,n}A_1 \times A_2 \times \dots \times A_n = \{(a_1, a_2, \dots, a_n) \mid a_i \in A_i \text{ for } i = 1, 2, \dots, n\}.
  • Ordered n-tuple: the resulting element (a1,a2,…,an)(a_1, a_2, \dots, a_n) is called an ordered n-tuple or simply an n-tuple.
  • Equality of n-tuples: two n-tuples (a1,a2,…,an)(a_1, a_2, \dots, a_n) and (b1,b2,…,bn)(b_1, b_2, \dots, b_n) are equal if and only if ai=bia_i = b_i for every i=1,2,…,ni = 1, 2, \dots, n.
  • Power notation: if all sets are identical (A1=A2=⋯=An=AA_1 = A_2 = \dots = A_n = A), the product is written as AnA^n 8.

📝 An ordered 3-tuple might look like (1,x,true)(1, x, \text{true}), where each element comes from a different set 8.

1.3 Some important theorems 9 10 11

Several mathematical properties govern how Cartesian products behave.

PropertyDescription
Element membership(a,b)∈A×B  ⟺  (a∈A)∧(b∈B)(a, b) \in A \times B \iff (a \in A) \land (b \in B)
Symmetry of elements(a,b)∈A×B  ⟺  (b,a)∈B×A(a, b) \in A \times B \iff (b, a) \in B \times A
Empty set ruleA=∅  ⟹  A×B=B×A=∅A = \emptyset \implies A \times B = B \times A = \emptyset
Commutativity conditionA×B=B×A  ⟺  (A=B)∨(A=∅)∨(B=∅)A \times B = B \times A \iff (A = B) \lor (A = \emptyset) \lor (B = \emptyset)

The size of a Cartesian product is determined by the sizes of the individual sets.

Set TypeCardinality Formula
Two finite sets$
n finite sets$

📝 If set AA has 2 elements and set BB has 3 elements, the cardinality of A×BA \times B is 2⋅3=62 \cdot 3 = 6 10.

2. Definition and Basic Notation of Binary Relation

2.1 Binary relation

A binary relation establishes a connection between elements of two sets.

  • Binary relation: a binary relation from set AA to set BB is defined as a subset of the Cartesian product A×BA \times B.
  • Relation notation: if RR is a relation from AA to BB, we write aRbaRb to state that aa is related to bb, which is equivalent to saying (a,b)∈R(a, b) \in R.
  • Non-relation notation: if aa is not related to bb, it can be written as aR̸ba \not R b, aRˉba \bar{R} b, or ¬(aRb)\neg (aRb).
  • Relation on a set: a relation on a single set AA is a relation from AA to AA, meaning it is a subset of A×AA \times A 13.

A binary relation R is defined as a set of ordered pairs, along with its domain and range. 21.

📝 If RR is a relation where aRbaRb means "aa divides bb", then (2,4)∈R(2, 4) \in R because 2 divides 4 26.

2.2 Domain and range of relation 14 20 21 27 30 31 35 36

Every relation has a specific set of starting elements and ending elements.

  • Domain: the domain of RR, denoted dom(R)\text{dom}(R), is the set of all elements a∈Aa \in A for which there exists at least one b∈Bb \in B such that aRbaRb.
  • Range: the range of RR, denoted ran(R)\text{ran}(R), is the set of all elements b∈Bb \in B such that there exists at least one a∈Aa \in A where aRbaRb 14.
TermSet Notation
Domaindom(R):={a∈A∣∃b∈B(aRb)}\text{dom}(R):= \{a \in A \mid \exists b \in B (aRb)\}
Rangeran(R):={b∈B∣∃a∈A(aRb)}\text{ran}(R):= \{b \in B \mid \exists a \in A (aRb)\}

Definition of a relation R as a set of ordered pairs. 23.

📝 In a relation R={(1,x),(2,x),(2,y)}R = \{(1, x), (2, x), (2, y)\}, the domain is {1,2}\{1, 2\} and the range is {x,y}\{x, y\} 26.

Relation RRDomainRange
Student xx takes course yy{Alex, Ben, Cathy}{DM, C, DS, MVS}
aa divides bb (on A={2,3,4},B={2,4,8,9,15}A=\{2,3,4\}, B=\{2,4,8,9,15\}){2, 3, 4}{2, 4, 8, 9, 15}
aa is a prime factor of bb (on A={2,3,4,8,9}A=\{2,3,4,8,9\}){2, 3}{2, 3, 4, 8, 9}

📝 If RR is a relation on integers Z\mathbb{Z} where aRbaRb if a=b2a = b^2, then dom(R)={x2∣x∈Z}\text{dom}(R) = \{x^2 \mid x \in \mathbb{Z}\} and ran(R)=Z\text{ran}(R) = \mathbb{Z} 37 38.

3. Relation Presentations: Arrow diagram, matrix, and digraph

3.1 Arrow diagrams

Arrow diagrams are a visual way to show how elements from one set relate to elements in another set.

  • Visual structure: The diagram uses sets as containers for elements and arrows to show the connections.
  • Directionality: The arrows indicate the direction of the relation from the first set to the second set.
  • Set types: These diagrams can represent a relation between two different sets or a relation on a single set.

Three arrow diagrams representing relations R1, R2, and R3.

📝 To represent a relation R1R_1 from A={Amir, Budi, Cecep}A = \{\text{Amir, Budi, Cecep}\} to B={IF221, IF251, IF342, IF323}B = \{\text{IF221, IF251, IF342, IF323}\}, you draw arrows from "Amir" to "IF251" and "IF323" to show those specific pairs exist in the relation. 41 42.

3.2 Tables 43

Tables provide a structured, grid-based way to list the elements of a relation.

  • Organization: Elements from the domain are typically listed on one axis, while elements from the range are listed on the other.
  • Mapping: The intersection of a row and a column shows whether a specific pair belongs to the relation.
Relation TypeVisual Method
Arrow DiagramArrows between sets
TableGrid of elements
MatrixBinary numbers in a grid
DigraphNodes and directed edges

3.3 Representation matrix of a relation 44

A representation matrix is a mathematical way to encode a relation using a grid of binary values.

  • Matrix dimensions: For a relation RR from set AA to set BB, the matrix MRM_R has dimensions ∣A∣×∣B∣|A| \times |B|.
  • Binary values: The matrix uses only two possible values to indicate the presence or absence of a relationship.
ConditionMatrix Value (mijm_{ij})
(ai,bj)∈R(a_i, b_j) \in R1
(ai,bj)∉R(a_i, b_j) \notin R0
  • Row and column mapping: Each row corresponds to a specific element from the first set, and each column corresponds to an element from the second set.

This diagram illustrates the definition of a representation matrix for a relation between two finite sets A and B.

📝 Let A={1,2,3}A = \{1, 2, 3\}, B={1,2}B = \{1, 2\}, and the relation RR be defined by aRbaRb if and only if a>ba > b. Since the pairs in RR are (2,1)(2, 1), (3,1)(3, 1), and (3,2)(3, 2), the representation matrix MRM_R is: [001011]\begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 1 & 1 \end{bmatrix} 45 46 47 48 49 50 51 52.

A representation matrix for a relation R between sets A and B, showing the relationship between elements of A and B.

A representation matrix for a relation R between sets A and B, where the rows correspond to elements of A and columns correspond to elements of B.

A representation matrix for a relation R from set A to set B is shown.

3.4 Digraph

A digraph, or directed graph, is a visual representation used specifically for relations on a single set.

  • Components: A digraph consists of a set VV of vertices (nodes) and a set EE of edges (ordered pairs).
  • Vertex roles: In an edge (a,b)(a, b), aa is the initial vertex and bb is the terminal vertex.
  • Loops: An edge that starts and ends at the same vertex, such as (a,a)(a, a), is called a loop.
  • Constraint: A digraph can only represent a relation on a set AA (where the relation is from AA to AA); it cannot represent a relation between two different sets AA and BB if A≠BA \neq B.

A directed graph representing a relation R with nodes labeled 1, 2, 3, and 4, and arrows indicating the connections between them.

📝 To draw a digraph for R={(1,1),(1,3),(2,1),(2,3),(2,4),(3,1),(3,2),(4,1)}R = \{(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (4, 1)\} in the set {1,2,3,4}\{1, 2, 3, 4\}, you draw four nodes and connect them with arrows according to each pair, including a loop at node 1. 54 55.

📝 To draw a digraph for R={(a,a),(a,b),(b,a),(b,c),(b,d),(c,a),(c,d),(d,b)}R = \{(a, a), (a, b), (b, a), (b, c), (b, d), (c, a), (c, d), (d, b)\} in the set {a,b,c,d}\{a, b, c, d\}, you place nodes for each letter and draw directed edges for every pair, such as a loop at aa. 56 57.

4. Important Theorem

4.1 Set operations on relations 59

If AA and BB are two sets, and R1R_1 and R2R_2 are relations from AA to BB, we can perform several operations to create new relations.

OperationSymbolDefinition
UnionR1∪R2R_1 \cup R_2(a,b)∈R1(a, b) \in R_1 or (a,b)∈R2(a, b) \in R_2
IntersectionR1∩R2R_1 \cap R_2(a,b)∈R1(a, b) \in R_1 and (a,b)∈R2(a, b) \in R_2
Symmetric differenceR1⊕R2R_1 \oplus R_2(a,b)∈R1(a, b) \in R_1 or (a,b)∈R2(a, b) \in R_2, but not both
DifferenceR1∖R2R_1 \setminus R_2(a,b)∈R1(a, b) \in R_1 and (a,b)∉R2(a, b) \notin R_2
Complement¬R\neg R or Rˉ\bar{R}(a,b)∉R(a, b) \notin R

4.2 Inverse relations 59

An inverse relation reverses the direction of the original relation by swapping the elements in each ordered pair.

RelationSymbolDefinition
Inverse relationR−1R^{-1}{(b,a)∈B×A∣(a,b)∈R}\{(b, a) \in B \times A \mid (a, b) \in R\}

📝 If RR is a relation where xRyxRy means x<yx < y, then the inverse relation R−1R^{-1} is defined by y<xy < x, which is the same as x>yx > y 93.

4.3 Exercises on set operations

The following exercises demonstrate how to apply set operations to specific relations.

4.4 Exercise: Set operations on finite sets 60 68

This exercise tests the ability to perform union, intersection, symmetric difference, difference, complement, and inverse operations on specific sets of ordered pairs.

  • Given sets: A={a,b,c}A = \{a, b, c\} and B={a,b,c,d}B = \{a, b, c, d\}.
  • Relation 1 (R1R_1): {(a,a),(b,b),(c,c)}\{(a, a), (b, b), (c, c)\}.
  • Relation 2 (R2R_2): {(a,a),(a,b),(a,c),(a,d)}\{(a, a), (a, b), (a, c), (a, d)\}.
OperationResult
Intersection (R1∩R2R_1 \cap R_2){(a,a)}\{(a, a)\}
Union (R1∪R2R_1 \cup R_2){(a,a),(a,b),(a,c),(a,d),(b,b),(c,c)}\{(a, a), (a, b), (a, c), (a, d), (b, b), (c, c)\}
Symmetric difference (R1⊕R2R_1 \oplus R_2){(a,b),(a,c),(a,d),(b,b),(c,c)}\{(a, b), (a, c), (a, d), (b, b), (c, c)\}
Difference (R1∖R2R_1 \setminus R_2){(b,b),(c,c)}\{(b, b), (c, c)\}
Difference (R2∖R1R_2 \setminus R_1){(a,b),(a,c),(a,d)}\{(a, b), (a, c), (a, d)\}
Complement (Rˉ1\bar{R}_1){(a,b),(a,c),(a,d),(b,a),(b,c),(b,d),(c,a),(c,b),(c,d)}\{(a, b), (a, c), (a, d), (b, a), (b, c), (b, d), (c, a), (c, b), (c, d)\}
Inverse (R2−1R_2^{-1}){(a,a),(b,a),(c,a),(d,a)}\{(a, a), (b, a), (c, a), (d, a)\}

4.5 Exercise: Set operations on real number relations 69 88

This exercise applies set operations to relations defined by inequalities on the set of real numbers R\mathbb{R}.

  • Relation 1 (R1R_1): xR1yxR_1y iff x<yx < y.
  • Relation 2 (R2R_2): xR2yxR_2y iff x>yx > y.
OperationResulting Relation
Union (R1∪R2R_1 \cup R_2){(x,y)∣x≠y}\{(x, y) \mid x \neq y\}
Intersection (R1∩R2R_1 \cap R_2)∅\emptyset
Difference (R1∖R2R_1 \setminus R_2)R1R_1 or {(x,y)∣x<y}\{(x, y) \mid x < y\}
Difference (R2∖R1R_2 \setminus R_1)R2R_2 or {(x,y)∣x>y}\{(x, y) \mid x > y\}
Symmetric difference (R1⊕R2R_1 \oplus R_2){(x,y)∣x≠y}\{(x, y) \mid x \neq y\}

📝 For the intersection R1∩R2R_1 \cap R_2, we look for xx such that x<yx < y and x>yx > y. Since these cannot both be true, the intersection is the empty set ∅\emptyset 77.

4.6 Exercise: Inverse and complement of real number relations 89 106

This exercise focuses on finding the inverse and complement for relations defined on R\mathbb{R}.

  • Relation RR: xRyxRy iff x<yx < y.
  • Relation SS: xSyxSy iff x≠yx \neq y.
Original RelationInverse (R−1R^{-1} or S−1S^{-1})Complement (Rˉ\bar{R} or Sˉ\bar{S})
x<yx < yx>yx > yx≥yx \geq y
x≠yx \neq yx≠yx \neq yx=yx = y

📝 If SS is the relation x≠yx \neq y, its complement Sˉ\bar{S} is the set of all pairs where the condition x≠yx \neq y is false, which means x=yx = y 106.

4.7 Exercise: Operations on integer relations 107 115

This exercise calculates the inverse and complement for relations defined on the set of integers Z\mathbb{Z}.

  • Relation RR: xRyxRy iff x≤yx \leq y.
OperationResulting Relation
Inverse (R−1R^{-1})x≥yx \geq y
Complement (Rˉ\bar{R})x>yx > y

4.8 Important theorems of inverse relations 116

Several fundamental properties describe the relationship between a relation and its inverse.

PropertyMathematical Statement
Domain of inversedom(R−1)=ran(R)\text{dom}(R^{-1}) = \text{ran}(R)
Range of inverseran(R−1)=dom(R)\text{ran}(R^{-1}) = \text{dom}(R)
Double inverse(R−1)−1=R(R^{-1})^{-1} = R
Subset preservationR⊆S  ⟺  R−1⊆S−1R \subseteq S \iff R^{-1} \subseteq S^{-1}

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also