Cardinality Formula

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

The Formula

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣ (inclusion-exclusion principle)

Ask yourself: Am I counting how many distinct elements a set has, each once?

Quick example

∣{a,b,c}∣=3. ∣∅∣=0. ∣{{1,2},3}∣=2 — there are two distinct elements.

Notation

∣A∣ or n(A)

What this formula means

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

Cardinality is the head count at a party, not the number of times the door opened: a guest who stepped out and came back is still one person. Inclusion-exclusion is how you merge two guest lists that overlap: add both lists, then subtract everyone who appears on both.

Formal view

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣ (inclusion-exclusion); ∣A∣=n⇔∃ a bijection f:A→{1,2,…,n}

Worked examples

Example 1

easy
Find the cardinality of: (a) A={2,4,6,8,10}, (b) B={x∈N:x≤0}, (c) C={{1,2},3,{4}}.
Show solution

Answer

∣A∣=5,∣B∣=1,∣C∣=3

First step

1.
(a) Count the distinct elements: 2,4,6,8,10 — five elements, so ∣A∣=5.

Full solution

  1. 2.
    (b) The only natural number ≤0 is 0 (assuming 0∈N). So B={0} and ∣B∣=1.
  2. 3.
    (c) C has three elements: the set {1,2}, the number 3, and the set {4}. So ∣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∪B∣=∣A∣+∣B∣−∣A∩B∣.

Example 3

medium
At a party of 60, 35 like jazz, 40 like rock, 20 like both. How many like at least one genre?

Common mistakes

  • Counting a repeated listing twice, like ∣{a,a,b}∣=3 — distinct elements only, so it is 2.
  • Using ∣A∣+∣B∣ for the union when sets overlap — subtract ∣A∩B∣ via inclusion-exclusion.
  • Confusing cardinality with the number of subsets — elements count linearly, subsets count as 2∣A∣.

Why this formula matters

Cardinality is the bridge from sets to counting and probability: a probability such as 38 is the size of an event set divided by the size of the sample space. Inclusion-exclusion lets you count a union from overlapping data, as in surveys. Without care about distinct members and overlaps, counts come out too high, and probabilities built on them can even exceed 1.

Frequently asked questions

What is the Cardinality formula?

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

How do you use the Cardinality formula?

Use cardinality when the question asks how many distinct members a set has: 'different', 'unique', 'how many students take at least one'. With overlapping groups and an 'or' question, use inclusion-exclusion. If repeats count, as in total coins or total votes, you are counting a list, not a set. If the question asks how many groups or selections can be formed, count subsets (2n) or combinations, not members.

What do the symbols mean in the Cardinality formula?

∣A∣ or n(A)

Why is the Cardinality formula important in Math?

Cardinality is the bridge from sets to counting and probability: a probability such as 38 is the size of an event set divided by the size of the sample space. Inclusion-exclusion lets you count a union from overlapping data, as in surveys. Without care about distinct members and overlaps, counts come out too high, and probabilities built on them can even exceed 1.

What do students get wrong about Cardinality?

The procedure for cardinality is the easy part; the trap is counting a repeated listing twice, like ∣{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.

What should I learn before the Cardinality formula?

Before studying the Cardinality formula, you should understand: set, element.