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

Recipe

Find a union, intersection, or difference

Use when: you're given two sets by their elements and asked for A \cup B, A \cap B, or A \setminus B

Goal: the exact resulting set, with no duplicate elements and the right direction if it's a difference

Taught in Union, intersection, difference

  1. 1

    Write out A and B as element lists next to each other, before combining anything. Seeing both lists together makes every later comparison direct.

    Example

    A = \{1,2,3,4\} and B = \{3,4,5,6\}, written side by side so each element's membership in A, in B, or in both is easy to check at a glance.

    Why: comparing elements is easiest when both lists sit in front of you, not buried in set-builder notation.

  2. 2

    Union, intersection, and difference each keep a different subset of the elements you just listed, so match the question to the right rule.

    Example

    For A = \{1,2,3,4\}, B = \{3,4,5,6\}: union keeps 1,2,3,4 from A plus the new 5,6 from B. Intersection keeps only 3 and 4, the elements both lists share. Difference A \setminus B removes B's elements (3,4,5,6) from A, leaving 1 and 2.

    • union (A \cup B) — keep every element appearing in A or in B, writing each one only once.
    • intersection (A \cap B) — keep only elements appearing in both A and B.
    • difference (A \setminus B) — keep only A's elements that do not also appear in B.

    Why: each operation matches a different logical rule (or, and, and-not), so the right rule has to match the question asked, not just the two sets involved.

  3. 3

    A \setminus B and B \setminus A generally name different sets, since one starts from A's elements and the other starts from B's.

    Example

    With A = \{1,2\}, B = \{2,3\}: A \setminus B = \{1\}, but B \setminus A = \{3\}. Swapping the two sets changes the answer.

    • asked for A \setminus B — remove B's elements from A's list.
    • asked for B \setminus A — remove A's elements from B's list.

    Why: swapping which set you start from changes which elements get removed, so difference is not symmetric the way union and intersection are.

  4. 4

    Collect the surviving elements inside braces, dropping any repeat, since a set never lists the same element twice.

    Why: this confirms the result is itself a properly written set, matching the notation the question used.

Common mistakes

  • Treating A \setminus B and B \setminus A as if they always name the same set.
  • Listing a shared element twice when writing the union instead of once.
  • Confusing intersection's "and" with union's "or," swapping which elements survive.
  • Stopping after finding the union or intersection when the question actually asked for all three.