Chapter II - Sets

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Sets and elements Set operations Some properties of nite sets

Sets
NGUYEN CANH Nam1
1 Faculty of Applied Mathematics Department of Applied Mathematics and Informatics Hanoi University of Technologies [email protected]

HUT - 2010

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Sets
Denition A collection or assembly of objects is called a set. Each object is called a element of set. The relation "is an element of", also called set membership, is denoted by . Writing x A, means that "x is an element of A". The negation of set membership is denoted by . If x is not an element of A we said "x doesnt belong to A" and write x A.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Sets
Examples

The students of the class ICT-K54 The rst ten natural numbers

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Sets
Venn diagram

Venn diagrams or set diagrams are diagrams that show all hypothetically possible logical relations between a nite collection of sets. A set is simple closed curve drawn in the plane and a point inside that curve is an element of set.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Sets
Cardinality

The cardinality of a set S, denoted by |S|, is "the number of members of S". For example, B is the set of colors of the French ag, we have |B| = 3. There is a unique set with no members and zero cardinality, which is called the empty set (or the null set) and is denoted by the symbol . For example, the set of all real solutions of the equation x 2 + 1 = 0 has zero members and thus is the empty set. Some sets have innite cardinality. The set of natural numbers, for instance, is innite.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Sets
Special sets

IP, denoting the set of all primes: IP = {2, 3, 5, 7, 11, 13, 17, ...}. IN, denoting the set of all natural numbers: IN = {0, 1, 2, ...}. Z denoting the set of all integers : Z, Z = {..., 2, 1, 0, 1, 2, ...}. Z O , denoting the set of all rational numbers : Q O = {a/b : a, b Z b = 0}. For example, 1/4 O and Q Z, Q 11/6 O . All integers are in this set since every integer a Q can be expressed as the fraction a/1. IR, denoting the set of all real numbers. This set includes all rational numbers, together with all irrational numbers (that is, numbers which cannot be rewritten as fractions, such as , e, and 2.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Specifying
Specifying the members of a set by pointing out the characteristic properties of elements of the set. Example A is the set whose members are the rst four positive integers. B is the set of colors of the French ag. The set F of the twenty smallest integers that are four less than perfect squares: F = {n2 4 : n is an integer; and 0 n 19}, the colon (":") means "such that". Sometimes the vertical bar ("|") is used instead of the colon.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Enumeration
Listing each member of the set. An extensional denition is denoted by enclosing the list of members in brackets. Example A = {4, 2, 1, 3} B = {blue, white, red} For sets with many elements, the enumeration of members can be abbreviated. For instance, the set of the rst thousand positive integers {1, 2, 3, ..., 1000} (the ellipsis ("...") indicates that the list continues in the obvious way) Ellipses may also be used where sets have innitely many members, the set of positive even numbers {2, 4, 6, 8, ...}.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Subsets

Denition If every member of set A is also a member of set B, then A is said to be a subset of B, written A B (also pronounced "A is contained in or equal to B"). Equivalently, we can write B A, read as B is a superset of A, B includes A, or B contains A. The relationship between sets established by is called inclusion or containment. If A is a subset of, but not equal to, B, then A is called a proper subset of B, written A B (A is a proper subset of B) or B A (B is proper superset of A).

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Subsets
Examples

Example The set of all men is a proper subset of the set of all people. {1, 2, 3, 4} {1, 2, 3, 4}.

The empty set is a subset of every set and every set is a subset of itself: A. A A.
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Some denitions and notations The ways to determine a set Subsets

Subsets
Equality

Two seemingly different sets are equal A = B if and only if A B and B A. If A and B are not equal we write A=B Example Let A = {x | x 2 = 1} and B = {1, 1}. Although A and B are described in different ways they have the same elements and so A = B.
NGUYEN CANH Nam Mathematics I - Chapter 2

Let A = {a, b, d } and B = {a, b, c}. Then A = B.

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Intersection
Denition The intersection of A and B, denoted by A B, is the set of all things which are members of both A and B (x (A B)) (x A and x B) If A B = , then A and B are said to be disjoint. Venn diagram

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Intersection
Example

{1, 2} {red, white} = . {1, 2} {1, 2} = {1, 2}.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Intersection
Properties

A B = B A. A B A. A A = A. A = .

A (B C) = (A B) C.

A B if and only if A B = A.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Union
Denition The union of A and B, denoted by A B, is the set of all things which are members of either A or B (x (A B)) (x A or x B) Venn diagram

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Union
Example

{1, 2} {red, white} = {1, 2, red, white}. {1, 2} {1, 2} = {1, 2}.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Union
Properties

A B = B A. A (A B). A A = A. A = A.

A (B C) = (A B) C.

A B if and only if A B = B.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Difference of sets
Denition The difference of A and B, denoted by A \ B, (or A B) is the set of all elements which are members of A but not members of B (x (A \ B)) (x A and x B) Venn diagram

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Difference of sets
Example

{1, 2} \ {red, white} = {1, 2}. {1, 2} \ {1, 2} = .

{1, 2, green} \ {red, white, green} = {1, 2}.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Compliment of a subset
Denition Let U be a set and A is a subset of U. The difference U \ A is called complement of A in U and denoted by A Venn diagram

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Compliment of a subset
Example

{1, 2, 3, 4} \ {1, 3} = {2, 4}.

U is the set of integers, E is the set of even integers, and O is the set of odd integers, then E = O.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Difference and complements


Properties

A \ B = B \ A. A A = U. A A = . (A) = A. A \ A = .

U = and = U. A \ B = A B.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Laws

Theorem (Distributive Laws) A (B C) = (A B) (A C) A (B C) = (A B) (A C)

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Laws
continue...

Theorem (De Morgans Laws)


n n

Denote
i=1

Ai = A1 . . . An and
n

have

i=1 n

Ai = A1 . . . An we then

Ai =
i=1 n i=1 n

Ai

Ai =
i=1 i=1

Ai

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Theorem

Theorem Let A1 , . . . , An be subsets of X then


n n

X\ X\

Ai =
i=1 n n

i=1

(X \ Ai )

Ai =
i=1

i=1

(X \ Ai )

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Agenda
1

Sets and elements Some denitions and notations The ways to determine a set Subsets Set operations Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets Some properties of nite sets

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Cartesian product of two sets

Denition The Cartesian product of two sets X (for example the points on an xaxis) and Y (for example the points on an y-axis), denoted X Y , is the set of all possible ordered pairs whose rst component is a member of X and whose second component is a member of Y (e.g., the whole of the xy plane): X Y = {(x, y)|x X and y Y }.

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Cartesian product of two sets


Examples

{1, 2} {red, white} = {(1, red), (1, white), (2, red), (2, white)}. Let A represent the set of all students at a university, and let B represent the set of all courses offered at the university. The Cartesian product A B can be used to represent all possible enrollments of students in courses at the university

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Basic properties of Cartesian products


In general AB = BA One exception is with the empty set, which acts as a "zero" and for equal sets. A = A= and, supposing G, T are sets and G = T : G T = T G. Strictly speaking, the Cartesian Product is not associative. (A B) C = A (B C)
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Basic properties of Cartesian products


Continue...

The Cartesian Product acts nicely with respect to intersections. (A B) (C D) = (A C) (B D) Notice that in most cases the above statement is not true if we replace intersection with union. (A B) (C D) = (A C) (B D) However, for intersection and union it holds for: A (B C) = (A B) (A C) and, A (B C) = (A B) (A C).
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Intersection and union of sets Difference of sets, compliment of a subset Theorems The Cartesian product of sets

Generalize Cartesian products


Denition The Cartesian product can be generalized to the n-ary Cartesian product over n sets X1, ..., Xn: X1 Xn = {(x1 , . . . , xn ) : xi Xi }. Denition The Cartesian square (or binary Cartesian product) of a set X is the Cartesian product X 2 = X X . The Cartesian power of a set X can be dened as: X n = X X X = {(x1 , x2 , . . . , xn ) | x1 X xn X } .
n
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Cardinality
Assume that the number of elements of a set X is nite. Denote by N(X ) the cardinality of X. Theorem Let A and B be nite sets . Then we have N(A B) = N(A).N(B) Theorem a) For two disjoint sets A, B we have N(A B) = N(A) + N(B) b) For A, B are arbitrary , we have N(A B) = N(A) + N(B) N(A B)
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Theorem For arbitrary nite sets A1 , A2 , . . . , Am , the number of elements of their union is counted by the formula N(A1 . . . Am ) = N1 N2 + N3 + . . . + (1)m Nm where N1 =
i=1 n

N(Ai ), . . . , Nk =
1i1 <i2 <...<ik m

N(Ai1 Ai2 . . . Aik )

Example N(A1 A2 A3 ) = N1 N2 + N3 where N1 = N(A1 ) + N(A2 ) + N(A3 ) N2 = N(A1 A2 ) + N(A2 A3 ) + N(A3 A1 ) N3 = N(A1 A2 A3 )
NGUYEN CANH Nam Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Exercises

Exercise 1: Let A, B and C be the subsets of X . Prove that a) (A \ B) = B A b) (A \ B) \ (A \ C) = (A \ B) C = (A C) \ B c) A (B \ C) = (A B) \ (A C)

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Exercises

Exercise 2: Prove that, for arbitrary sets E , F , G we have E (F G) = (E F ) (E G)

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Exercises

Exercise 3: Show that A (B C) = (C B) A

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Exercises

Exercise 4: Suppose we survey 200 students to see whether they are taking courses in computer science, mathematics, or physics. The results show that 90 students take computer science, 110 take mathematics, and 60 take physics. Further, 20 students take computer science and mathematics, 20 take computer science and physics, and 30 take mathematics and physics. We are interested in those students that take courses in all these areas. What could we say about the number of those students?

NGUYEN CANH Nam

Mathematics I - Chapter 2

Sets and elements Set operations Some properties of nite sets

Exercises

Exercise 5: Prove that a) (A B) (A B) = A b) (A B) \ (A B) = (A \ B) (B \ A)

NGUYEN CANH Nam

Mathematics I - Chapter 2

You might also like