Sets Are Collections With Elements And Cardinality
- Mathematics uses sets to talk about collections of objects in a precise way.
- A set might contain numbers, shapes, people, or anything else where membership is clear.
Set
A collection of objects. Each object in the set is called an element (or member) of the set.
We usually name sets with capital letters (such as $A$, $B$, $C$) and write their elements inside curly brackets $\{\ \}$.
Element
The simplest form of matter that cannot be broken down into simpler substances by physical or chemical means.
To talk about membership we use:
- $\in$ meaning "is an element of"
- $\notin$ meaning "is not an element of"
If $A=\{16,25,36,49,64\}$ then $49\in A$ but $81\notin A$.
Order And Repetition Do Not Matter
- A key idea is that a set is not a list.
- Order does not matter: $\{a,e,i,o,u\}=\{e,o,u,i,a\}$.
- Duplicates are not repeated: if a class has ten 16-year-olds and four 15-year-olds, the set of ages is just $\{15,16\}$.
- Do not write repeated elements in a set to show frequency.
- Sets only record whether an element is present, not how many times it occurs.
Cardinality: Counting Elements In A Set
The cardinality of a set $A$ is the number of elements it contains, written $n(A)$.
Cardinality
The cardinality of a set $A$, written $n(A)$, is the number of elements in $A$.
If $A=\{\text{knife, fork, spoon}\}$ then $n(A)=3$.
- A set is finite if it has a (finite) number of elements (you can finish counting them).
- A set is infinite if it never ends.
- Let $D$ be the set of positive integers less than 30 that are multiples of 4.
- You can list it: $D=\{4,8,12,16,20,24,28\}$, so $n(D)=7$.
Sets Can Be Described In Three Main Ways
You will commonly meet three descriptions of the same set:
- In words
- By listing elements (also called roster notation)
- Using set-builder notation
Describing Sets In Words
- This is the most natural way to start.
- Words must be specific enough that everyone would choose the same elements.
$$B=\{\text{vowels in the English alphabet}\}$$
If someone else could reasonably disagree about whether an object belongs, your description is not precise enough.
Listing Elements (Roster Notation)
- Here you explicitly write each element separated by commas.
- For number sets you can use ellipses $\ldots$ to show a pattern continues
- $B=\{a,e,i,o,u\}$
- $D=\{2,3,4,\ldots,20\}$ (integers between 1 and 21)
- When you use $\ldots$, the pattern must be clear.
- For example, $\{2,4,6,8,\ldots\}$ clearly means "all positive even integers".
Set-Builder Notation Gives A Rule
- Set-builder notation describes a set using a rule rather than listing every element.
- It uses:
- curly brackets $\{\ \}$
- a variable (often $x$)
- a vertical bar $\mid$ meaning "such that"
- a condition or restriction
- The set $A=\{1,2,3,\ldots,9\}$ can be written as $$A=\{x\mid x\in\mathbb{N},\ 1\le x\le 9\}.$$
- Here $x\in\mathbb{N}$ restricts $x$ to natural numbers and $1\le x\le 9$ restricts the range.
- Read $\{x\mid \dots\}$ aloud as "the set of all $x$ such that ...".
- This helps you translate smoothly between notation and words.
Standard Number Sets And Their Symbols
Many sets you use in algebra are standard and have special symbols (often called double-struck or blackboard bold letters).
- The natural numbers are $\mathbb{N}=\{0,1,2,3,\ldots\}$.
- The integers are $\mathbb{Z}=\{\ldots,-2,-1,0,1,2,\ldots\}$.
- The positive integers are $\mathbb{Z}^+=\{1,2,3,\ldots\}$.
- The rational numbers are $\mathbb{Q}=\left\{\frac{p}{q}\mid p,q\in\mathbb{Z},\ q\ne 0\right\}$.
- The real numbers include all rational and irrational numbers.
These are infinite sets.
- In this course, $0$ is included in $\mathbb{N}$.
- Even though 0 is neither positive nor negative, it is still a natural number.
- $7\in\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R}$
- $-7\in\mathbb{Z},\ \mathbb{Q},\ \mathbb{R}$
- $0\in\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R}$
- $1.5=\frac{3}{2}\in\mathbb{Q},\ \mathbb{R}$
- $\pi\in\mathbb{R}$ but $\pi\notin\mathbb{Q}$
- $\sqrt{121}=11\in\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R}$
- $\sqrt{14}\in\mathbb{R}$ but $\sqrt{14}\notin\mathbb{Q}$
Not every decimal is irrational.
Terminating decimals (like $-0.1=-\frac{1}{10}$) and recurring decimals (like $0.333\ldots=\frac{1}{3}$) are rational because they can be written as fractions.
Inequalities In Set Notation Control Endpoints
- Set descriptions often use inequalities such as $0<x<1$.
- The symbol $<$ means the endpoint is not included.
- The symbol $\le$ means the endpoint is included.
- "real numbers between 0 and 1" is $$S=\{x\mid x\in\mathbb{R},\ 0<x<1\}$$ Because 0 and 1 are excluded, we use $<$.
- "Integers from 2 to 7 inclusive" $$\{x\mid x\in\mathbb{Z},\ 2\le x\le 7\}$$
- "Natural numbers less than 5" $$\{x\mid x\in\mathbb{N},\ x<5\}=\{0,1,2,3,4\}.$$
Translating Between Words, Lists, And Set-Builder Notation
Being fluent means you can switch representations.
From Set-Builder To A List (When Possible)
$$E=\{x\mid x\in\mathbb{Z},\ -3<x<2\}$$
Because $x$ must be an integer strictly between $-3$ and $2$:
$$E=\{-2,-1,0,1\}$$
When Listing Is Impossible
Some sets cannot be listed in roster form.
$$G=\{x\mid x\in\mathbb{R},\ 0<x<1\}$$
There is no "first" real number greater than 0, and no "last" real number less than 1, so the set is infinite and unlistable.
From A List To Set-Builder (Spot The Pattern)
$$M=\{4,8,12,16,\ldots,40\}$$
These are multiples of 4 from 4 to 40:
$$M=\{x\mid x=4n,\ n\in\mathbb{Z}^+,\ 1\le n\le 10\}$$
If the elements increase by a constant difference (like +4 each time), it is often a set of multiples and can be written as $x=kn$.
Set Notation You Will Use Constantly
Besides $\in$ and $\notin$, these symbols appear frequently:
- $\subseteq$: "is a subset of"
- $\emptyset$: the empty set
Subset
A set $A$ is a subset of $B$ (written $A\subseteq B$) if every element of $A$ is also an element of $B$.
Empty set
Written $\emptyset$, is the set with no elements.
$$\mathbb{N}\subseteq\mathbb{Z}\subseteq\mathbb{Q}\subseteq\mathbb{R}$$
- Be careful: $\emptyset$ is not the same as $\{0\}$.
- The set $\{0\}$ has one element, so $n(\{0\})=1$, but $n(\emptyset)=0$.
Membership and cardinality
Let $A=\{4,6,8,10\}$, $C=\{1,3,4,7,11\}$, and $D=\{0,\pm1,\pm2,\pm3,\pm4\}$.
- $4\in A$ (true)
- $7\notin C$ (false) because $7\in C$
- $1\in A$ (false) because $1\notin A$
- $27\in A$ (false) because $27\notin A$
- $8\in D$ (false) because $D$ only goes up to $\pm4$
Cardinality:
- $n(C)=5$
- $n(D)=9$ (elements are $-4,-3,-2,-1,0,1,2,3,4$)
So $n(C)=n(D)$ is false.
Writing a set in set-builder notation
$P=\{2,3,5,7,\ldots,37\}$ is the set of prime numbers from 2 to 37.
A correct set-builder description is
$$P=\{x\mid x\text{ is prime},\ 2\le x\le 37\}.$$
(There is no universal special symbol for the set of primes, so you write the condition in words.)
- Use curly brackets for sets: write $\{1,2,3\}$, not $(1,2,3)$.
- Check endpoints: decide between $<$ and $\le$ before you write.
- When listing integers from an inequality, test a boundary value to see if it is included.
- For sets of multiples, show the pattern clearly using $x=kn$ with $n\in\mathbb{Z}$ or $n\in\mathbb{Z}^+$.
- Write the set of factors of 12 in roster form and find its cardinality.
- Write in set-builder notation: "all integers $x$ such that $-5\le x<3$".
- True or false? If false, correct it: $\sqrt{14}\in\mathbb{Q}$.