1.5 - Sets and Venn diagrams

1.5 - Sets and Venn diagrams

Sets give you a precise way to sort objects into groups. You will describe membership, select unions, intersections and complements, and place elements in Venn diagrams. The same language works for numbers, letters and people.

Sets and membership

Where should 22 go if one circle means “even numbers” and another means “prime numbers”? And where should 11 go? You will build a diagram that gives both numbers exactly one home.

You already know

An even integer is divisible by 22. A prime number has exactly two positive factors, 11 and itself, so 11 is not prime.

Start with the primes below 88: 2,3,5,72, 3, 5, 7. Everyone using this rule obtains the same collection. “Nice numbers” is different: without a rule for “nice”, you cannot decide which numbers belong.

Set and element

A set is a well-defined collection of distinct objects. Each object in it is an element. Write the elements in braces, for example A={2,3,5,7}A=\{2,3,5,7\}. Then 5∈A5\in A means “55 belongs to AA”, and 4∉A4\notin A means “44 does not belong to AA”.

Order does not matter: {2,3,5,7}\{2,3,5,7\} and {7,5,3,2}\{7,5,3,2\} are the same set. Repeating an entry changes nothing either: {2,2,3}={2,3}\{2,2,3\}=\{2,3\}. A set records whether an object belongs, not how often it was written.

There is a neat reason why the opening number 22 is special: it is the only even prime. Any even integer larger than 22 has 22 as a factor in addition to 11 and itself, so it is not prime. Set notation is not supplied on either the Foundation or Higher formulae sheet.

Key idea

Membership is a yes-or-no decision about one object and one set. Braces describe the collection; ∈\in and ∉\notin describe whether an object belongs.

Check the actual entries before choosing a symbol. A number's size does not decide whether it belongs.

The universe and complements

“Not in my group” needs a boundary. If your problem considers only the integers from 11 to 66, an answer cannot suddenly include 77.

Universal set and empty set

The universal set, E\mathrm{E}, contains every object being considered. The empty set, ∅\varnothing, contains no elements. For example, there are no multiples of 77 in {1,2,3,4,5,6}\{1,2,3,4,5,6\}. The set {0}\{0\} is not empty: it contains the element 00.

Once you know the boundary, you can say exactly what lies outside a particular set.

Complement

The complement A′A' contains the elements of E\mathrm{E} that are not in AA. For example, if E={1,2,3}\mathrm{E}=\{1,2,3\} and A={2}A=\{2\}, then A′={1,3}A'=\{1,3\}.

To find a complement, work through the universal set and remove every member of the named set. The rule for complements is not supplied on either tier's formulae sheet.

Worked example 1: stay inside the universe

Question. Find A′A' for E={1,2,3,4,5,6}\mathrm{E}=\{1,2,3,4,5,6\} and A={2,4,6}A=\{2,4,6\}.

Plan. Start with the universe and keep only the entries not in AA.

E={1,2,3,4,5,6}start with all candidatesA={2,4,6}remove these entriesA′={1,3,5}keep the rest\begin{aligned} \mathrm{E}&=\{1,2,3,4,5,6\} && \text{start with all candidates}\\ A&=\{2,4,6\} && \text{remove these entries}\\ A'&=\{1,3,5\} && \text{keep the rest} \end{aligned}

Why start with E\mathrm{E}? The complement is the rest of this universe, not every other number that exists.

Answer. A′={1,3,5}A'=\{1,3,5\}.

Check. The two lists have no shared entry, and together they contain every entry of E\mathrm{E}.

Change only the universe by adding 77. The set AA stays the same, but its complement changes.

Worked example 2: change the boundary

Question. Find A′A' for E={1,2,3,4,5,6,7}\mathrm{E}=\{1,2,3,4,5,6,7\} and A={2,4,6}A=\{2,4,6\}.

Plan. Remove the same entries from the enlarged universe.

E={1,2,3,4,5,6,7}include the new candidateA={2,4,6}remove the same entriesA′={1,3,5,7}retain all others\begin{aligned} \mathrm{E}&=\{1,2,3,4,5,6,7\} && \text{include the new candidate}\\ A&=\{2,4,6\} && \text{remove the same entries}\\ A'&=\{1,3,5,7\} && \text{retain all others} \end{aligned}

Why include 77 now? It is in the new universe and is not in AA.

Answer. A′={1,3,5,7}A'=\{1,3,5,7\}.

Check. Every integer from 11 to 77 appears in exactly one of AA and A′A'.

An empty result and a result containing zero have different meanings.

Watch out

The line ∅={0}\varnothing=\{0\} is wrong. The left side has no element; the right side contains 00. If nothing remains after removing a set from the universe, write ∅\varnothing.

For your turn, change the universe once more and keep the same set to remove.

Union and intersection

Two sets can share members. You need different instructions for selecting their shared members and for collecting everything in either set.

Intersection and union

The intersection A∩BA\cap B contains elements in both sets. The union A∪BA\cup B contains elements in at least one set, including those in both. For A={1,2,4}A=\{1,2,4\} and B={2,3,4}B=\{2,3,4\}, the shared entries are 22 and 44.

Think “both” for an intersection and “either or both” for a union. Write every selected element once. These operations are not supplied on either tier's formulae sheet.

Worked example 3: select both or either

Question. For A={1,2,4}A=\{1,2,4\} and B={2,3,4}B=\{2,3,4\}, find A∩BA\cap B and A∪BA\cup B.

Plan. First find entries common to the lists; then combine the lists without repeats.

A∩B={2,4}present in both listsA∪B={1,2,3,4}present in at least one\begin{aligned} A\cap B&=\{2,4\} && \text{present in both lists}\\ A\cup B&=\{1,2,3,4\} && \text{present in at least one} \end{aligned}

Why keep 22 and 44 in the union? Belonging to both still satisfies “at least one”.

Answer. A∩B={2,4}A\cap B=\{2,4\}, A∪B={1,2,3,4}A\cup B=\{1,2,3,4\}.

Check. Every intersection entry lies in both original sets; every union entry appears in an original list.

Change only the final entry of BB, from 44 to 55. One shared member disappears, while a new union member appears.

Worked example 4: one entry changes

Question. For A={1,2,4}A=\{1,2,4\} and B={2,3,5}B=\{2,3,5\}, find A∩BA\cap B and A∪BA\cup B.

Plan. Test common membership, then collect all distinct entries.

A∩B={2}only two is sharedA∪B={1,2,3,4,5}include either set\begin{aligned} A\cap B&=\{2\} && \text{only two is shared}\\ A\cup B&=\{1,2,3,4,5\} && \text{include either set} \end{aligned}

Why is 44 still in the union? It belongs to AA; union membership does not require both sets.

Answer. A∩B={2}A\cap B=\{2\}, A∪B={1,2,3,4,5}A\cup B=\{1,2,3,4,5\}.

Check. Only 22 is repeated across the two original lists, and it is written just once in each answer.

If no elements are shared, the sets are disjoint and their intersection is ∅\varnothing. With complements, A∩B′A\cap B' means “in AA, but not in BB”, while (A∪B)′(A\cup B)' means “in neither”. Brackets show what the complement applies to.

Watch out

Writing A∪B={1,3}A\cup B=\{1,3\} for the sets in Worked example 33 wrongly removes the shared entries. A union includes the overlap. The correct union is {1,2,3,4}\{1,2,3,4\}.

This time change one entry of AA. Use the same two selection rules.

Representing sets in Venn diagrams

A Venn diagram turns membership rules into positions. Draw a rectangle for E\mathrm{E} and labelled closed curves for the sets. Inside a circle means “belongs”; outside it means “does not belong”. The overlapping region belongs to both sets.

Draw enough space for every region, then put shared elements in the overlap first. Next fill each “only” region. Finally put elements in neither set inside the rectangle but outside both circles. Circle areas do not measure the size of the sets.

Worked example 5: give every element one home

Question. Represent E={1,2,3,4,5,6,7,8}\mathrm{E}=\{1,2,3,4,5,6,7,8\}, A={2,4,6,8}A=\{2,4,6,8\} and B={2,3,5,7}B=\{2,3,5,7\} in a Venn diagram.

Plan. Draw and label the rectangle and two overlapping circles, then fill the shared, only and neither regions.

both: {2}start with shared entriesA only: {4,6,8}remove the shared entryB only: {3,5,7}remove the shared entryneither: {1}account for the universe\begin{aligned} \text{both}&:\ \{2\} && \text{start with shared entries}\\ A\text{ only}&:\ \{4,6,8\} && \text{remove the shared entry}\\ B\text{ only}&:\ \{3,5,7\} && \text{remove the shared entry}\\ \text{neither}&:\ \{1\} && \text{account for the universe} \end{aligned}

Why place 22 only once? A point in the overlap is already inside both circles.

Answer. The labelled diagram below represents the three given sets.

Check. Read the whole of each circle, including its overlap: you recover AA and BB. All eight universe elements appear once.

Here is the completed construction. It answers the opening puzzle: 22 is even and prime, while 11 is neither.

[DIAGRAM: asset_slug: sets_venn_elements; caption: Each of the eight elements occupies exactly one region; description: Rectangle E contains overlapping circles A and B. A only contains 4,6,8, overlap contains 2, B only contains 3,5,7 and outside both contains 1. Positions are set membership, not numerical scale.; file: sets_venn_elements.png; recommended_method: matplotlib]
Each of the eight elements occupies exactly one region

Now change only one entry of BB, replacing 22 with 11. The sets become disjoint, so draw separate circles rather than an overlap containing a member.

Worked example 6: represent disjoint sets

Question. Represent E={1,2,3,4,5,6,7,8}\mathrm{E}=\{1,2,3,4,5,6,7,8\}, A={2,4,6,8}A=\{2,4,6,8\} and B={1,3,5,7}B=\{1,3,5,7\} in a Venn diagram.

Plan. Draw two separate labelled circles in the universal rectangle, then place the members of each set.

A∩B=∅no shared entriesA only: {2,4,6,8}fill the first circleB only: {1,3,5,7}fill the second circleneither: ∅all entries are placed\begin{aligned} A\cap B&=\varnothing && \text{no shared entries}\\ A\text{ only}&:\ \{2,4,6,8\} && \text{fill the first circle}\\ B\text{ only}&:\ \{1,3,5,7\} && \text{fill the second circle}\\ \text{neither}&:\ \varnothing && \text{all entries are placed} \end{aligned}

Why separate the circles? It makes the absence of shared members clear. Overlapping circles with an empty intersection would also represent these sets correctly.

Answer. Put 2,4,6,82,4,6,8 inside AA, 1,3,5,71,3,5,7 inside BB, and nothing outside the circles.

Check. The two lists together account for all eight elements, with no repeat.

If a whole set belongs inside another, draw its curve wholly inside the other's curve. In every case, it is membership, rather than the shape or size of a circle, that decides placement.

Watch out

Putting 22 in the AA-only region and another 22 in the BB-only region misrepresents Worked example 55. Both positions claim “not in the other set”. Put one 22 in the overlap instead.

Use the same region method with the universe enlarged by one element. A short list for each region lets you check a diagram you draw on paper.

Quick Recap

  • A set has distinct elements; x∈Ax\in A and x∉Ax\notin A describe membership.
  • The universal set sets the boundary; A′A' selects its members outside AA.
  • An intersection means both; a union means either or both.
  • In a Venn diagram, place every element once and include the overlap when reading either circle.

In the opening puzzle, 22 belongs in the overlap of the even and prime sets. The number 11 goes outside both circles, but inside the universal rectangle.