• Foundation
  • About 15 min
  • 5 practice questions

Counting with Venn diagrams

Use n(A ∪ B) = n(A) + n(B) − n(A ∩ B) and its three-set version to answer survey questions about both, only one and neither.

If something looks wrong, please tell us.

Many questions give you the sizes of a few sets and ask for the size of another: how many students play at least one game, how many read only one newspaper, how many like none of the subjects. One formula, with a Venn diagram beside it, answers all of these. This lesson explains why the formula is true, then extends it from two sets to three.

The two-set formula

If you add n(A) and n(B), every element in the overlap A ∩ B is counted twice, once in each set. To count each element of A ∪ B exactly once, subtract the overlap one time:

n(A ∪ B) = n(A) + n(B) − n(A ∩ B). If A and B are disjoint, n(A ∪ B) = n(A) + n(B).

— Rule to remember

Three useful pieces follow from the same picture. The number in A only is n(A − B) = n(A) − n(A ∩ B). The number in exactly one of the two sets is n(A ∪ B) − n(A ∩ B). The number in neither set is n(U) − n(A ∪ B), because 'neither' is the complement of the union. Before using any formula, decide which region of the Venn diagram the question is asking about.

Worked example 1: a class survey

In a class of 40 students, 25 play cricket, 20 play football and 10 play both. How many play at least one game, how many play neither and how many play cricket only? At least one game is the union: n(C ∪ F) = 25 + 20 − 10 = 35. Neither: 40 − 35 = 5. Cricket only: 25 − 10 = 15. A quick check: football only is 20 − 10 = 10, and 15 + 10 + 10 + 5 = 40, the whole class.

Worked example 2: finding the overlap

Suppose n(A) = 12, n(B) = 9 and n(A ∪ B) = 17. Put the numbers into the formula: 17 = 12 + 9 − n(A ∩ B), so n(A ∩ B) = 21 − 17 = 4. The formula has four quantities, so any three of them give the fourth. This rearranged form, n(A ∩ B) = n(A) + n(B) − n(A ∪ B), is worth knowing directly.

Three sets

For three sets the same idea is applied twice. Adding n(A), n(B) and n(C) counts elements in exactly two sets twice and elements in all three sets three times. Subtracting the three pairwise intersections fixes the 'two sets' elements, but now the elements in all three have been added three times and taken away three times, so they are missing. Adding n(A ∩ B ∩ C) back once puts them in:

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C).

— Rule to remember

In a three-set Venn diagram there are seven regions inside the circles. The safest method for detailed questions is to fill the diagram from the centre outwards: first the region in all three sets, then the three 'exactly two' regions, then the three 'only one' regions.

Worked example 3: three languages

Of 60 students, 30 study Hindi, 25 English and 20 Sanskrit; 10 study Hindi and English, 8 English and Sanskrit, 7 Hindi and Sanskrit, and 4 study all three. By the formula, the number studying at least one language is 30 + 25 + 20 − 10 − 8 − 7 + 4 = 54, so 60 − 54 = 6 study none. Now fill the diagram from the centre. All three: 4. Hindi and English only: 10 − 4 = 6; English and Sanskrit only: 8 − 4 = 4; Hindi and Sanskrit only: 7 − 4 = 3. Hindi only: 30 − 6 − 3 − 4 = 17; English only: 25 − 6 − 4 − 4 = 11; Sanskrit only: 20 − 3 − 4 − 4 = 9. The seven regions add to 17 + 11 + 9 + 6 + 4 + 3 + 4 = 54, which matches the formula.

Key takeaways

Add the sets, subtract what was counted twice and, for three sets, add back the centre. 'Neither' or 'none' is the total minus the union. 'Only' means one region of the diagram, found by subtracting the overlaps. For three sets, fill the Venn diagram from the centre outwards, and check that all the regions add up to the given total.

Check your understanding

  1. 1. If n(A) = 20, n(B) = 15 and n(A ∩ B) = 5, what is n(A ∪ B)?

    1. 30
    2. 35
    3. 40
    4. 25
    Show answer

    Answer: A. n(A ∪ B) = 20 + 15 − 5 = 30.

  2. 2. If n(A ∪ B) = 50, n(A) = 28 and n(B) = 32, what is n(A ∩ B)?

    1. 4
    2. 18
    3. 60
    4. 10
    Show answer

    Answer: D. n(A ∩ B) = n(A) + n(B) − n(A ∪ B) = 28 + 32 − 50 = 10.

  3. 3. Of 100 people, 60 drink tea, 45 drink coffee and 20 drink both. How many drink neither?

    1. 5
    2. 35
    3. 20
    4. 15
    Show answer

    Answer: D. At least one drink: 60 + 45 − 20 = 85. Neither: 100 − 85 = 15.

  4. 4. Of 100 people, 60 drink tea, 45 drink coffee and 20 drink both. How many drink tea only?

    1. 60
    2. 25
    3. 20
    4. 40
    Show answer

    Answer: D. Tea only = tea − both = 60 − 20 = 40.

  5. 5. n(A) = 10, n(B) = 12, n(C) = 15, n(A ∩ B) = 4, n(B ∩ C) = 5, n(A ∩ C) = 6 and n(A ∩ B ∩ C) = 2. Find n(A ∪ B ∪ C).

    1. 37
    2. 24
    3. 22
    4. 26
    Show answer

    Answer: B. 10 + 12 + 15 − 4 − 5 − 6 + 2 = 24.

Sign in to keep track of the lessons you finish.

Next lesson → Cartesian products and relations

Privacy · Terms · Refunds · Delivery