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 and set operations, revisited

~8 min

A group is, underneath everything else this course adds, a set with one operation attached to it. Every idea below is already familiar from Discrete Math I. This section only puts the vocabulary back in your hands before it starts carrying real weight. Three later ideas lean on it directly. A subgroup, starting in chapter 6, is just a subset that survives the operation without leaving it. A direct product, in chapter 11, is built straight from the Cartesian product G \times H. A binary operation itself, starting in chapter 1, is a function whose domain is G \times G — a set you cannot even write down without the Cartesian product reviewed here.

Think of a set as a guest list. A subset is a smaller list drawn entirely from the first one; nobody on it is a stranger to the bigger list. Union merges two guest lists into one, counting each person once even if they appear on both. Intersection keeps only the names shared by both lists. The Cartesian product works differently. Instead of merging two lists into one bigger list, it pairs every name on list A with every name on list B. The result is a list of pairings, not a list of names. A seating chart matching every diner to every table is exactly this kind of pairing. Swap the diner and the table and you get a different pairing, not the same one back.

A set is an unordered collection of distinct objects. A set operation is a rule that builds a new set out of one or two existing ones. Union, intersection, difference, and the Cartesian product below are the four this course actually reaches for. For a set A, B \subset A means every element of B is also an element of A. The union A \cup B collects everything in A or B, or both. The intersection A \cap B keeps only what's in both. The difference A \setminus B keeps what's in A and removes anything also in B. The Cartesian product A \times B is the set of all ordered pairs (a,b) with a \in A and b \in B. Order matters here: A \times B and B \times A contain different pairs unless A = B. Starting in chapter 6, you will constantly ask two separate questions together. Is this candidate actually a subset? And is it closed under some operation? Two standing facts are worth stating outright. The empty set \varnothing is a subset of every set, and every set is a subset of itself. Both follow straight from the definition of subset above. There is no element of \varnothing, or of A itself, that could ever fail the "also in A" test.

Theorem

The Empty Set is a Subset of Every Set

also known as: vacuous subset

Recalled from College Algebra · Sets, plainly — first taught there.

🔖

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.

Shade the difference

Click every region belonging to A but not to B.

Loading interactive…

Subset or not?

Sort each candidate set by whether it is a subset of {1,2,3,4}.

Loading interactive…

Worked example

Union, intersection, and difference of two finite sets

  1. 1

    Let A = \{1, 2, 3, 4\} and B = \{3, 4, 5\}. Find A \cup B, A \cap B, and A \setminus B.

  2. 2

    A \cup B collects every element appearing in either set, listed once each: \{1,2,3,4,5\}.

  3. 3

    A \cap B keeps only 3 and 4, since those are the only elements both sets share.

  4. 4
    \boxed{A \cup B = \{1,2,3,4,5\}, \quad A \cap B = \{3,4\}, \quad A \setminus B = \{1,2\}}

    5 is in B but not A, so it never appears in A \ B — the order in "difference" matters

Loading interactive…

Worked example

A Cartesian product as the domain of an operation

  1. 1

    Let A = \{1, 2, 3\}. List A \times A, and say how many ordered pairs it contains.

  2. 2

    Every element of the first A pairs with every element of the second: (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3).

  3. 3
    \boxed{|A \times A| = 9}

    This is exactly the set a binary operation on A would need as its domain — chapter 1 defines a binary operation as a function A \times A \to A, one output for every one of these nine input pairs.

Where this goes next

Chapter 6: Subgroups

The subgroup test is a subset question wearing algebra's clothes. Given a group G and a subset H \subset G, chapter 6 asks three things: is H closed under G's operation, does it contain the identity, and does it contain every element's inverse? Each check is really a membership question. Does this particular element of G \times G's output land back inside H? You can decide that with nothing more than the subset and closure ideas reviewed here.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Discrete Mathematics I — Logic, Proof, and Structure

What does {x in Q : x^2 = 2} equal?

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

sqrt(2) is irrational, so no rational number satisfies x^2=2 -- the rule describes the empty set.

From Discrete Mathematics I — Logic, Proof, and Structure

Why is set-builder notation necessary for a set like the real numbers between 0 and 1?

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

An infinite set cannot be written out element by element -- a rule is the only way to name it precisely.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Discrete Mathematics I — Logic, Proof, and Structure

Is {1,5} a subset of {1,2,3,4}?

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

5 is in {1,5} but not in {1,2,3,4} -- one missing element is enough to fail the subset claim.

From Discrete Mathematics I — Logic, Proof, and Structure

What does A subseteq B mean?

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 subseteq B means every element of A is guaranteed to also be an element of B.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Discrete Mathematics I — Logic, Proof, and Structure

A student claims A setminus B always equals B setminus A. Test with A={1,2}, B={2,3} -- is the claim correct?

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 two differences pick out different leftover elements -- set difference is not commutative in general.

From Discrete Mathematics I — Logic, Proof, and Structure

Two sets are called disjoint exactly 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.

Why

Disjoint sets share no elements at all -- their intersection is empty by definition.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Discrete Mathematics I — Logic, Proof, and Structure

What is A times 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

Cartesian product pairs every element of A with every element of B, keeping first and second coordinates in order.

From Discrete Mathematics I — Logic, Proof, and Structure

If |A| = 3 and |B| = 7, what is |A times 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

The size of a Cartesian product is the product of the two sizes: 3 times 7 = 21.

Correct answer

Also accepted:

Why

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.