5.1 Basic Definition
š Definition: Set
Informal Definition: A set is a collection of items
Sets are fundamental mathematical objects that group related items together.
Examples of Sets
- Days of week: {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}
- Factors of 24: {1, 2, 3, 4, 6, 8, 12, 24}
- Prime numbers below 15: {2, 3, 5, 7, 11, 13}
5.2 Standard Number Sets
Number Set Hierarchy
ā: {0, 1, 2, 3, ...}
ā¤: {..., -2, -1, 0, 1, 2, ...}
ā: {p/q | p, q ā ā¤, q ā 0}
ā: All rationals and irrationals
ā ļø Course Convention
Important: In this course, ā includes 0
ā = {0, 1, 2, 3, 4, ...}
Some textbooks exclude 0 from natural numbers, but we include it.
5.3 Subset Notation
š Definition: Subset
A ā B means "A is a subset of B"
Every element of A is also in B
Subset Examples
- ā ā ⤠(all natural numbers are integers)
- ⤠ā ā (all integers are rational)
- ā ā ā (all rationals are real)
- Primes ā ā (all primes are natural numbers)
Venn Diagram Representation
ā (Real Numbers)
āāāāāāāāāāāāāāāāāāāāāāā
ā ā (Rationals) ā
ā āāāāāāāāāāāāāāāā ā
ā ā ⤠(Integers)ā ā
ā ā āāāāāāāāāā ā ā
ā ā āā(Naturals)ā ā
ā ā āāāāāāāāāā ā ā
ā āāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāā
5.4 Set Comprehension (Set Builder Notation)
š General Form
{x | x ā S, P(x)}
Read as: "the set of all x such that x belongs to S and x satisfies property P"
Components:
- Generator: The underlying set (S)
- Condition/Filter: Property P(x) that elements must satisfy
šļø Building Sets with Comprehension
Example 1: Even Natural Numbers
{n | n ā ā, n mod 2 = 0}
Or equivalently: {n | n ā ā, n is even}
Result: {0, 2, 4, 6, 8, 10, ...}
Example 2: Integers Between -6 and 6
{z | z ā ā¤, -6 ⤠z ⤠6}
Result: {-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6}
Example 3: First 500 Natural Numbers
X = {n | n ā ā, n < 500}
Result: {0, 1, 2, ..., 499}
Example 4: Cubes of First 500 Natural Numbers
{n³ | n ā X} where X is defined above
Result: {0³, 1³, 2³, ..., 499³} = {0, 1, 8, 27, 64, ...}
š” Flexibility in Notation
- Can write conditions in various equivalent ways
- Can use words or mathematical symbols
- Precision matters, but readability is important
5.5 Intervals (for Real Numbers)
Types of Intervals
Closed Interval [a, b]:
- Includes endpoints
- [0, 1] = {r | r ā ā, 0 ⤠r ⤠1}
- Used for probabilities
Open Interval (a, b):
- Excludes endpoints
- (0, 1) = {r | r ā ā, 0 < r < 1}
Half-Open Intervals:
- [a, b) = includes a, excludes b
- (a, b] = excludes a, includes b
Visual Representation (Number Line)
Filled dot (ā) means included
Open dot (ā) means excluded
[2, 5]: āāāāāāāāāā (includes both 2 and 5)
(2, 5): āāāāāāāāāā (excludes both 2 and 5)
[2, 5): āāāāāāāāāā (includes 2, excludes 5)
(2, 5]: āāāāāāāāāā (excludes 2, includes 5)
5.6 Cardinality
š Definition: Cardinality
The cardinality of a set is the number of elements in it
Notation: |A| represents the cardinality of set A
For Finite Sets
Simply count the elements:
- |{1, 2, 3, 4, 5}| = 5
- |{a, b, c}| = 3
- |{factors of 24}| = |{1, 2, 3, 4, 6, 8, 12, 24}| = 8
For Infinite Sets
Use bijections (covered in later topics)
This is how we compare the "sizes" of infinite sets like ā, ā¤, ā, and ā
š§® Practice Problems
Problem 1: Set Builder Notation
Write the following sets using set comprehension notation:
- All odd natural numbers less than 20
- All perfect squares between 1 and 100
- All negative integers greater than -10
Solutions:
- {n | n ā ā, n < 20, n is odd} = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}
- {n² | n ā ā, 1 ⤠n² ⤠100} = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100}
- {z | z ā ā¤, -10 < z < 0} = {-9, -8, -7, -6, -5, -4, -3, -2, -1}
Problem 2: Subset Relations
Determine if the following statements are true or false:
- ā ā ā
- {2, 4, 6} ā {even natural numbers}
- {-1, 0, 1} ā ā
Solutions:
- True - All natural numbers are real numbers
- True - 2, 4, 6 are all even natural numbers
- False - -1 is not a natural number (ā = {0, 1, 2, 3, ...})
Problem 3: Intervals
Express the following intervals using set comprehension:
- The closed interval [-3, 7]
- The half-open interval (0, 1]
- All real numbers greater than 5
Solutions:
- {r | r ā ā, -3 ⤠r ⤠7}
- {r | r ā ā, 0 < r ⤠1}
- {r | r ā ā, r > 5} or using interval notation: (5, ā)
Problem 4: Cardinality
Find the cardinality of the following sets:
- A = {n | n ā ā, n² < 50}
- B = {factors of 36}
- C = {prime numbers less than 30}
Solutions:
- |A| = 8
A = {0, 1, 2, 3, 4, 5, 6, 7} since 7² = 49 < 50 but 8² = 64 > 50
- |B| = 9
B = {1, 2, 3, 4, 6, 9, 12, 18, 36}
- |C| = 10
C = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29}