Skip to main content
Mathematics LibreTexts

4.4: Cardinality

  • Page ID
    113153
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives
    • Find the cardinality of a set
    • Use cardinality properties to solve survey problems using a Venn diagram

    Often times we are interested in the number of items in a set or subset. This is called the cardinality, or the cardinal number, of the set.

    Cardinality

    The number of elements in a set is the cardinality of that set.

    The cardinality of the set \(A\) is often notated as \(|A|\) or \(n(A)\).

    Note: a set can be finite or infinite. A finite set will have a cardinality of 0 or a natural number. An infinite set has a cardinality of the form \(\aleph_{0}\) (aleph null), which represents the cardinality of the natural numbers.

    Example \(\PageIndex{1}\)

    Let \(A=\{1,2,3,4,5,6\}\) and \(B=\{2,4,6,8\}\).

    Find the cardinality of:

    1. \(B\)
    2. \(A \cup B\)
    3. \(A \cap B \)
    Solution
    1. The cardinality of \(B\) is \(4,\) since there are 4 elements in the set.
    2. The cardinality of \(A \cup B\) is \(7,\) since \(A \cup B=\{1,2,3,4,5,6,8\},\) which contains 7 elements.
    3. The cardinality of \(A \cap B\) is 3 , since \(A \cap B=\{2,4,6\}\), which contains 3 elements.

    Example \(\PageIndex{2}\)

    What is the cardinality of \(P=\) the set of English names for the months of the year?

    Solution

    The cardinality of this set is \(12,\) since there are 12 months in the year.

    Sometimes we may be interested in the cardinality of the union or intersection of sets, but not know the actual elements of each set. This is common in surveying.

    Example \(\PageIndex{3}\)

    A survey asks 200 people “What beverage do you drink in the morning?”, and offers choices:

    • Tea only
    • Coffee only
    • Both coffee and tea

    Suppose 20 report tea only, 80 report coffee only, 40 report both. How many people drink tea in the morning? How many people drink neither tea or coffee?

    Solutionclipboard_e4a799fb2a4fd730e81cbde00737b2dda.png

    This question can most easily be answered by creating a Venn diagram. We can see that we can find the people who drink tea by adding those who drink only tea to those who drink both: 60 people.

    We can also see that those who drink neither are those not contained in the any of the three other groupings, so we can count those by subtracting from the cardinality of the universal set, 200.

    \(200-20-80-40=60\) people who drink neither.

    Example \(\PageIndex{4}\)

    A survey asks: Which social media have you used in the last month?

    • Twitter
    • Facebook
    • Have used both

    The results show 40% of those surveyed have used Twitter, 70% have used Facebook, and 20% have used both. What percentage of the surveyed people have used neither Twitter nor Facebook?

    Solution

    Let \(T\) be the set of all people who have used Twitter, and \(F\) be the set of all people who have used Facebook. Notice that while the cardinality of \(F\) is \(70 \%\) and the cardinality of \(T\) is \(40 \%\), the cardinality of \(F \cup T\) is not simply \(70 \%+40 \%\), since that would count those who use both services twice. To find the cardinality of \(F \cup T\), we can add the cardinality of \(F\) and the cardinality of \(T\), then subtract those in intersection that we've counted twice. In symbols,

    \(n(F \cup T)=n(F)+n(T)-n(F \cap T)\)

    \(n(F \cup T)=70 \%+40 \%-20 \%=90 \%\)

    Now, to find how many people have not used either service, we're looking for the cardinality of \((F \cup T)'\). Since the universal set contains \(100 \%\) of people and the cardinality of \(F \cup T=90 \%\), the cardinality of \((F \cup T)'\) must be the other \(10 \%\).

    The previous example illustrated two important properties.

    Cardinality properties

    \(n(A \cup B)=n(A)+n(B)-n(A \cap B)\)

    \(n(A')=n(U)-n(A)\)

    Notice that the first property can also be written in an equivalent form by solving for the cardinality of the intersection:

    \(n(A \cap B)=n(A)+n(B) - n(A \cup B)\)

    Example \(\PageIndex{5}\)

    Fifty students were surveyed, and asked if they were taking a social science (SS), humanities (HM) or a natural science (NS) course the next semester.

    \(\begin{array}{ll} \text{21 were taking a SS course} & \text{26 were taking a HM course} \\ \text{19 were taking a NS course} & \text{9 were taking SS and HM} \\ \text{7 were taking SS and NS} & \text{10 were taking HM and NS} \\ \text{3 were taking all three} & \text{7 were taking none} \end{array}\)

    How many students are only taking a SS course?

    Solution

    clipboard_e7d93dd2c9298a1e569b2a03a2ca7591a.pngIt might help to look at a Venn diagram.

    From the given data, we know that there are 3 students in region \(e\) and 7 students in region \(h\).

    Since 7 students were taking a SS and NS course, we know that \(n(d)+n(e)=7\). Since we know there are 3 students in region \(e\), there must be \(7-3=4\) students in region \(d\).

    Similarly, since there are 10 students taking HM and NS, which includes regions \(e\) and \(f\), there must be \(10-3=7\) students in region \(f\).

    Since 9 students were taking SS and HM, there must be \(9-3=6\) students in region \(b\).

    Now, we know that 21 students were taking a SS course. This includes students from regions \(a, b, d,\) and \(e .\) Since we know the number of students in all but region \(a,\) we can determine that \(21-6-4-3=8\) students are in region \(a\).

    Thus, 8 students are taking only a SS course.

    Try It \(\PageIndex{1}\)

    One hundred fifty people were surveyed and asked if they believed in UFOs, ghosts, and Bigfoot.

    \(\begin{array}{ll} \text{43 believed in UFOs} & \text{44 believed in ghosts} \\ \text{25 believed in Bigfoot} & \text{10 believed in UFOs and ghosts} \\ \text{8 believed in ghosts and Bigfoot} & \text{5 believed in UFOs and Bigfoot} \\ \text{2 believed in all three} & \text{} \end{array}\)

    How many people surveyed believed in at least one of these things?

    Answer

    Starting with the intersection of all three circles, we work our way out. Since 10 people believe in UFOs and ghosts, and 2 believe in all three, that leaves 8 that believe in only UFOs and ghosts. We work our way out, filling in all the regions. Once we have, we can add up all those regions, getting 91 people in the union of all three sets. This leaves \(150-91=59\) who believe in none.

    Thus, 91 people believed in at least one of these things.

    clipboard_e8db2cbb7bab5f97bb8027875dd84439a.png

    Example \(\PageIndex{6}\)

    A survey asked people about the type of candy they like. The results are shown in the Venn diagram. How many people in the survey . . .

    Venn_Three_set_candy.png

    a) Liked cookies?

    b) Liked only cookies?

    c) Did not like cookies?

    d) Liked cookies and gummy bears?

    e) Liked cookies and gummy bears, but not chocolate?

    f) Liked cookies or gummy bears?

    g) Liked cookies or gummy bears, but not chocolate?

    h) Did not like any of these types of candy?

    Solution

    a) Answer: 33. People who like cookies are those who only like cookies (7), those who like cookies and gummy bears but not chocolate (6), those whole like cookies and chocolate but not gummy bears (15), and those who like all three (5). So the answer is 33=7+6+15+5.

    b) Answer: 7. People who like only cookies is 7.

    c) Answer: 25. People who do not like cookies are all the people in the survey (58), i.e. the sum of all the numbers (58=7+6+3+5+15+8+12+2), minus the people who do like cookies from part a). So the answer is 25=58-33

    d) Answer: 11. People who like cookies and gummy bears are those who like those two but not chocolate (6) plus those who like all three types (5). So the answer is 11=6+5.

    e) Answer: 6. The intersection between cookies and gummy bears, but with out the intersection of all three candies.

    f) Answer: 44. People who like cookies or gummy bears are all the people (58), except those who like like none of the candy (2) or those who like only chocolate (12). So the answer is 44=58-2-12.

    g) Answer: 16. People who like cookies or gummy bears, but not chocolate, are those who like only cookies (7), those who like only gummy bears (3), and those who like those two but not chocolate (6). So the answer is 16=7+6+3.

    h) Answer: 2. The people who were surveyed who do not like any of the three types of cancy are marked in the universal set outside the three rings 2.

    Try It \(\PageIndex{2}\)

    A survey asked college students what types of movies they enjoy. The results are shown in the Venn diagram. How many students in the survey . . .

    Venn_Three_set_movies.png

    a) Liked romcoms?

    b) Did not like action movies?

    c) Liked only foreign films?

    d) Liked romcoms or foreign films, but not action movies?

    e) Liked action movies and foreign films?

    Answer

    a) Answer: 30. The total number of students who like romcoms, are the students that like all three types of movies (3), students that like both foreign films and romcoms but not action movies (12), students that like both action movies and romcoms but not foreign films (4), and those who only like romcoms (11). So the total number of students who like romcoms is 3+12+4+11=30.

    b) Answer: 38. The total number of students who DO like action movies is 23= 3+1+4+15, just like in part a). The overall number of students surveyed is the sum of all the listed numbers 61=15+1+5+3+4+12+11+10. Then the number of students wh DO NOT like actions movies is all the participants minus the ones who do like actions movies 38=61-23.

    c) Answer: 5. The students who like only foreign films is 5.

    d) Answer: 28. Students who like romcoms or foreign films are the ones who like only foreign films (5), the ones who like only romcoms (11), and those who like both (12) but not any of the students who like actions movies and foreign films or romcoms (1, 3, or 4). So the answer is 28=5+11+12.

    e) Answer: 4. Students whole like action movies and foreign films, and those who like both of those but not romcoms (1), and those who like all three types (3). So the answer is 4=1+3.


    This page titled 4.4: Cardinality is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by David Lippman (The OpenTextBookStore) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.