Discrete Mathematics Module 2: Introduction to Sets

Learn the fundamentals of sets, cardinality, the empty set and subsets. These are essential foundations for discrete mathematics and computer science.

← Back to Module Overview

Discrete mathematics studies structures that are countable or otherwise distinct and separable, such as sets, graphs and logical statements. These ideas sit at the heart of computer science.

Sets are one of the most important building blocks in discrete mathematics. In this module, you will explore what sets are, how we describe them and how they relate to each other.

"Once you are comfortable with sets, many other topics in discrete mathematics start to feel much more natural."

πŸ”Ž What you will learn

πŸ“š What is Discrete Mathematics?

Discrete mathematics is the study of mathematical structures that are countable or otherwise distinct and separable, such as combinations, graphs and logical statements. These structures can be finite or infinite, but they are not continuous like the real numbers.

πŸ”  What are Sets?

A set is an unordered collection of distinct objects, called elements. If an object a belongs to a set A, we write a ∈ A. If not, we write a βˆ‰ A.

Examples:

Vowels = { a, e, i, o, u }
Students = { Fred, Tom, Mary, Jane }

For infinite or large sets, we often use ellipsis:

A = { 1, 2, 3, 4, 5, ... }

πŸ“ Cardinality of a Set

Cardinality refers to the number of elements in a set. It is denoted as |A|. Finite sets have a natural number as their cardinality. Infinite sets are simply described as infinite.

🚫 The Empty Set

The empty set contains no elements. It is written as {} or βˆ…. Be careful: { βˆ… } is not empty. It is a set with one element, namely the empty set.

πŸ“‚ Subsets

If all elements of set A are in set B, then we say A βŠ† B. If B has extra elements that are not in A, then A is a proper subset and we write A βŠ‚ B. If both sets contain exactly the same elements, then A = B.

βœ… Key takeaway

Set theory underpins functions, relations, logic and many areas of computer science. A solid understanding of sets makes later topics in algorithms, databases and programming languages much easier to grasp.

🧠 Quick Quiz: Test Your Understanding of Sets

1. What symbol represents the empty set?


2. Which of these is a valid finite set?


3. If A = {1, 2} and B = {1, 2, 3}, what is true?


4. What does |A| represent?


5. Which symbol means "is an element of"?


6. Which of the following is not a correct set representation?


Celestial Ant
β€œNeed guidance?”