Three Sets in One Venn Diagram
When three sets overlap, their Venn diagram has three circles drawn inside the rectangle that stands for the universal set U. Each circle crosses the other two, and together they cut the rectangle into separate regions. Every element of U sits in exactly one of those regions. The two diagrams below look almost alike. In Figure 1 every number lies inside at least one circle. In Figure 2 the number 8 has moved out of the circles, and a new number, 10, has been placed outside them as well.


Set A is the same in both figures: A = {1, 3, 4, 6, 9}. In Figure 1, B = {5, 6, 7, 8, 9} and C = {2, 4, 6, 8}. In Figure 2 the element 8 has left both of these circles, so B = {5, 6, 7, 9} and C = {2, 4, 6}. Counting the elements gives this table.
| Cardinality | Figure 1 | Figure 2 |
| \( n(A) \) | 5 | 5 |
| \( n(B) \) | 5 | 4 |
| \( n(C) \) | 4 | 3 |
| \( n(A \cup B \cup C) \) | 9 | 8 |
| \( n(U) \) | 9 | 10 |
In Figure 1 nothing lies outside the circles, so \( n(A \cup B \cup C) = n(U) = 9 \). In Figure 2 two elements, 8 and 10, lie outside all three circles, so \( n(A \cup B \cup C) = 8 \), which is 2 less than \( n(U) = 10 \). The elements outside every circle make up the complement of \( A \cup B \cup C \). The union and its complement together fill the whole of U:
\[ n(U) = n(A \cup B \cup C) + n(\overline{A \cup B \cup C}) \]
Cardinality: the number of elements in a set. The cardinality of a set A is written \( n(A) \).
Complement of \( A \cup B \cup C \): the elements of U that belong to none of the three sets. Their number, \( n(\overline{A \cup B \cup C}) \), answers every question about people who chose none or neither.
\( n(A \cup B \cup C) \) can never be larger than \( n(U) \). The two are equal only when no element lies outside all three circles.
Filling a Venn Diagram from a Survey
A survey does not hand you lists of names. It gives counts. Here is a typical one. In a class, 40 students like oranges, 35 like mangoes and 50 like bananas. Of these, 15 like oranges and mangoes, 20 like mangoes and bananas, 25 like oranges and bananas, and 5 like all three fruits. Another 30 students like none of the three. How many students took part in the survey?
Let O, M and B be the sets of students who like oranges, mangoes and bananas. The count 15 for oranges and mangoes already includes the 5 students who like all three, so 15 cannot be written straight into one region. This is why a survey diagram is always filled from the centre outwards, in this order:
- Write the number in all three sets in the centre.
- Write the number in none of the sets outside the circles.
- For each pair of sets, subtract the centre from the pair's count. This gives the region for those two sets only.
- For each set, subtract everything already written inside its circle from its total. This gives the region for that set only.
- Add all eight regions to get n(U).
Step 1: The centre holds the students who like all three fruits:
\[ n(O \cap M \cap B) = 5 \]
Step 2: Outside the circles go the students who like none of the fruits:
\[ n(\overline{O \cup M \cup B}) = 30 \]
Step 3: Orange and mango only. The 15 includes the 5 in the centre, so subtracting them:
\[ n_o(O \cap M) = 15 - 5 = 10 \]
Step 4: Mango and banana only, subtracting the centre from 20:
\[ n_o(M \cap B) = 20 - 5 = 15 \]
Step 5: Orange and banana only, subtracting the centre from 25:
\[ n_o(O \cap B) = 25 - 5 = 20 \]
Step 6: Orange only. Circle O already holds 5 in the centre and 10 and 20 in its two shared regions, so these are taken away from 40:
\[ n_o(O) = 40 - (5 + 10 + 20) = 5 \]
Step 7: Mango only, taking 5, 10 and 15 away from 35:
\[ n_o(M) = 35 - (5 + 10 + 15) = 5 \]
Step 8: Banana only, taking 5, 15 and 20 away from 50:
\[ n_o(B) = 50 - (5 + 15 + 20) = 10 \]
Step 9: Adding all eight regions to get the total number of students:
\[ \begin{aligned} n(U) &= 5 + 5 + 10 + 10 \\ &\quad + 15 + 20 + 5 + 30 \\ &= 100 \end{aligned} \]

So 100 students took part in the survey. As a check, the four numbers inside circle O are 5, 10, 5 and 20, and they add up to 40, the number who like oranges.
Do not write 15 in the region shared by O and M alone. The 15 is \( n(O \cap M) \), the whole overlap, and it already contains the 5 students in the centre. Only \( 15 - 5 = 10 \) belong in that region.
The Eight Regions and Their Names
Three overlapping circles always cut U into eight regions: seven inside the circles and one outside them all. To name a single region, a small o is written below the n. \( n_o(A) \) is read as 'n of A only' and counts the elements that are in A but in neither B nor C. In the same way, \( n_o(A \cap B) \) counts the elements that are in both A and B but not in C.

Only A, written \( n_o(A) \): the number of elements that belong to A and to neither of the other two sets.
A and B only, written \( n_o(A \cap B) \): the number of elements that belong to both A and B but not to C.
- \( n_o(A) \): in A only
- \( n_o(B) \): in B only
- \( n_o(C) \): in C only
- \( n_o(A \cap B) \): in A and B, not in C
- \( n_o(B \cap C) \): in B and C, not in A
- \( n_o(A \cap C) \): in A and C, not in B
- \( n(A \cap B \cap C) \): in all three sets, the centre
- \( n(\overline{A \cup B \cup C}) \): in none of the three, still inside U
Reading the diagram circle by circle gives the relations that every problem in this topic uses. A pair-only region is the whole overlap of the two sets with the centre taken out:
\[ \begin{aligned} n_o(A \cap B) &= n(A \cap B) - n(A \cap B \cap C) \\ n_o(A \cap C) &= n(A \cap C) - n(A \cap B \cap C) \\ n_o(B \cap C) &= n(B \cap C) - n(A \cap B \cap C) \end{aligned} \]
Each circle is made of four regions: its own only region, its two pair-only regions and the centre:
\[ \begin{aligned} n(A) &= n_o(A) + n_o(A \cap B) \\ &\quad + n_o(A \cap C) + n(A \cap B \cap C) \\ n(B) &= n_o(B) + n_o(A \cap B) \\ &\quad + n_o(B \cap C) + n(A \cap B \cap C) \\ n(C) &= n_o(C) + n_o(A \cap C) \\ &\quad + n_o(B \cap C) + n(A \cap B \cap C) \end{aligned} \]
The union is all seven regions inside the circles. Adding the region outside them gives n(U), exactly as in Figure 2.
\[ \begin{aligned} & n(A \cup B \cup C) \\ &= n_o(A) + n_o(B) + n_o(C) \\ &\quad + n_o(A \cap B) + n_o(B \cap C) \\ &\quad + n_o(A \cap C) + n(A \cap B \cap C) \end{aligned} \]
When the elements themselves are written in the regions, every count is read straight off the diagram. Look at the sets P, Q and R below.

The region for P only holds 1, 2, 3 and 18, so \( n_o(P) = 4 \). The centre holds only 6, so \( n(P \cap Q \cap R) = 1 \). P and R share 4 and 6, so \( n(P \cap R) = 2 \). Of these two, 6 also belongs to Q, so \( n_o(P \cap R) = 1 \). Outside all three circles lie 7, 8, 10 and 14, so \( n(\overline{P \cup Q \cup R}) = 4 \).
The Union Formula for Three Sets
Start with two overlapping sets. Adding \( n(A) \) and \( n(B) \) counts the shared elements twice, once inside each set. Subtracting the overlap once puts this right.

\[ n(A \cup B) = n(A) + n(B) - n(A \cap B) \]
For three sets the same rule is used twice. The idea is to treat \( A \cup B \) as a single set and join C to it.
Step 1: Writing the union of three sets as the union of two sets, \( A \cup B \) and C, and using the two-set rule:
\[ \begin{aligned} n(A \cup B \cup C) &= n\{(A \cup B) \cup C\} \\ &= n(A \cup B) + n(C) \\ &\quad - n\{(A \cup B) \cap C\} \end{aligned} \]
Step 2: Expanding \( n(A \cup B) \) by the two-set rule. By the distributive law, \( (A \cup B) \cap C = (A \cap C) \cup (B \cap C) \), so the expression becomes:
\[ \begin{aligned} &= n(A) + n(B) - n(A \cap B) \\ &\quad + n(C) - n\{(A \cap C) \cup (B \cap C)\} \end{aligned} \]
Step 3: Using the two-set rule once more on the last term. The common part of \( A \cap C \) and \( B \cap C \) is \( A \cap B \cap C \), so:
\[ \begin{aligned} & n\{(A \cap C) \cup (B \cap C)\} \\ &= n(A \cap C) + n(B \cap C) \\ &\quad - n(A \cap B \cap C) \end{aligned} \]
Step 4: Putting this back into Step 2, opening the bracket and arranging the terms:
\[ \begin{aligned} & n(A \cup B \cup C) \\ &= n(A) + n(B) + n(C) \\ &\quad - n(A \cap B) - n(B \cap C) \\ &\quad - n(A \cap C) + n(A \cap B \cap C) \end{aligned} \]
Add the three sets, subtract the three pairs, then add back the centre. This works for any three sets.
A quick count shows why the centre is added back. An element in all three sets is counted three times in \( n(A) + n(B) + n(C) \). It is then removed three times by the three pair terms, which leaves it not counted at all. Adding \( n(A \cap B \cap C) \) counts it exactly once. An element in exactly two sets is counted twice and removed once, so it is already counted once and needs nothing more.
Overlapping sets: sets that have at least one element in common.
Disjoint sets: sets that have no element in common, so every intersection between them is empty.
If A, B and C are disjoint, every intersection has cardinality 0, and the formula shrinks to a plain sum:
\[ n(A \cup B \cup C) = n(A) + n(B) + n(C) \]
Only One Set and Exactly Two Sets
Survey questions often ask how many people chose only one thing, or exactly two things. Both answers come straight from the region relations above.
Exactly two sets: the elements that belong to two of the sets but not to the third. They fill the three pair-only regions.
\[ \begin{aligned} & n_o(A \cap B) + n_o(B \cap C) + n_o(A \cap C) \\ &= n(A \cap B) + n(B \cap C) \\ &\quad + n(A \cap C) - 3\,n(A \cap B \cap C) \end{aligned} \]
The centre is taken away three times because it sits inside all three pair counts, and each pair-only region needs it removed once.
Only one set: the elements that belong to exactly one of the three sets. Their number is \( n_o(A) + n_o(B) + n_o(C) \).
To find one only region without drawing, start from the circle relation \( n(A) = n_o(A) + n_o(A \cap B) + n_o(A \cap C) + n(A \cap B \cap C) \). Replace each pair-only region by its pair count less the centre, and collect the centre terms. Two centres are added and one is subtracted, which leaves one centre added:
\[ \begin{aligned} n_o(A) &= n(A) - n(A \cap B) \\ &\quad - n(A \cap C) + n(A \cap B \cap C) \end{aligned} \]
At least one set: the elements that belong to one, two or all three of the sets. Their number is \( n(A \cup B \cup C) \).
'A and B' in a survey means \( n(A \cap B) \), which includes the people who also chose C. 'A and B only' or 'exactly A and B' means \( n_o(A \cap B) \), which leaves them out. Read the question for the word only before you put a number in a region.
Worked Example 1: Union and Complement
Given \( n(U) = 120 \), \( n(A) = 48 \), \( n(B) = 51 \), \( n(C) = 40 \), \( n(A \cap B) = 11 \), \( n(B \cap C) = 10 \), \( n(A \cap C) = 9 \) and \( n(A \cap B \cap C) = 4 \). Find \( n(A \cup B \cup C) \) and \( n(\overline{A \cup B \cup C}) \), and show the information in a Venn diagram.
Step 1: Putting the given values into the union formula:
\[ \begin{aligned} n(A \cup B \cup C) &= 48 + 51 + 40 \\ &\quad - 11 - 10 - 9 + 4 \end{aligned} \]
Step 2: Adding the three sets gives 139 and adding the three pairs gives 30, so:
\[ n(A \cup B \cup C) = 139 - 30 + 4 = 113 \]
Step 3: Using \( n(U) = n(A \cup B \cup C) + n(\overline{A \cup B \cup C}) \) with the values known:
\[ 120 = 113 + n(\overline{A \cup B \cup C}) \]
Step 4: Subtracting 113 from both sides:
\[ n(\overline{A \cup B \cup C}) = 120 - 113 = 7 \]
Step 5: For the diagram, finding the pair-only regions by taking the centre 4 from each pair count:
\[ \begin{aligned} n_o(A \cap B) &= 11 - 4 = 7 \\ n_o(B \cap C) &= 10 - 4 = 6 \\ n_o(A \cap C) &= 9 - 4 = 5 \end{aligned} \]
Step 6: Finding each only region by taking from the set's total the three regions already inside its circle:
\[ \begin{aligned} n_o(A) &= 48 - (7 + 5 + 4) = 32 \\ n_o(B) &= 51 - (7 + 6 + 4) = 34 \\ n_o(C) &= 40 - (5 + 6 + 4) = 25 \end{aligned} \]

The seven regions inside the circles are 32, 34, 25, 7, 6, 5 and 4. Their sum is 113, which agrees with the formula. With 7 outside, the whole diagram holds 120 elements, which is n(U).
Worked Example 2: Passing All Three Subjects
Of 180 students who sat a final examination at a school, 86 passed Science, 80 passed Maths and 76 passed Nepali. Of them, 26 passed Science and Maths, 36 passed Maths and Nepali, and 32 passed Science and Nepali. 20 students did not pass any of the three subjects.
- (a) Show the information in a Venn diagram.
- (b) Find the number of students who passed all three subjects.
Let S, M and N be the sets of students who passed Science, Maths and Nepali. Then \( n(U) = 180 \), \( n(S) = 86 \), \( n(M) = 80 \), \( n(N) = 76 \), \( n(S \cap M) = 26 \), \( n(M \cap N) = 36 \), \( n(S \cap N) = 32 \) and \( n(\overline{S \cup M \cup N}) = 20 \). The centre is unknown, so it is found first and the diagram is drawn after.
Step 1: Writing n(U) as the union formula plus the students outside all circles:
\[ \begin{aligned} n(U) &= n(S) + n(M) + n(N) \\ &\quad - n(S \cap M) - n(M \cap N) \\ &\quad - n(S \cap N) + n(S \cap M \cap N) \\ &\quad + n(\overline{S \cup M \cup N}) \end{aligned} \]
Step 2: Substituting the given values:
\[ \begin{aligned} 180 &= 86 + 80 + 76 - 26 - 36 \\ &\quad - 32 + n(S \cap M \cap N) + 20 \end{aligned} \]
Step 3: Simplifying the numbers. The sets add to 242, the pairs add to 94, and \( 242 - 94 + 20 = 168 \), so:
\[ 180 = 168 + n(S \cap M \cap N) \]
Step 4: Subtracting 168 from both sides:
\[ n(S \cap M \cap N) = 180 - 168 = 12 \]
So 12 students passed all three subjects. This answers part (b).
Step 5: For part (a), finding the pair-only regions by taking 12 from each pair count:
\[ \begin{aligned} n_o(S \cap M) &= 26 - 12 = 14 \\ n_o(M \cap N) &= 36 - 12 = 24 \\ n_o(S \cap N) &= 32 - 12 = 20 \end{aligned} \]
Step 6: Finding the only regions for each subject:
\[ \begin{aligned} n_o(S) &= 86 - (14 + 20 + 12) = 40 \\ n_o(M) &= 80 - (14 + 24 + 12) = 30 \\ n_o(N) &= 76 - (20 + 24 + 12) = 20 \end{aligned} \]

All eight regions add to \( 40 + 30 + 20 + 14 + 24 + 20 + 12 + 20 = 180 \), the number of students who sat the examination.
Another Way: Let the Centre Be x
The same answer comes from the Venn diagram alone, without the formula. Call the unknown centre x, fill every region in terms of x, and use the fact that the eight regions together make U.
Step 1: Writing each pair-only region as its pair count less x:
\[ \begin{aligned} n_o(S \cap M) &= 26 - x \\ n_o(M \cap N) &= 36 - x \\ n_o(S \cap N) &= 32 - x \end{aligned} \]
Step 2: Writing each only region as the subject's total less the other three regions of its circle:
\[ \begin{aligned} n_o(S) &= 86 - (26 - x) - x - (32 - x) \\ &= 28 + x \\ n_o(M) &= 80 - (26 - x) - x - (36 - x) \\ &= 18 + x \\ n_o(N) &= 76 - (36 - x) - x - (32 - x) \\ &= 8 + x \end{aligned} \]
Step 3: Adding all eight regions and setting the sum equal to 180:
\[ \begin{aligned} & (28 + x) + (18 + x) + (8 + x) \\ &+ (26 - x) + (36 - x) + (32 - x) \\ &+ x + 20 = 180 \end{aligned} \]
Step 4: Collecting terms. The numbers add to 168. Three x are added and three are subtracted, which leaves the single x from the centre:
\[ 168 + x = 180 \]
Step 5: Subtracting 168 from both sides:
\[ x = 180 - 168 = 12 \]
Both methods give 12 students who passed all three subjects. Putting \( x = 12 \) back into the expressions gives the same regions as before: \( 28 + 12 = 40 \), \( 18 + 12 = 30 \) and \( 8 + 12 = 20 \).
Worked Example 3: Medals in Exactly Two Events
A school gave medals in three events. 36 students won medals in dance, 12 in drama and 18 in music. Altogether 45 students won medals, and 4 students won medals in all three events. How many students won medals in exactly two events?
Let A, B and C be the sets of students with medals in dance, drama and music. Then \( n(A) = 36 \), \( n(B) = 12 \), \( n(C) = 18 \) and \( n(A \cap B \cap C) = 4 \). The 45 students each won at least one medal, so \( n(A \cup B \cup C) = 45 \). The pair counts are not given, so their total is found first.
Step 1: Putting the known values into the union formula:
\[ \begin{aligned} 45 &= 36 + 12 + 18 + 4 \\ &\quad - n(A \cap B) - n(B \cap C) \\ &\quad - n(A \cap C) \end{aligned} \]
Step 2: Since \( 36 + 12 + 18 + 4 = 70 \), moving the three pair terms to the left and 45 to the right:
\[ \begin{aligned} & n(A \cap B) + n(B \cap C) + n(A \cap C) \\ &= 70 - 45 = 25 \end{aligned} \]
Step 3: Taking the centre out of each of the three pairs, which removes it three times:
\[ \begin{aligned} & n_o(A \cap B) + n_o(B \cap C) + n_o(A \cap C) \\ &= 25 - 3 \times 4 = 13 \end{aligned} \]
So 13 students won medals in exactly two events.
Another Way: Letters for the Pair Regions
Let the three pair-only regions be \( n_o(A \cap B) = a \), \( n_o(B \cap C) = b \) and \( n_o(A \cap C) = c \). The question asks for \( a + b + c \). Each only region is the set's total less the centre and its two pair regions, as the diagram shows. The 45 counts only students who won at least one medal, so nothing outside the circles enters this working.

Step 1: Adding the seven regions inside the circles and setting the sum equal to 45:
\[ \begin{aligned} & \{36 - (4 + a + c)\} + \{12 - (4 + a + b)\} \\ &+ \{18 - (4 + b + c)\} + a + b + c + 4 \\ &= 45 \end{aligned} \]
Step 2: Opening the brackets. The three only regions become \( 32 - a - c \), \( 8 - a - b \) and \( 14 - b - c \), so:
\[ \begin{aligned} & (32 - a - c) + (8 - a - b) \\ &+ (14 - b - c) + a + b + c + 4 = 45 \end{aligned} \]
Step 3: Collecting terms. The numbers add to 58. Each letter appears twice with a minus sign and once with a plus sign, so one of each is left subtracted:
\[ 58 - a - b - c = 45 \]
Step 4: Moving the letters to one side and the numbers to the other:
\[ a + b + c = 58 - 45 = 13 \]
The Venn diagram method agrees with the formula method: 13 students won medals in exactly two events. The formula is quicker when only a total is wanted. The diagram method shows every region and is safer when you are not sure which counts include the centre.
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.