Sets

An Overview of Sets

Set Overview

A set is a collection of elements. When defining a set, we often use curly braces
S={}S = \{\dots\}
. The number of elements in a set is denoted
S\left| S \right|
or
n(S)n(S)
. We can say an element
aa
is a member of the set
SS
by saying
aSa \in S
. Note that a set has no repeating elements.
Common sets have their own symbols:
N\N
- the set of natural numbers (there is no agreement on whether this contains
00
or not)
Z\mathbb{Z}
- the set of integers
Q\mathbb{Q}
- the set of rational numbers
R\mathbb{R}
- the set of real numbers
C\mathbb{C}
- the set of complex numbers

Set-Builder Notation

This notation allows us to easily define sets. For example, if we wanted to define a set with all multiple of 3 up to 30, we could do the following:
S={x:x=3k,kN,x30}S = \{ x : x = 3k, k \in \N, x \leq 30 \}

Set Rules

Assuming we have two sets
AA
and
BB
, we have a way to interact with them.

Equality

We say
A=BA = B
if both sets have the exact same elements.

The Universal Set

The set
UU
contains all elements of interest.

Union

The union of two sets
ABA \cup B
is a combination set of all elements in
AA
or
BB
.

Intersection

The intersection of two sets
ABA \cap B
is a set of all elements that appear in both
AA
and
BB
.

Set-Difference

The set-difference of
AA
and
BB
is the set of all elements in
AA
not in
BB
.
AB={aA:a∉B}A \setminus B = \{ a \in A : a \not \in B\}

Complement

The complement of
AA
, denoted
AA^\prime
, is all elements of
UU
not in
AA
. You can think of it as
UAU \setminus A
.

Subset

If all elements of
AA
are also elements of
BB
, then
AA
is a subset of
BB
and this is denoted
ABA \subseteq B
. Note that means it is possible that
A=BA = B
. To discount this possibility, we say
AA
is a proper subset of
BB
, denoted
ABA \subset B
.