Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Sets, plainly

~20 min

Everything in algebra eventually comes down to talking about groups of numbers: "all the numbers that work in this equation," "every number bigger than 3," "the whole numbers." Before we can talk about groups precisely, we need one small piece of vocabulary: the set. This section is the whole idea, no more and no less. Once you have it, symbols like \in and \subset (which show up constantly from here on) are just abbreviations for sentences you already understand.

A set is just a named bag of things, and \in just means "is in the bag."

Picture an actual bag labeled A. You've physically dropped the numbers 1, 2, 3, and 4 into it. Ask "is 3 in the bag?" Yes, so 3 \in A. Ask "is 7 in the bag?" No, so 7 \notin A. That's the entire concept of set membership: a yes/no question about whether something is in the bag.

The empty set is just an empty bag. It sounds like a trick. Why would you have a bag with nothing in it? But it comes up constantly in math, as the honest answer to "which numbers make this equation true?" when the answer is none of them. An empty bag is still a bag. A locked door with nobody behind it is still a door.

One detail is worth nailing down early, because it trips people up the moment sets get combined. A set's "distinct objects" rule means a set never bothers counting the same item twice. \{1, 1, 2\} and \{1, 2\} are the same set. The bag either has a 1 in it or it doesn't. It doesn't track how many times 1 got dropped in. Order doesn't matter either. \{1, 2, 3\} and \{3, 1, 2\} are the same bag, just listed in a different order. A set only cares what's in the bag, never how many times or in what order it got mentioned.

A set is a well-defined collection of distinct objects, called its elements or members. Sets are typically named with a capital letter and written by listing their elements inside curly braces: A = \{1, 2, 3, 4\}

To say an object belongs to a set, we write \in (read "is an element of" or simply "is in"); to say it doesn't, \notin. For the set A above: 3 \in A \qquad \text{but} \qquad 7 \notin A

The empty set, written \varnothing or \{\}, is the set containing no elements at all. It is still a legitimate set. The group with nothing in it is still a group, the same way an empty box is still a box.

Check your understanding (counts toward your progress)

Let A = \{2, 5, 9\}. Which is TRUE?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

\{5\} (a bag containing 5) is not itself one of A's loose elements — A's elements are the bare numbers 2, 5, and 9.

This has it backwards — 5 (the bare number) is the element; \{5\} (the tiny bag) is not.

5 very much does relate to A — it's a member. The relationship is just \in, not \subset.

Why

5 is a bare number that appears among A's elements, so 5 \in A. \{5\} is a set containing one element — it's a subset of A (\{5\} \subset A), not itself one of A's elements.

Check whether each object in question is a bare number or a set containing one number — \in and \subset apply to different kinds of objects.

For A=\{7,39,54,61,89\}, which statement about 61 is true?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

61 is one of A's listed elements, so 61\in A.

Practice: Sets, membership, and duplicates (5 problems · doesn’t affect your progress)

Let A = \{2, 5, 9\}. Which statement is true?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

5 is listed inside the braces of A — it IS a member, so \in (not \notin) is the correct symbol.

A is a whole set of three numbers, not a single number — a set can never equal one of its own elements.

\{5\} is a set containing one element, 5. A has three elements. They're different sets, even though 5 happens to be in both.

Why

5 \in A reads "5 is an element of A," and 5 is one of the three numbers listed inside A's braces, so the statement is true. \in always relates an element to a set — never a set to a set.

5 \in A

Which of these best describes the empty set \varnothing?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

\varnothing shows up constantly and legitimately — for instance, as the solution set of an equation with no solutions. It's not an error state.

That's a common mix-up: \{0\} (a set holding the number zero) has ONE element. \varnothing has ZERO elements. They're different sets.

It's ordinary and shows up right away — e.g. "the set of real numbers satisfying x^2 = -1" is \varnothing.

Why

The empty set is a completely legitimate set with zero elements — an empty bag is still a bag. It's not the same as \{0\}, which contains one element (the number 0).

A perfectly valid set that happens to contain zero elements

Are \{1, 2, 3\} and \{3, 1, 2\} the same set?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

A set has no built-in order — listing the same three elements in a different sequence describes the identical bag.

Which element happens to be written first has no bearing on which elements are actually in the bag.

This is always true for sets, regardless of context — order simply isn't part of what a set tracks.

Why

A set only records which objects belong to it, never the order they're written in. \{1,2,3\} and \{3,1,2\} list the identical three elements, so they're the same set.

Yes — a set only cares which elements are in it, not the order they're listed in

Let A=\{1, \{2,3\}, 4\}. How many elements does A have?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

\{2,3\} counts as a single element (a set nested inside A), alongside 1 and 4 — three elements total.

Correct answer

Also accepted:

Why

3

True or false: a set can contain another set as one of its elements.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Sets are collections of "objects," and a set is itself a perfectly good object — it can be an element of another set.

There's no loop here — \{2,3\} is simply one distinct object being counted as one of the two elements of the outer set.

This isn't special to the empty set — any set can appear as an element of another set.

Why

Sets can contain any kind of well-defined object, including other sets. \{1, \{2,3\}\} has exactly two elements: the number 1, and the set \{2,3\} (counted as a single object) — not four elements.

Sets can hold any kind of object as an element — check whether a set itself can count as one such object.

Count the outer set's elements one at a time: is \{2,3\} counted as one item, or does it get broken apart into two?

True — e.g. \{1, \{2, 3\}\} is a valid set with two elements: the number 1 and the set \{2,3\}

One set living inside another

A subset just means one bag is entirely tucked inside another, bigger bag.

If bag A has {1, 2, 3, 4, 5} in it, and bag B has just {2, 4}, then everything in B's little bag is also sitting somewhere in A's big bag. So B is a subset of A. It's the "nesting dolls" idea: a smaller doll fits entirely inside a bigger one.

The weird-sounding rule "the empty set is a subset of everything" makes sense once you see why it could ever fail. The claim B \subset A would only be false if B had something that A didn't. The empty set has nothing at all, so there's no way for it to have something A lacks. It passes the test automatically, by having nothing to fail with.

Set B is a subset of set A, written B \subset A, when every element of B is also an element of A. For example, if A = \{1, 2, 3, 4, 5\} and B = \{2, 4\}, then B \subset A, because both 2 and 4 are members of A.

Every set is a subset of itself, and the empty set is a subset of every set. That's true vacuously, since it has no elements that could fail to be in the other set.

A convention is worth stating outright, the same way this course later pins down whether 0 counts as a natural number. Here, \subset is used for the ordinary (not-necessarily-proper) subset relation, so B \subset A allows B = A. That's why "every set is a subset of itself" above is true. Some textbooks instead reserve \subset for a proper subset (one that excludes B = A) and write \subseteq for the relation used in this course. Both conventions are common; this course uses \subset to mean ordinary subset throughout.

A trap: element vs. subset

It's extremely common to blur two different questions: "is this one number in the bag?" (element, \in) versus "is this whole smaller bag tucked inside the bigger one?" (subset, \subset). Getting this confused is one of the most frequent set-notation mistakes, so it's worth pausing on right after meeting both ideas.

Think of A as a bag holding three loose marbles: 2, 5, and 9. The marble labeled 5 is in the bag. That's 5 \in A. But \{5\} isn't a marble at all. It's a tiny second bag that happens to contain just the one marble "5." That tiny bag isn't itself sitting loose inside A. A has loose marbles in it, not a nested little bag. What IS true is that everything inside the tiny bag, just the marble 5, is also findable among A's loose marbles. That's what makes \{5\} a subset of A, not an element of it. Mixing up "is a marble" with "is a bag of marbles" is the whole source of this confusion. It's worth pausing on now: the fix is just remembering which of the two things, a bare number or a bag, you're actually holding.

For a set A = \{2, 5, 9\}, the number 5 is an element of A (5 \in A), but the set containing just 5, written \{5\}, is a subset of A (\{5\} \subset A), not an element of it. Both 5 and \{5\} are different mathematical objects: one is a bare number, and the other is a bag holding one number. Only one of the two relationships (\in or \subset) correctly connects each of them to A.

Sort each item: element or subset of A?

A = {2, 5, 9}. Click an item, then click the bin it belongs in — is it one bare number from A, or a set built out of A's members?

Loading interactive…

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

What this task checks

Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.

The compiler says

A model answer

Correct answer

Also accepted:

Why

Why

Every bare number from A (5, 9, 2) is an element, written with ∈. Everything else here is itself a set built from A's members — even a one-member set like {5}, the empty set ∅ (a subset of every set), or A written out in full ({2, 5, 9}, since every set is a subset of itself) — so each of those gets ⊂, not ∈.

Theorem

The Empty Set is a Subset of Every Set

also known as: vacuous subset

🔖

For every set A, \varnothing \subset A.

B \subset A is false only when B contains some element that A lacks. Take B = \varnothing: it contains no elements at all, so there is nothing it could possibly contain that A doesn't also contain. The condition for B \subset A to fail can never be met, so \varnothing \subset A holds automatically — for every set A, including A = \varnothing itself.

Worked example

Is B a subset of A?

  1. 1

    Let A = \{2, 4, 6, 8\} and B = \{4, 8\}. Check every element of B against A.

  2. 2

    Is 4 \in A? Yes: 4 appears in A.

  3. 3

    Is 8 \in A? Yes: 8 appears in A too.

  4. 4

    Every element of B showed up in A, with nothing left to check. So B \subset A.

Worked example

Finding a counterexample — when the subset claim is FALSE

  1. 1

    Let A = \{1, 3, 5, 7\} and C = \{3, 6\}. Is C \subset A? This time, check every element of C the same way, but don't assume the answer is yes just because it was last time.

  2. 2

    Is 3 \in A? Yes: 3 appears in A. So far, so good.

  3. 3

    Is 6 \in A? Check the list \{1, 3, 5, 7\} carefully: no 6 anywhere. No.

  4. 4

    The subset test only needs one failure to break the whole claim. The moment a single element of C isn't found in A, C \subset A is false, full stop, no matter how many other elements of C did match. So C \not\subset A, and the number 6 is the counterexample that proves it: one specific item that's in C but missing from A.

Where subsets show up outside a math class

This "smaller group entirely tucked inside a bigger group" idea is everywhere once you start looking for it. Every student enrolled in Calculus is a subset of every student enrolled at the university. Being in the smaller group guarantees membership in the bigger one, but not the reverse. A grocery list of "produce" items is a subset of the full grocery list. Every square is a member of the (bigger) set of rectangles, which is why "all squares are rectangles" is true but "all rectangles are squares" is false. The subset relationship only points one direction, and getting the direction backwards is one of the most common reasoning slips this idea produces, in math and out of it.

Worked example

Checking a subset claim about a grocery list

  1. 1

    The full grocery list is G = \{\text{milk, eggs, bread, apples, bananas, chicken}\}. The "produce" list, pulled off a store map, is P = \{\text{apples, bananas}\}. Is P \subset G?

  2. 2

    Check every item on P against G, the same way the subset test works for numbers: is "apples" on G? Yes. Is "bananas" on G? Yes.

  3. 3

    Every item on the smaller list showed up on the bigger one, with nothing left to check, so P \subset G. If the produce list had instead included "tofu" and G didn't carry it, that single miss would have been enough to break the claim, the same way one missing number broke C \subset A earlier in this section.

Check your understanding (counts toward your progress)

If B \subset A and A \subset B are BOTH true, what can you conclude?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

It's not impossible — it happens exactly when the two sets have identical elements, e.g. A=\{1,2\} and B=\{1,2\}.

Disjoint means no shared elements — but mutual subset containment actually forces total overlap, the opposite situation.

This works even for nonempty sets — e.g. A=\{1,2\}=B satisfies both containments without either set being empty.

Why

If every element of B is in A (that's B \subset A) AND every element of A is in B (that's A \subset B), then neither set can have anything the other lacks — meaning they must contain exactly the same elements, i.e. A = B.

Think about what it means for every element of A to be in B, AND every element of B to be in A, at the same time.

Try writing out a small example where both containments hold, and see what the two sets end up looking like.

For A=\{8,18,22,27,29,30\} and B=\{8,30,181\}, is B a subset of A?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

At least one element of B doesn't appear in A's list, so B\not\subset A.

Practice: Testing and applying the subset relationship (5 problems · doesn’t affect your progress)

"Every student in Calculus is a subset of every student at the university" — which everyday relationship does this describe?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

The Calculus students aren't unrelated to the university's students — every one of them IS a university student, which is exactly what makes it a subset relationship, not a disjoint one.

There's no claim here about the two groups being the same size — only that one is entirely contained in the other, which is usually a much bigger group.

The direction described is the smaller group (Calculus students) contained in the bigger one (all students) — not the reverse.

Why

This is the everyday version of B \subset A: everyone in the smaller group (Calculus students) is guaranteed to also be in the bigger group (university students), even though the reverse isn't true — most university students aren't in Calculus.

A smaller group entirely contained within a bigger group

For A=\{2,4,6,8\} and B=\{2,4\}, which statement correctly describes the two sets?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Check: is 6 in B? No — so A is NOT a subset of B.

\notin relates an element to a set, not two sets to each other — this reasoning doesn't apply to the subset test.

They do relate — every element of B is also in A.

Why

Both elements of B (2 and 4) are found in A, so B\subset A.

B\subset A

Let A=\{1,3,5,7\} and C=\{3,6,9\}. How many elements of C are NOT found in A?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Checking C's elements against A: 3 is found, but 6 and 9 are not — two elements of C fail the test.

Correct answer

Also accepted:

Why

Check each element of C against A one at a time and count how many fail the test.

2

"All squares are rectangles, but not all rectangles are squares." In subset language, this means:

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

If both containments held, the two sets would actually be equal — but there are rectangles (e.g. a 2-by-5 one) that aren't squares, so this fails.

Disjoint would mean no overlap at all — but every square IS a rectangle, so there's total overlap in one direction.

This has the direction backwards — it's squares that are the smaller, contained group, not rectangles.

Why

Every square satisfies the definition of a rectangle, so the set of squares is a subset of the set of rectangles. But plenty of rectangles (non-square ones) aren't squares, so the containment only runs one way — a common trap is assuming subset relationships are symmetric, when they generally aren't.

Check both directions separately — does every square satisfy the definition of a rectangle, and does every rectangle satisfy the definition of a square?

Squares \subset Rectangles, and this relationship only points one direction

If B \subset A, and B has 5 elements while A also has exactly 5 elements, what must be true?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

They're given as the same size, 5 elements each — A can't have MORE elements than B here.

It's entirely possible — it happens exactly when A and B share every element.

B has 5 elements, so it's clearly not empty.

Why

If every element of B (all 5) is in A, and A also has exactly 5 elements, there's no room for A to have anything extra — A and B must contain exactly the same elements.

Think about what it would mean for A to have an element that B lacks, given both sets have the same size.

A=B

Combining sets: union and intersection

Union pours two bags into one big bag. Whatever was in either original bag is now in the combined bag. Nobody cares if a number happened to be in both. It just lands in the combined bag once. Union is the generous operation: it counts anything that showed up anywhere.

Intersection is the opposite instinct: keep only what both bags agree on. Imagine two people each writing a guest list. Intersection is "who's on both lists?" Whoever isn't mentioned by both gets cut. Intersection is the strict, picky operation.

A good memory trick: \cup looks like a cup that collects everything poured into it (union = gathering). \cap looks like a strainer. Only what fits through both holes gets kept (intersection = filtering down to the overlap).

If two bags share nothing, like a set of even numbers and a set of odd numbers, their intersection is the empty bag. We call the sets disjoint: they simply don't overlap.

Given two sets A and B:

Union (A \cup B) is the set of every element that is in A, in B, or in both. Everything gets gathered together, with duplicates only counted once.

Intersection (A \cap B) is the set of elements that are in both A and B at the same time: only the overlap.

If A \cap B = \varnothing (no shared elements at all), the sets are called disjoint.

Formula

Union and Intersection

🔖

For sets A and B: A \cup B = \{\text{everything in } A,\text{ in } B,\text{ or in both}\} A \cap B = \{\text{everything in both } A \text{ and } B\}

Two overlapping circles labeled A and B, both fully shaded, illustrating that the union A ∪ B includes every element from either circle
Union — everything inside either circle (or both) is included.
Two overlapping circles labeled A and B, with only the overlapping lens-shaped region shaded, illustrating that the intersection A ∩ B keeps only elements shared by both circles
Intersection — only the overlap counts.
Two separate, non-overlapping circles labeled A and B, illustrating that disjoint sets share no elements at all
Disjoint sets — no overlap, so A ∩ B = ∅.

Worked example

Union and intersection of two small sets

  1. 1

    Let A = \{1, 2, 3, 4\} and B = \{3, 4, 5, 6\}.

  2. 2

    Union: gather every element from either set, no repeats: A \cup B = \{1, 2, 3, 4, 5, 6\}

  3. 3

    Intersection: keep only what's in both: A \cap B = \{3, 4\}

  4. 4

    Notice 3 and 4 appear in both A and B, so they show up in the intersection, and they were each only counted once in the union, not twice, even though they were "available" from both sets.

Worked example

A harder case: three sets, and a disjoint pair

  1. 1

    Let A = \{2, 4, 6\}, B = \{6, 8, 10\}, and C = \{1, 3, 5\}. Find A \cup B \cup C and A \cap C.

  2. 2

    Union of all three: pour every element from A, B, and C into one bag, no repeats, in any order: A \cup B \cup C = \{1, 2, 3, 4, 5, 6, 8, 10\} Only 6 was shared (between A and B), and it still only appears once.

  3. 3

    Intersection of A and C: check every element of A against C: is 2 \in C? No. Is 4 \in C? No. Is 6 \in C? No. Not one element of A shows up in C.

  4. 4
    A \cap C = \varnothing

    A and C share nothing at all, so their intersection is the empty set, which means A and C are disjoint. Notice this doesn't stop them from both taking part in the three-way union above; disjoint sets can still be combined with \cup, they just don't overlap with each other while doing it.

Everything a set leaves out: the complement

If A is "everything in the bag," the complement A' is "everything else on the table that didn't go in the bag." You can't ask for a complement without first agreeing on what "the table" (U) even contains. "Everything not in A" only makes sense once you've fixed a whole universe to take the leftovers from.

Every set lives inside some larger universal set U: "everything currently under discussion." The complement of A, written A' (also seen as A^c or \overline{A}), is every element of U that is not in A: A' = \{\text{everything in } U \text{ that is not in } A\}

A rectangle labeled U with a circle labeled A inside it; the region inside the rectangle but outside the circle is shaded, illustrating that the complement A' is everything in the universal set that is not in A
Complement — everything in U outside the circle.

Worked example

Finding a complement

  1. 1

    Let the universal set be U = \{1, 2, 3, 4, 5, 6, 7, 8\} and A = \{2, 4, 6\}. Find A'.

  2. 2

    A' needs every element of U that is not in A. Go through U one number at a time and keep only the ones missing from A.

  3. 3

    1, 3, 5, 7, 8 are each not in A; 2, 4, 6 are excluded since they're already in A.

  4. 4
    A' = \{1, 3, 5, 7, 8\}

    Notice A and A' together rebuild all of U with no overlap. Every element of U is in exactly one of the two.

Complements show up constantly in probability later in this course. Instead of computing "at least one success" directly, it's often far easier to compute the complement ("zero successes") and subtract from 1. That's the same "everything U leaves out" idea, just applied to outcomes instead of numbers.

Check your understanding (counts toward your progress)

The universal set U=\{1,2,\dots,30\} has 30 elements. If A\subset U has 14 elements, how many elements does A' (the complement of A) have?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

A' contains everything in U except A's elements: 30-14=16.

Correct answer

Also accepted:

Why

A' is everything in U that is NOT in A.

Let U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\} and A = \{2, 3, 5, 7\}. How many elements does A' have?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

U has 10 elements and A has 4. Every element of U is in exactly one of A or A', so A' has 10 - 4 = 6 elements.

Correct answer

Also accepted:

Why

Every element of U is in exactly one of A or A' — no overlap, nothing left out.

Practice: Finding what a set leaves out (4 problems · doesn’t affect your progress)

Given the universal set U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\} and A = \{1, 2, 3, 4\}, find A'.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's A itself, not what's left OUT of A — the complement is everything in U that A doesn't contain.

That's the whole universal set U, including A's own elements — the complement should exclude 1, 2, 3, and 4.

A' is only empty if A already covers all of U, which it doesn't here — six numbers (5 through 10) are still missing from A.

Why

Go through U = \{1,...,10\} and keep only what's missing from A: removing 1, 2, 3, and 4 leaves \{5, 6, 7, 8, 9, 10\}.

Go through every element of U one at a time and keep only the ones missing from A.

\{5, 6, 7, 8, 9, 10\}

Let U = \{a, b, c, d, e, f, g\} and A = \{b, d, f\}. How many elements does A' have?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

U has 7 elements and A has 3. Every element of U lands in exactly one of A or A', so A' has 7 - 3 = 4 elements — namely \{a, c, e, g\}.

Correct answer

Also accepted:

Why

Every element of U is in exactly one of A or A' — subtract A's size from U's size.

4

Let U = \{1, 2, 3, 4, 5, 6, 7, 8\} and A = \{2, 4, 6, 8\}, so A' = \{1, 3, 5, 7\}. Which of the following is NOT an element of A'?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

1 IS in A' — it's missing from A, so the complement keeps it.

3 IS in A' — it's missing from A, so the complement keeps it.

7 IS in A' — it's missing from A, so the complement keeps it.

Why

6 is an element of A itself, so it's excluded from the complement — A' only holds what's left OUT of A, and 6 doesn't qualify.

Check each choice against A first — anything already inside A can't also be in A'.

6

Let U = \{1, 2, 3, 4, 5, 6, 7, 8, 9\} and A = \{1, 3, 5, 7, 9\} (the odd numbers in U). What is A'?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's A itself (the odd numbers) — the complement is everything else, the even numbers.

9 is odd, so it's already in A — it can't also show up in A'.

A' is empty only if A already covers every element of U, but four even numbers (2, 4, 6, 8) are still missing from A.

Why

Every element of U that isn't odd is even, so removing A's five odd numbers from U's nine numbers leaves exactly the four even numbers, \{2, 4, 6, 8\}.

\{2, 4, 6, 8\}

Sets and search results

Union and intersection aren't just abstract bag-math. They're what's happening every time you filter something with more than one condition. Search "cheap or fast" shipping and you get the union: everything matching at least one condition, a bigger combined pool. Search "cheap and fast" and you get the intersection: only the options satisfying both at once, a smaller, stricter pool. This is precisely why adding more "and" conditions to a search narrows your results: intersection shrinks or stays the same as you demand more. Adding more "or" conditions widens them instead: union grows or stays the same. The next time a filter checkbox feels like it's doing something mysterious, it's very likely running \cup or \cap under the hood.

Worked example

What a shipping filter actually returns

  1. 1

    Five shipping options are numbered 1 through 5. The ones meeting the "cheap" price threshold are C = \{1, 2, 4\}; the ones meeting the "fast" delivery threshold are F = \{2, 3, 4\}. What does the site show for "cheap or fast," and for "cheap and fast"?

  2. 2

    "Cheap or fast" is the union: gather every option satisfying at least one condition, no repeats. C \cup F = \{1, 2, 3, 4\}: four of the five options qualify.

  3. 3

    "Cheap and fast" is the intersection: keep only the options satisfying both at once. Checking each element of C against F: option 2 is in both, option 4 is in both, option 1 isn't in F. C \cap F = \{2, 4\}: only two options survive.

  4. 4

    Notice the pattern the prose above predicted: the "and" search (intersection) returned fewer options than either list alone, while the "or" search (union) returned more than either list alone. That's not a coincidence particular to shipping. It's what \cap and \cup always do to a result count.

Check your understanding (counts toward your progress)

Let A=\{2,4,6,8\} and B=\{4,8,12\}. How many elements does A\cap B have?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Only 4 and 8 appear in both sets — A\cap B=\{4,8\}, two elements.

Correct answer

Also accepted:

Why

For A=\{8,19,39,42,50\} and B=\{18,25,37,43,50\}, what is |A\cap B| (the number of elements)?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

A\cap B keeps only the elements common to both sets: |A\cap B|=1.

Correct answer

Also accepted:

Why

Union counts every element appearing in EITHER set (no repeats); intersection counts only elements in BOTH.

Let A=\{3,6,9,12,15\} and B=\{6,12,18,24\}. How many elements are in A but not in B?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Removing A's elements that also appear in B (6 and 12) leaves \{3,9,15\} — three elements.

Correct answer

Also accepted:

Why

List A's elements, then remove any that also appear in B.

Practice: Combining sets with union and intersection (6 problems · doesn’t affect your progress)

Let A = \{1, 2, 3\} and B = \{3, 4, 5\}. What is A \cup B?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's the INTERSECTION (what's shared), not the union. Union gathers everything from both sets.

Union doesn't repeat a shared element — 3 belongs to the combined set, but only counted once.

Union keeps everything, including the shared element 3 — nothing gets left out.

Why

Union pours both sets into one: every element from A (1, 2, 3) and every element from B (3, 4, 5), with the shared element 3 counted only once — giving \{1,2,3,4,5\}.

\{1, 2, 3, 4, 5\}

Same sets, A = \{1, 2, 3\} and B = \{3, 4, 5\}. What is A \cap B?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's the union — everything combined. Intersection is stricter: only what's in BOTH sets survives.

The sets DO share an element — 3 is in both — so the intersection isn't empty. \varnothing would be correct only for sets with nothing in common.

Those are the elements that belong to only ONE of the two sets — intersection wants elements in BOTH, which rules all four of those out.

Why

Intersection keeps only elements present in both sets. Checking each: only 3 appears in both A and B, so A \cap B = \{3\}.

\{3\}

Two sets are called "disjoint" when...

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

The union of two nonempty sets can never be empty — union only grows or stays the same, it never shrinks to nothing.

That describes subsets, an entirely different relationship, and it doesn't require the sets to share nothing.

Having equal size is unrelated to whether the sets overlap — two same-size sets can share every element or none at all.

Why

Disjoint means zero overlap: A \cap B = \varnothing. For example, the even numbers and the odd numbers are disjoint — no number is in both groups.

Translate 'disjoint' into a statement about the intersection of the two sets.

Their intersection is the empty set — they share no elements

Let A=\{1,2,3\}, B=\{3,4,5\}, C=\{5,6,7\}. What is (A\cup B)\cap C?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's closer to the union of all three sets, not this specific combination.

5 is shared between (A\cup B) and C, so it's not empty.

3 is in A\cup B but not in C, so it doesn't survive the intersection with C — only 5 does.

Why

A\cup B=\{1,2,3,4,5\}. Intersecting with C=\{5,6,7\} keeps only the shared element: \{5\}.

Work out A\cup B first, then intersect that result with C.

\{5\}

Searching a store site for "blue and on sale" versus "blue or on sale" — which search returns MORE results (or the same), in general?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

"And" is the stricter, narrowing condition (intersection) — it can only match as many or fewer items than either condition alone, never more.

"And" (intersection) keeps only the overlap; "or" (union) keeps everything from either group — these are generally different-sized result sets.

This can be reasoned out in general, without knowing specific inventory: union (or) can never be smaller than intersection (and) for the same two conditions.

Why

"Or" behaves like union — gathering anything matching at least one condition, so the result set is at least as large as either individual condition. "And" behaves like intersection — keeping only items satisfying both, which narrows or matches the smaller of the two, never exceeds it.

Match 'and' to one set operation and 'or' to the other, then think about which one can only shrink or stay the same versus grow or stay the same.

"Blue or on sale" returns at least as many results — union only grows or stays the same as you add conditions with "or"

If A \cap B = A, what does that tell you about the relationship between A and B?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Disjoint sets have A \cap B = \varnothing, not A \cap B = A — this is describing the opposite situation, heavy overlap, not none.

This can happen for many nonempty sets — for instance A=\{1,2\}, B=\{1,2,3\} gives A \cap B = \{1,2\} = A.

It doesn't require full equality — B can have extra elements A doesn't, as long as B contains everything A has.

Why

A \cap B = A means every element of A survived the "is it in both?" filter — which can only happen if every element of A was already in B to begin with. That's exactly the definition of A \subset B.

Ask what it means for every element of A to survive the 'is it in both?' filter.

Try a small example where A \cap B = A and see what relationship A and B have.

A \subset B — every element of A is also in B

Where this shows up

Databases & Search

A retailer's database might define A = "customers who bought a laptop" and B = "customers who bought a printer." A marketing query for "sold a laptop and a printer" (a bundle-upsell target list) is literally A \cap B. A query for "sold a laptop or a printer" (anyone who might want ink or a case) is A \cup B. The database engine doesn't think in English at all. Every filter with more than one condition compiles down to set operations like these, run over millions of rows instead of a handful. Getting \cap and \cup backwards in a real query doesn't just misname a set on paper; it sends a marketing email to the wrong ten thousand people.

Set-builder notation: describing instead of listing

Listing works fine for a bag of four numbers. It falls apart the instant the bag is infinite. You can't write out "every number bigger than 3" one at a time. You'd never finish. Set-builder notation solves this by describing the rule for getting into the bag instead of listing every member. The expression \{x \mid x > 3\} works like a bouncer at the door of an infinite club, and the rule on the clipboard is "must be bigger than 3." Anything satisfying the rule gets in. Nothing else does. You don't need the guest list if you have the rule for who's on it.

When a set is too large (or infinite) to list, set-builder notation describes it by a defining property instead: \{x \mid x > 3\} read "the set of all x such that x is greater than 3." The vertical bar \mid (sometimes a colon, :) is read "such that."

Worked example

Set-builder with two conditions at once

  1. 1

    Describe, in set-builder notation, "every number from 2 up to (but not including) 10."

  2. 2

    This has two requirements stacked on the same x: "at least 2" (x \ge 2) and "less than 10" (x < 10). Set-builder lets you chain both conditions after the bar, joined by "and."

  3. 3
    \{x \mid 2 \le x < 10\}

    Read aloud: "the set of all x such that x is at least 2 and less than 10." Both halves of the compound inequality are doing double duty as the bouncer's two rules: fail either one, and you don't get in.

  4. 4

    Compare this to \{x \mid x > 3\} from before: that bag was a bouncer with one rule and an open-ended guest list (infinitely many numbers keep qualifying, forever, as x grows). This bag's rule has a floor and a ceiling. Even though it still contains infinitely many numbers (every decimal between 2 and 10 counts), the values themselves are trapped between two fixed boundaries rather than running off to infinity.

Drag the probe below along the number line and watch which values fall inside the bouncer's rule \{x \mid 2 \le x < 10\}. Notice the boundary at 2 lets the probe in, but the one at 10 turns it away right at the edge:

Probe the set {x | 2 ≤ x < 10}

Loading interactive…

Set-builder in reverse — reading the rule back into English

Being able to go from a rule to a description is just as important as building the rule in the first place. Given \{x \mid x \neq 5\}, the honest plain-English reading is "every number except 5." Everything on the number line is allowed except that one specific value, which gets turned away at the door. This is a genuinely different shape of rule than "x > 3": instead of a boundary you cross, it's a single value carved out of an otherwise unrestricted set. Set-builder notation is flexible enough to describe both kinds of rule, and many more, with the same \{x \mid \ldots\} template. Only the condition after the bar changes.

Worked example

Reading a rule with both a range AND an exception

  1. 1

    Translate \{x \mid -4 \le x \le 4,\ x \neq 1\} into a plain-English description. This rule stacks the "floor and ceiling" kind with the "carve one value out" kind on the same line.

  2. 2

    Read the first part like the bouncer rule above: -4 \le x \le 4 is "every number from -4 to 4, inclusive," and both boundaries pass the test.

  3. 3

    Read the second part like the x \neq 5 rule above it: x \neq 1 turns away exactly one value, 1, no matter where it falls in the range.

  4. 4

    Combine both conditions, joined by the comma's "and": "every number from -4 to 4, inclusive, except 1." Everything in that range gets in except the single value the second condition names, the two rule-shapes from this section stacked on one bag instead of appearing separately.

Check your understanding (counts toward your progress)

Which set-builder expression describes "every number from 2 up to (but not including) 10"?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

This only captures the lower boundary and has no upper limit at all — 10, 50, and 1000 would all incorrectly qualify.

This only captures the upper boundary — it would incorrectly include very negative numbers, with no floor at 2.

This excludes 2 itself with a strict <, but the description says "from 2," meaning 2 should be included.

Why

"From 2" (inclusive) needs 2 \le x, and "up to but not including 10" needs x < 10. Chaining both conditions after the bar gives \{x \mid 2 \le x < 10\}.

Translate 'from 2' and 'up to but not including 10' into two separate inequality symbols, then chain them together.

Why is set-builder notation necessary at all, instead of just listing elements?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

It's not about appearances — it solves a real problem: some sets genuinely can't be written out one element at a time.

Listing is completely valid for small, finite sets like \{1,2,3,4\} — set-builder is for when listing is impossible, not always required.

It's for any set too large or too indirectly defined to list — nothing about it is specific to fractions.

Why

Listing breaks down for infinite sets — you'd never finish writing "4, 5, 6, 7, ..." for "all numbers greater than 3." Set-builder describes the defining RULE instead, which works no matter how large or infinite the set is.

Think about whether you could ever finish writing out a complete list for 'all numbers greater than 3'.

Practice: Reading and writing set-builder notation (4 problems · doesn’t affect your progress)

How do you read \{x \mid x > 3\} in plain English?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Set-builder describes a RULE, not a single value — this set has infinitely many members, every number bigger than 3.

This isn't a single equation with one solution — it's a description of an entire (infinite) group of numbers.

Check the inequality direction: x > 3 means greater than, not less than.

Why

The vertical bar reads "such that." \{x \mid x > 3\} describes every number x satisfying the rule "x is greater than 3" — an infinite set, described by its defining property instead of a list.

Read the vertical bar as the words 'such that', then translate the inequality that follows it.

The set of all x such that x is greater than 3

Which set-builder expression describes "every number that is at most 7"?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

That's the opposite direction — greater than, not at most.

"At most 7" includes 7 itself — strict < wrongly excludes it.

That points the wrong direction — at most means capped from above, not below.

Why

"At most 7" means 7 or smaller, i.e. x\le 7, giving \{x\mid x\le 7\}.

Translate 'at most' into an inequality symbol before matching it to an answer choice.

\{x\mid x\le 7\}

How many integers satisfy \{x\mid -3<x\le4\}?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

The qualifying integers are -2,-1,0,1,2,3,4 — seven of them (-3 itself is excluded).

Correct answer

Also accepted:

Why

List out the integers between the two boundaries, checking each one against both inequality symbols.

7

How do you read \{x \mid x \neq 5\} in plain English?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

This describes the exact opposite — it's every number EXCLUDING 5, not a set containing only 5.

There's no inequality direction here at all — \neq just rules out one specific value, it doesn't restrict to a range above it.

This is a huge, nearly-unrestricted set (everything but one point), not an empty one.

Why

\neq means "is not equal to." \{x \mid x \neq 5\} describes every real number with exactly one value carved out — a single excluded point rather than a boundary you cross, a different shape of rule than "x>3."

Read \neq as its own kind of rule — it doesn't set a direction like > or <, it excludes one single value.

Every number except 5

Why this matters

Every one of these ideas resurfaces immediately. The next section uses \in and \cup to describe intervals on the number line. The section after that uses \subset to show how the number families nest inside each other. Much later, the complement becomes the fastest way to compute "at least one" probabilities, and later still, "domain" and "range" are nothing more than sets described with this notation. You now have the whole toolkit. The rest of the course just keeps reusing it.

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.