Every object in linear algebra is a set with some
extra structure. A vector space is a set on which we can
add and scale, a subspace is a subset of it, and a
linear map sends elements of one set to elements of
another. Before the structure arrives, we need the plain
language of sets: how to describe them, when two of them
are equal, and how to combine them. The most important
move in this section is proving that two sets are equal
by proving two inclusions, a move we will use for
subspaces, spans, kernels and images throughout the
book.
Sets,
elements and set-builder notation
A set is a collection of objects,
called its elements. We write for “ is an element of ” (also “ belongs to ”, “ lies in ”), and for its
negation. A set is determined by its elements and
nothing else: it has no order and no repetition. So
, and all describe
the same set, whose elements are and . We make this precise
below.
Small sets can be listed between braces. Infinite
sets we meet constantly have fixed names.
Definition
0.3.1 (Common number sets)
We write
- for the natural
numbers; in this book
includes ;
- for the
integers;
- for the
rational numbers, the numbers with and ;
- for the
real numbers;
- for the
complex numbers, studied later in this
chapter.
Books disagree about whether . With our
convention, the Well-Ordering Principle (Theorem 0.2.11)
applies to collections that contain , and “” means . When we need
positive integers only, we say “”. For real
numbers we
also use intervals: is the set of real
with , the set with , and
, are defined in the
same way.
Listing elements fails for most sets we care about,
such as “the real numbers whose square is less than
”. Instead we
describe a set by a property, and select from a set we
already have.
Definition
0.3.2 (Set-builder notation)
Let be a set
and let be a
predicate for . The set is the set whose elements are
exactly those for which is true.
In words: an object belongs to if
and only if
and is true. Both parts
matter. The ambient set says where we are
looking, and the predicate says what we keep. The colon
is read “such that”; some books use a vertical bar
instead. When it is plain which sets the elements come
from, as in the unions and intersections below, we
sometimes leave the ambient set out and write .
A second form describes the elements by a formula:
is the set of all numbers of the form with an integer. An object
belongs to it
exactly when
for some . This form will describe sets such as
“all combinations of given vectors” in Chapter 1.
Example
(Reading set-builder notation)
Describe each set more simply.
- (a) .
- (b) .
- (c) and .
- (d) , a set of ordered pairs (made precise
under Cartesian products below).
Solution.
(a) A real number
satisfies exactly when , so the set is the interval .
(b) The same
predicate, selected from instead, keeps only
integers: the set is . Changing the ambient set changes the
set.
(c) Both are the
set of even integers. The first selects
the integers with a property; the second produces each
element by the formula . By the definition of
“even” (Definition 0.2.1), an
integer is even exactly when it equals for some .
(d) The pairs of
reals whose coordinates add to : the line in the plane
through and
.
What if no element of satisfies the
predicate? We still want a set, and it has no
elements.
Definition
0.3.3 (Empty set)
The empty set is the set
with no elements: for
every object .
For example, , since for every real
(Example (Quantified statements)).
Also . We will see shortly
that there is only one empty set, so
these two descriptions give the same set.
Statements about all elements of are vacuously
true: “every element of is a prime
number” has no element that could fail, just as in the
degenerate case discussed after Example (Quantified statements).
Warning. , and are three different
sets. The set has no
elements. The set has
exactly one element, namely the empty set. The set has exactly one
element, namely the number . A box containing an
empty box is not an empty box. In Chapter 1 this
matters: will
be a subspace, and never is.
Subsets
Most sets in this book live inside a bigger set: the
even integers inside , a line inside the
plane, and later a subspace inside a vector space. The
first thing to check about a candidate subspace will be
that it sits inside the space at all. We need a word for
“sits inside”.
is a
subset of when
everything in is
also in .
Definition
0.3.4 (Subset)
Let and be sets. We say is a
subset of , and write , if If and , then
is a proper subset of , written .
In words: says that every element of
is an element of
. It says nothing
about elements of ; may contain many more.
The definition is an implication inside a “for every”,
so the proof template of the previous section applies:
to show , let and show .
By Definition 0.1.4 and
Theorem 0.1.2, the
negation reads So to show is not
a subset of ,
exhibit one element of outside .
Example
(Subsets)
Decide whether each inclusion holds.
- (a) .
- (b) and .
- (c) and ,
for any set .
- (d) .
Solution.
(a) All hold.
Every natural number is an integer; every integer equals , so it is rational;
every rational number is real.
(b) The first
holds: each of
is an element of . The second fails, although it differs from
the first in only one element: passes, but and , so
is a witness for
.
(c) Both hold.
For :
let ; then
. For :
the implication has a false
hypothesis for every by Definition 0.3.3, so
it is vacuously true (Definition 0.1.2). The
empty set is a subset of every set, including
itself.
(d) Holds. Let
with
. Then , so
or , and both are
integers.
Warning. and are different
relations. says the object is one of the elements
of . compares
two sets, element by element. So is true
while makes no sense ( is not a set here); and
is true while is
false.
Quick check. Let . Is
? Is ?
Solution. The set has exactly two
elements: the set and the number . So is
true. But is
false: , and is neither the set
nor the
number , so .
Equality of
sets and double inclusion
We said a set is determined by its elements. Here is
the precise version.
Definition
0.3.5 (Set equality)
Two sets and
are
equal, written , if they have
exactly the same elements:
So : each object belongs to one of
these sets exactly when it is or . Order and repetition
in a list are features of how we write
a set, not of the set.
Proving a biconditional for every at once is awkward. It
is much easier to prove two implications separately, and
that is exactly what the next result allows.
Theorem
0.3.1 (Double inclusion)
Let and be sets. Then if and only if
and
.
Proof. By Definition 0.3.5,
means that
for every , both
and hold, since a biconditional
is the conjunction of an implication and its converse. A
statement of the form “for every , and ” holds exactly when
“for every , ” and “for every
, ” both hold, by Definition 0.1.3.
Hence holds
exactly when and both hold. By Definition 0.3.4,
these are and . This proves the theorem.
This is the move “prove set equality by
double inclusion”. The proof is written in two
labeled halves, and , each
starting “Let ”. Here is a first consequence.
Example
(A solution set by double inclusion)
Prove that .
Solution. Write . By Theorem 0.3.1 it
suffices to prove and .
Let
. Then is real and .
Factoring, . A product of two real numbers is zero only
if one factor is zero, so or . Hence .
Let
, so
or . Both are real. If
, then ; if , then . In either
case .
This shows .
Solving an equation “at school” usually produces only
the
half: “if is a
solution, then is
or ”. The half,
checking that the candidates really are solutions, is
the part that gets forgotten. It matters whenever a step
in the solving is not reversible, such as squaring both
sides.
Union,
intersection and difference
Given two sets, there are three basic ways to form a
new one: keep what is in either, keep what is in both,
or keep what is in the first but not the second. Each is
a set-builder description whose predicate uses a
connective from the section on logic.
Definition
0.3.6 (Union)
The union of sets and is
Definition
0.3.7 (Intersection)
The intersection of sets and is We call
and
disjoint if .
Definition
0.3.8 (Set difference and complement)
The difference of sets and is When all sets under discussion are subsets of
one fixed set ,
the complement of is .
In words: the union keeps an element that lies in
at least one of the sets (the “or” is
inclusive, as always); the intersection keeps an element
that lies in both; the difference keeps the
elements of that
are not in . The complement depends
on the choice of :
the complement of is the set of
negative integers inside , but a much bigger
set inside .
Example
(Operations on finite sets)
Let and . Compute , , and .
Solution. Checking each element
against the definitions: ; ;
; and . Since , the difference is not symmetric in its two
arguments, unlike union and intersection.
Example
(Operations on intervals)
Let
and .
Compute ,
and .
Solution. A real lies in when or , which
happens exactly when ; so . It lies in when both hold,
that is, when ; so . It lies in when and not
.
Given , “not
”
means ; so
. The endpoint is excluded because
.
Unions, intersections and differences interact
through laws that mirror those for “or”, “and” and
“not”. The first pair is De Morgan’s laws, the set
version of Theorem 0.1.2.
Theorem
0.3.2 (De Morgan’s laws for sets)
Let , and be sets. Then
- (a) ;
- (b) .
In particular, if , then and .
Idea. Unwind membership into
connectives. “” is “not ( or )”, and De Morgan for statements turns that
into “
and ”. So
each law is its logical counterpart, applied one element
at a time. We prove (a) by double inclusion; (b) is an
exercise.
Proof. We prove (a) using Theorem 0.3.1.
Let
. By Definition 0.3.8,
and . By Definition 0.3.6, the
second says that “ or ” is false, so by Theorem 0.1.2, and . Since and , we have ;
since and
, we have
. Hence by Definition 0.3.7.
Let
. By Definition 0.3.7 and
Definition 0.3.8,
, and . By Theorem 0.1.2, “ or ” is false, so
.
Together with , this gives .
This proves (a). For the complement form, take and use Definition 0.3.8:
, and similarly for (b).
The second pair of laws says each of and distributes over the
other, like multiplication over addition, except that
here both directions hold.
Theorem
0.3.3 (Distributive laws for sets)
Let , and be sets. Then
- (a) ;
- (b) .
Idea. Double inclusion again, and
in each half the “or” in a union forces a split into
cases. For (b) , an element
of both
and is
either in , and
then done, or not in , and then it must be in
and in . We prove (b); (a) is
an exercise.
Proof. We prove (b) using Theorem 0.3.1.
Let
. By Definition 0.3.6,
or .
Case 1: . Then and by Definition 0.3.6.
Case 2: . Then and by Definition 0.3.7, so
again and .
In both cases by Definition 0.3.7.
Let
, so and .
Case 1: . Then .
Case 2: . Since and , we get . Since and , we get . Hence , so .
In both cases . This proves (b).
Indexed
families of sets
Two sets are not always enough. In Chapter 1 we will
need “the intersection of all subspaces
that contain a given set”, and there are usually
infinitely many of them. So we need unions and
intersections of any number of sets at once.
An indexed family is a list of sets with one set
for each label; its union keeps what lies in some
member, its intersection what lies in every
member.
Definition
0.3.9 (Unions and intersections of indexed
families)
Let be a set,
and for each let
be a set. The collection is an
indexed family of sets, with
index set . Its
union is and, if
is non-empty, its
intersection is
In words: lies
in the union when it lies in at least
one ,
and in the intersection when it lies in
every . When , these are
and
. When
, we also write and .
Why
must be non-empty for the intersection. If
,
the condition “” is vacuously true for
every object , so the “intersection”
would contain everything, which is not a set we want.
(When all sets live inside a fixed , one sometimes defines
the empty intersection to be .) The empty union
causes no such trouble: “” is always false, so .
Example
(Indexed unions and intersections of intervals)
For each integer , let and . Show that You may use the fact that for every real there is an
integer
with .
Solution. The union. Let . By
Definition 0.3.9,
for some
, so .
Hence .
Let
. Since
, there is
an integer
with .
Then , so , and hence lies in the union. By
Theorem 0.3.1, the
union is .
The intersection. Suppose, for a
contradiction, that some lies in . Then , so
. Choose an
integer
with .
Then , contradicting for every . Hence the intersection
has no elements, so it equals .
Each is
non-empty (it contains ), and each is
contained in the one before. Yet their intersection is
empty. Infinite intersections can shrink to nothing even
when no single step does.
De Morgan’s laws hold for indexed families with the
same proofs: for a non-empty index set , and . The “or” of the
finite version becomes “there exists”, and the “and”
becomes “for every”, exactly as in Definition 0.1.4.
Cartesian
products and -tuples
A set forgets order: . But a point in the plane is not
like that. The point is different from . We need objects
that remember order.
An ordered pair has a first entry
and a second
entry , and two
ordered pairs are equal exactly when their entries agree
in order:
Definition
0.3.10 (Cartesian product)
Let and be sets. The
Cartesian product of and is the set of ordered
pairs More generally, for sets , the
product is the set of all ordered lists
with
for each .
For example, . The order of the factors matters: , but , whose pairs
have a letter first. A degenerate case: for every set , since no pair can have
a second entry from .
Definition
0.3.11 (-tuples)
Let be a set
and an
integer. An -tuple of
elements of is an
ordered list with each . The set of all of them is Two -tuples are equal
exactly when for every .
Example
(Sets of tuples)
Describe some elements of , and , and count the
elements of .
Solution. The set is the plane: it
contains ,
and . The set
contains
but not
,
whose second entry is not an integer. The set consists of
the lists of three bits: There are two choices for each of the three
entries, giving elements. In the same way, if has elements then has elements.
In Chapter 1, and more generally
become the
first examples of vector spaces, with -tuples added and scaled
entry by entry.
Power
sets
Sets can themselves be elements of sets, as the
warning about showed.
One such set collects every subset of a given set.
Definition
0.3.12 (Power set)
The power set of a set is the set of all
subsets of :
So means exactly . For
example, which has elements. The
degenerate case is instructive: has one
element, because the empty set has exactly one subset,
itself. For a set with elements the power set
has elements;
the last exercise proves this by induction.
Exercises
A. Check your
understanding
Exercise
(A1)
Decide whether each statement is true or false. Give
a one-line reason.
- (a) .
- (b) .
- (c) .
- (d) .
- (e)
and .
- (f) and .
Solution.
(a) True. By Definition 0.3.1,
includes in this book.
(b) False. By Definition 0.3.3,
nothing is an element of , not even
.
(c) True. The
empty set is a subset of every set, vacuously, as in Example (Subsets).
(d) False. but , so
the two sets do not have the same elements (Definition 0.3.5).
(e) The first is
true: both sets have exactly the elements and . The second is false:
ordered pairs are equal only when their first entries
agree, and .
(f) The first is
true: , so by Definition 0.3.12. The
second is false: , but is a number, not a
subset of ,
so .
B. Practice
Exercise
(B1: The second De Morgan law)
Let , , be sets. Prove that
, which is
part (b) of Theorem 0.3.2.
Solution. We use Theorem 0.3.1.
Let
. By Definition 0.3.8,
and . By Definition 0.3.7,
“ and ” is false, so by
Theorem 0.1.2, or . If , then ; if
, then
. In either case by Definition 0.3.6.
Let
. By Definition 0.3.6,
or . In the first case and ; in the
second, and
. In both
cases , and
“ or
” is
true, so by Theorem 0.1.2 “ and ” is false, that
is, . Hence .
This proves the equality.
Exercise
(B2: A distributive law)
Let , , be sets. Prove that
, which is part (a) of Theorem 0.3.3.
Solution. We use Theorem 0.3.1.
Let
. Then and , so or . If , then ; if , then . In either case .
Let
. If , then and . If , then
and . In either case and , so .
This proves the equality.
Exercise
(B3: An indexed intersection)
Prove that You may use the fact that for every real there is an
integer
with .
Solution. Write and
. We use Theorem 0.3.1.
For
every ,
, so . By Definition 0.3.9,
.
Let
. Suppose,
for a contradiction, that . Then , so there is an integer with .
Then or
, so
. This
contradicts , which requires for every . Hence , that is, .
This shows .
C. Going deeper
Exercise
(C1: When union equals intersection)
Let and be sets. Prove that
if and only if .
Solution. Suppose
. Then and
. By Definition 0.3.6 and
Definition 0.3.7,
“ or ” and “ and ” are both
equivalent to , so . Hence .
Suppose . We show using Theorem 0.3.1.
Let
. Then by Definition 0.3.6.
Since , we get , and in particular .
Swapping the roles of and in the previous
paragraph, which is allowed since and
, gives .
Hence .
This proves the equivalence.
Exercise
(C2: Counting subsets)
For a finite set , write for its
number of elements. The aim is to prove that for every finite set .
- (a) Check the claim
when .
- (b) Let have elements, fix , and let . Show that every subset of belongs to exactly one
of the two collections: the subsets of with , and the
subsets of with
.
- (c) Show that the
subsets of with
are
exactly the subsets of , and that and pair off the subsets of containing with the subsets of
, each
undoing the other.
- (d) Hence prove the
claim by induction on .
Hint: in (c), use double inclusion to check that
when .
Solution.
(a) The only
subset of is itself, since
any has no elements and so equals by Theorem 0.3.1. So
has element.
(b) Let . The
statement
is either true or false, and not both. So lies in exactly one of
the two collections.
(c) First
collection. If and , then every lies in and is not , so ; hence .
Conversely, if , then and , since no element of equals . So the first
collection is exactly .
Second collection. If with , then . If , then
contains . Now we
check that the two operations undo each other. For containing : an element lies in
exactly when it is in and not , or it is ; since , this is exactly
when it is in . So
. For : an element lies in exactly when it is in or equal to , and not equal to ; since , this is
exactly when it is in . So . Hence the two operations pair the subsets of
containing one-to-one with the
subsets of ,
and the two collections have the same number of
elements.
- (d) Let be the statement
“every set with
elements has exactly subsets”. We use Theorem 0.2.7 with
. The base
case is (a),
since the only set with no elements is . Let , suppose , and let have elements. Fix , which exists
since ,
and let , a set with elements. By (b), the
number of subsets of is the size of the
first collection plus the size of the second. By (c) and
the induction hypothesis, each of these sizes equals
. Hence has
subsets, which is . By Theorem 0.2.7, holds for every
, as
claimed.