Union – Merging Elements of Sets

Learn how to calculate the union of two or more sets using standard formulas and diagrams.
🔑

Definition of Union

The union of two or more sets is a new set that contains all the distinct elements from all the sets combined. It is denoted by the symbol . The union operation represents the logical 'OR', meaning an element is included in the union if it belongs to set A, or to set B, or to both.

\[ A \cup B = \{x : x \in A \text{ or } x \in B\} \]
Set-builder notation for Union
SymbolMeaning
A ∪ BUnion of A and B
x ∈ AElement x belongs to set A
Logical OR
|A|Cardinality (number of elements) of set A
The empty set
🔢

Key Formulas for Union

\[ A \cup B = \{x : x \in A \lor x \in B\} \]
Logical Definition of Union
\[ |A \cup B| = |A| + |B| - |A \cap B| \]
Cardinality (Inclusion-Exclusion Principle)
\[ \bigcup_{i=1}^{n} A_i = A_1 \cup A_2 \cup \cdots \cup A_n \]
Union of Multiple Sets
\[ |A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C| \]
Cardinality for Three Sets
🎨

Venn Diagram of Union

A B 1 2 3 4 5 6 A ∪ B = {1, 2, 3, 4, 5, 6}
Union A ∪ B: all elements in A, B, or both — the entire shaded region including the overlap

A Venn diagram for the union of two sets, A and B, shows two overlapping circles. The union, A ∪ B, is represented by the entire area covered by both circles, including their overlapping region. This visually demonstrates that the union contains all elements from set A, all elements from set B, and all elements common to both.

⚖️

Properties of Union

The union operation follows several fundamental algebraic laws.

\[ A \cup B = B \cup A \]
Commutative Property
\[ (A \cup B) \cup C = A \cup (B \cup C) \]
Associative Property
\[ A \cup A = A \]
Idempotent Property
\[ A \cup \emptyset = A \]
Identity Element
\[ A \cup U = U \]
Domination Law (where U is the Universal Set)
\[ A \subseteq A \cup B \text{ and } B \subseteq A \cup B \]
Monotonicity
🔬

Proof of the Cardinality Formula

Let's prove the Principle of Inclusion-Exclusion for two sets: |A ∪ B| = |A| + |B| - |A ∩ B|.

The union A ∪ B can be expressed as the union of three disjoint sets: elements only in A (A - B), elements only in B (B - A), and elements in both (A ∩ B).

\[ A \cup B = (A - B) \cup (B - A) \cup (A \cap B) \]

Since these three sets are disjoint, the cardinality of their union is the sum of their individual cardinalities.

\[ |A \cup B| = |A - B| + |B - A| + |A \cap B| \]

We also know that |A| = |A - B| + |A ∩ B| and |B| = |B - A| + |A ∩ B|. Rearranging these gives |A - B| = |A| - |A ∩ B| and |B - A| = |B| - |A ∩ B|.

Substituting these back into the equation for |A ∪ B|:

\[ |A \cup B| = (|A| - |A \cap B|) + (|B| - |A \cap B|) + |A \cap B| \]

Simplifying the expression, we arrive at the final formula:

\[ |A \cup B| = |A| + |B| - |A \cap B| \]
✏️

Worked Example

Given set A = {1, 3, 5, 7} and set B = {2, 3, 4, 5}, find the union A ∪ B and its cardinality |A ∪ B|.
  1. List all unique elements from set A: {1, 3, 5, 7}.
  2. List all unique elements from set B: {2, 3, 4, 5}.
  3. Combine the elements from both sets, writing each unique element only once: {1, 2, 3, 4, 5, 7}.
  4. To find the cardinality, use the formula |A ∪ B| = |A| + |B| - |A ∩ B|.
  5. Find the cardinalities: |A| = 4, |B| = 4.
  6. Find the intersection A ∩ B = {3, 5}, so |A ∩ B| = 2.
  7. Calculate: |A ∪ B| = 4 + 4 - 2 = 6.
  8. Alternatively, count the elements in the resulting union set: {1, 2, 3, 4, 5, 7} has 6 elements.
A ∪ B = {1, 2, 3, 4, 5, 7} and |A ∪ B| = 6.
🧮

Try It

🚀

Applications of Union

💾 Database Operations: In database management, the SQL UNION operator combines the result sets of two or more SELECT statements into a single result set. This is crucial for integrating data from different tables to create comprehensive reports.

🔍 Search Engines: When you perform a search using the 'OR' operator (e.g., 'cats OR dogs'), the search engine finds all documents containing 'cats', all documents containing 'dogs', and combines these results. This is a direct application of the union concept to aggregate information.

📊 Market Research: Analysts combine different customer segments to understand the total market. For example, the union of 'customers who bought product X' and 'customers who visited the website' gives a complete list of all engaged or purchasing customers.

🏥 Healthcare & Medical Systems: Medical researchers might take the union of patient groups with different symptoms to identify all individuals who might have a particular disease. This helps in forming comprehensive study populations for clinical trials.

🌍

Real-World Examples

A school has two clubs: the Chess Club and the Robotics Club. The Chess Club has 25 members. The Robotics Club has 30 members. If 8 students are members of both clubs, how many students are in at least one of the clubs?
  1. Let C be the set of Chess Club members and R be the set of Robotics Club members.
  2. We are given |C| = 25, |R| = 30, and |C ∩ R| = 8.
  3. We need to find the total number of students in either club, which is the cardinality of the union, |C ∪ R|.
  4. Use the inclusion-exclusion principle: |C ∪ R| = |C| + |R| - |C ∩ R|.
  5. Substitute the values: |C ∪ R| = 25 + 30 - 8.
  6. Calculate the result: 55 - 8 = 47.
There are 47 students in at least one of the clubs.
A survey of 100 coffee drinkers found that 70 take sugar (S) and 60 take cream (C). If 50 people take both sugar and cream, how many people take at least one of them?
  1. We are given |S| = 70, |C| = 60, and |S ∩ C| = 50.
  2. We want to find the number of people who take sugar or cream, which is |S ∪ C|.
  3. Apply the formula: |S ∪ C| = |S| + |C| - |S ∩ C|.
  4. Plug in the numbers: |S ∪ C| = 70 + 60 - 50.
  5. Compute the sum: 130 - 50 = 80.
80 people take at least one of sugar or cream.
🏙️

Real-World Scenarios

Store A only Store B only both A ∪ B — All Customers No duplicates in merged list
Merged Customer Lists
Merging two store loyalty databases uses set union — every customer appears exactly once even if they shopped at both stores, eliminating duplicate marketing emails.
A B Combined Friend Network A∪B = all unique connections
Social Networks
A user's "People you may know" feed is the union of friends-of-friends minus current friends — set union followed by set difference in graph databases.
LinkedIn 120 Indeed 95 35 overlap Applicant Sources |A∪B| = 120+95−35 = 180 unique candidates
Recruitment
ATS software deduplicates applicants from multiple job boards using set union: |A∪B| = |A|+|B|−|A∩B|. This avoids sending the same candidate to multiple interviewers.

Merging Music Playlists: Imagine you and a friend want to create an ultimate road trip playlist. You combine your 'Classic Rock' playlist with their '80s Hits' playlist. The resulting master playlist is the union of the two, containing every song from both lists without duplicates.

Combining Contact Lists: When you get a new phone, you might merge the contacts from your old phone's address book with the contacts stored in your email account. The final, unified contact list on your new phone is the union of these two sets of contacts.

Aggregating Food Allergies: When planning a dinner party, you ask each guest for their dietary restrictions. To create a list of all ingredients to avoid, you take the union of each person's allergy list. The final list includes every single ingredient that at least one guest is allergic to.

📚

Types and Classifications

Disjoint Union: This is a special case where the sets have no elements in common (their intersection is the empty set). In this case, the cardinality is simply the sum of the individual cardinalities: |A ∪ B| = |A| + |B|.

\[ \text{If } A \cap B = \emptyset, \text{ then } |A \cup B| = |A| + |B| \]

Finite vs. Infinite Union: A union can be performed on a finite number of sets (e.g., A ∪ B ∪ C) or an infinite number of sets. An infinite union, like ⋃_{n=1}^{∞} A_n, combines elements from a countably infinite sequence of sets.

Partition of a Set: A collection of non-empty subsets {A_i} forms a partition of a set S if they are mutually disjoint and their union is equal to S. This is a fundamental concept in combinatorics and probability.

⚠️

Common Mistakes

⚠️ Forgetting to Remove Duplicates: A common error is simply listing all elements from both sets without removing the duplicates. The union of {1, 2} and {2, 3} is {1, 2, 3}, not {1, 2, 2, 3}. A set only contains unique elements.
⚠️ Confusing Union (∪) with Intersection (∩): Students often mix up the symbols. Remember, the 'U' in Union looks like a cup holding everything from both sets. Intersection's symbol (∩) looks like a bridge connecting only the common elements.
⚠️ Incorrectly Calculating Cardinality: A frequent mistake is to assume |A ∪ B| = |A| + |B|. This is only true if the sets are disjoint. For overlapping sets, you must subtract the cardinality of the intersection (|A ∩ B|) to avoid double-counting.
🚀

Study Strategy

1 📖 Grasp Foundational Concepts
  • Define 'Union' (∪) as all elements present in either set A, set B, or both.
  • Use the Venn Diagram to visualize how the Union encompasses the total area of both circles.
  • Distinguish 'Union' from 'Intersection' (∩), which only includes elements common to both sets.
  • Review key properties like the commutative law (A ∪ B = B ∪ A) and the associative law.
2 🧠 Memorize the Core Formulas
  • Commit the primary formula to memory: |A ∪ B| = |A| + |B| - |A ∩ B|.
  • Understand why the intersection (|A ∩ B|) is subtracted: to correct for double-counting elements.
  • Learn the formula for disjoint (mutually exclusive) sets, where the formula simplifies to |A ∪ B| = |A| + |B|.
  • Familiarize yourself with the probability version: P(A ∪ B) = P(A) + P(B) - P(A ∩ B).
3 ✍️ Practice with Worked Examples
  • Follow the provided Worked Example step-by-step, ensuring you understand each calculation.
  • Solve the example again without looking at the solution to test your recall and application.
  • Identify the given values (|A|, |B|, |A ∩ B|) in new practice problems before attempting to solve.
  • Check your work against the 'Common Mistakes' section to avoid frequent errors like forgetting to subtract the intersection.
4 🌍 Apply to Real-World Scenarios
  • Translate a Real-World Scenario into a mathematical problem, identifying sets A, B, and their intersection.
  • Solve a practical problem, such as finding the total number of people who like coffee or tea from survey data.
  • Create your own simple scenario (e.g., friends who own a dog or a cat) and apply the formula.
  • Analyze the 'Applications' section to understand how the formula is used in fields like market research or public health.
By systematically building from concepts to application, you can confidently master the Union formula and solve complex real-world problems.

Frequently Asked Questions

×

×