UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 2.1 Free with a free account
Sets and Set Notation
Discrete Mathematics · Chapter 2: Set Theory and FunctionsSection 2.1 · lesson 9 of 878 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Discrete Mathematics.
Lesson complete
Earn the 4 college credits for Discrete Mathematics
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: The Universal Set and Subsets →← Tautologies and ContradictionsNext lesson: The Universal Set and Subsets →
In this lesson
Membership - the single question set theory is built on.
- Define a set, its elements, and membership
- Write sets in roster and set-builder notation
- Name the 4 standard number sets and how they nest
- Recognize the empty set, singletons, and set equality
Transcript
Everything said in the video, section by section (1,240 words). Read along, or search it.
Set Theory and Functions
Sets and Set Notation
Chapter two turns the tools of formal logic toward collections of objects. It starts with the most basic notion of all, the set. This section defines what a set is, how to write one down, and how to tell whether something belongs to it. We'll also meet the four standard number sets, the empty set, and what it means for two sets to be equal.
The Opening Problem
Is This Username Banned?
A content-moderation system for a social platform keeps a list of permanently banned usernames. Root, admin, test, and guest. Whenever a new account is created, the system asks one question. Is this proposed username a member of the banned collection, or not? That single question, membership, is the entire foundation on which set theory is built.
Definition
Sets, Elements, and Membership
A set is an unordered collection of distinct objects, called its elements, or members. A set is fully determined by which objects it contains. Not by the order they're listed in, and not by how many times an object is mentioned. If x is an element of a set S, we write x is in S, using the element symbol. If it isn't, we write x is not in S. Against the banned set B, admin is in B is true. alice one two three is in B is false. There's no middle ground. No username is halfway a member. Two features are easy to overlook. First, a set has no order. Root and admin, and admin and root, are the same set. Second, a set has no duplicates. Listing root twice doesn't create two copies. That set still has two usernames, not three.
2 Notations
Roster and Set-Builder
There are two ways to write a set down. Roster notation lists the elements explicitly inside braces, separated by commas. It's direct and unambiguous for small, finite sets, like the banned usernames. Set-builder notation states a property the elements must satisfy. It's read as the set of all x such that P of x is true. The vertical bar reads such that. Some sources use a colon instead. This course uses the bar. Here's one set written both ways. In roster form, zero, two, four, six, eight, ten. In set-builder form, the set of natural numbers x such that x is even and x is at most ten.
Checking the Example
Same Set, 2 Descriptions
It's worth checking that these really are the same set, rather than taking it on faith. The set-builder condition admits zero, two, four, six, eight, and ten. Each is a natural number, each is even, and each is at most ten. It excludes every other natural number. One, three, five, seven, and nine fail the even requirement. Twelve, fourteen, and beyond fail the at-most-ten requirement. So the two descriptions admit exactly the same six values. The notation is a choice of convenience, not a property of the set. And set-builder notation is the only practical option once a set is infinite. All the even natural numbers, with no upper bound, can't be written as a roster. No finite list extended with dots is precise. But set-builder notation states the defining property exactly.
Standard Number Sets
4 Sets Worth a Symbol
Four number sets recur so often that they get standard symbols, written in a double-struck, or blackboard bold, typeface. The natural numbers are the counting numbers together with zero. Zero, one, two, three, and so on. Some sources leave zero out. This course includes it. The integers are the naturals together with their negatives. The rational numbers are every number expressible as a ratio of two integers, a over b, where b isn't zero. And the real numbers are every number on the number line. That includes every rational number, and every irrational one, such as the square root of two, and pi.
Where They Show Up
Declaring What Kind of Number
These sets show up wherever a system has to declare what kind of number a value may be. An array index must be a natural number. There's no element at index minus three, or index two and a half. A ledger balance is typically an integer number of cents. Debits need negative values, but fractional cents aren't meaningful. A currency field stored as a fixed-precision decimal is really a rational number, a ratio of integers. And a temperature or voltage reading is naturally a real number, since it varies continuously. Notice that every natural number is also an integer. Every integer is also rational, because n is n over one. And every rational number is also real.
Figure 2.1.1
The Number Sets, Nested
This figure shows the four number sets, nested inside one another. Every natural number sits inside the integers, every integer inside the rationals, and every rational inside the reals. Minus five and one hundred sit in the integer band, because they aren't natural numbers. Three quarters and minus two thirds sit in the rational band, because they aren't integers. And the square root of two and pi sit in the outermost band, because they can't be written as a ratio of two integers at all. The formal name for this kind of relationship, and its compact notation, come in section two point two.
Table 2.1.1
All Infinite - Only 2 Listable
This table summarizes the four sets. All four are infinite. But only the naturals and the integers can even be partially written in roster form, using an ellipsis. The rationals and the reals have no useful roster form at all. For them, set-builder notation isn't merely convenient. It's necessary.
Empty and Singleton Sets
Zero Members Is Still a Set
The empty set, written with a slashed circle or a pair of empty braces, is the set containing no elements at all. It's still a set, a collection with zero members. It isn't the absence of a set. A singleton set contains exactly one element, such as the set containing five. The singleton and the number five are different kinds of object. One is a set with one member. The other is that member. A moderation queue with no pending reports is modeled as the empty set, not as the absence of a queue. The system still has a well-defined collection to check against. It's simply empty. And a queue holding exactly one report is a singleton, distinct from the report itself, in the same way the set containing five is distinct from five.
Set Equality
Exactly the Same Elements
Two sets A and B are equal exactly when they contain precisely the same elements. For every object x, x is in A if and only if x is in B. Order and repeated listing play no role, since neither changes which elements a set contains. Compare one, two, three with three, two, one, two. Every element of the first appears in the second, and every element listed in the second is one, two, or three. So they're equal. The repeated two doesn't add a fourth element. Now compare one, two, three with one, two, three, four. Four is in the second set, but not the first. The test fails in one direction, so the sets aren't equal.
Takeaways
A Set Is Its Elements
To summarize. A set is determined only by which elements it contains. Order and repetition are irrelevant. Roster notation works for small, finite sets. Set-builder notation is required once a set is infinite. The natural numbers, integers, rationals, and reals nest inside one another. The empty set is a set with zero elements, and a singleton is a different kind of object from its one element. Two sets are equal exactly when membership matches in both directions. Here's something to think about. Is the empty set the same object as the set containing the empty set? Using the definition of equality, explain why not. Ask how many elements each one contains.
About Discrete Mathematics at UPI Study
Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take Discrete Mathematics with UPI Study
Where the credit goes
Universities that work with NCCRS
Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Sets and Set Notation
What is a set in discrete math, and what does it mean to be an element of a set?
What is the difference between roster notation and set-builder notation?
What are the four standard number sets and how do they nest?
How do you tell whether two sets are equal, and is the empty set the same as the set containing the empty set?
About the Discrete Mathematics course
How many college credits is Discrete Mathematics?
How much does Discrete Mathematics cost and what is included?
Which universities accept UPI Study credits?
How long does Discrete Mathematics take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 4 credits in Discrete Mathematics.
87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
4 credits · NCCRSEnroll →