This note covers set language, set notation and Venn diagrams for one, two and three sets. Sets give you a precise way to describe groups of numbers or objects, and Venn diagrams turn word problems about overlapping groups into a picture you can count from and use for probability.
Key ideas
A set is a collection of items called elements (or members). Sets are written in curly brackets, for example \(A=\{2,4,6,8\}\). The order of elements does not matter, and each element is listed once.
You can describe a set in three ways: by listing, by a word description (such as "the prime numbers less than 12"), or with set-builder notation. In set-builder notation, \(\{x: x\text{ is an integer},\ 2\lt x\le7\}\) means "the set of all \(x\) such that \(x\) is an integer and \(x\) is greater than 2 and at most 7". This set is \(\{3,4,5,6,7\}\).
The universal set \(\xi\) contains every element being considered in the problem. Every other set in the problem is part of \(\xi\). The empty set \(\emptyset\) (also written \(\{\}\)) has no elements.
Operations and relationships:
- The union \(A\cup B\) contains the elements that are in \(A\) or in \(B\) or in both.
- The intersection \(A\cap B\) contains the elements that are in both \(A\) and \(B\). If \(A\cap B=\emptyset\), the sets are disjoint.
- The complement \(A'\) contains the elements of \(\xi\) that are not in \(A\).
- \(A\subset B\) means \(A\) is a subset of \(B\): every element of \(A\) is also in \(B\).
- \(n(A)\) is the number of elements in \(A\).
Venn diagrams. Draw a rectangle for \(\xi\) and a circle for each set. Overlapping circles show the elements in common. The best method is to fill in the middle overlap first, then work outwards, and finally put the elements outside all the circles. Always check that the numbers add up to \(n(\xi)\).
For two sets, the counting rule is \(n(A\cup B)=n(A)+n(B)-n(A\cap B)\). You subtract the intersection because it was counted twice.
Probability from a Venn diagram. If an element is chosen at random from \(\xi\), then the probability that it lies in a given region is the number of elements in that region divided by \(n(\xi)\).
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \(x\in A\), \(x\notin A\) | \(x\) is an element of \(A\); \(x\) is not an element of \(A\). |
| \(\xi\) | Universal set: everything under consideration. |
| \(\emptyset\) | Empty set: no elements. |
| \(A\cup B\) | Union: in \(A\), in \(B\), or in both. |
| \(A\cap B\) | Intersection: in both \(A\) and \(B\). |
| \(A'\) | Complement: in \(\xi\) but not in \(A\). |
| \(A\subset B\) | \(A\) is a subset of \(B\). |
| \(n(A)\) | Number of elements in \(A\). |
| \(n(A\cup B)=n(A)+n(B)-n(A\cap B)\) | Counting rule for two overlapping sets. |
| \(P(\text{region})=\dfrac{n(\text{region})}{n(\xi)}\) | Probability of choosing from a region at random. |
Worked examples
Example 1 \(\xi=\{1,2,3,\ldots,20\}\), \(A\) is the set of multiples of 3 and \(B\) is the set of even numbers. Find \(A\cap B\), \(n(A\cup B)\) and \(n\big((A\cup B)'\big)\).
List the sets. \(A=\{3,6,9,12,15,18\}\), so \(n(A)=6\). \(B=\{2,4,6,\ldots,20\}\), so \(n(B)=10\).
The elements in both lists are 6, 12 and 18. So \(A\cap B=\{6,12,18\}\) and \(n(A\cap B)=3\).
Use the counting rule: \(n(A\cup B)=6+10-3=13\).
The complement of \(A\cup B\) is everything in \(\xi\) outside it: \(20-13=7\) elements. These are \(1,5,7,11,13,17,19\).
Answer: \(A\cap B=\{6,12,18\}\); \(n(A\cup B)=13\); \(n\big((A\cup B)'\big)=7\).
Example 2 In a class of 40 students, 25 play football (F), 18 play tennis (T) and 6 play neither. A student is chosen at random. Find the number who play both sports, then the probability that the student plays tennis only.
The number playing at least one sport is \(40-6=34\). So \(n(F\cup T)=34\).
Use the counting rule: \(34=25+18-n(F\cap T)\), so \(n(F\cap T)=43-34=9\).
Football only: \(25-9=16\). Tennis only: \(18-9=9\). Check: \(16+9+9+6=40\).
The probability of tennis only is \(\dfrac{9}{40}\).
Answer: 9 students play both; probability \(=\dfrac{9}{40}=0.225\).
Example 3 \(\xi=\{1,2,\ldots,12\}\). \(P\) is the set of prime numbers, \(O\) is the set of odd numbers and \(T\) is the set of multiples of 3. Place the numbers in a three-set Venn diagram and find \(n(P\cup T)\) and \(n(O'\cap P)\).
\(P=\{2,3,5,7,11\}\), \(O=\{1,3,5,7,9,11\}\), \(T=\{3,6,9,12\}\).
Start with the centre, in all three sets: only 3 is prime, odd and a multiple of 3.
In \(P\) and \(O\) but not \(T\): 5, 7, 11. In \(O\) and \(T\) but not \(P\): 9. In \(P\) and \(T\) but not \(O\): none.
In one set only: \(P\) only is 2; \(O\) only is 1; \(T\) only is 6 and 12.
Outside all circles: 4, 8, 10. Check: \(1+3+1+1+1+2+3=12\).
\(P\cup T\) contains \(2,3,5,7,11,6,9,12\), which is 8 elements. \(O'\) is the even numbers, and the only even prime is 2, so \(O'\cap P=\{2\}\) and its size is 1.
Answer: \(n(P\cup T)=8\); \(n(O'\cap P)=1\).
Common errors
- Writing the total of a circle in the overlap region only. Each circle total includes the overlap, so subtract the intersection to find "only" regions.
- Confusing \(\cup\) with \(\cap\). Union means "or" (a bigger set); intersection means "and" (a smaller set).
- Forgetting the elements outside the circles, so the regions do not add up to \(n(\xi)\).
- Reading \(A'\) as "the elements of \(B\)". The complement means everything in \(\xi\) not in \(A\), including elements outside every circle.
- Listing an element twice when finding \(A\cup B\). Each element is written once.
Exam tip: when a Venn diagram problem gives a total and the numbers for each set, always fill in the intersection first and write the regions as "only" numbers. Then add every region to check against the total.
Check yourself
- List the elements of \(\{x: x\text{ is an integer},\ -2\le x\lt3\}\).
Answer
\(\{-2,-1,0,1,2\}\). The value 3 is excluded because of the strict inequality. - \(n(A)=12\), \(n(B)=9\) and \(n(A\cup B)=17\). Find \(n(A\cap B)\).
Answer
\(17=12+9-n(A\cap B)\), so \(n(A\cap B)=21-17=4\). - \(\xi=\{1,2,3,4,5,6,7,8,9,10\}\), \(A=\{1,3,5,7,9\}\), \(B=\{2,3,5,7\}\). Find \(A\cap B'\).
Answer
\(B'=\{1,4,6,8,9,10\}\). The elements of \(A\) that are also in \(B'\) are 1 and 9. So \(A\cap B'=\{1,9\}\). - In a group of 30 people, 17 have a bike (B), 12 have a scooter (S) and 5 have both. How many have neither?
Answer
\(n(B\cup S)=17+12-5=24\). Neither: \(30-24=6\).