You are on page 1of 142

Discrete Mathematics

Lecture 2 - Sets and Relations

Professor Askar Dzhumadil’daev

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 1 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Examples
N a set of natural numbers. Its elements are 1, 2, 3, . . .
Z a set of integer numbers. Its elements are . . . − 2, −1, 0, 1, 2, . . .

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Examples
N a set of natural numbers. Its elements are 1, 2, 3, . . .
Z a set of integer numbers. Its elements are . . . − 2, −1, 0, 1, 2, . . .

There are two basic ways to describe sets. The first way is by listing elements
of a set within braces (when it is possible)

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Examples
N a set of natural numbers. Its elements are 1, 2, 3, . . .
Z a set of integer numbers. Its elements are . . . − 2, −1, 0, 1, 2, . . .

There are two basic ways to describe sets. The first way is by listing elements
of a set within braces (when it is possible)

Examples
A = {a, b, c, d} is a set denoted by A containing elements a, b, c, d.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Examples
N a set of natural numbers. Its elements are 1, 2, 3, . . .
Z a set of integer numbers. Its elements are . . . − 2, −1, 0, 1, 2, . . .

There are two basic ways to describe sets. The first way is by listing elements
of a set within braces (when it is possible)

Examples
A = {a, b, c, d} is a set denoted by A containing elements a, b, c, d.
B = {x} is a set with one element x.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33


Sets
A set is a basic concept in mathematics that has no formal definition.

Notion or Concept
A set is a collection of distinct objects called elements or members.

Sets are conventionally denoted by capital letters.

Examples
N a set of natural numbers. Its elements are 1, 2, 3, . . .
Z a set of integer numbers. Its elements are . . . − 2, −1, 0, 1, 2, . . .

There are two basic ways to describe sets. The first way is by listing elements
of a set within braces (when it is possible)

Examples
A = {a, b, c, d} is a set denoted by A containing elements a, b, c, d.
B = {x} is a set with one element x.
N = {1, 2, 3, . . .} is the set of natural numbers.
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 2 / 33
The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33


The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.
Example
The set of even natural numbers could be described as

{k | k is an even integer, k > 0}

or as {2k | k = 1, 2, 3, . . .} or as {2k | k is a natural number}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33


The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.
Example
The set of even natural numbers could be described as

{k | k is an even integer, k > 0}

or as {2k | k = 1, 2, 3, . . .} or as {2k | k is a natural number}

If x is an element of a set A, then we write x ∈ A, otherwise x ∈


/A
Example
2 ∈ N but −3 ∈
/N

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33


The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.
Example
The set of even natural numbers could be described as

{k | k is an even integer, k > 0}

or as {2k | k = 1, 2, 3, . . .} or as {2k | k is a natural number}

If x is an element of a set A, then we write x ∈ A, otherwise x ∈


/A
Example
2 ∈ N but −3 ∈
/N

True or False (?)


Let S = {{a}, b, c}.
a∈
/S
{a} ∈ S
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33
The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.
Example
The set of even natural numbers could be described as

{k | k is an even integer, k > 0}

or as {2k | k = 1, 2, 3, . . .} or as {2k | k is a natural number}

If x is an element of a set A, then we write x ∈ A, otherwise x ∈


/A
Example
2 ∈ N but −3 ∈
/N

True or False (?)


Let S = {{a}, b, c}.
a∈
/S True
{a} ∈ S
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33
The second way is just giving description of a set. It has the following format
{x | x has certain properties}
which is read as ”the set of x such that x has certain properties”.
Example
The set of even natural numbers could be described as

{k | k is an even integer, k > 0}

or as {2k | k = 1, 2, 3, . . .} or as {2k | k is a natural number}

If x is an element of a set A, then we write x ∈ A, otherwise x ∈


/A
Example
2 ∈ N but −3 ∈
/N

True or False (?)


Let S = {{a}, b, c}.
a∈
/S True
{a} ∈ S True
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 3 / 33
A=B

Definition (Equality of sets)


Sets A and B are equal, and write A = B if and only if A and B contain the
same elements or neither set contains any elements.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 4 / 33


A=B

Definition (Equality of sets)


Sets A and B are equal, and write A = B if and only if A and B contain the
same elements or neither set contains any elements.

Examples
{1, 2, 1} = {1, 2} = {2, 1}
{ 12 , 42 } = { 12 }
{t | t = r − s, r, s ∈ {0, 1, 2}} = {−2, −1, 0, 1, 2}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 4 / 33


Definition (The empty set)


The unique set that contains no elements is called the empty set and denoted
by ∅

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 5 / 33


Definition (The empty set)


The unique set that contains no elements is called the empty set and denoted
by ∅

Examples
{n ∈ N | 5n = 2}
{n ∈ N | n2 + 1 = 0}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 5 / 33


Definition (The empty set)


The unique set that contains no elements is called the empty set and denoted
by ∅

Examples
{n ∈ N | 5n = 2}
{n ∈ N | n2 + 1 = 0}

True or False (?)


{∅} = ∅

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 5 / 33


Definition (The empty set)


The unique set that contains no elements is called the empty set and denoted
by ∅

Examples
{n ∈ N | 5n = 2}
{n ∈ N | n2 + 1 = 0}

True or False (?)


{∅} = ∅ False

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 5 / 33


A⊆B

Definition (Subset)
A set A is a subset of a set B if and only if every element of A is an element of
B, write it as A ⊆ B. If A ⊆ B but A 6= B, then A is called a proper subset of
B and write A $ B.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 6 / 33


A⊆B

Definition (Subset)
A set A is a subset of a set B if and only if every element of A is an element of
B, write it as A ⊆ B. If A ⊆ B but A 6= B, then A is called a proper subset of
B and write A $ B.

Examples
{a, b} ⊆ {a, b, c}
{a, b} $ {a, b, c}
{a, b} $ {a, b, {a, b}}
{a, b} ∈ {a, b, {a, b}}
N$Z$Q$R$C
{a, b} $ {a, b, c} * {a, b, x}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 6 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

True or False (?)


{∅} ∈ {{∅}}
∅ ⊆ {{∅}}
{∅} ⊆ {{∅}}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

True or False (?)


{∅} ∈ {{∅}} True
∅ ⊆ {{∅}}
{∅} ⊆ {{∅}}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

True or False (?)


{∅} ∈ {{∅}} True
∅ ⊆ {{∅}} True
{∅} ⊆ {{∅}}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

True or False (?)


{∅} ∈ {{∅}} True
∅ ⊆ {{∅}} True
{∅} ⊆ {{∅}} False

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


Proposition
For any set A, A ⊆ A and ∅ ⊆ A.

Proof
If a ∈ A, then a ∈ A, so A ⊆ A. We prove the second part of proposition by
contradiction. Suppose the empty set ∅ is not a subset of A. Then there must
exist some x ∈ ∅ such that x ∈
/ A. However, it is impossible, since there is no
x∈∅

True or False (?)


{∅} ∈ {{∅}} True
∅ ⊆ {{∅}} True
{∅} ⊆ {{∅}} False

Proposition (Easy)
A = B if and only if A ⊆ B and B ⊆ A

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 7 / 33


P(A)

Definition (The power set)


The power set of a set, denoted P(A), is the set of all subsets of A

P(A) = {B|B ⊆ A}.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 8 / 33


P(A)

Definition (The power set)


The power set of a set, denoted P(A), is the set of all subsets of A

P(A) = {B|B ⊆ A}.

Example
If A = {a, b, c}, then its power set is

P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 8 / 33


Operations on Sets

Definition (Union and Intersection)


The union of sets A and B, written A ∪ B, is the set of elements in A or in B
(or in both). The intersection of sets A and B, written A ∩ B, is the set of
elements that belong to both A and B.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 9 / 33


Operations on Sets

Definition (Union and Intersection)


The union of sets A and B, written A ∪ B, is the set of elements in A or in B
(or in both). The intersection of sets A and B, written A ∩ B, is the set of
elements that belong to both A and B.

Example
If A = {a, b, c} and B = {a, x, y, b}, then

A ∪ B = {a, b, c, x, y} and A ∩ B = {a, b}

For any set A, A ∪ ∅ = A and A ∩ ∅ = ∅


For any set A, A ∪ A = A and A ∩ A = A

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 9 / 33


Operations on Sets

Definition (Union and Intersection)


The union of sets A and B, written A ∪ B, is the set of elements in A or in B
(or in both). The intersection of sets A and B, written A ∩ B, is the set of
elements that belong to both A and B.

Example
If A = {a, b, c} and B = {a, x, y, b}, then

A ∪ B = {a, b, c, x, y} and A ∩ B = {a, b}

For any set A, A ∪ ∅ = A and A ∩ ∅ = ∅


For any set A, A ∪ A = A and A ∩ A = A

For any A and B, we have the following equalities


A ∪ B = B ∪ A and A ∩ B = B ∩ A
(A ∪ B) ∪ C = A ∪ (B ∪ C) and (A ∩ B) ∩ C = A ∩ (B ∩ C)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) and A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 9 / 33
Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.
Thus, x ∈ A and x ∈ B or x ∈ A and x ∈ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.
Thus, x ∈ A and x ∈ B or x ∈ A and x ∈ C. In two cases, x ∈ A.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.
Thus, x ∈ A and x ∈ B or x ∈ A and x ∈ C. In two cases, x ∈ A.
Also, we have x ∈ B or x ∈ C; thus, x ∈ B ∪ C.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.
Thus, x ∈ A and x ∈ B or x ∈ A and x ∈ C. In two cases, x ∈ A.
Also, we have x ∈ B or x ∈ C; thus, x ∈ B ∪ C.
So x is both in A and in B ∪ C; that is x ∈ A ∩ (B ∪ C).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


Let us demonstrate a proof of A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

Proof. As we observed in the Proposition on equality of sets, to show that


two sets are equal it is sufficient to show that each is subset of the other.
First, we show that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) and let x ∈ A ∩ (B ∪ C).
Then x ∈ A and x ∈ B ∪ C.
Since x ∈ B ∪ C, either x ∈ B or x ∈ C.

This suggests two cases:


Case 1 (x ∈ B): x ∈ A and x ∈ B. So x ∈ A ∩ B.
Case 2 (x ∈ C): x ∈ A and x ∈ C. So x ∈ A ∩ C.
We have shown that either x ∈ A ∩ B or x ∈ A ∩ C.
By definition of union, x ∈ (A ∩ B) ∪ (A ∩ C).

Conversely, we show that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).


Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C.
Thus, x ∈ A and x ∈ B or x ∈ A and x ∈ C. In two cases, x ∈ A.
Also, we have x ∈ B or x ∈ C; thus, x ∈ B ∪ C.
So x is both in A and in B ∪ C; that is x ∈ A ∩ (B ∪ C).
This completes the proof 

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 10 / 33


A\B and Ac

Definition (Difference and Complement)


The set difference of sets A and B, written A\B, is the set of those elements
of A that are not in B. The complement of a set A is the set Ac = U \A, where
U is some universal set made clear by the context.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 11 / 33


A\B and Ac

Definition (Difference and Complement)


The set difference of sets A and B, written A\B, is the set of those elements
of A that are not in B. The complement of a set A is the set Ac = U \A, where
U is some universal set made clear by the context.

Examples
{a, b, c}\{a, b} = {c}
{a, b, c}\{a, x} = {b, c}
{a, b, ∅}\∅ = {a, b, ∅}
{a, b, ∅}\{∅} = {a, b}
Let U be a set of days of week and
A = {Monday, Tuesday, Wednesday, Thursday, Friday}. Then
Ac = {Saturday, Sunday}
A = {x ∈ Z | x2 > 0}. Then Ac = {0}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 11 / 33


Some properties
A\B = A ∩ B c
(Ac )c = A

The Laws of De Morgan


(A ∪ B)c = Ac ∩ B c
(A ∩ B)c = Ac ∪ B c

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 12 / 33


A×B

Definition (Direct product)


If A and B are sets, the Cartesian product (direct product) of A and B is the
set
A × B = {(a, b) | a ∈ A, b ∈ B}

The elements of A × B are called ordered pairs because their order is


important: (a, b) 6= (b, a) if a 6= b. In case A × A, we just write A2 .

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 13 / 33


A×B

Definition (Direct product)


If A and B are sets, the Cartesian product (direct product) of A and B is the
set
A × B = {(a, b) | a ∈ A, b ∈ B}

The elements of A × B are called ordered pairs because their order is


important: (a, b) 6= (b, a) if a 6= b. In case A × A, we just write A2 .

Example
Let A = {a, b} and B = {x, y, z}. Then

A × B = {(a, x), (a, y), (a, z), (b, x), (b, y), (b, z)}

and
B × A = {(x, a), (x, b), (y, a), (y, b), (z, a), (z, b)}.

As we see above, in general, A × B 6= B × A

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 13 / 33


R

Definition (Binary relation)


Let A and B denote sets. A binary relation from A to B is a subset of A × B.
A binary relation on A is a subset of A × A.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 14 / 33


R

Definition (Binary relation)


Let A and B denote sets. A binary relation from A to B is a subset of A × B.
A binary relation on A is a subset of A × A.

Examples
If A is the set of students who were registered at a University and
B = {Algorithms, Calculus, Discrete Mathematics, English}, then
R = {(a, b) | a ∈ A is enrolled in a course in subject b ∈ B in the third
semester }
is a binary relation from A to B

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 14 / 33


R

Definition (Binary relation)


Let A and B denote sets. A binary relation from A to B is a subset of A × B.
A binary relation on A is a subset of A × A.

Examples
If A is the set of students who were registered at a University and
B = {Algorithms, Calculus, Discrete Mathematics, English}, then
R = {(a, b) | a ∈ A is enrolled in a course in subject b ∈ B in the third
semester }
is a binary relation from A to B
{(a, b) | a, b ∈ N, ab is an integer} and {(a, b) | a, b ∈ N, a − b = 2} are
binary relations on N

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 14 / 33


R

Definition (Binary relation)


Let A and B denote sets. A binary relation from A to B is a subset of A × B.
A binary relation on A is a subset of A × A.

Examples
If A is the set of students who were registered at a University and
B = {Algorithms, Calculus, Discrete Mathematics, English}, then
R = {(a, b) | a ∈ A is enrolled in a course in subject b ∈ B in the third
semester }
is a binary relation from A to B
{(a, b) | a, b ∈ N, ab is an integer} and {(a, b) | a, b ∈ N, a − b = 2} are
binary relations on N
{(x, y) | y = x2 } is a binary relation on R whose graph is the parabola on
the plane R × R = R2

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 14 / 33


Types of relations

Definition (Reflexive relation)


A binary relation R on a set A is reflexive if and only if (a, a) ∈ R for all a ∈ A

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 15 / 33


Types of relations

Definition (Reflexive relation)


A binary relation R on a set A is reflexive if and only if (a, a) ∈ R for all a ∈ A

Examples
{(x, y) ∈ R2 | x ≤ y} is a reflexive relation on R since x ≤ x for any x ∈ R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 15 / 33


Types of relations

Definition (Reflexive relation)


A binary relation R on a set A is reflexive if and only if (a, a) ∈ R for all a ∈ A

Examples
{(x, y) ∈ R2 | x ≤ y} is a reflexive relation on R since x ≤ x for any x ∈ R
{(a, b) ∈ N2 | ab ∈ N} is a reflexive relation on N since a
a = 1 for any a ∈ N

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 15 / 33


Types of relations

Definition (Reflexive relation)


A binary relation R on a set A is reflexive if and only if (a, a) ∈ R for all a ∈ A

Examples
{(x, y) ∈ R2 | x ≤ y} is a reflexive relation on R since x ≤ x for any x ∈ R
{(a, b) ∈ N2 | ab ∈ N} is a reflexive relation on N since a
a = 1 for any a ∈ N
2 2 2
{(x, y) ∈ R | x + y > 0} is not a reflexive relation on R since (0, 0) ∈
/R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 15 / 33


Definition (Symmetric relation)
A binary relation R on a set A is symmetric if and only if
if a, b ∈ A and (a, b) ∈ R, then (b, a) ∈ R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 16 / 33


Definition (Symmetric relation)
A binary relation R on a set A is symmetric if and only if
if a, b ∈ A and (a, b) ∈ R, then (b, a) ∈ R

Examples
R = {(x, y) ∈ R2 | x2 + y 2 = 1} is a symmetric relation on R since if
x2 + y 2 = 1, then y 2 + x2 = 1 too. If (x, y) ∈ R, then (y, x) ∈ R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 16 / 33


Definition (Symmetric relation)
A binary relation R on a set A is symmetric if and only if
if a, b ∈ A and (a, b) ∈ R, then (b, a) ∈ R

Examples
R = {(x, y) ∈ R2 | x2 + y 2 = 1} is a symmetric relation on R since if
x2 + y 2 = 1, then y 2 + x2 = 1 too. If (x, y) ∈ R, then (y, x) ∈ R
{(x, y) ∈ Z2 | x − y is even} is a symmetric relation on Z since if x − y is
even so is y − x

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 16 / 33


Definition (Symmetric relation)
A binary relation R on a set A is symmetric if and only if
if a, b ∈ A and (a, b) ∈ R, then (b, a) ∈ R

Examples
R = {(x, y) ∈ R2 | x2 + y 2 = 1} is a symmetric relation on R since if
x2 + y 2 = 1, then y 2 + x2 = 1 too. If (x, y) ∈ R, then (y, x) ∈ R
{(x, y) ∈ Z2 | x − y is even} is a symmetric relation on Z since if x − y is
even so is y − x
R = {(x, y) ∈ R2 | x2 ≥ y} is not a symmetric relation on R. For example,
(2, 1) ∈ R because 22 ≥ 1, but (1, 2) ∈
/ R because 12  2

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 16 / 33


Definition (Antisymmetric relation)
A binary relation R on a set A is antisymmetric if and only if

if a, b ∈ A and both (a, b) and (b, a) are in R, then a = b.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 17 / 33


Definition (Antisymmetric relation)
A binary relation R on a set A is antisymmetric if and only if

if a, b ∈ A and both (a, b) and (b, a) are in R, then a = b.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is an antisymmetric relation on R since x ≤ y
and y ≤ x implies x = y; thus (x, y) ∈ R and (y, x) ∈ R implies x = y

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 17 / 33


Definition (Antisymmetric relation)
A binary relation R on a set A is antisymmetric if and only if

if a, b ∈ A and both (a, b) and (b, a) are in R, then a = b.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is an antisymmetric relation on R since x ≤ y
and y ≤ x implies x = y; thus (x, y) ∈ R and (y, x) ∈ R implies x = y
If S is a set and P(S) is a power set of S, then
{(X, Y ) | X, Y ∈ P(S), X ⊆ Y } is antisymmetric since X ⊆ Y and Y ⊆ X
implies X = Y

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 17 / 33


Definition (Antisymmetric relation)
A binary relation R on a set A is antisymmetric if and only if

if a, b ∈ A and both (a, b) and (b, a) are in R, then a = b.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is an antisymmetric relation on R since x ≤ y
and y ≤ x implies x = y; thus (x, y) ∈ R and (y, x) ∈ R implies x = y
If S is a set and P(S) is a power set of S, then
{(X, Y ) | X, Y ∈ P(S), X ⊆ Y } is antisymmetric since X ⊆ Y and Y ⊆ X
implies X = Y
R = {(1, 2), (2, 3), (3, 3), (2, 1)} is not antisymmetric relation on
A = {1, 2, 3} because (1, 2) ∈ R and (2, 1) ∈ R but 1 6= 2

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 17 / 33


Definition (Antisymmetric relation)
A binary relation R on a set A is antisymmetric if and only if

if a, b ∈ A and both (a, b) and (b, a) are in R, then a = b.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is an antisymmetric relation on R since x ≤ y
and y ≤ x implies x = y; thus (x, y) ∈ R and (y, x) ∈ R implies x = y
If S is a set and P(S) is a power set of S, then
{(X, Y ) | X, Y ∈ P(S), X ⊆ Y } is antisymmetric since X ⊆ Y and Y ⊆ X
implies X = Y
R = {(1, 2), (2, 3), (3, 3), (2, 1)} is not antisymmetric relation on
A = {1, 2, 3} because (1, 2) ∈ R and (2, 1) ∈ R but 1 6= 2

Remark
Note that “antisymmetric” is not the same as “not symmetric”. The last
relation in the preceding example is not symmetric but neither is it
antisymmetric.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 17 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is transitive relation on R since x ≤ y and
y ≤ z, then x ≤ z; if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is transitive relation on R since x ≤ y and
y ≤ z, then x ≤ z; if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R
{(a, b) ∈ Z2 | ab is an integer} is a transitive relation on Z since, if a
b and b
c
are integers, then so is ac because ac = ab · cb

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is transitive relation on R since x ≤ y and
y ≤ z, then x ≤ z; if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R
{(a, b) ∈ Z2 | ab is an integer} is a transitive relation on Z since, if a
b and b
c
are integers, then so is ac because ac = ab · cb
R = {(x, y), (x, z), (y, u), (x, u)} is a transitive relation on {x, y, z, u}
because there is only one pair of the form (a, b), (b, c) belonging to R, that
is, (x, y) and (y, u) and, for this pair, it is true that (a, c) = (x, u) ∈ R

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is transitive relation on R since x ≤ y and
y ≤ z, then x ≤ z; if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R
{(a, b) ∈ Z2 | ab is an integer} is a transitive relation on Z since, if a
b and b
c
are integers, then so is ac because ac = ab · cb
R = {(x, y), (x, z), (y, u), (x, u)} is a transitive relation on {x, y, z, u}
because there is only one pair of the form (a, b), (b, c) belonging to R, that
is, (x, y) and (y, u) and, for this pair, it is true that (a, c) = (x, u) ∈ R
R = {(a, b), (b, a), (a, a)} is not transitive on {a, b} since it contains the
pairs (b, a) and (a, b), but not the pair (b, b)

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Transitive relation)
A binary relation R on a set A is transitive if and only if
if a, b, c ∈ A and both (a, b) and (b, c) are in R, then (a, c) ∈ R.

Examples
R = {(x, y) ∈ R2 | x ≤ y} is transitive relation on R since x ≤ y and
y ≤ z, then x ≤ z; if (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R
{(a, b) ∈ Z2 | ab is an integer} is a transitive relation on Z since, if a
b and b
c
are integers, then so is ac because ac = ab · cb
R = {(x, y), (x, z), (y, u), (x, u)} is a transitive relation on {x, y, z, u}
because there is only one pair of the form (a, b), (b, c) belonging to R, that
is, (x, y) and (y, u) and, for this pair, it is true that (a, c) = (x, u) ∈ R
R = {(a, b), (b, a), (a, a)} is not transitive on {a, b} since it contains the
pairs (b, a) and (a, b), but not the pair (b, b)
R = {(x, y) ∈ R2 | x2 ≥ y} is not transitive on R because (3, 4) ∈ R
(32 ≥ 4) and (4, 10) ∈ R(42 ≥ 10), but (3, 10) ∈ R (32  10)

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 18 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Examples
Suppose A is the set of all people in the world and
R = {(a, b) ∈ A × A | a and b have the same parents} Then R is an
equivalence relation.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Examples
Suppose A is the set of all people in the world and
R = {(a, b) ∈ A × A | a and b have the same parents} Then R is an
equivalence relation.
{(a, b) ∈ Z2 | a − b is divisible by 3} is an equivalence relation

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Examples
Suppose A is the set of all people in the world and
R = {(a, b) ∈ A × A | a and b have the same parents} Then R is an
equivalence relation.
{(a, b) ∈ Z2 | a − b is divisible by 3} is an equivalence relation
{(a, b) ∈ R2 | a ≤ b} is not an equivalence relation

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Examples
Suppose A is the set of all people in the world and
R = {(a, b) ∈ A × A | a and b have the same parents} Then R is an
equivalence relation.
{(a, b) ∈ Z2 | a − b is divisible by 3} is an equivalence relation
{(a, b) ∈ R2 | a ≤ b} is not an equivalence relation
{(a, b) ∈ A2 | a = b} is an equivalence relation on any set A

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33


Definition (Equivalence relation)


An equivalence relation on a set A is a binary relation R on A that is reflexive,
symmetric, and transitive. If a given relation R is an equivalence relation,
then usually denote it by ∼ and write a ∼ b to indicate that (a, b) ∈ R. In case
a ∼ b, we say that “a is equivalent to b”.

Examples
Suppose A is the set of all people in the world and
R = {(a, b) ∈ A × A | a and b have the same parents} Then R is an
equivalence relation.
{(a, b) ∈ Z2 | a − b is divisible by 3} is an equivalence relation
{(a, b) ∈ R2 | a ≤ b} is not an equivalence relation
{(a, b) ∈ A2 | a = b} is an equivalence relation on any set A

In general, we may consider an equivalence relation as a weakening of equality


relation.
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 19 / 33
A/ ∼

Definition (Equivalence class and Quotient set)


If ∼ denotes an equivalence relation on a set A, the equivalence class of an
element a ∈ A is the set a = {x ∈ A | x ∼ a} of all elements equivalent to a.
The set of all equivalence classes is called the quotient set of A and denoted
A/ ∼.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 20 / 33


A/ ∼

Definition (Equivalence class and Quotient set)


If ∼ denotes an equivalence relation on a set A, the equivalence class of an
element a ∈ A is the set a = {x ∈ A | x ∼ a} of all elements equivalent to a.
The set of all equivalence classes is called the quotient set of A and denoted
A/ ∼.

Example
Let A be the set of all residents of Kazakhstan. Let a, b ∈ A. Call a and b are
related to each other by relation R, that is, (a, b) ∈ R if a and b are residents
of the same region of Kazakhstan. Then one can easily check that R is an
equivalence relation on A. The residents of Shymkent, for example, form one
equivalence class, as do the residents of Almaty, residents of Karaganda, and
so on. The quotient set is the set of all regions in Kazakhstan.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 20 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

2 = {x ∈ Z | x ∼ 2}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

2 = {x ∈ Z | x ∼ 2} = {x ∈ Z | x − 2 is divisible by 3}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

2 = {x ∈ Z | x ∼ 2} = {x ∈ Z | x − 2 is divisible by 3}
= {. . . − 4, −1, 2, 5, 8, . . .}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

2 = {x ∈ Z | x ∼ 2} = {x ∈ Z | x − 2 is divisible by 3}
= {. . . − 4, −1, 2, 5, 8, . . .} = {3k + 2 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


One more example

Example
Let R = {(x, y) ∈ Z2 | x − y is divisible by 3}. Then R =∼ on Z (Why?).
We will determine
equivalence classes of integer numbers
the quotient set Z/ ∼ in Z
with respect to the equivalence relation ∼.
Let us first find the equivalence class of 0. By definition we have
0 = {x ∈ Z | x ∼ 0} = {x ∈ Z | x − 0 is divisible by 3} = {0, ±3, ±6, . . .}
= {3k | k ∈ Z} = 3Z.

1 = {x ∈ Z | x ∼ 1} = {x ∈ Z | x − 1 is divisible by 3}
= {. . . − 5, −2, 1, 4, 7, . . .} = {3k + 1 | k ∈ Z} = 3Z + 1.

2 = {x ∈ Z | x ∼ 2} = {x ∈ Z | x − 2 is divisible by 3}
= {. . . − 4, −1, 2, 5, 8, . . .} = {3k + 2 | k ∈ Z} = 3Z + 2.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 21 / 33


Example continued

Example
By similar way, we obtain

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z}

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1. Hence,


4 = 1.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1. Hence,


4 = 1.
In general, the equivalence class of r ∈ Z is 3Z if r is a multiple of 3, 3Z + 1 if
r is of the form 3k + 1, and 3Z + 2 if r is of the form 3k + 2.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1. Hence,


4 = 1.
In general, the equivalence class of r ∈ Z is 3Z if r is a multiple of 3, 3Z + 1 if
r is of the form 3k + 1, and 3Z + 2 if r is of the form 3k + 2.
Since every integer r is either a multiple of 3, or 3k + 1, or 3k + 2 for some k,
the only equivalence classes are 3Z, 3Z + 1 and 3Z + 2.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1. Hence,


4 = 1.
In general, the equivalence class of r ∈ Z is 3Z if r is a multiple of 3, 3Z + 1 if
r is of the form 3k + 1, and 3Z + 2 if r is of the form 3k + 2.
Since every integer r is either a multiple of 3, or 3k + 1, or 3k + 2 for some k,
the only equivalence classes are 3Z, 3Z + 1 and 3Z + 2.
Thus the quotient set for the given equivalence relation on Z is
Z/ ∼= {3Z, 3Z + 1, 3Z + 2}.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Example continued

Example
By similar way, we obtain
3 = {3k + 3 | k ∈ Z} = {3(k + 1) | k ∈ Z} = {3k | k ∈ Z} = 0. Hence, 3 = 0.

4 = {3k + 4 | k ∈ Z} = {3(k + 1) + 1 | k ∈ Z} = {3k + 1 | k ∈ Z} = 1. Hence,


4 = 1.
In general, the equivalence class of r ∈ Z is 3Z if r is a multiple of 3, 3Z + 1 if
r is of the form 3k + 1, and 3Z + 2 if r is of the form 3k + 2.
Since every integer r is either a multiple of 3, or 3k + 1, or 3k + 2 for some k,
the only equivalence classes are 3Z, 3Z + 1 and 3Z + 2.
Thus the quotient set for the given equivalence relation on Z is
Z/ ∼= {3Z, 3Z + 1, 3Z + 2}.

Additionally, we note that the equivalence classes are disjoint sets (they do
not have an common element) whose union is Z
Z = (3Z) ∪ (3Z + 1) ∪ (3Z + 2).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 22 / 33


Basic theorem about equivalence relation
Theorem
If ∼ denotes an equivalence relation on a set A, then
If a ∼ b, then a = b
if a  b, then a ∩ b = ∅
A is the disjoint union of all the distinct equivalence classes

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 23 / 33


Basic theorem about equivalence relation
Theorem
If ∼ denotes an equivalence relation on a set A, then
If a ∼ b, then a = b
if a  b, then a ∩ b = ∅
A is the disjoint union of all the distinct equivalence classes

Proof
If a ∼ b, let x be any element of a. Then x ∼ a and so x ∼ b by
transitivity. Hence x ∈ b and a ⊆ b. The symmetry of ∼ implies that
b ∼ a, and an argument similar to the above shows that b ⊆ a. This
proves that a = b.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 23 / 33


Basic theorem about equivalence relation
Theorem
If ∼ denotes an equivalence relation on a set A, then
If a ∼ b, then a = b
if a  b, then a ∩ b = ∅
A is the disjoint union of all the distinct equivalence classes

Proof
If a ∼ b, let x be any element of a. Then x ∼ a and so x ∼ b by
transitivity. Hence x ∈ b and a ⊆ b. The symmetry of ∼ implies that
b ∼ a, and an argument similar to the above shows that b ⊆ a. This
proves that a = b.
Suppose that a  b. If there was an element x ∈ a ∩ b, then x ∼ a, x ∼ b,
so a ∼ b by symmetry and transitivity. Hence a ∩ b = ∅.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 23 / 33


Basic theorem about equivalence relation
Theorem
If ∼ denotes an equivalence relation on a set A, then
If a ∼ b, then a = b
if a  b, then a ∩ b = ∅
A is the disjoint union of all the distinct equivalence classes

Proof
If a ∼ b, let x be any element of a. Then x ∼ a and so x ∼ b by
transitivity. Hence x ∈ b and a ⊆ b. The symmetry of ∼ implies that
b ∼ a, and an argument similar to the above shows that b ⊆ a. This
proves that a = b.
Suppose that a  b. If there was an element x ∈ a ∩ b, then x ∼ a, x ∼ b,
so a ∼ b by symmetry and transitivity. Hence a ∩ b = ∅.
The first two parts of the theorem show that two equivalence classes are
either the same or disjoint. The reflexivity of ∼ implies that each element
a ∈ A is in the equivalence class a. Hence A is the disjoint union of all the
equivalence classes 
Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 23 / 33


Definition (Partial order)


A partial order on a set A is a binary relation R that is reflexive,
antisymmetric, and transitive. A partially ordered set, poset for short, is a pair
(A, ), where  is a partial order on the set A.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 24 / 33




Definition (Partial order)


A partial order on a set A is a binary relation R that is reflexive,
antisymmetric, and transitive. A partially ordered set, poset for short, is a pair
(A, ), where  is a partial order on the set A.

Examples
The binary relation ≤ on the real numbers is a partial order.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 24 / 33




Definition (Partial order)


A partial order on a set A is a binary relation R that is reflexive,
antisymmetric, and transitive. A partially ordered set, poset for short, is a pair
(A, ), where  is a partial order on the set A.

Examples
The binary relation ≤ on the real numbers is a partial order.
For any set S, the binary relation ⊆ on the power set P(S) is a partial
order.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 24 / 33


Definition (comparable)
If (A, ) is a partially ordered set, elements a and b of are said to be
comparable if and only if either a  b or b  a.

Example
If X and Y are subsets of a set S, it need not be the case that X ⊆ Y or
Y ⊆ X; for example, {a} and {b, c} are not comparable.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 25 / 33


Definition (comparable)
If (A, ) is a partially ordered set, elements a and b of are said to be
comparable if and only if either a  b or b  a.

Example
If X and Y are subsets of a set S, it need not be the case that X ⊆ Y or
Y ⊆ X; for example, {a} and {b, c} are not comparable.

Definition
If  is a partial order on a set and every two elements of A are comparable,
then  is called a total order and the pair (A, ) is called a totally ordered set.

Example
The real numbers are totally ordered set by ≤ because, for every pair a, b of
real numbers, either a ≤ b or b ≤ a. On the other hand, the sets of sets,
{{a}, {b}, {c}, {a, c}} is not totally ordered by ⊆ since neither {a} ⊆ {b} nor
{b} ⊆ {a}.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 25 / 33


Hasse diagrams

Partial orders are often pictured by means of a diagram named after


mathematician Helmut Hasse (1898-1079).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 26 / 33


Hasse diagrams

Partial orders are often pictured by means of a diagram named after


mathematician Helmut Hasse (1898-1079).
In the Hasse diagram of a partially ordered set (A, )
there is a dot (a vertex) associated with each element of A;
if a  b, then the dot for b is positioned higher than the dot for a; and
if a  b such that a 6= b, and there is no intermediate with a  c  b such
that a 6= c 6= b, then a line is drawn from a to b

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 26 / 33


Example of Hasse diagrams

Two Hasse diagrams


are shown in the picture.

On the left, the Hasse


diagram for ({0, 1, 2, 3}, ≤).

On the right, the Hasse


diagram for (P({a, b, c}), ⊆).

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 27 / 33


Definition (maximum and minimum)
An element a of a poset (A, ) is a maximum if and only if b  a for every
b ∈ A and minimum if and only if a  b for every b ∈ A.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 28 / 33


Definition (maximum and minimum)
An element a of a poset (A, ) is a maximum if and only if b  a for every
b ∈ A and minimum if and only if a  b for every b ∈ A.

Example
In the poset (P({a, b, c}), ⊆), ∅ set is a minimum element and the set {a, b, c}
maximum element. In the poset {{a}, {b}, {c}, {a, c}} (with respect to ⊆),
there is neither a maximum nor a minimum because, for each of the elements
{a}, {b}, {c} and{a, c}, there is no another of these with which it is not
comparable.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 28 / 33


One must be careful to distinguish between maximum and maximal elements
and minimum and minimal elements.

Definition (maximal and minimal)


An element a of a poset (A, ) is maximal if and only if
If b ∈ A and a  b, then b = a.
and minimal if and only if

If b ∈ A and b  a, then b = a.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 29 / 33


One must be careful to distinguish between maximum and maximal elements
and minimum and minimal elements.

Definition (maximal and minimal)


An element a of a poset (A, ) is maximal if and only if
If b ∈ A and a  b, then b = a.
and minimal if and only if

If b ∈ A and b  a, then b = a.

Thus, a maximum element is “bigger” (in the sense of ) than every other
element in the set, while a maximal element is one that is not less than any
other. Considering again the poset {{a}, {b}, {c}, {a, c}}, while there is neither
a maximum nor a minimum, each of {a}, {b} and {c} is minimal, while {b}
and {a, c} are maximal.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 29 / 33


Question (?)
What are the maximum, maximal, minimum and minimal elements in the
poset whose Hasse diagram is in the picture below?

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 30 / 33


Question (?)
What are the maximum, maximal, minimum and minimal elements in the
poset whose Hasse diagram is in the picture below?

Answer: There is no maximum, but a and b are maximal; d is both minimal


and a minimum.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 30 / 33


Questions for Self-Study

Let A be a set with n ≥ 0 elements.


How many subsets does P(A) have?
How many relations are there on A?
How many reflexive relations are there on A?
How many symmetric relations are there on A?
How many antisymmetric relations are there on A?
How many transitive relations are there on A?
How many equivalence relations are there on A?
How many partial orders are there on A?
Justify your answers in each case.

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 31 / 33


Link to MIT video lecture on topic “Relations, Partial Orders, and
Scheduling”:

https : //ocw.mit.edu/courses/electrical − engineering − and − computer −


science/6−042j −mathematics−f or−computer−science−f all−2010/video−
lectures/lecture − 11 − relations − partial − orders − and − scheduling

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 32 / 33


The End of Lecture 2

Professor Askar Dzhumadil’daev Discrete Mathematics Lecture 2 - Sets and Relations 33 / 33

You might also like