Lesson 1 · Cardinality of Sets

Union of Sets

MathematicsSubject
8 minEstimated read

Two Friends and Their Flower Colours

Supriya and Anjila went into a garden and each picked some flowers. Afterwards, each of them made a list of the colours she had picked. Call Supriya's set of colours S and Anjila's set of colours A.

S = {red, yellow, blue, pink}

A = {yellow, white, blue, purple, orange, red}

Some colours appear in both lists. Red, yellow and blue were picked by both girls. Pink was picked only by Supriya. White, purple and orange were picked only by Anjila. Both sets sit inside one universal set U, here the set of all flower colours. On a Venn diagram, U is drawn as a rectangle and S and A as two overlapping circles inside it. The colours that belong to both sets sit in the part where the circles overlap.

The colours common to S and A sit in the overlap. Pink is only in S, and white, purple and orange are only in A.
The colours common to S and A sit in the overlap. Pink is only in S, and white, purple and orange are only in A.

Now ask: which colours were picked by Supriya, or by Anjila, or by both? To answer, the two lists are put together into one list. Red, yellow and blue appear in both lists, but in the new list each of them is written only once.

Colours picked by either girl = {red, yellow, blue, pink, white, purple, orange}

The new set has 7 colours, not 10. Adding 4 and 6 gives 10, but 3 colours were counted twice. A set made by gathering every member of two sets in this way is called the union of the two sets.

What the Union Means and How It Is Written

Definition

If A and B are subsets of a universal set U, the union of A and B is the set of all members that belong to A, or to B, or to both. It is written \( A \cup B \) and read "A union B".

The sign \( \cup \) is shaped like a cup open at the top. A member gets into \( A \cup B \) if it is in A only, or in B only, or in both. There is just one condition: it must be in at least one of the two sets.

Definition

Union in set-builder form: \( A \cup B = \{x : x \in A \text{ or } x \in B\} \)

This is read as: \( A \cup B \) is the set of all x such that x is a member of A or x is a member of B. In mathematics the word "or" here includes the case where x is in both.

To show \( A \cup B \) on a Venn diagram, both circles are shaded completely: the part of A alone, the part of B alone and the overlap in the middle. The part of U outside the circles stays unshaded, because a member there belongs to neither A nor B.

Every part of both circles is shaded. The whole shaded region is \( A \cup B \).
Every part of both circles is shaded. The whole shaded region is \( A \cup B \).
Common mistake

Do not write a common member twice when forming a union. A set lists each member only once, so a member found in both sets appears in the union just once.

Union of Three Sets

A union is not limited to two sets. Gathering every member of three sets A, B and C gives \( A \cup B \cup C \). A member belongs to it if it is in at least one of the three sets.

Definition

Union of three sets: \( A \cup B \cup C = \{x : x \in A \text{ or } x \in B \text{ or } x \in C\} \)

On a Venn diagram, three circles overlap one another. To show \( A \cup B \cup C \), every part of all three circles is shaded.

Example 1: Union of Overlapping Sets

Question: If P = {multiples of 3 less than 20} and Q = {multiples of 2 less than 20}, find \( P \cup Q \) and show it on a Venn diagram.

Step 1: Listing the multiples of 3 that are less than 20. Counting in threes and stopping before 20 gives:

\[ P = \{3, 6, 9, 12, 15, 18\} \]

Step 2: Listing the multiples of 2 that are less than 20:

\[ Q = \{2, 4, 6, 8, 10, 12, 14, 16, 18\} \]

Step 3: Writing the two sets joined by the union sign:

\[ \begin{aligned} P \cup Q = {} & \{3, 6, 9, 12, 15, 18\} \\ & \cup \{2, 4, 6, 8, 10, 12, 14, 16, 18\} \end{aligned} \]

Step 4: Merging the lists in increasing order. Since 6, 12 and 18 are in both sets, each is written only once:

\[ \begin{aligned} P \cup Q = \{ & 2, 3, 4, 6, 8, 9, \\ & 10, 12, 14, 15, 16, 18\} \end{aligned} \]

Check: P has 6 members and Q has 9. Three members are shared, so the union should have \( 6 + 9 - 3 = 12 \) members, and the answer above has exactly 12. On the Venn diagram, 6, 12 and 18 go in the overlap, 3, 9 and 15 go in the part of P alone, and the other even numbers go in the part of Q alone.

The shaded region, both circles in full, represents \( P \cup Q \). The shared members 6, 12 and 18 sit in the middle.
The shaded region, both circles in full, represents \( P \cup Q \). The shared members 6, 12 and 18 sit in the middle.

Example 2: When One Set Is a Subset of the Other

Question: A farmer grows A = {wheat, buckwheat, mustard, tomato, brinjal, chilli, barley, potato, beans} in her field, and B = {buckwheat, barley, potato, beans} is the set of crops she grows on the upper terrace. Find \( A \cup B \) and show it on a Venn diagram.

Step 1: Checking the members of B. Buckwheat, barley, potato and beans are all in A as well, so B is a subset of A:

\[ B \subset A \]

Step 2: Writing the two sets joined by the union sign:

\( A \cup B \) = {wheat, buckwheat, mustard, tomato, brinjal, chilli, barley, potato, beans} \( \cup \) {buckwheat, barley, potato, beans}

Step 3: Merging the lists. Every member of B is already in A, so nothing new is added:

\( A \cup B \) = {wheat, buckwheat, mustard, tomato, brinjal, chilli, barley, potato, beans}

\[ A \cup B = A \]

On the Venn diagram, the circle for B lies completely inside the circle for A. Shading all of A automatically shades B, so the shaded region is just A.

The circle B lies inside A. The shaded region represents \( A \cup B \), which is the same as A.
The circle B lies inside A. The shaded region represents \( A \cup B \), which is the same as A.
Key idea

When one of two sets is a subset of the other, their union is the larger set. If \( B \subset A \), then \( A \cup B = A \).

Union of Disjoint Sets

Two sets with no member in common are called disjoint sets. On a Venn diagram their circles do not touch. When their union is formed, there is no repeated member to leave out, so every member of both sets simply goes into the union.

Key idea

When two sets are disjoint, their union is the set made of all the members of both sets together. The number of members in the union is exactly the sum of the numbers in each set.

Example 3 question: If P = {even numbers less than 10} and Q = {odd numbers less than 10}, find \( P \cup Q \) and show it on a Venn diagram.

Step 1: Listing the even numbers less than 10:

\[ P = \{2, 4, 6, 8\} \]

Step 2: Listing the odd numbers less than 10:

\[ Q = \{1, 3, 5, 7, 9\} \]

Step 3: Joining the sets with the union sign. No number is both even and odd, so P and Q are disjoint:

\[ P \cup Q = \{2, 4, 6, 8\} \cup \{1, 3, 5, 7, 9\} \]

Step 4: Putting all nine members in increasing order:

\[ P \cup Q = \{1, 2, 3, 4, 5, 6, 7, 8, 9\} \]

The 4 members of P and the 5 members of Q make exactly 9, because nothing is shared. On the Venn diagram, two separate circles are both shaded completely.

The circles for P and Q do not meet. The two shaded circles together represent \( P \cup Q \).
The circles for P and Q do not meet. The two shaded circles together represent \( P \cup Q \).

Example 4: Finding the Union of Three Sets

Question: If \( A = \{a, b, c, d, e\} \), \( B = \{a, e, i, o, u\} \) and \( C = \{d, e, f, g\} \), find \( A \cup B \cup C \) and show it on a Venn diagram.

Step 1: Writing the three sets joined by union signs:

\[ \begin{aligned} A \cup B \cup C = {} & \{a, b, c, d, e\} \\ & \cup \{a, e, i, o, u\} \\ & \cup \{d, e, f, g\} \end{aligned} \]

Step 2: Removing the repeats. The letter a is in A and B, d is in A and C, and e is in all three sets. Writing each of these once and collecting every letter gives:

\[ \begin{aligned} A \cup B \cup C = \{ & a, b, c, d, e, \\ & f, g, i, o, u\} \end{aligned} \]

Check: the three lists contain \( 5 + 5 + 4 = 14 \) letters in all, but a and d were each written twice and e three times. Taking away the \( 1 + 1 + 2 = 4 \) extra copies leaves \( 14 - 4 = 10 \), and the answer has exactly 10 letters. On the Venn diagram, e sits in the centre where all three circles overlap, a sits where only A and B overlap, and d sits where only A and C overlap.

The Three Cases Side by Side

Looking at how two sets are related tells you in advance what their union will look like. The table compares the three cases met in the examples.

How the sets are relatedVenn diagramWhat the union is
Some members shared (overlapping sets)Two circles partly overlappingMembers of both, shared ones written once
One inside the other, \( B \subset A \)Circle B inside circle A\( A \cup B = A \), the larger set
Nothing shared (disjoint sets)Two separate circlesEvery member of both sets together

Whatever the case, the rule is the same: every member of at least one set is written once in the union, and on the Venn diagram every circle is shaded completely.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.