A set is a bunch of objects, which are called elements of the set.
N = { 0 , 1 , 2 , 3 , … } the natural numbers C = { red, blue, yellow } primary colors D = { Teddy, Sheba, Bella } dead pets P = { { a , b } , { a , c } , { b , c } } a set of sets \begin{aligned}
\mathbb{N} &=\{0,1,2,3, \ldots\} & & \text {the natural numbers } \\
C &=\{\text { red, blue, yellow }\} & & \text {primary colors } \\
D &=\{\text { Teddy, Sheba, Bella }\} & & \text {dead pets } \\
P &=\{\{a, b\},\{a, c\},\{b, c\}\} & & \text {a set of sets}
\end{aligned}
N C D P = { 0 , 1 , 2 , 3 , … } = { red, blue, yellow } = { Teddy, Sheba, Bella } = { { a , b } , { a , c } , { b , c } } the natural numbers primary colors dead pets a set of sets
The order of elements in a set don't matter.
Any object only appears in a set once (it's either in the set or not).
The expression e ∈ S e \in Se ∈ S asserts that e ee is an element of set S SS .
symbol set elements ∅ the empty set none N nonnegative integers { 0 , 1 , 2 , 3 , … } Z integers { … , − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 , … } Q rational numbers 1 2 , − 5 3 , 16 , etc. R real numbers π , e , − 9 , 2 , etc. C complex numbers i , 19 2 , 2 − 2 i , etc. \begin{array}{lll}
\textbf { symbol } & \textbf { set } & \textbf { elements } \\
\emptyset & \text { the empty set } & \text { none } \\
\mathbb{N} & \text { nonnegative integers } & \{0,1,2,3, \ldots\} \\
\mathbb{Z} & \text { integers } & \{\ldots,-3,-2,-1,0,1,2,3, \ldots\} \\
\mathbb{Q} & \text { rational numbers } & \frac{1}{2},-\frac{5}{3}, 16, \text { etc. } \\
\mathbb{R} & \text { real numbers } & \pi, e,-9, \sqrt{2}, \text { etc. } \\
\mathbb{C} & \text { complex numbers } & i, \frac{19}{2}, \sqrt{2}-2 i, \text { etc. }
\end{array}
symbol ∅ N Z Q R C set the empty set nonnegative integers integers rational numbers real numbers complex numbers elements none { 0 , 1 , 2 , 3 , … } { … , − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 , … } 2 1 , − 3 5 , 1 6 , etc. π , e , − 9 , 2 , etc. i , 2 1 9 , 2 − 2 i , etc.
A superscript + or - restricts a set to positive or negative elements.
¶ Comparing and Combining Sets
X ⊆ Y X \subseteq YX ⊆ Y indicates that X XX is a subset of Y YY (every element of X XX is an element of Y YY ).
X ⊂ Y X \subset YX ⊂ Y indicates that X XX is a subset of Y YY , but the two are not equal.
X ⊆ Y ↔ ( x ∈ X ⟶ x ∈ Y ) X \subseteq Y \leftrightarrow (x \in X \longrightarrow x \in Y)X ⊆ Y ↔ ( x ∈ X ⟶ x ∈ Y )
X ∪ Y X \cup YX ∪ Y The union of sets X XX and Y YY contains all elements appearing in X XX or Y YY .
x ∈ X ∪ Y ↔ x ∈ X ∨ x ∈ Y x \in X \cup Y \leftrightarrow x \in X \medspace \vee \medspace x \in Y
x ∈ X ∪ Y ↔ x ∈ X ∨ x ∈ Y
X ∪ Y = { x ∣ x ∈ X or x ∈ Y } X \cup Y=\{x \mid x \in X \text { or } x \in Y\}
X ∪ Y = { x ∣ x ∈ X or x ∈ Y }
X ∩ Y X \cap YX ∩ Y The intersection of sets X XX and Y YY consists of all elements that appear in both X XX and Y YY .
x ∈ X ∩ Y ↔ x ∈ X ∧ x ∈ Y x \in X \cap Y \leftrightarrow x \in X \medspace \wedge \medspace x \in Y
x ∈ X ∩ Y ↔ x ∈ X ∧ x ∈ Y
X ∩ Y = { x ∣ x ∈ X and x ∈ Y } X \cap Y=\{x \mid x \in X \text { and } x \in Y\}
X ∩ Y = { x ∣ x ∈ X and x ∈ Y }
X − Y X-YX − Y or X \ Y X\backslash YX \ Y of The difference sets X XX and Y YY contain all elements that are in X XX , but not in Y YY .
x ∈ X − Y ↔ x ∈ X ∧ x ∉ Y x \in X - Y \leftrightarrow x \in X \medspace \wedge \medspace x \notin Y
x ∈ X − Y ↔ x ∈ X ∧ x ∈ / Y
X − Y = { x ∣ x ∈ X and x ∉ Y } X-Y=\{x \mid x \in X \text { and } x \notin Y\}
X − Y = { x ∣ x ∈ X and x ∈ / Y }
(not clear if ⊕ \oplus⊕ is appropriate for set notation or if that is only acceptable for logical operations. ⊕ \oplus⊕ is typically used as the XOR \text{XOR}XOR connective.)
X ⊕ Y X \oplus YX ⊕ Y (or X ⊖ Y X \ominus YX ⊖ Y or X △ Y X \triangle YX △ Y ) contains elements in either X XX or Y YY , but not in both X XX and Y YY .
x ∈ X ⊕ Y ≡ x ∈ X ≢ x ∈ Y x \in X \oplus Y \equiv x \in X \not \equiv x \in Y
x ∈ X ⊕ Y ≡ x ∈ X ≡ x ∈ Y
X ⊕ Y = ( X − Y ) ∪ ( Y − X ) X \oplus Y=(X-Y) \cup(Y-X)
X ⊕ Y = ( X − Y ) ∪ ( Y − X )
X × Y X \times YX × Y contains all the ordered pairs in which the first elements are selected from X XX , and the second elements are selected from Y YY .
X × Y = { ( x , y ) ∣ x ∈ X ∧ y ∈ Y } X \times Y=\{(x, y) \mid x \in X \wedge y \in Y\}
X × Y = { ( x , y ) ∣ x ∈ X ∧ y ∈ Y }
The notation X 2 X^2X 2 is used to denote X × X X \times XX × X . X 3 X^3X 3 to denote X × X × X X \times X \times XX × X × X and so on.
X n = { ( x 1 , x 2 , … , x n ) ∣ x i ∈ X for i = 1 , 2 , … , n } X^{n}=\left\{\left(x_{1}, x_{2}, \ldots, x_{n}\right) \mid x_{i} \in X \text { for } i=1,2, \ldots, n\right\}
X n = { ( x 1 , x 2 , … , x n ) ∣ x i ∈ X for i = 1 , 2 , … , n }
The cartesian product X × Y X \times YX × Y has x y xyx y elements.
Often all the sets being considered are subsets of a known domain of discourse D DD . For any subset A AA of D DD , we define A ˉ \bar{A}A ˉ to be the set of all elements of D DD not in A AA . That is, A ˉ : : = D − A \bar{A}::=D-AA ˉ : : = D − A . The set A ˉ \bar{A}A ˉ is the complement of A AA .
For example, the complement of positive real numbers is the set of negative real numbers together with zero when the domain is all real numbers.
R + ‾ = R − ∪ { 0 } \overline{\mathbb{\LARGE R}^{\large +}}=\mathbb{R}^{-} \cup\{0\}
R + = R − ∪ { 0 }
If A AA is in a universal set U UU , the complement of A AA is
A ˉ = { x ∈ U ∣ x ∉ A } \bar{A}=\{x \in U \mid x \notin A\}
A ˉ = { x ∈ U ∣ x ∈ / A }
The collection of all subsets of a set. If A AA has n nn elements, there are 2 n 2^n2 n sets in p o w ( A ) pow(A)p o w ( A ) .
B ∈ pow ( A ) IFF B ⊆ A B \in \operatorname{pow}(A) \quad \text { IFF } \quad B \subseteq A
B ∈ p o w ( A ) IFF B ⊆ A
If A AA and B BB are sets, and f : A → B f:A \rarr Bf : A → B is a function, and B BB is equal to P ( A ) P(A)P ( A ) , this means that f ff is simply a function that each element of A AA to some subset of A AA .
The power set of the empty set ∅ \emptyset∅ has 2 0 = 1 2^0=12 0 = 1 element.
Used to describe sets that cannot be listed by elements or taking unions, intersections, etc.
The idea is to define a set using a predicate . The set consists of all values that make the predicate true.
A = { n ∈ N ∣ n is a prime and n = 4 k + 1 for some integer k } A=\{n \in \mathbb{N} \mid n \text { is a prime and } n=4 k+1 \text { for some integer } k\}
A = { n ∈ N ∣ n is a prime and n = 4 k + 1 for some integer k }
The set A AA consists of all natural numbers n nn for which the predicate
" n is a prime and n = 4 k + 1 for some integer k ′ ′ " n \text { is a prime and } n=4 k+1 \text { for some integer } k^{\prime \prime}
" n is a prime and n = 4 k + 1 for some integer k ′ ′
is true. The smallest elements of A AA are:
5 , 13 , 17 , 29 , 37 , 41 , 53 , 57 , 61 , 73 , … 5,13,17,29,37,41,53,57,61,73, \ldots
5 , 1 3 , 1 7 , 2 9 , 3 7 , 4 1 , 5 3 , 5 7 , 6 1 , 7 3 , …
B = { x ∈ R ∣ x 3 − 3 x + 1 > 0 } B=\left\{x \in \mathbb{R} \mid x^{3}-3 x+1>0\right\}
B = { x ∈ R ∣ x 3 − 3 x + 1 > 0 }
The set B BB consists of all real numbers x xx for which the predicate
x 3 − 3 x + 1 > 0 x^{3}-3 x+1>0
x 3 − 3 x + 1 > 0
is true.
C = { a + b i ∈ C ∣ a 2 + 2 b 2 ≤ 1 } C=\left\{a+b i \in \mathbb{C} \mid a^{2}+2 b^{2} \leq 1\right\}
C = { a + b i ∈ C ∣ a 2 + 2 b 2 ≤ 1 }
Set C CC consists of all complex numbers a + b i a+b ia + b i such that
a 2 + 2 b 2 ≤ 1 a^{2}+2 b^{2} \leq 1
a 2 + 2 b 2 ≤ 1
Two sets are equal if they have exactly the same elements. X = Y X=YX = Y means that z ∈ X z \in Xz ∈ X if and only if z ∈ Y z \in Yz ∈ Y , for all elements z zz . Set equalities can be formulated and proved as "iff" theorems.
Theorem: Let A AA , B BB , and C CC be sets, then
A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C ) A \cap(B \cup C)=(A \cap B) \cup(A \cap C)
A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )
Note: above read as "The intersection of set A with the union of set B and set C is equivalent to the union of the intersections of sets A and B and sets A and C"
Proof: The equality is equivalent to the assertion that
x ∈ A ∩ ( B ∪ C ) ⟺ x ∈ ( A ∩ B ) ∪ ( A ∩ C ) x \in A \cap(B \cup C) \iff x \in(A \cap B) \cup(A \cap C)
x ∈ A ∩ ( B ∪ C ) ⟺ x ∈ ( A ∩ B ) ∪ ( A ∩ C )
for all x. We prove the above assertion by using a chain of iff's.
Definition of intersection:
x ∈ A ∩ ( B ∪ C ) ⟺ ( x ∈ A ) ∧ ( x ∈ B ∪ C ) x \in A \cap(B \cup C) \iff (x \in A) \wedge (x \in B \cup C)
x ∈ A ∩ ( B ∪ C ) ⟺ ( x ∈ A ) ∧ ( x ∈ B ∪ C )
Definition of union:
( x ∈ A ) ∧ ( x ∈ B ∪ C ) ⟺ ( x ∈ A ) ∧ ( x ∈ B ∨ x ∈ C ) (x \in A) \wedge (x \in B \cup C) \iff (x \in A) \wedge (x \in B \vee x \in C)
( x ∈ A ) ∧ ( x ∈ B ∪ C ) ⟺ ( x ∈ A ) ∧ ( x ∈ B ∨ x ∈ C )
AND distributivity:
( x ∈ A ) ∧ ( x ∈ B ∨ x ∈ C ) ⟺ ( x ∈ A ∧ x ∈ B ) ∨ ( x ∈ A ∧ x ∈ C ) (x \in A) \wedge (x \in B \vee x \in C) \iff (x \in A \wedge x \in B) \vee (x \in A \wedge x \in C)
( x ∈ A ) ∧ ( x ∈ B ∨ x ∈ C ) ⟺ ( x ∈ A ∧ x ∈ B ) ∨ ( x ∈ A ∧ x ∈ C )
Definition of intersection
( x ∈ A ∧ x ∈ B ) ∨ ( x ∈ A ∧ x ∈ C ) ⟺ ( x ∈ A ∩ B ) ∨ ( x ∈ A ∩ C ) (x \in A \wedge x \in B) \vee (x \in A \wedge x \in C) \iff (x \in A \cap B) \vee (x \in A \cap C)
( x ∈ A ∧ x ∈ B ) ∨ ( x ∈ A ∧ x ∈ C ) ⟺ ( x ∈ A ∩ B ) ∨ ( x ∈ A ∩ C )
Definition of union
( x ∈ A ∩ B ) ∨ ( x ∈ A ∩ C ) ⟺ x ∈ ( A ∩ B ) ∪ ( A ∩ C ) (x \in A \cap B) \vee (x \in A \cap C) \iff x \in(A \cap B) \cup(A \cap C)
( x ∈ A ∩ B ) ∨ ( x ∈ A ∩ C ) ⟺ x ∈ ( A ∩ B ) ∪ ( A ∩ C )
■ \hspace{24em} \blacksquare
■