Numbers and Sets

Lecture 1

Div Bhagia

Today’s Topics & References

  • Course introduction
  • Numbers and sets (sections 2.2 and 2.3)

Real-Number System

  • Integers: \[...,-3,-2,-1,0,1,2,3,...\]

  • Fractions: \[\frac{1}{2}, \frac{3}{5}, -\frac{2}{3}\]

  • Rational numbers: ratio of integers

  • Are fractions rational numbers? What about integers?

Real-Number System

  • Rational numbers: ratio of integers

  • “terminating or repeating decimal”

  • \[\text{Example. } \frac{1}{3}=0.333, \frac{1}{4}=0.25\]

  • Irrational numbers: cannot be expressed as a ratio of two integers

  • “nonterminating or nonrepeating decimal”

  • \[\text{Example. } \sqrt{2}=1.4142, \pi=3.1415\]

  • Real numbers (\(\mathbb{R}\)): rational and irrational

Sets

  • A set is a collection of distinct objects. \[A = \{brownies, icecream, pizza, ramen\}\]

  • \(pizza \in A\), \(\in\) stands for ‘is in’

  • What about sets \(B\) and \(C\)? \[B = \{x | x \text{ is a positive integer}\}\] \[C = \{x | 1<x<5\}\]

Set Relations

  • Equivalence (\(=\)) \[A = \{brownies, icecream, pizza, ramen\}\] \[B = \{pizza, ramen, icecream, brownies\}\] \[A = B\]

  • Subset (\(\subset\)) \[C = \{pizza, ramen\}\] \(C \neq A\) but \(C \subset A\). Note: \(A \supset C\) is equivalent. Is \(A \subset B\)? Yes, but \(C\) is a proper subset of A.

Set Relations

  • Disjoint sets \[A = \{brownies, icecream, pizza, ramen\}\] \[D = \{salad, fruits\}\]

  • Neither but still related \[A = \{brownies, icecream, pizza, ramen\}\] \[E = \{salad, fruits, icecream\}\]

Set Relations

  • \(\emptyset\): empty or null set

  • What are all possible subsets of \[S = \{a,b,c\}\]

  • \(\emptyset, \{a\}, \{b\},\{c\}, \{a,b\}, \{b,c\}, \{a,c\}, \{a,b,c\}\) Always \(2^n\) subsets. Here \(n=3\), so 8 subsets.

Set Operations

  • Union: \(A \cup B\), elements in either \(A\) or \(B\)

  • Intersection: \(A \cap B\), elements in both \(A\) and \(B\)

Example: \[A = \{brownies, icecream, pizza, ramen\}\] \[B = \{salad, fruits, icecream\}\] \(A \cup B =\) \(A \cap B =\)

Set Operations

  • Union: \(A \cup B\), elements in either \(A\) or \(B\)

  • Intersection: \(A \cap B\), elements in both \(A\) and \(B\)

What about \[A = \{brownies, icecream, pizza, ramen\}\] \[B = \{salad, fruits\}\] \(A \cup B =\) \(A \cap B =\)

Set Operations

  • Complement of \(A\): \(\tilde{A}\), ‘not \(A\)

  • Universal set \(U\) (context specific) then: \[\tilde{A}= \{x | x \in U \text{ and } x \not\in A\}\] Example. \(U=\{1,e,f,2\}, A=\{1,2\}\), then \(\tilde{A}=\{e,f\}\).

Set Operations: Venn Diagrams

Shade the following regions:

\(A \cup B\)

Blank two-set Venn diagram: sets A and B overlapping inside universal set U

\(A \cap B\)

Blank two-set Venn diagram: sets A and B overlapping inside universal set U

\(\tilde{A}\)

Blank two-set Venn diagram: sets A and B overlapping inside universal set U

Laws of Set Operations

  • Commutative law \[A \cup B = B \cup A \quad \quad A \cap B = B \cap A\]

  • Distributive law \[A \cup (B \cap C) = (A \cup B) \cap (A \cup C)\] \[A \cap (B \cup C) = (A \cap B) \cup (A \cap C)\]

Distributive law

Verify by shading: \(A \cup (B \cap C) = (A \cup B) \cap (A \cup C)\)

\(A\)

Blank three-set Venn diagram for shading the region A: sets A, B, and C overlapping inside universal set U

\(B \cap C\)

Blank three-set Venn diagram for shading the region B intersect C: sets A, B, and C overlapping inside universal set U

Distributive law

Now the right-hand side, \((A \cup B) \cap (A \cup C)\):

\(A \cup B\)

Blank three-set Venn diagram for shading the region A union B: sets A, B, and C overlapping inside universal set U

\(A \cup C\)

Blank three-set Venn diagram for shading the region A union C: sets A, B, and C overlapping inside universal set U

Ordered Sets

  • We said order does not matter for sets

  • But we can have ordered sets where \[(a,b) \neq (b,a) \text{ unless } a=b\]

  • Ordered pairs, triples,…

Example. \((age, weight)\), \((22,120)\) different from \((120,22)\)

Cartesian Product

\[A = \{1,2\} \quad B = \{3,4\}\] Cartesian Product: set of all possible ordered pairs \[A \times B = \{ (1,3), (1,4), (2,3), (2,4) \}\]

Cartesian Plane

\[\mathbb{R}^2 = \{(x,y) | x \in \mathbb{R}, y \in \mathbb{R}\}\]

Can have \(\mathbb{R}^3, \mathbb{R}^4,...,\mathbb{R}^n\)