← mapSet Theory

Sets & Membership

⚗ Dr. Möbius, from the lab

Everything — and I mean every goddamn thing — in higher mathematics is built out of one object: the set. A bag. A collection. It has no order, no duplicates, and no opinions. The Federation of Boring Textbook Authors will waste three chapters sneaking up on this; I'm handing it to you in one sentence. Master the bag and you've got the foundation under the foundation. Fumble it and the rest of this stratum eats you alive.

THE BIG IDEA

A set is a collection determined entirely by its members, and the only question it ever answers is whether a given thing is in it or not.

A set is a bag, and that's almost the whole story

Forget every fancy thing you've heard. A set is a collection of objects, called its elements or members. That's it. The objects can be numbers, letters, other sets, wolves — the set doesn't care what they are, only which ones are inside. This is not a warm-up; this is the whole damn foundation.

A set has exactly three personality traits, and they're all about what it refuses to track:

  • No order. {1,2,3}\{1, 2, 3\} and {3,1,2}\{3, 1, 2\} are the same set. A bag doesn't know which rock you dropped in first.
  • No duplicates. {1,1,2}\{1, 1, 2\} is just {1,2}\{1, 2\}. Either a thing is in the bag or it isn't; "in twice" is meaningless.
  • No opinions. The only question a set will answer is: are you in me or not? That question has a symbol, and you'll write it ten thousand times before you die.

That symbol is \in. We write xAx \in A for "xx is an element of AA", and xAx \notin A for "xx is not". So 2{1,2,3}2 \in \{1, 2, 3\} is true and 5{1,2,3}5 \notin \{1, 2, 3\} is true. Membership is the only primitive. Everything else in set theory gets defined out of \in. Everything. The whole fucking edifice. Remember that the way you remember your own name.

Two ways to name a bag

You can describe a set by roster notation — just list the elements between braces:

A={2,4,6,8}.A = \{2, 4, 6, 8\}.

That's great until your set is infinite or huge. For that we use set-builder notation, which says "the set of all xx such that some condition holds":

A={xx is an even number and 2x8}.A = \{\, x \mid x \text{ is an even number and } 2 \le x \le 8 \,\}.

Read the bar \mid as "such that". The left side is the template (what shape the elements take); the right side is the filter (which ones survive). This is just the quantifier machinery from the Logic stratum wearing braces — xAx \in A literally means "the filter is true for xx".

Here's the standard cast of infinite sets you'll see forever — tattoo them on the inside of your skull:

  • N={0,1,2,3,}\mathbb{N} = \{0, 1, 2, 3, \dots\} — the natural numbers.
  • Z={,2,1,0,1,2,}\mathbb{Z} = \{\dots, -2, -1, 0, 1, 2, \dots\} — the integers.
  • Q\mathbb{Q} — the rationals, all fractions p/qp/q.
  • R\mathbb{R} — the reals, the whole continuous line.
  • \emptyset — the empty set, the bag with nothing in it. More on this bastard in a minute.

Subset: one bag fits inside another

Now the second relation, and it's the one that powers every proof in this stratum. We say AA is a subset of BB, written ABA \subseteq B, when every element of AA is also an element of BB. Stated precisely — and this is the definition, carve it into the goddamn lab wall:

ABmeansx(xA    xB).A \subseteq B \quad \text{means} \quad \forall x\,(x \in A \implies x \in B).

Stare at that. ABA \subseteq B is an implication wearing a subset costume. That means every subset proof is just an implication proof: assume xAx \in A, do some honest work, conclude xBx \in B. We will beat that single move to death in the proofs lesson, so internalize it now. If I have to remind you of this in office hours — and I don't have office hours because this is a particle accelerator — I will be deeply disappointed in both of us.

Drag the regions around and watch what \subseteq looks like — when AA's circle sits entirely inside BB's, every point of AA is a point of BB:

venn lab — two sets
ABU

The empty set is a subset of everything

Here's a fact that feels like a scam until you see why it's airtight: B\emptyset \subseteq B for every set BB. The empty set is a subset of literally everything, including itself. Every student I've ever shown this to says "that can't be right." Every one of them was wrong.

Why? Run the definition. B\emptyset \subseteq B means x(x    xB)\forall x\,(x \in \emptyset \implies x \in B). But there is no xx with xx \in \emptyset — the bag is empty. So the hypothesis xx \in \emptyset is never true, which means the implication is never tested, which means it never fails. An implication with a false hypothesis is vacuously true. The empty set passes the subset exam by never showing up to be questioned. That's not a trick; that's logic cashing a check it wrote in the quantifiers lesson.

A bag containing an empty bag is not empty

Now the classic head-on collision. Is {}\{\emptyset\} the same as \emptyset? No. Absolutely not. And if you nod along too fast you'll get burned for the rest of your mathematical life.

\emptyset is the empty bag — zero elements. {}\{\emptyset\} is a bag with one element inside it, and that element happens to be the empty bag. One is empty; the other contains something. So {}\emptyset \in \{\emptyset\} is true, and {}\{\emptyset\} has size one, not zero. Sets can contain sets. A set can contain other sets as elements, and this is exactly how mathematicians build numbers, pairs, functions, and the entire universe out of nothing but braces and the empty set.

The power set: every possible sub-bag

Last piece of equipment — and it's a hell of a piece. Given a set AA, its power set P(A)\mathcal{P}(A) is the set of all subsets of AA. Not the elements — the subsets. For A={a,b}A = \{a, b\}:

P(A)={, {a}, {b}, {a,b}}.\mathcal{P}(A) = \{\, \emptyset,\ \{a\},\ \{b\},\ \{a, b\} \,\}.

Four subsets. Notice \emptyset and AA itself always make the list — and if you forget either of them on an exam, the ghost of Cantor will personally haunt you. Now the gorgeous part: if AA has nn elements, P(A)\mathcal{P}(A) has 2n2^n elements. Here's the proof, and it's a thing of beauty. To build a subset of AA, walk down the elements one at a time and flip a switch for each: in or out. Two choices per element, nn elements, independent choices — so 222=2n2 \cdot 2 \cdots 2 = 2^n total subsets. Every subset is one setting of nn on/off switches. That 2n2^n is going to detonate again in the cardinality lesson, where it proves there are infinitely many sizes of infinity. File it away.

🔬 SPECIMENS (worked examples)

Worked example 1 — roster to set-builder and back (both directions, no excuses)

Write {3,6,9,12,15}\{3, 6, 9, 12, 15\} in set-builder notation. Then list {xZ2x<3}\{\, x \in \mathbb{Z} \mid -2 \le x < 3 \,\} in roster form.

The first set is the multiples of 33 from 33 to 1515. The template is "3k3k" and the filter pins down kk:

{3,6,9,12,15}={3kkZ, 1k5}.\{3, 6, 9, 12, 15\} = \{\, 3k \mid k \in \mathbb{Z},\ 1 \le k \le 5 \,\}.

For the second, the filter is "integers xx with 2x<3-2 \le x < 3". Note the strict << on the right: 33 is excluded. Walk the integers:

{xZ2x<3}={2,1,0,1,2}.\{\, x \in \mathbb{Z} \mid -2 \le x < 3 \,\} = \{-2, -1, 0, 1, 2\}.

That's it — five elements. The boundary signs (\le versus <<) are load-bearing; misread one and you grab the wrong elements.

Worked example 2 — sorting out ∈ versus ⊆

Let A={1,2,{3}}A = \{1, 2, \{3\}\}. Decide each: (a) 2A2 \in A, (b) {2}A\{2\} \in A, (c) {2}A\{2\} \subseteq A, (d) 3A3 \in A, (e) {3}A\{3\} \in A.

First, what are the elements of AA? Exactly three: the number 11, the number 22, and the set {3}\{3\}. Now grind through each claim against the definitions.

(a) 2A2 \in A: is 22 one of the listed elements? Yes. True.

(b) {2}A\{2\} \in A: is the set {2}\{2\} one of the elements of AA? The elements are 1,2,{3}1, 2, \{3\} — none of them is {2}\{2\}. False.

(c) {2}A\{2\} \subseteq A: does every element of {2}\{2\} live in AA? The only element is 22, and 2A2 \in A. True. (Subset, not member — different question, different answer.)

(d) 3A3 \in A: is the bare number 33 an element of AA? No — the element is {3}\{3\}, a bag containing 33, not 33 itself. False.

(e) {3}A\{3\} \in A: is the set {3}\{3\} one of the elements? Yes, it's literally listed. True.

(d) versus (e) is the whole lesson: 33 is trapped inside a bag that's an element of AA, so 33 itself is not an element of AA.

Worked example 3 — the power set, switch by switch (miss one, redo it)

List every element of P({a,b,c})\mathcal{P}(\{a, b, c\}) and confirm the count.

We need all subsets of a 33-element set, so the count must be 23=82^3 = 8. Organize by size so we miss nothing:

  • Size 00: \emptyset.
  • Size 11: {a}, {b}, {c}\{a\},\ \{b\},\ \{c\}.
  • Size 22: {a,b}, {a,c}, {b,c}\{a,b\},\ \{a,c\},\ \{b,c\}.
  • Size 33: {a,b,c}\{a,b,c\}.

So

P({a,b,c})={, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}}.\mathcal{P}(\{a,b,c\}) = \{\, \emptyset,\ \{a\},\ \{b\},\ \{c\},\ \{a,b\},\ \{a,c\},\ \{b,c\},\ \{a,b,c\} \,\}.

Count them: 1+3+3+1=8=231 + 3 + 3 + 1 = 8 = 2^3. The on/off-switch argument predicted this: three elements, three independent in/out switches, 232^3 settings. The two everyone forgets are \emptyset (all switches off) and the whole set (all on) — both are genuine subsets.

☠ KNOWN HAZARDS

  • Thinking order or repetition matters. {a,b}={b,a}\{a, b\} = \{b, a\} and {a,a}={a}\{a, a\} = \{a\}. If you ever "count" {1,1,2}\{1,1,2\} as three elements, the bag has already beaten you. Don't let the bag win.

  • Confusing \in with \subseteq. 2{1,2,3}2 \in \{1,2,3\} (element); {2}{1,2,3}\{2\} \subseteq \{1,2,3\} (subset). 2{1,2,3}2 \subseteq \{1,2,3\} is nonsense and {2}{1,2,3}\{2\} \in \{1,2,3\} is false. The bare element belongs; the braced bag is contained. Mixing these up is the single most common way to write something that looks like math but is just bullshit.

  • Believing {}=\{\emptyset\} = \emptyset. One has size 11, the other size 00. {}\emptyset \in \{\emptyset\} but \emptyset \notin \emptyset. This trips up everyone exactly once — make this your once.

  • Forgetting \emptyset and AA in the power set. P(A)\mathcal{P}(A) always includes the empty set and the whole set. Leave them out and your count of 2n2^n collapses — and you've demonstrated that you didn't actually read this lesson.

TL;DR

  • A set is determined entirely by its members: no order, no duplicates. {1,2,3}={3,1,2}\{1,2,3\} = \{3,1,2\} and {1,1,2}={1,2}\{1,1,2\} = \{1,2\}.

  • Membership \in is the only primitive — everything else is defined from it. Roster notation lists; set-builder {xP(x)}\{x \mid P(x)\} filters.

  • ABA \subseteq B means x(xA    xB)\forall x\,(x \in A \implies x \in B) — subset proofs are implication proofs.

  • \emptyset is a subset of every set (vacuously true), but {}\{\emptyset\} \ne \emptyset: a bag holding an empty bag has one element.

  • The power set P(A)\mathcal{P}(A) is all subsets of AA, and P(A)=2A|\mathcal{P}(A)| = 2^{|A|} by the on/off-switch argument.

unlocks