Skip to main content
Logo image

Section 0.1 Sets

We will gradually make our way to definitions of the vector spaces and linear transformations mentioned in this text’s title. For now it will suffice to observe that a vector space is a certain kind of set, and a linear transformation is a special type of function. Accordingly we gather here some notions about sets and (in the next section) functions that will come in handy once we meet the two main players of linear algebra.

Definition 0.1.1. Sets.

A set is a collection of objects. An object \(x\) is a member (or element) of a set \(A\) if \(A\) contains \(x\text{.}\) In this case, we write \(x \in A\text{.}\) If \(x\) is not a member of \(A\text{,}\) we write \(x \notin A\text{.}\)
We use curly braces to describe the contents of a set. For example, \(A=\{1,2,3\}\) is the set containing the first three positive integers, and \(B=\{1,2,3,\dots\}\) is the set of all positive integers. The defining property of sets is that they are completely determined by their members, and nothing more. In particular, when describing sets as above, it does not matter in what order the elements are listed, nor if they are repeated: e.g., \(\{1,2,3\}\text{,}\) \(\{2,1,3\}\text{,}\) and \(\{2,1,1,3,2\}\) are three descriptions of the same set. This somewhat slippery notion is made perfectly clear by specifying exactly what it means for two sets to be equal, as we do below.

Definition 0.1.2. Set equality.

Sets \(A\) and \(B\) are equal, denoted \(A=B\text{,}\) if they have precisely the same elements: i.e., if for any object \(x\text{,}\) we have \(x\in A\) if and only if \(x\in B\text{.}\)
Set membership naturally extends to a notion of one set “lying” within another.

Definition 0.1.3. Set inclusion (subsets).

A set \(A\) is a subset of a set \(B\text{,}\) denoted \(A \subseteq B\text{,}\) if every member of \(A\) is a member of \(B\text{:}\) i.e., \(x\in A\) implies \(x\in B\) for any object \(x\text{.}\) The relation \(A\subseteq B\) is called set inclusion.

Remark 0.1.4.

The definitions of set equality and the subset relation make use of two important logical operations: namely, the “if and only if” (or “iff” for short) and “if-then” operations. We describe these notions in more detail in Logic, and we outline techniques for proving “if and only if” and “if-then” statements, including statements about set equality and the subset relation, in Proof techniques.
With the fundamental notions of membership, equality, and subset in place, we now introduce means of building new sets from existing ones. The first is a manner of carving out a subset of a given set using a specified property.

Definition 0.1.5. Set-builder notation.

Let \(A\) be a set, and let \(P\) be a property that elements of \(A\) either satisfy or do not satisfy. For an element \(x\in A\text{,}\) let \(P(x)\) denote the statement that \(x\) satisfies \(P\text{.}\) The set of all elements of \(A\) satisfying \(P\) is denoted
\begin{equation*} \{x \in A \colon P(x) \}\text{.} \end{equation*}

Remark 0.1.6.

Set builder notation ‘\(\{x \in A\colon P(x)\}\)’ is parsed from left to right as follows:
  • \(\{\)’ is read as “the set of”
  • \(x\in A\)’ is read as “elements of \(A\)
  • \(\colon\)’ is read as “such that”
  • \(P(x)\)’ is read as “\(P(x)\) is true”.
Taken altogether we get: “The set of elements of \(A\) such that \(P(x)\) is true”.

Example 0.1.7.

Let \(A=\{0,1,2,\dots \}\) be the set of nonnegative integers. The subset \(B=\{0,2,4,\dots\}\) of even positive integers can be described using set-builder notation as
\begin{equation*} B=\{x\in A\colon x \text{ is even}\}\text{,} \end{equation*}
or alternatively,
\begin{equation*} B=\{x\in A\colon x=2k \text{ for some integer } k\}\text{.} \end{equation*}
Next we use set builder notation, the set membership relation, and some basic logic to define the union, intersection, and difference of sets.

Definition 0.1.8. Union, intersection, difference, and complement.

Let \(A\) and \(B\) be subsets of a common set \(X\text{.}\)
  • Set union.
    The union \(A \cup B\) of \(A\) and \(B\) is defined as
    \begin{equation*} A\cup B=\{x\in X\colon x\in A\text{ or } x\in B\}\text{.} \end{equation*}
    More generally, the union \(A_1\cup A_2\dots \cup A_n\) of a collection of subsets of \(A_i\subseteq X\) is defined as
    \begin{equation*} A_1\cup A_2\dots \cup A_n=\{x\in X\colon x\in A_i \text{ for some } 1\leq i\leq n\}\text{.} \end{equation*}
  • Set intersection.
    The intersection \(A \cap B\) of \(A\) and \(B\) is defined as
    \begin{equation*} A\cap B=\{x\in X\colon x\in A\text{ and } x\in B\}\text{.} \end{equation*}
    More generally, the intersection \(A_1\cap A_2\dots \cap A_n\) of a collection of subsets of \(A_i\subseteq X\) is defined as
    \begin{equation*} A_1\cap A_2\dots \cap A_n=\{x\in X\colon x\in A_i \text{ for all } 1\leq i\leq n\}. \end{equation*}
  • Set difference.
    The difference \(A-B\) is defined as
    \begin{equation*} A-B=\{x\in X\colon x\in A\text{ and } x\notin B\}\text{.} \end{equation*}
  • Set complement.
    The complement of \(A\) in \(X\) is defined as \(X-A\text{.}\) In contexts where there is clear what the larger set \(X\) is, we denote the complement of \(A\) in \(X\) as \(A^c\text{.}\)
With the help of these set operations, we can now describe some common sets used in mathematics.

Definition 0.1.9. Common mathematical sets.

We denote by \(\mathbb{R}\) the set of all real numbers. The integers \(\Z\) and rational numbers \(\mathbb{Q}\) are the subsets of \(\R\) defined as
\begin{align*} \mathbb{Z} \amp =\{0,1,2,3,\dots\}\cup \{-1,-2,-3,\dots\} \\ \mathbb{Q} \amp = \{x\in\mathbb{R}\colon x=\tfrac{m}{n} \text{ for some } m,n\in\Z\} \text{.} \end{align*}
This yields the following chain of subsets:
\begin{equation} \mathbb{Z}\subseteq\mathbb{Q}\subseteq\mathbb{R}\text{.}\tag{0.1.1} \end{equation}
The empty set is the set containing no objects, denoted \(\{\ \}\) or \(\emptyset\text{.}\)

Exercises Exercises

1.

Let \(A= \{ 2, 3, 6, 7, 8 \}\) , \(B= \{ 2, 4, 7, 8 \}\) , \(C= \{ 0, 1, 4, 5, 6, 7 \}\text{.}\)
List the elements of the following sets. If there is more than one element write them separated by commas.
\(A \cap B = \{\) \(\}\)
\(A \cup B = \{\) \(\}\)
\((B \cup C) \cap A = \{\) \(\}\)
\(B \cup (C \cap A) = \{\) \(\}\)
Answer 1.
\(2, 7, 8\)
Answer 2.
\(2, 3, 4, 6, 7, 8\)
Answer 3.
\(2, 6, 7, 8\)
Answer 4.
\(2, 4, 6, 7, 8\)

2.

Let \(S = \lbrace w,x,y,z\rbrace\text{,}\) \(T = \lbrace 0\rbrace\)
How many elements are in \(S\times T\text{?}\)
Determine \(S\times T\)
[Note: Enter your answer as a comma-separated list. Pairs should be denoted with parentheses.]
\(\lbrace\)\(\rbrace\)
Answer 1.
\(4\)
Answer 2.
\(\left(\text{w}, 0\right), \left(\text{x}, 0\right), \left(\text{y}, 0\right), \left(\text{z}, 0\right)\)
Solution.
\(S = \lbrace w,x,y,z\rbrace\) \(T = \lbrace 0\rbrace\) The number of elements in a Cartesian product is simply \(N(A)\cdot N(B)\) for any sets \(A, B\text{.}\) Thus, the number of elements in \(S\times T\) is \(N(A)\cdot N(B) = 4\cdot 1 = 4\) The Cartesian product \(A\times B\) is defined as the set of all ordered pairs whose first component is a member of \(A\) and whose second component is a member of \(B\text{.}\) More formally, \(A\times B = \lbrace (a,b) \vert a\in A \textbf{ and } b\in B\rbrace\) Thus, \(S\times T\) is \(\lbrace (w,0),(x,0),(y,0),(z,0)\rbrace\)