Cardinality Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Cardinality.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

The cardinality of a finite set is the number of distinct elements it contains, written ∣A∣|A| β€” it measures the size of the set without regard to element order or identity.

Cardinality answers "how many?" β€” count each distinct element once and you have the cardinality.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Cardinality is the count of distinct elements in a set, written ∣A∣|A|.

Common stuck point: The procedure for cardinality is the easy part; the trap is counting a repeated listing twice, like ∣{a,a,b}∣=3|\{a, a, b\}| = 3. Asking "Am I counting how many distinct elements a set has, each once?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Am I counting how many distinct elements a set has, each once?

Worked Examples

Example 1

easy
Find the cardinality of: (a) A={2,4,6,8,10}A = \{2, 4, 6, 8, 10\}, (b) B={x∈N:x≀0}B = \{x \in \mathbb{N} : x \le 0\}, (c) C={{1,2},3,{4}}C = \{\{1,2\}, 3, \{4\}\}.

Answer

∣A∣=5,∣B∣=1,∣C∣=3|A|=5,\quad |B|=1,\quad |C|=3

First step

1
(a) Count the distinct elements: 2,4,6,8,102, 4, 6, 8, 10 β€” five elements, so ∣A∣=5|A| = 5.

Full solution

  1. 2
    (b) The only natural number ≀0\le 0 is 00 (assuming 0∈N0 \in \mathbb{N}). So B={0}B = \{0\} and ∣B∣=1|B| = 1.
  2. 3
    (c) CC has three elements: the set {1,2}\{1,2\}, the number 33, and the set {4}\{4\}. So ∣C∣=3|C| = 3.
Cardinality counts distinct top-level elements. When a set contains other sets as elements, each sub-set counts as one element regardless of its own size.

Example 2

medium
Let A={1,2,3,4}A = \{1,2,3,4\} and B={3,4,5,6}B = \{3,4,5,6\}. Verify the formula ∣AβˆͺB∣=∣A∣+∣Bβˆ£βˆ’βˆ£A∩B∣|A \cup B| = |A| + |B| - |A \cap B|.

Example 3

medium
At a party of 6060, 3535 like jazz, 4040 like rock, 2020 like both. How many like at least one genre?

Example 4

hard
Show that ∣Z∣=∣N∣|\mathbb{Z}|=|\mathbb{N}| by giving a bijection.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
A set SS has 3 elements. How many subsets does SS have? How many proper subsets?

Example 2

medium
In a class of 40 students, 25 play football, 20 play basketball, and 10 play both. Use cardinality formulas to find how many play at least one sport and how many play neither.

Example 3

easy
Find ∣{2,4,6,8}∣|\{2,4,6,8\}|.

Example 4

easy
Find ∣{1,1,2}∣|\{1,1,2\}|.

Example 5

easy
Find βˆ£βˆ…βˆ£|\emptyset|.

Example 6

easy
Find ∣{βˆ…}∣|\{\emptyset\}|.

Example 7

easy
If A={a,b,c}A=\{a,b,c\} and B={d,e}B=\{d,e\} are disjoint, find ∣AβˆͺB∣|A\cup B|.

Example 8

easy
How many subsets does a 3-element set have?

Example 9

easy
Find ∣{x∈Z:1≀x≀5}∣|\{x \in \mathbb{Z} : 1 \le x \le 5\}|.

Example 10

easy
Is ∣{a,b,c}∣|\{a,b,c\}| a number or a set?

Example 11

medium
If ∣A∣=7|A|=7, ∣B∣=5|B|=5, ∣A∩B∣=3|A\cap B|=3, find ∣AβˆͺB∣|A\cup B| by inclusion-exclusion.

Example 12

medium
In a class, 18 study French, 15 study Spanish, 6 study both. How many study at least one?

Example 13

medium
Find ∣AβˆͺB∣|A\cup B| if ∣A∣=10|A|=10, ∣B∣=8|B|=8, and A,BA,B are disjoint, then if ∣A∩B∣=4|A\cap B|=4.

Example 14

medium
How many subsets of {1,2,3,4}\{1,2,3,4\} have exactly 2 elements?

Example 15

medium
If ∣A∣=m|A|=m and ∣B∣=n|B|=n, what is ∣AΓ—B∣|A\times B| (the Cartesian product)?

Example 16

medium
Among 30 students, 20 like tea, 16 like coffee, all like at least one. How many like both?

Example 17

medium
How many subsets does {1,2,3,4,5}\{1,2,3,4,5\} have, and how many are proper subsets?

Example 18

medium
How many functions are there from a 3-element set to a 2-element set?

Example 19

medium
Of 40 people, 22 own a dog, 18 own a cat, 10 own neither. How many own both?

Example 20

challenge
Use inclusion-exclusion for three sets: ∣A∣=∣B∣=∣C∣=10|A|=|B|=|C|=10, each pairwise intersection =4=4, triple intersection =2=2. Find ∣AβˆͺBβˆͺC∣|A\cup B\cup C|.

Example 21

challenge
How many elements are in {1,2,…,100}\{1,2,\dots,100\} that are divisible by 2 or 3?

Example 22

challenge
Show ∣N∣=∣{even naturals}∣|\mathbb{N}| = |\{\text{even naturals}\}| by exhibiting a bijection.

Example 23

easy
Find ∣{a,b,c,d,e,f}∣|\{a,b,c,d,e,f\}|.

Example 24

easy
Find ∣{x∈Z:βˆ’2≀x≀2}∣|\{x\in\mathbb{Z}:-2\le x\le 2\}|.

Example 25

easy
If A={a,b,c}A=\{a,b,c\}, how many subsets does AA have?

Example 26

easy
Find ∣{{1,2},{3},4}∣|\{\{1,2\},\{3\},4\}|.

Example 27

easy
Is ∣N∣|\mathbb{N}| finite or infinite?

Example 28

easy
Find ∣{x∈N:x<6}∣|\{x\in\mathbb{N}:x<6\}| using the convention N={1,2,3,…}\mathbb{N}=\{1,2,3,\ldots\}.

Example 29

medium
If ∣A∣=12|A|=12, ∣B∣=8|B|=8, and ∣AβˆͺB∣=15|A\cup B|=15, find ∣A∩B∣|A\cap B|.

Example 30

medium
A class of 5050 students: 3030 take math, 2525 take physics, 1010 take both. How many take neither?

Example 31

medium
How many 3-element subsets does {1,2,3,4,5,6}\{1,2,3,4,5,6\} have?

Example 32

medium
If ∣A∣=4|A|=4 and ∣B∣=5|B|=5, find ∣AΓ—B∣|A\times B|.

Example 33

medium
How many functions are there from a 44-element set to a 33-element set?

Example 34

medium
How many bijections exist from a 55-element set to itself?

Example 35

medium
From {1,…,20}\{1,\ldots,20\}, how many are divisible by 44?

Example 36

hard
In a survey of 100100: 6060 read books, 5050 watch films, 3030 do both. How many do exactly one?

Example 37

hard
From {1,…,200}\{1,\ldots,200\}, how many integers are divisible by 33 or 55?

Example 38

hard
Three sets ∣A∣=∣B∣=∣C∣=20|A|=|B|=|C|=20, pairwise intersections =8=8, triple intersection =3=3. Find ∣AβˆͺBβˆͺC∣|A\cup B\cup C|.

Example 39

hard
How many 44-letter strings use only letters from {A,B,C}\{A,B,C\} with repeats allowed?

Example 40

hard
How many subsets of {1,…,10}\{1,\ldots,10\} contain exactly 44 elements with no two consecutive?

Example 41

challenge
Is ∣Q∣=∣N∣|\mathbb{Q}|=|\mathbb{N}|?

Example 42

challenge
Cantor showed ∣N∣<∣R∣|\mathbb{N}|<|\mathbb{R}|. What is the name for the cardinality of R\mathbb{R}?

Example 43

challenge
How many subsets of {1,…,20}\{1,\ldots,20\} have even cardinality?

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

setelement