Lesson 2: Sets

Let us begin at the beginning.

The most fundamental idea in all of mathematics—that which gets the whole ball rolling—is the notion of an element.  What is an element?  It is simply a thing.  Any thing.  An apple is an element, a number is an element, an idea is an element, this website is an element.  You’re an element, I’m an element, “humanity” is an element.  Hopefully you’re starting to get the picture.

Why do we want to consider elements?  Because they form the second most fundamental idea in all of mathematics.  Namely, a collection of elements is a set.  A set is just some elements.  Thus, if I have an apple, a water bottle, an idea, and the number 3, I can take them all together and form the set whose elements are “an apple, a water bottle, an idea, and the number 3”.  We can consider the set of all living people in the world, or the set of all dead American presidents, or the set of all deodorant sticks.

You might now be wondering why we’re talking about sets and elements—what do deodorant sticks and apples have to do with math?  Your curiosity would be warranted, but it’s unjustified.  Remember, we’re building mathematics right now** and we therefore can’t ask whether or not something “has to do with mathematics”.  We’re creating math as we speak!  So far all we know is that mathematics is the study of sets and elements, and therefore it just so happens that apples and deodorant sticks and dead presidents all have to do with math.  Of course, we can form sets of numbers and get a little closer to what you’re used to thinking math is, but we must remember that apples and ideas form just as good of sets as do numbers.  We’ll soon see that even within these very intuitive definitions of sets and elements there is very subtle logic lurking about!

In order to make progress, we need to be a little more precise and we need to establish some notation.  Notation is nothing to be scared of, and for a discussion of why we shouldn’t be scared of notation, have a look at this brief note on notation.

We all are comfortable with what an element is, and therefore it isn’t necessary to make a very rigorous definition of the term (though there is some subtlety here, and lots of smart people are working on it).  Our intuitive picture of an element as being simply a thing is fine.  We then define sets in terms of these elements.  Namely, we have the following definition:

Definition 2.1  set is a collection of distinct elements.  // (this will denote the end of a definition or example)

I am sweeping a whole lot of subtlety under the rug with this definition, and we’ll see what kind of trouble it gets us into later. For now, though, we continue on with it because it is the simplest and most intuitive definition of a set.  Note that if I have a set whose elements are “the computer that I’m typing this on, the water bottle on my desk right now, and the sun”, and you have a set whose elements are “the computer that you’re reading this is on, the water bottle on your desk, and the sun”, we want to be able to consider these two sets as different.  This is because presumably I’m typing this and you’re reading this on different computers, and the water bottle on my desk is a different water bottle than the one on your desk (our suns will likely be the same, however).  Moreover, we want to consider sets as equivalent only when they are composed of the exact same elements as each other.  Note that even if your computer is the exact same model as mine, our sets are different because they are different actual computers.  Also note that our sets would be equal only if every single element in both sets were the same.  If one element is different, then the entire sets are considered different.

There are more subtleties that we need to clear up, but before we do this let us set up some notation.  If we’re dealing with a set, we can label the set however we like.  Thus I can say, “let A be the set of all basketballs”, which would mean that every time I write the letter A, I am just using a shorthand notation—an abbreviation—for the abstract idea of “the set of all basketballs”.  Accordingly, if I were holding a basketball in my hands right now, I could truthfully say that it is an element of A, which is short for “it is an element of the set of all basketballs”.

When writing down mathematics, we always want to use a friendly notation, and the following bit of notation is extremely useful.  When labeling the elements of a set, we put the elements inside brackets such as these {}.  Thus, A=\{\mathrm{all\ basketballs}\} is shorthand notation for the phrase “A is the set of all basketballs”.  There’s nothing fancy going on here, it’s just notation.  Suppose I decided to call the set of all basketballs BALL instead of A.  Then I would have the abbreviation \textbf{BALL}=\{\mathrm{all\ basketballs}\}.  I could have called this set DoNkEy if I wanted to, but that wouldn’t be very helpful.  Another common set that we’ll see in the future is the set of all positive whole numbers, namely 1, 2, 3, 4, and so on, forever.  I will often denote this set either by {positive whole numbers} or by {1, 2, 3, …} where the “…” is to remind us that this set “goes on forever”.  If I wanted to call the set of positive whole numbers C, then I would write “C={positive whole numbers}” or “C={1, 2, 3, …}”, and they would both mean the same thing.  Remember, what we write on the page is just a bookmark for an abstract idea in our head, so as long as we remember what the bookmark stands for, we’ll be alright.  By my above definition of C, we have that 17 is in C (i.e., 17 is an element of C), but -5 is not, nor is this water bottle (because neither of them are positive whole numbers).

Using this notation, we can clarify two more subtle issues before moving on to lesson 3.  Let us consider the following two sets, calling one of them A and one of them B:  A=\{1, 5, 2, 6\} and B=\{1, 2, 6, 5\}.  Are these two sets the same?  I.e., does A=B?  The answer is yes, since they both have the exact same elements.  The point is that it doesn’t matter what order in which I write the elements, because the set has no “structure”.  In other words, when I’m writing these sets down with the above notation, I’m just listing the elements that are in the sets.  Obviously, whether or not an element is in a set is independent of the order in which I write them.  Lastly, let us consider the following two sets (again calling them A and B):  A=\{1, 1, 2, 2, 7\} and B=\{1, 7, 2\}.  Are these sets the same?  YES.  Why?  Well, we already know that order doesn’t matter, but now we also recall that in the definition of a set, the elements need to be distinct.  Since 1 is not distinct from 1, and 2 is not distinct from 2, the set \{1, 1, 2, 2, 7\} is really the same as \{1, 2, 7\}, and therefore A=B!

This might all seem rather trivial or obvious to you now, but we’ll soon be seeing that these issues are in fact highly non-trivial.  In fact, in a couple of lessons we’ll derive a real, full-fledged, inescapable paradox within this sort of set theory!   For now, this might give you a new way of looking at mundane objects around the house or office or classroom.  Try out some of these exercises whenever you’re bored.

**To see how and/or why we’re building math, check out the posts “What is Mathematics” and “What is a Mathematical Structure?”.


1)  Try to define some crazy sets, and try to determine if two sets are the same or not.  For example, can we define the set of all ideas?  What about the set of all thoughts?  What makes two different thoughts distinct? (Because remember, elements in a set need to be distinct!)  Is the set of all ideas equal to the set of all thoughts?  It depends on how you define them!  Don’t get too worked up about this stuff yet though—I’m just trying to show you that “mathematical thought” is indeed much broader than you could have ever imagined!

2)  Can you think of a set that contains itself as an element?  (If you can’t, don’t worry, this one is tricky and it’s something we’ll be addressing more in a little while).

Solutions to Exercises

Next Lesson

Previous Lesson

16 Responses to Lesson 2: Sets

  1. suevanhattum says:

    I think the lines I’ve copied below are wrong. The word distinct allows us to say {1,1,2}={1,2}, which you addressed later.

    The reason why we needed to throw the word “distinct” in there is because we want to consider two sets equivalent when all of their elements are the same. Thus, if I have a set whose elements are “the computer that I’m typing this on, the water bottle on my desk right now, and the sun”, and you have a set whose elements are “the computer that you’re reading this is on, the water bottle on your desk, and the sun”, we want to be able to consider these two sets as different because presumably I’m typing this and you’re reading this on different computers, and the water bottle on my desk is a different water bottle than the one on your desk (our suns will likely be the same, however).

  2. The word distinct is telling us we don’t care if an element is repeated in the list given. I don’t believe it has anything to do with the issue you raised of whether your computer and mine are the same or not.

  3. A set is a well defined collection of elements.

  4. YatharthROCK says:


    > Note that even if your computer is the exact same model as mine, our sets are different because they are different actual computers.

    Although I agree with another commenter that this wasn’t immediately relevant to the discussion, and slightly confusing; it was interesting to think of analogies for this. In computer languages, this is quite well-defined: for example, Python would use `foo == bar` for testing equality by value and `foo is bar` for testing identity (although Java manages to mess this up too with its String comparisons).

    In natural languages I couldn’t find such a hard and fast line, though the difference exists there too: when 2 people say that they have the same mom, they’re really referring to the same person (even if the moms were twins); but when they’d say that they had the same car, the model would be what matters. I remember having a discussion about it before, but I don’t remember if it was a StackExchange question or an IRC conversation


    > If I wanted to call the set of positive whole numbers C, then I would write “C={positive whole numbers}” or “C={1, 2, 3, …}”, and they would both mean the same thing.

    OK, despite not much notation having been introduced yet, I am already having serious gripes with it. To borrow from the world of CS again, what ‘type’ would the noun phrase ‘positive whole numbers’ be of? It is clearly referring to a set, right? But then C_1 really becomes a set containing only the set of all positive whole numbers, which is NOT equivalent to simply the set of all positive whole numbers.

    TBH, the first time I just browsed till Lesson 5 I didn’t notice this; but now that I am actually reading this seriously, I think it could trip a lot of other people of. I think you should edit it to simply “C = positive whole numbers”.

    Question 1

    Micheal from Vsauce did a great job of taking the question of how many ‘things’ (an vague he tried to define term, that did include thoughts) there were (or could be) in the (observable) universe: .

    I myself had basically ended defining a thought as simply an occurence of an idea (Google too defines it as “an idea or opinion produced by thinking or occurring suddenly in the mind”). Whether they’re the same or not brings us back to the equality topic.

    Also, if two sets are defined differently but end up being constituent of the same elements (i.e., are equal); they’re still not the ‘same’ sets, right? (This is getting meta!)

    Question 2

    I did get this one† (not going to leave a spoiler here!), and immediately went down the rabbit hole of how the set has to be infinite and whether that’s sort of like how there are an infinite amount of infinities between real numbers (are the two concepts related at all?).

    † Forgive me if I seem pretentious for declaring that here, but part of the reason (maybe the entire reason?) I love math so much is the burst of dopamine I get at those “Aha!” moments.


    Loving this already; thanks so much! I don’t know if you’re still active on this site; but if you are, would you consider moving to a different comment system? Discourse is great, but Disqus is fine too.

    ~~~ Yatharth

  5. Karthik says:

    The statement “Remember, we’re building mathematics right now” seems to assume that the reader has already finished reading the essays “What is Mathematics” and “What is a Mathematical Structure”. Most readers would have. However, perhaps links and references to those can be provided here for those who haven’t.

  6. Horia Georgescu says:

    A late comer to your site, exploring how I can use it with my daughter in gr 10.
    And to encourage the author, and ease my pursuit, I purchased the book too!
    Regarding the book: it reads fine on my PC, but when I tried to switch to reading it in the cloud, it didn’t work. I think it might be an oversight perhaps, not enabling it for kindle cloud? Would appreciate if you can have a look at it and make it available there as well. I tend to switch often to Linux and the only way to read it from Linux, would be through the browser, in kindle cloud.
    Thank you for sharing your work!

    • Hi Horia, first of all I’m so sorry for my comically late reply! And second of all I’m so glad to hear that you’re enjoying this stuff and that you’re working it in with your daughter. How is that going? I’m very curious to know how someone in grade 10 is liking/understanding all this, as that was the age range that motivated me to write all this (with Volume 2 currently in the works) in the first place. As for readability, I will definitely look into it. The problem is that I’m rather constrained by Createspace, which is the publishing tool I used to publish the book, as it only allows me to publish on a very limited range of kindle platforms. I’ll look into it though and if it doesn’t work out I’m happy to send you a hard copy “on the house,” so to speak 🙂 just let me know!

      • hgeorgescu says:

        Hi Michael, thank you, has been a while since I wrote my question! Your site is excellent, and I truly appreciate your interest and desire to help. Unfortunately we didn’t make it too far, I wasn’t able to fire up “the spark” which would have helped overcome the schedule challenges, other priorities and interests, and so on. Grade 10 and the change of schools, new teachers and colleagues, all reduced my ability to keep my place in her schedule. As this school year is about to end, I’ll try again to resume where we stopped. Probably a traditional book will help in that it is more portable… we’ll see. It is not the medium which kept us from continuing. I can go back to Amazon and buy also the paper version if that were the case. Thanks again for creating this site and sharing it with the internet community!
        Horia G, Toronto

        • Hi Horia, thanks so much for your detailed update! I totally understand that sometimes “life just gets in the way,” so to speak, and I really appreciate your kind words. Please do keep in touch and keep me updated whenever you see fit and let me know if I can help at all! Also don’t be shy about letting me know if you see changes I can make to help “speak to” grade 10ers. Cheers!

  7. Nicola says:

    There is a point I did not fully understand. When you write that two sets are equal ONLY IF all single elements in both sets are the same, it seems that there is a logical implication of the form: if two sets are equal then all single elements in both sets are the same. However, shouldn’t we have a biconditional statement here?
    Thank you very much for your great work!

    • Hi Nicola, first of all sorry for my comically late reply! I’ll be better in the future 🙂 and second, yes, you’re correct, this really is an IF AND ONLY IF statement. However, this is our definition of what set equality means, and for various reasons the mathematical community agrees to only use one way statements for definitions. For example, if I define a coffee cup as being “a cup on my desk,” then I would write the definition as “a coffee cup is a cup on my desk,” and would not need to write “a cup is a coffee cup if and only if it is on my desk.” However, if I define a coffee cup as something else, maybe as a cup in my room, and then later PROVE that a cup is in my room if and only if it is on my desk, then I have to say “a cup is a coffee cup if and only if it is on my desk.”

      Here, we’re defining set equality to be when two sets have identical elements, and thus we only need the one-way statement, but it is indeed the case that this one-way statement encodes the “if and only if” nature that we know we want. Does that make sense? Great question! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s