Processing math: 18%
Lecture Notes: Sets
Preliminaries
- Name tags
- Sign in
- Announce Quiz 1
Course Content
Tuesday Review
Question:
- Use strong induction to show that any amount of postage greater than or equal to 6¢ can be made using 2¢, 4¢, and 7¢ stamps.
Answer:
- Predicate: P(n) means “n¢ of postage can be made with 2¢, 4¢, and 7¢ stamps.
- Base case: Show P(n) is true for n = 6, 7.
- Induction hypothesis: Let n≥7 be arbitrary but fixed, and assume P(m) holds whenever 6≤m≤n.
- Induction step: Given our I.H., We will prove P(n+1).
- By the I.H., P(n−1) is true, since n−1≥n0=6. By adding a 2¢ stamp to the stamps used for P(n−1), we can measure n+1 cents.
Thursday Review
Review Written Assignment 4.
Set Notation
- Write: Definition: A set is a collection of distinct objects, which are called its members.
- For example:
{1,2,4}
{{1,2,4}}
{{1},{2},{4}}
- Ask: Are these sets equal?
- Nope! The first set has three members. The second set has one member. The third set has three members, each of which are sets.
- Sets don’t have order
- Sets don’t have repeated elements
- For example: Write the set of the class’s favorite ice cream flavors.
Special Sets
Z={…,−3,−2,−1,0,1,2,3,…}= the set of integersN={0,1,2,3,…}= the set of nonnegative integers, the natural numbersR= the set of real numbersQ= the set of rational numbers∅={}= the empty set
Subsets and Supersets
- Write: Definition: A subset of a set is a collection of elements drawn from the original set, but possibly missing some elements of the original.
- For example:
N⊆Z
Z⊆Q
∅⊆Z
∅⊆Q
Z⊆Z
- Write: Definition: A proper subset is a subset which is not equal.
- For example:
N⊊
\mathbb{Z} \subsetneq \mathbb{Q}
\emptyset \subsetneq \mathbb{Z}
\emptyset \subsetneq \mathbb{Q}
- Note that the notation \subset is ambiguous, so we will avoid it.
- Write: Definition: If A is a subset of B, then B is a superset of A.
- Write: Definition: If A is a proper subset of B, then B is a proper superset of A.
The Power Set
- Write: Definition: The power set of a set A is the set of all subsets of A.
- For example, if A = \{3, 17\} then
\mathcal{P}(A) = \{ \emptyset, \{3\}, \{17\}, \{3, 17\}\}
Set Membership
- a \in S says that a is a member of the set S.
- Ask: Are each of these true or false?
2 \in \{ 2, 5, 7\} is true.
3 \in \{ 2, 5, 7\} is false.
3 \not\in \{ 2, 5, 7\} is true.
\mathbb{Z} \in \mathcal{P}(\mathbb{Q}) is true.
1 \subseteq \{ 1, 2\} is false.
\{1\} \subseteq \{ 1, 2\} is true.
\{1\} \subsetneq \{ 1, 2\} is true.
\{1\} \in \{ 1, 2\} is false.
Set Cardinality
- Write: Definition: We denote the size of a set S, also called its cardinality, by \vert S \vert.
- Suppose A = \{3, 17\}
- Ask: What is the cardinality of each of these sets?
\vert \emptyset \vert = 0
\vert A \vert = 2
\vert \mathcal{P}(A) \vert = \vert \{ \emptyset, \{3\}, \{17\}, \{3, 17\}\} \vert = 4
\vert \mathbb{Z} \vert = \infty
\vert \{\mathbb{Z}\} \vert = 1
Set-builder Notation
- Write: The set of even integers can be written:
\{ n \in \mathbb{Z} : n \text{ is even} \}
\{ n \in \mathbb{Z} : n = 2m \text{ for some } m \in \mathbb{Z}\}
\{ 2m : m \in \mathbb{Z} \}
- This is called “set-builder notation.”
- The domain is written on the left, and the rule for inclusion in the set is written as a predicate on the right.
- More generally, we can form a subset of set A using a predicate P with the notation:
\{ x \in A : P(x) \}
- This subset will contain the elements of A which have property P.
- Note that in our third example, the domain was omitted from the left-hand side, and was specified in the rule on the right-hand side.
Set Operations
- Next, we will discuss operations you can perform on sets
- I will depict two sets with a Venn diagram
- Draw: Overlapping circles A and B, in two different colors
- First, I will color the intersection: A \cap B
- Next, the union: A \cup B
- Using set-builder notation, we can write union and intersection as:
A \cup B = \{x: x \in A \text{ or } x \in B \} \text{ (union)}
A \cap B = \{x: x \in A \text{ and } x \in B \} \text{ (intersect)}
- Union and intersection are associative, as are addition and multiplication of numbers. For sets A, B, C:
(A \cup B) \cup C = A \cup (B \cup C)
(A \cap B) \cap C = A \cap (B \cap C)
- This is just how “and” and “or” work in English
- For example, I have a cat who is “five years old and male, and orange”
- Use this example for associativity of union and intersection
- Union and intersection are commutative. For sets A and B:
A \cup B = B \cup A
A \cap B = B \cap A
- We also have the set difference operation.
- Draw: A - B and B - A .
- Note that: A \cup B = (A - B) \cup (B - A) \cup (A \cap B)
- Point out each piece in the Venn diagram
- The complement of a set, \bar{B} = \{x : x \not\in B \} . Draw it.
- Note that if the universe of x is not defined, it might be clear from context.
- But it is better to specify the universe, or else the reader might assume the universe is the universal set: U
- The universal set includes all possible elements!
- If you don’t specify the domain, then: \bar{B} = U - B
- For example: B = {Sat, Sun}. What is \bar{B} ?
- Suppose that D = {Mon, Tue, Wed, Thur, Fri, Sat, Sun}.
- Then we could write:
B = \{x \in D : x \text{ is a weekend day} \}
\bar{B} = \{x \in D : x \text{ is a weekday} \}
\bar{B} = \{x \in D : x \not\in B \}
Disjoint
- Write: Definition: Sets A and B are disjoint if they have no elements in common.
- Ask: How to express this in mathematical notation?
A \cap B = \emptyset
Distributive Laws
- This is the distributive law for addition and multiplication of numbers:
a \cdot (b+c) = a \cdot b + a \cdot c
- Similarly, there are distributive laws for union and intersection.
- Write: Distributive Laws
A \cup (B \cap C) = (A \cup B) \cap (A \cup C)
A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
- Let’s take a closer look at the right-hand side of the first law
- Write: For an element x \in (A \cup B) \cap (A \cup C):
- x \in (A \cup B) and
- x \in (A \cup C)
- This means x is in A or (B and C), which is exactly what the left-hand side of the equation says.
- Let’s take a closer look at the left-hand side of the second law
- Write: For an element x \in A \cap (B \cup C):
- x \in A and
- x \in B or x \in C
- So x is in (A and B) or (A and C), which is exactly what the right-hand side of the equation says.
Skipping Limit Notation
This is on pages 53-54. We will introduce it when we need it.
Ordered Pairs
- In some cases, it is useful to have an ordered collection of elements.
- Write: For example, an ordered pair:
\langle x, y \rangle
\langle x, y \rangle = \langle z, w \rangle \text{ just in case } x = z \text{ and } y = w
- An ordered pair could represent points in a cartesian plane
- Draw: A plane with four points, with their coordinates labeled
- Write: A set containing those four points
- If you wanted to represent points in 3D space, you could use ordered triples: \langle x, y, z \rangle
- More generally, ordered n-tuples refers to a sequence of n elements.
Cross Product
- The last operation we will discuss today is called the Cartesian product or cross product.
- Write: Definition: For sets A, B , the Cartesian product or cross product A \times B is the set of all ordered pairs with the first component from A and the second component from B.
- A cross product operates on sets, and yields a set of ordered pairs.
- For example, if A = {1, 2, 3} and B = {-1, -2} then:
A \times B = {⟨1, −1⟩, ⟨1, −2⟩, ⟨2, −1⟩, ⟨2, −2⟩, ⟨3, −1⟩, ⟨3, −2⟩}
- Ask: Does A \times B = B \times A ?
- Answer: No, order matters.
- Ask: How to calculate \vert A \times B \vert ?
- Answer: \vert A \times B \vert = \vert A \vert \cdot \vert B \vert
- The cross product is also defined for infinite sets.
- For example, I could denote regions of the cartesian plane using a cross product.
- Draw:
- \mathbb{Z} \times \mathbb{Z} , all integer coordinates.
- \mathbb{N} \times \mathbb{N} , all integer coordinates in the northeast.
- \mathbb{Z} \times \mathbb{N} , all integer coordinates in the north.
- \mathbb{R} \times \mathbb{R} , all points in the plane.