Euler Hall — free maths guides

The union is the set of elements in either — and it is an 'or'

A plain-language explanation of union and intersection of sets. The idea in plain words, a worked example, and a check with the answers shown — part of the free Quantitative Reasoning guides.

Collect, do not repeat

The unionA∪BA \cup B contains every element that is inAA, or inBB, or in both.

A={1,2,3},B={3,4}⟹A∪B={1,2,3,4}.A = \{1, 2, 3\}, \quad B = \{3, 4\} \quad\Longrightarrow\quad A \cup B = \{1, 2, 3, 4\}.

The 3 appears in both sets and exactly ONCE in the union: a set has no repeats, so collecting the members means collecting them once each.

That "or" is inclusive, exactly like the logical connective. An element in both sets satisfies "inAA or inBB", so it belongs to the union. There is no exclusive reading here.

Reading a union is a membership test: to decide whetherx∈A∪Bx \in A \cup B, checkx∈Ax \in A andx∈Bx \in B and accept if either holds. That is why the union is the set version of∨\vee, and why the counting formula subtracts the overlap — the shared elements were counted once in each set.

Why a repeated element is written once

A set is determined by its members, not by how they were described.{1,2,3}\{1,2,3\} and{3,2,1,3}\{3,2,1,3\} are the same set, because they have the same members — the second merely lists one of them twice.

So writing the union as{1,2,3,3,4}\{1,2,3,3,4\} is not wrong about membership and is not a set written in standard form. The convention is to list each member once, and it matters for COUNTING: the size of the union is the number of distinct members.

That is the whole reason inclusion-exclusion exists.n(A)+n(B)n(A) + n(B) counts the shared elements twice, once from each set, so the union's size isn(A)+n(B)−n(A∩B)n(A) + n(B) - n(A \cap B) — the subtraction removes exactly the duplicates the union's definition would have collapsed.

Worked example: a union with a shared element

FindA∪BA \cup B andn(A∪B)n(A \cup B) forA={4,6,7,8}A = \{4, 6, 7, 8\},B={1,5,7,9}B = \{1, 5, 7, 9\}.

Step one — collect the members ofAA. 4, 6, 7, 8.

Step two — add the members ofBB that are not already there. 1, 5, 9 — and 7 is already present, so it is not added again.

Step three — write the union in order.A∪B={1,4,5,6,7,8,9}A \cup B = \{1, 4, 5, 6, 7, 8, 9\}.

Step four — count. Seven elements.

Step five — check with the formula.n(A)=4n(A) = 4,n(B)=4n(B) = 4, andA∩B={7}A \cap B = \{7\} son(A∩B)=1n(A \cap B) = 1. Then4+4−1=74 + 4 - 1 = 7. Agrees, which is the check that the listing did not silently drop or duplicate an element.

By the end you can
  • Write a union in roster form
  • Test an element for membership in a union
  • Say why a shared element is written once
Check yourself
  1. 1.A={1,3,5}A = \{1, 3, 5\},B={3,5,7}B = \{3, 5, 7\}. FindA∪BA \cup B andn(A∪B)n(A \cup B).
  2. 2.A={2}A = \{2\},B={2}B = \{2\}. What isA∪BA \cup B?
  3. 3. IsA∪BA \cup B always at least as large asAA?
Answers
  1. 1.{1,3,5,7}\{1, 3, 5, 7\}, four elements.
  2. 2.{2}\{2\} — one element. A union with an identical set changes nothing.
  3. 3. Yes: every element ofAA is in the union, so the union cannot have fewer members thanAA.
Work out where to start — free, no accountAnswer six real questions — free, no account