What Are Sets?
Before we dive into set operations, let's make sure we understand what a set actually is.
A set is a well-defined collection of distinct objects, called elements or members. Sets are usually named with capital letters like , , or .
For example:
- — a set of the first five positive integers
- — a set of colours
- — a set of even numbers up to 10
An element (or member) is an individual object that belongs to a set. We use the symbol to mean "is an element of" and to mean "is not an element of."
Using the set :
- means "3 is an element of " ✓
- means "7 is not an element of " ✓
Think of a set like a playlist on your phone. The playlist has a name (the set name), and the individual songs in it are the elements. A song is either on the playlist or it isn't — there are no duplicates, and the order doesn't matter.
Set Notation Essentials
There are several important notations and special sets you need to know:
The universal set, written as (or sometimes or ), is the set of all elements being considered in a particular problem. Every other set in the problem is a subset of the universal set.
The empty set (or null set), written as or , is the set that contains no elements at all.
Set is a subset of set (written ) if every element of is also an element of .
Other useful notation:
- — the number of elements in set (also called the cardinality)
- Curly braces are used to list the elements of a set
If and , then:
- because every element of is in
- because has 3 elements
Don't confuse with . The empty set has zero elements. The set actually has one element — the empty set itself!
11 more sections in this topic
Pick this up in your Library: it holds the whole topic, notes, cheatsheet and questions.