Set Theory
We can define sets in 3 ways.
-
Listing elements.
-
Set Builder notation (set comprehension).
-
A list with implied pattern.
Common Sets
Description | Notation |
---|---|
Integers | |
Positive Integers | |
Non-Negative Integers | |
Rationals | |
Real Numbers | |
Set of Numbers. 1 through | |
Empty Set (no elements) |
note
0 is not positive.
Membership
How to check whether an element is in a set ?
- Checking whether in the list, if is given explicitly.
- Checking whether satisfies the conditions, if is given in Set Builder Notation.
- Checking whether satisfies the implied condition, for sets given like
note
Membership Examples:
- because 12 is an integer & 12 divides 60.
- the implied condition is "odd numbers".
danger
implied conditions are bad!
Equality of Sets
Two sets are considered to be equal if they contain the same elements.
e.g. , when:
- Every element is in . aka. Every element of is also in .
- Every element is in . aka. Every element of is also in .
Another equivalent definition using subset:
note
Are these the same?
- is the same set as (order doesn't matter).
- is the same set as (don't count multiples).
- is the same as .
Size of Sets
The size of a set is denoted as which is the number of distinct elements in the set.