# 10.1: Sets and Set Notation

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

A set is a collection of things called elements. For example $$\left\{ 1,2,3,8\right\}$$ would be a set consisting of the elements 1,2,3, and 8. To indicate that $$3$$ is an element of $$\left\{ 1,2,3,8\right\} ,$$ it is customary to write $$3\in \left\{ 1,2,3,8\right\}.$$ We can also indicate when an element is not in a set, by writing $$9\notin \left\{ 1,2,3,8\right\}$$ which says that $$9$$ is not an element of $$\left\{ 1,2,3,8\right\}.$$ Sometimes a rule specifies a set. For example you could specify a set as all integers larger than $$2.$$ This would be written as

$S=\left\{ x\in \mathbb{Z}:x>2\right\} .\nonumber$

This notation says: $$S$$ is the set of all integers, $$x,$$ such that $$x>2.$$

Suppose $$A$$ and $$B$$ are sets with the property that every element of $$A$$ is an element of $$B$$. Then we say that $$A$$ is a subset of $$B.$$ For example, $$\left\{ 1,2,3,8\right\}$$ is a subset of $$\left\{ 1,2,3,4,5,8\right\}.$$ In symbols, we write

$\left\{ 1,2,3,8\right\} \subseteq \left\{ 1,2,3,4,5,8\right\} .\nonumber$

It is sometimes said that “$$A$$ is contained in $$B$$" or even “$$B$$ contains $$A$$". The same statement about the two sets may also be written as

$\left\{ 1,2,3,4,5,8\right\} \supseteq \left\{ 1,2,3,8\right\}. \nonumber$

We can also talk about the union of two sets, which we write as $$A \cup B$$. This is the set consisting of everything which is an element of at least one of the sets, $$A$$ or $$B$$. As an example of the union of two sets, consider

$\left\{ 1,2,3,8\right\} \cup \left\{ 3,4,7,8\right\} =\left\{ 1,2,3,4,7,8\right\}.\nonumber$

This set is made up of the numbers which are in at least one of the two sets.

In general

$A\cup B = \left\{ x:x\in A \text{ or }x\in B\right\}\nonumber$

Notice that an element which is in both $$A$$ and $$B$$ is also in the union, as well as elements which are in only one of $$A$$ or $$B$$.

Another important set is the intersection of two sets $$A$$ and $$B$$, written $$A \cap B$$. This set consists of everything which is in both of the sets. Thus $$\left\{ 1,2,3,8\right\} \cap \left\{ 3,4,7,8\right\} =\left\{ 3,8\right\}$$ because $$3$$ and $$8$$ are those elements the two sets have in common. In general, $A\cap B = \left\{ x:x\in A\text{ and }x\in B\right\}\nonumber$

If $$A$$ and $$B$$ are two sets, $$A\setminus B$$ denotes the set of things which are in $$A$$ but not in $$B.$$ Thus $A\setminus B = \left\{ x\in A:x\notin B\right\}\nonumber$ For example, if $$A = \left\{1,2,3,8 \right\}$$ and $$B = \left\{ 3,4,7,8 \right\}$$, then $$A \setminus B = \left\{ 1,2,3,8\right\} \setminus \left\{ 3,4,7,8 \right\} =\left\{1,2 \right\}$$.

A special set which is very important in mathematics is the empty set denoted by $$\emptyset$$, which is defined as the set which has no elements in it. It follows that the empty set is a subset of every set. This is true because if it were not so, there would have to exist a set $$A,$$ such that $$\emptyset$$ has something in it which is not in $$A.$$ However, $$\emptyset$$ has nothing in it and so it must be that $$\emptyset \subseteq A.$$

We can also use brackets to denote sets which are intervals of numbers. Let $$a$$ and $$b$$ be real numbers. Then

• $$\left[ a,b\right] = \{x \in \mathbb{R}: a\leq x\leq b \}$$
• $$\left[a,b \right) = \{x \in \mathbb{R}: a\leq x<b \}$$
• $$\left( a,b\right) = \{x \in \mathbb{R}: a<x<b \}$$
• $$(a,b] = \{ x \in \mathbb{R}: a<x\leq b \}$$
• $$[a,\infty ) = \{x \in \mathbb{R}: x\geq a \}$$
• $$(-\infty ,a] = \{x \in \mathbb{R}: x \leq a \}$$

These sorts of sets of real numbers are called intervals. The two points $$a$$ and $$b$$ are called endpoints, or bounds, of the interval. In particular, $$a$$ is the lower bound while $$b$$ is the upper bound of the above intervals, where applicable. Other intervals such as $$\left( -\infty ,b\right)$$ are defined by analogy to what was just explained. In general, the curved parenthesis, $$($$, indicates the end point is not included in the interval, while the square parenthesis, $$[$$, indicates this end point is included. The reason that there will always be a curved parenthesis next to $$\infty$$ or $$-\infty$$ is that these are not real numbers and cannot be included in the interval in the way a real number can.

To illustrate the use of this notation relative to intervals consider three examples of inequalities. Their solutions will be written in the interval notation just described.

## Example $$\PageIndex{1}$$: Solving an Inequality

Solve the inequality $$2x+4\leq x-8$$.

###### Solution

We need to find $$x$$ such that $$2x+4\leq x-8$$. Solving for $$x$$, we see that $$x\leq -12$$ is the answer. This is written in terms of an interval as $$(-\infty ,-12].$$

Consider the following example.

## Example $$\PageIndex{2}$$: Solving an Inequality

Solve the inequality $$\left( x+1\right) \left( 2x-3\right) \geq0.$$

###### Solution

We need to find $$x$$ such that $$\left( x+1\right) \left( 2x-3\right) \geq0.$$ The solution is given by $$x\leq -1$$ or $$x\geq \frac{3}{2}$$. Therefore, $$x$$ which fit into either of these intervals gives a solution. In terms of set notation this is denoted by $$(-\infty ,-1]\cup [ \frac{3}{2},\infty ).$$

Consider one last example.

## Example $$\PageIndex{3}$$: Solving an Inequality

Solve the inequality $$x \left( x+2\right) \geq-4$$.

###### Solution

This inequality is true for any value of $$x$$ where $$x$$ is a real number. We can write the solution as $$\mathbb{R}$$ or $$\left( -\infty ,\infty \right) .$$

In the next section, we examine another important mathematical concept.

This page titled 10.1: Sets and Set Notation is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Ken Kuttler (Lyryx) .