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 set is the number of distinct elements it contains, written |A| or n(A).

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 measures the size of a set; infinite sets can have different cardinalities (e.g., |\mathbb{N}| < |\mathbb{R}|).

Common stuck point: Some infinities are bigger than others: |\text{integers}| < |\text{reals}|.

Sense of Study hint: Write out the distinct elements, then count them. For union problems, use |A| + |B| - |A intersect B| to avoid double-counting.

Worked Examples

Example 1

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

Solution

  1. 1
    (a) Count the distinct elements: 2, 4, 6, 8, 10 โ€” five elements, so |A| = 5.
  2. 2
    (b) The only natural number \le 0 is 0 (assuming 0 \in \mathbb{N}). So B = \{0\} and |B| = 1.
  3. 3
    (c) C has three elements: the set \{1,2\}, the number 3, and the set \{4\}. So |C| = 3.

Answer

|A|=5,\quad |B|=1,\quad |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\} and B = \{3,4,5,6\}. Verify the formula |A \cup B| = |A| + |B| - |A \cap B|.

Practice Problems

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

Example 1

easy
A set S has 3 elements. How many subsets does S 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.

Related Concepts

Background Knowledge

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

setelement