C1.2; E1.2 - Sets and Venn diagrams

C1.2; E1.2 - Sets and Venn diagrams

Of 12 students, 7 swim, 6 cycle and 3 do both. How many do neither? Sets let you organise overlapping groups without counting anyone twice. Learn the shared C1.2 and E1.2 language of sets, unions, intersections, complements and counts using diagrams with two sets.

Sets and universal set

To answer the opening question, first decide who is included in the survey. “Does not swim” means something different among the 12 surveyed students than among everyone in the school.

Set and universal set

A set is a well-defined collection of objects, called its elements. The universal set, written UU, contains all the objects being considered in a particular problem. Curly brackets enclose a listed set: for example, V={a,e,i,o,u}V=\{a,e,i,o,u\}.

List each element only once. Order does not matter: {2,4,6}\{2,4,6\} and {6,2,4}\{6,2,4\} are the same set. A condition can define a set instead of a list. In A={x∣x is prime}A=\{x\mid x\text{ is prime}\}, the vertical line means “such that”; take only values allowed by the stated universal set.

Worked example 1: a condition using natural numbers

Question. Let U={0,1,2,3,4,5,6,7,8,9,10}U=\{0,1,2,3,4,5,6,7,8,9,10\}. List the elements of A={x∣x is prime}A=\{x\mid x\text{ is prime}\}.

Plan. Check the numbers in UU against the definition of prime.

primes up to 10:2, 3, 5, 7A={2,3,5,7}\begin{aligned} \text{primes up to 10}&: 2,\ 3,\ 5,\ 7\\ A&=\{2,3,5,7\} \end{aligned}

Zero and 1 are not prime, and the other allowed positive integers have extra factors.

Answer. A={2,3,5,7}A=\{2,3,5,7\}.

Check. Each listed number has exactly two positive factors, and all are in UU. The next prime, 11, is outside UU.

Now keep the same universe but change the condition to an interval. The boundary symbols determine whether endpoints are included.

Worked example 2: an interval within a finite universe

Question. With U={0,1,2,3,4,5,6,7,8,9,10}U=\{0,1,2,3,4,5,6,7,8,9,10\}, list B={x∣2≤x<6}B=\{x\mid2\le x<6\}.

Plan. Select the allowed whole numbers at least 2 and less than 6.

2≤x<6⟶2, 3, 4, 5B={2,3,4,5}\begin{aligned} 2\le x<6&\quad\longrightarrow\quad2,\ 3,\ 4,\ 5\\ B&=\{2,3,4,5\} \end{aligned}

Answer. B={2,3,4,5}B=\{2,3,4,5\}.

Check. The value 2 satisfies the inclusive lower bound. The value 6 fails the strict upper bound. A value such as 2.5 fits the inequality but is excluded by this UU.

If UU instead allowed every number between 0 and 10, the same interval condition would include 2.5 and infinitely many other values. The universe is part of the definition. Natural numbers in this course are 0,1,2,…0,1,2,\ldots, so a natural-number condition does not itself exclude zero.

Key idea

A set's rule must tell you unambiguously whether each allowed object belongs. “The nice numbers” is not a well-defined mathematical condition.

Use both the condition and its universe.

Union and intersection

A Venn diagram uses a rectangle for UU and a closed curve for each set. An element in both sets belongs in their overlap, written once. An element in neither set stays inside the rectangle but outside both curves.

Union and intersection

The union, A∪BA\cup B, contains elements in A or B or both. The intersection, A∩BA\cap B, contains elements in both A and B. The notation n(A)n(A) means the number of elements in A.

In a union, “or” includes “both”. This picture places each element of U={1,2,…,10}U=\{1,2,\ldots,10\} exactly once.

[DIAGRAM: asset_name: Two overlapping sets of numbers; asset_slug: two_sets_elements; caption: The overlap contains 6, while the union contains everything inside either circle.; description: A universal-set rectangle contains numbers one to ten exactly once. Set A is the even numbers two, four, six, eight and ten. Set B is three, six and nine. A-only contains two, four, eight and ten, the overlap contains six, B-only contains three and nine, and outside both are one, five and seven.]
The overlap contains 6, while the union contains everything inside either circle.

Worked example 3: read the two operations

Question. Let A={2,4,6,8,10}A=\{2,4,6,8,10\} and B={3,6,9}B=\{3,6,9\}. Find A∩BA\cap B, A∪BA\cup B and n(A∪B)n(A\cup B).

Plan. First select the shared elements, then combine both lists without repeating an element.

A∩B={6}in both listsA∪B={2,3,4,6,8,9,10}in either listn(A∪B)=7count the distinct elements\begin{aligned} A\cap B&=\{6\} &&\text{in both lists}\\ A\cup B&=\{2,3,4,6,8,9,10\} &&\text{in either list}\\ n(A\cup B)&=7 &&\text{count the distinct elements} \end{aligned}

Answer. {6}\{6\}, {2,3,4,6,8,9,10}\{2,3,4,6,8,9,10\}, and 7 respectively.

Check. The two original lists contain 5+3=85+3=8 entries, but 6 is counted twice. Removing one repeated entry gives 7.

The next sets are given by number properties rather than ready-made lists. List them first, then use the same operations.

Worked example 4: operations on defined sets

Question. Let U={1,2,…,12}U=\{1,2,\ldots,12\}. A is the set of factors of 12, and B is the set of multiples of 3 in UU. Find A∩BA\cap B and A∪BA\cup B.

Plan. Write each set explicitly, then identify common and combined elements.

A={1,2,3,4,6,12}B={3,6,9,12}A∩B={3,6,12}A∪B={1,2,3,4,6,9,12}\begin{aligned} A&=\{1,2,3,4,6,12\}\\ B&=\{3,6,9,12\}\\ A\cap B&=\{3,6,12\}\\ A\cup B&=\{1,2,3,4,6,9,12\} \end{aligned}

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

Check. The union has 6+4−3=76+4-3=7 elements: the 3 shared elements are included once, not twice.

The count of a union comes from adding each non-overlapping region once. This is why the overlap must be subtracted once if you start with n(A)+n(B)n(A)+n(B).

Watch out

A∩BA\cap B is a set; n(A∩B)n(A\cap B) is a number. For example, A∩B={3,6,12}A\cap B=\{3,6,12\} but n(A∩B)=3n(A\cap B)=3.

List every required element once.

Complement and counts

“Not in A” selects all the allowed elements outside A, including any that belong to B. It does not mean only the region outside both sets.

Complement

The complement of A, written A′A', contains all elements of UU that are not in A. Thus n(A′)=n(U)−n(A)n(A')=n(U)-n(A). The set (A∪B)′(A\cup B)' contains elements in neither A nor B.

When survey data give how many do both activities, put that number in the overlap first. Each set's total already includes the overlap.

Worked example 5: complete the opening survey

Question. Of 12 students, 7 swim (S), 6 cycle (C), and 3 do both. Find the four Venn-region counts and n(S′)n(S').

Plan. Fill the overlap, subtract it from each set total, then use the whole class total.

both=3swim only=7−3=4cycle only=6−3=3neither=12−(4+3+3)=2n(S′)=3+2=5\begin{aligned} \text{both}&=3\\ \text{swim only}&=7-3=4\\ \text{cycle only}&=6-3=3\\ \text{neither}&=12-(4+3+3)=2\\ n(S')&=3+2=5 \end{aligned}

Answer. Swim only 4, both 3, cycle only 3, neither 2; n(S′)=5n(S')=5.

Check. The four regions sum to 12. The swimming circle totals 4+3=74+3=7, and 12−7=512-7=5 do not swim.

The completed picture shows that the 3 students who cycle only also belong to S′S'.

[DIAGRAM: asset_name: Swimming and cycling survey; asset_slug: two_sets_counts; caption: The four disjoint regions total 12. The complement of S contains 3 plus 2 students.; description: A universal-set rectangle of twelve students contains two overlapping circles S and C. The S-only region is four, the overlap is three, the C-only region is three, and the region outside both is two. These are counts rather than lists of individual students.]
The four disjoint regions total 12. The complement of S contains 3 plus 2 students.

Now read counts already given in disjoint regions, including a complement combined with an intersection.

Worked example 6: select the correct regions

Question. In a survey, 6 people belong to A only, 5 to both A and B, 7 to B only and 2 to neither. Find n(A)n(A), n(A′)n(A') and n(A∩B′)n(A\cap B').

Plan. Translate each expression into the regions it includes.

n(A)=6+5=11all inside An(A′)=7+2=9all outside An(A∩B′)=6inside A, outside B\begin{aligned} n(A)&=6+5=11 &&\text{all inside A}\\ n(A')&=7+2=9 &&\text{all outside A}\\ n(A\cap B')&=6 &&\text{inside A, outside B} \end{aligned}

Answer. 11, 9 and 6 respectively.

Check. 11+9=2011+9=20, the total of the four regions. Of the 11 in A, removing the 5 also in B leaves 6.

A Venn diagram can display either individual elements or region counts. Its labels and question tell you which: a written 4 might identify the number 4 or count four people.

Watch out

If 7 swim and 3 do both, the “swim only” region is 7−3=47-3=4, not 7. Putting 7 outside the overlap would incorrectly make the swimming total 10.

Start with the overlap and check the total.

Quick Recap

  • State the universal set; it controls every listed set and complement.
  • A union means either set or both; an intersection means both.
  • Count overlap elements once in a union. The notation n(A)n(A) counts elements rather than listing them.
  • A complement includes everything in UU outside that set.

In the opening survey, 7+6−3=107+6-3=10 students do at least one activity, so 12−10=212-10=2 do neither.