Math Fundamentals18 sections · 814 units
Open in Course

Vocabulary - Cardinality

Number of elements

The cardinality of a set is the count of elements it contains. You write A|A| to denote the cardinality of set AA.

If A={1,2,3}A = \{1, 2, 3\}, then A=3|A| = 3. If B=B = \emptyset, then B=0|B| = 0.

Cardinality tells you the size of a set. In programming, this is like calling len()\text{len}() or size()\text{size}() on a collection.