Download Sets, Logic, and Proof

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Sets, Logic, and Proof
Linear Algebra, Fall 2008
There is a certain vocabulary and grammar that underlies all of mathematics, in particular
mathematical proof. The vocabulary includes words such as ‘if,’ ‘and,’ ‘or,’ and ‘not’ which
have precise meanings in mathematics that may differ from common usage. The grammar
underlying mathematics consists of not only the way that we put vocabulary words together
but of logical arguments in which you begin with statements you know to be true and deduce
statements that were previously not known to be true. These logical arguments are referred
to as proofs.
These notes are meant to be an introduction to the concept of mathematical proof. There
are many books on this topic; see How to Read and Do Proofs: An Introduction to Mathematical Thought Processes by Daniel Solow for an example of such a book. Proof techniques
also vary by mathematical area, so this is meant to be a very broad and brief overview.
1
Sets and Set Notation
We begin with a review of some (but not all) basic concepts of sets and set notation. Intuitively, a set is a collection of objects, which are called its elements or members. Some
commonly used sets are
C
R
Q
Z
N
=
=
=
=
=
the
the
the
the
the
set
set
set
set
set
of
of
of
of
of
complex numbers,
real numbers,
rational numbers,
integers,
positive integers.
One can describe a set by listing, in curly braces, all the objects that the set contains. For
example, the statement
S = {1, 2, 3}
defines S to be the set containing the numbers 1, 2, and 3. Sometimes we use an ellipsis (. . .)
to save ink, especially for sets with infinitely many elements; for example,
N = {1, 2, 3, . . .}
If we happen to list an element twice, it still belongs to the set “just once”; for example,
{1, 2, 3} and {1, 2, 2, 3} are exactly the same set.
The notation x ∈ S means that x is an element of the set S, whereas the notation x ∈
/ S
/ Z and
means that x is not an element of S. For example, 2 ∈ N and π ∈ R, while 45 ∈
√
2∈
/ Q. (A proof of the last assertion is given in Example 8 on page 15 of this handout.)
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 2 of 20
The elements of a set can be other sets; for example, {2, {5}} is the set whose elements are
2 and {5}. So 2 ∈ {2, {5}} and {5} ∈ {2, {5}}, but 5 ∈
/ {2, {5}}.
The empty set, denoted ∅, is a special set which doesn’t have any elements; in other words,
∅ = {}. One can think of the empty set as a box with nothing inside.
Another way to describe a set is to give a condition for deciding whether or not an object is
an element of the set. If P (x) is a statement about x, we use the notation
{x : P (x)}
to indicate the set of all x for which P (x) is true. The colon is usually pronounced “such
that.” For example,
N = {x : x ∈ Z and x > 0}
Another notation for this is
{x ∈ Z : x > 0}
This reads, “the set of integers x such that x > 0.”
If A and B are sets, and if every element of A is also an element of B, we say that A is a
subset of B, and we write A ⊆ B. For example, Z is a subset of R, but R is not a subset
of Z. Every set is a subset of itself. Also, the empty set is a subset of every set.
Two sets are equal if and only if they have the same elements. For example,
{1, 2, 3} = {2, 3, 1} = {3, 1, 2, 2, 1, 1, 1, 3, 3}
but
{2, {5}} =
6 {2, 5}
The union of two sets A and B, denoted by A ∪ B, is the set of all objects that are in A or
B (or both):
A ∪ B = {x : x ∈ A or x ∈ B}
The intersection of A and B is the set of all objects that are in both A and B:
A ∩ B = {x : x ∈ A and x ∈ B}
For example,
{1, 2, 3} ∪ {3, 4, 5} = {1, 2, 3, 4, 5}
{1, 2, 3} ∩ {3, 4, 5} = {3}
Venn diagrams provide a way to visualize these and other set-theoretic concepts. In Figure
1(a), the inside of the circle on the left represents the contents of A, while the inside of the
circle on the right represents B. The shaded region is A ∪ B. In Figure 1(b), the shaded
region is A ∩ B. How would we demonstrate the meaning of A ⊆ B with a Venn diagram?
Sets, Logic, and Proof Linear Algebra, Fall 2008
(a)
Page 3 of 20
(b)
Figure 1: Venn diagrams of (a) the union A ∪ B and (b) the intersection A ∩ B
The difference between two sets A and B, denoted by A \ B (or A − B), is defined as
follows:
A \ B = {x : x ∈ A and x ∈
/ B}
Figure 2 gives a Venn diagram illustrating this operation. For example, Z \ N is the set of
nonpositive integers, i.e. {. . . , −3, −2, −1, 0}.
Figure 2: Venn diagram of the set difference A \ B
Page 4 of 20
Sets, Logic, and Proof Linear Algebra, Fall 2008
2
Logic
In mathematics, a statement is a sentence that is either true or false, but not both. For
example,
6 is an even integer
and
4 is an odd integer
are statements. (The first one is true, and the second is false.) We will use capital letters
such as P and Q to denote statements.
2.1
Logical Operations
In arithmetic, we can combine or modify numbers with operations such as +, ×, etc. Likewise, in logic, we have certain operations for combining or modifying statements. In mathematics, these words have precise meanings, which are given below. In some cases, the
mathematical meanings of these words differ slightly from, or are more precise than, common English usage. To help explain those precise meanings here, we will use symbols and
truth tables, but rest assured that in day-to-day mathematical proofs we usually express our
logic in English words.
• Not. The simplest logical operation is negation denoted by the word ‘not’ or the
symbol ¬. If P is a statement, then ‘not P ’ or ¬P is defined to be
– true, when P is false
– false, when P is true.
P
T
F
¬P
F
T
• And. If P and Q are two statements, then the statement ‘P and Q’, sometimes
denoted P ∧ Q, is defined to be
– true, when P and Q are both true;
– false, when P is false, or Q is false, or both P and Q are false.
This is a connective known as conjunction.
P
T
T
F
F
Q
T
F
T
F
P ∧Q
T
F
F
F
P
T
T
F
F
Q
T
F
T
F
P ∨Q
T
T
T
F
Page 5 of 20
Sets, Logic, and Proof Linear Algebra, Fall 2008
• Or. If P and Q are two statements, then the statement ‘P or Q’, sometimes denoted
P ∨ Q, is defined to be
– true, when P is true or Q is true or both P and Q are true;
– false, when both P and Q are false.
In English, sometimes ‘P or Q’ means that P is true or Q is true, but not both. (For
example, a menu might read “The steak dinner comes with soup or salad.”) However,
this is not typically the case in mathematics. We always allow for the possibility that
both P and Q are true, unless we explicitly say otherwise. This is a connective known
as disjunction.
• If . . . then. If P and Q are statements, then the statement ‘if P then Q’, known as
an implication, is defined to be
– true, when P and Q are both true or when P is false;
– false, when P is true and Q is false.
We refer to P as the assumption or hypothesis and Q as the conclusion. We
sometimes abbreviate the statement ‘if P then Q’ by ‘P implies Q’, or ‘P ⇒ Q’. If
we claim that the implication P ⇒ Q is true, we are not claiming that P or Q is
necessarily true. Rather, we are making the conditional statement that if P happens
to be true, then Q is also true. If P is false, then we say that P ⇒ Q is vacuously
true. Thus P ⇒ Q is logically equivalent to Q ∨ ¬P , as we see in the following truth
table.
P
T
T
F
F
Q
T
F
T
F
P ⇒Q
T
F
T
T
P
T
T
F
F
Q
T
F
T
F
¬P
F
F
T
T
Q ∨ ¬P
T
F
T
T
• If and only if. If P and Q are statements, then the statement ‘P if and only if Q’, Do (P ⇒
Q)∧(Q ⇒
known as a double implication, is defined to be
– true, when P and Q are both true or both false;
– false, when one of P and Q is true and the other is false.
We sometimes abbreviate the statement ‘P if and only if Q’ by ‘P iff Q’, or ‘P ⇔ Q’.
When P ⇔ Q is true, we say that P and Q are equivalent.
P
T
T
F
F
Q
T
F
T
F
P ⇔Q
T
F
F
T
P ) ⇐⇒
(P ⇐⇒
Q).
Sets, Logic, and Proof Linear Algebra, Fall 2008
2.2
Page 6 of 20
Converse, Inverse, and Contrapositive
There are three ways of changing the implication P ⇒ Q into a related statement: the
converse, the inverse, and the contrapositive. Take as an example the statement ‘If the
Cobbers are winning, then we are happy.’
original
P ⇒Q
converse
Q⇒P
inverse
¬P ⇒ ¬Q
contrapositive ¬Q ⇒ ¬P
‘If
‘If
‘If
‘If
the Cobbers are winning, then we are happy.’
we are happy, then the Cobbers are winning.’
the Cobbers are not winning, then we are not happy.’
we are not happy, then the Cobbers are not winning.’
Many logical mistakes, both inside the classroom and out in the world, are made by taking
a true statement and assuming its converse or inverse also holds, but that’s not true. If we
examine the truth tables for these statements (below), we see that the converse and inverse
always have the same truth values. Similarly the original statement and the contrapositive
also always have the same truth values. We say that a statement and its contrapositive are
logically equivalent.
P
T
T
F
F
Q
T
F
T
F
¬P
F
F
T
T
original converse
¬Q P ⇒ Q Q ⇒ P
F
T
T
T
F
T
F
T
F
T
T
T
inverse
contrapositive
¬P ⇒ ¬Q
¬Q ⇒ ¬P
T
T
T
F
F
T
T
T
So you can always replace a statement with its contrapositive, but take care! Neither the
converse nor the inverse is logically equivalent to the original statement, nor even implied
by it. (For example, we might be happy even though the Cobbers are losing, just because
we’re eating ice cream.) It is possible for a statement (and its contrapositive) to be true,
but the converse (and inverse) to be false. It is also possible for all four statements to be
true (double implication, iff). A statement and its converse (inverse) are logically
independent!
2.3
Quantifiers
Consider the sentence
x is even.
This is not what we have been calling a statement; we can’t say whether it is true or false,
because it doesn’t say what x is. There are three basic ways to turn this sentence into a
statement. The first is to say exactly what x is:
When x = 6, x is even.
The following are two more interesting ways of turning the sentence into a statement:
For every integer x, x is even.
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 7 of 20
There exists an integer x such that x is even.
The phrases ‘for every’, denoted with the symbol ∀, and ‘there exists’, denoted with the
symbol ∃, are called quantifiers. There are two types of quantifiers: existential and universal. An existential quantifier is used to claim existence (i.e. that there is at least one
instance when a claim is satisfied). Common existential quantifiers in English are ‘some’,
‘there exists’, and ‘at least one’. Universal quantifiers are used to assert a claim is always
true. Common universal quantifiers in English are ‘every’, ‘all’, ‘any’, ‘whenever’, ‘no’ and
‘none’. As an example of the use of quantifiers, we can give precise definitions of the terms
‘even’ and ‘odd’.
Definition 1: An integer x is even if there exists an integer y such that x = 2y.
Definition 2: An integer x is odd if there exists an integer y such that x = 2y + 1.
We will call a sentence such as ‘x is even’ that depends on the value of x a ‘statement about
x’. We can denote the sentence ‘x is even’ by ‘P (x)’; then P (5) is the statement ‘5 is even’
(which is false), P (72) is the statement ‘72 is even’ (which is true), and so forth. If S is a P (x) is a
function –
set and P (x) is a statement about x, then the notation
(∀x ∈ S) P (x)
means that P (x) is true for every x in the set S. The notation
(∃x ∈ S) P (x)
means that there exists at least one element x of S for which P (x) is true.
Using the above notation, the definition of ‘x is even’ given previously becomes
(∃y ∈ Z) x = 2y
Of course, this is still a statement about x. We can turn this into a genuine statement by
using a quantifier to say what x is. For instance, the statement
(∀x ∈ Z)(∃y ∈ Z) x = 2y
says that all integers are even. (This is false.) The statement
(∃x ∈ Z)(∃y ∈ Z) x = 2y
says that there exists at least one even integer. (This is true.)
The sentence
(∃y ∈ Z) x = 2y + 1
means that x is odd. The statement
(∀x ∈ Z) (∃y ∈ Z) x = 2y or (∃y ∈ Z) x = 2y + 1
plug in x,
get T/F.
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 8 of 20
says that every integer is even or odd.
The order of quantifiers is very important; changing the order of the quantifiers in a statement
will often change the meaning of a statement. For example, the statement
(∀x ∈ Z)(∃y ∈ Z) x < y
is true, but the statement
(∃y ∈ Z)(∀x ∈ Z) x < y
is false.
2.4
Negating statements
We often need to find the negations of complicated statements (for instance, in finding the
contrapositive of a statement). Negating a simple statement is not difficult. But if we add
in quantifiers and connectives, it becomes tricky because the negation swaps quantifiers and
swaps connectives. It usually helps to do simple examples in English.
Rules for Negating Statements with Quantifiers:
• The negation of a statement involving a universal quantifier uses an existential quantifier. In symbols,
¬(∀x) P (x) ⇔ (∃x) ¬P (x).
For example, the negation of ‘Every piece of candy is sweet’ would be ‘There exists a
piece of candy that is not sweet,’ say a lemon drop.
• The negation of a statement involving an existential quantifier uses a universal quantifier. In symbols,
¬(∃x) P (x) ⇔ (∀x) ¬P (x).
For example, the negation of ‘There exists a cow that is purple’ would be ‘Every cow
is not purple.’
Rules for Negating Statements with Connectives (DeMorgan’s Laws):
• The negation of ‘P or Q’ is ‘(not P ) and (not Q)’. In symbols,
¬(P ∨ Q) ⇔ ¬P ∧ ¬Q.
For example, the negation of ‘My car is yellow or your truck is green’ is ‘My car is not
yellow and your truck is not green.’
• The negation of ‘P and Q’ is ‘(not P ) or (not Q)’. In symbols,
¬(P ∧ Q) ⇔ ¬P ∨ ¬Q.
For example, the negation of ‘Roses are red and violets are blue’ is ‘Either roses are
not red, or violets are not blue.’
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 9 of 20
It is also possible to negate implications and double implications, though we will not do so
frequently. The rules for doing this are given in the right-hand column of Table 1 on page
10. We give just one example. If I asserted that ‘If the Cobbers are winning, then we are
happy,’ how could you prove me wrong? You would have to show me that the Cobbers are
indeed winning, but we are nevertheless not happy (perhaps because our ice cream fell on
the sidewalk). Symbolically,
¬(P ⇒ Q) ⇔ P ∧ ¬Q.
Sets, Logic, and Proof Linear Algebra, Fall 2008
3
Page 10 of 20
Proofs
A proof is an explanation which convinces other mathematicians that a statement is true.
A good proof also helps them understand why it is true. Table 1 summarizes just about
everything you need to know about logic. It lists the basic ways to prove, use, and negate
every type of statement. In boxes with multiple items, the first item listed is the one most
commonly used.
Statement
Ways to Prove it
• Prove that P is true.
P
• Assume P is false, and
derive a contradiction.
P ∧Q
• Prove P , and then
prove Q.
• Assume P is false, and
deduce that Q is true.
P ∨Q
• Assume Q is false, and
deduce that P is true.
• Prove that P is true.
• Prove that Q is true.
• Assume P is true, and
P ⇒Q
deduce that Q is true.
• Assume Q is false, and
deduce that P is false.
• Prove P ⇒ Q, and
P ⇔Q
then prove Q ⇒ P
• Prove P and Q.
• Prove (not P ) and
(not Q).
• Find an x in S for
(∃x ∈ S) P (x) which P (x) is true.
• Say “let x be any
(∀x ∈ S) P (x) element of S.” Prove
that P (x) is true.
Ways to Use it
• P is true.
• If P is false, you have
a contradiction.
• P is true.
• Q is true.
• If P ⇒ R and Q ⇒ R,
then R is true.
• If P is false, then
Q is true.
• If Q is false, then
P is true.
• If P is true, then
Q is true.
• If Q is false, then
P is false.
• Statements P and Q
are interchangeable.
• Say “let x be an element
of S such that P (x)
is true.”
• If x ∈ S, then P (x)
is true.
• If P (x) is false, then
x∈
/ S.
How to Negate it
¬P
(¬P ) ∨ (¬Q)
(¬P ) ∧ (¬Q)
P ∧ (¬Q)
(P ∧ (¬Q))∨
((¬P ) ∧ Q)
(∀x ∈ S) ¬P (x)
(∃x ∈ S) ¬P (x)
Table 1: Logic in a nutshell.
Don’t worry if some of the entries in the table appear cryptic at first; they will make sense
after you have seen some examples. In our first example, we will illustrate how to prove ‘for
every’ statements and ‘if . . . then’ statements, and how to use ‘there exists’ statements.
Page 11 of 20
Sets, Logic, and Proof Linear Algebra, Fall 2008
Example 1: Write a proof that for every integer x, if x is odd, then x + 1 is even.
Proof. This is a ‘for every’ statement, so the first thing we do is write
Let x be any integer.
We have to show, using only the fact that x is an integer, that if x is odd then x + 1 is
even. So we write
Suppose x is odd.
We must somehow use this assumption to deduce that x + 1 is even. Recall from Definition 2 that the statement ‘x is odd’ means that there exists an integer y such that
x = 2y + 1. Also, we can give this integer y any name we like; so to avoid confusion
below, we are going to call it w. So to use the assumption that x is odd, we write
Let w be an integer such that x = 2w + 1.
Now we want to prove that x + 1 is even, i.e., that there exists an integer y such that
x + 1 = 2y. Here’s how we do it:
Adding 1 to both sides of this equation, we get x + 1 = 2w + 2. Let y = w + 1;
then y is an integer and x + 1 = 2y, so x + 1 is even.
We have completed our proof, so we can write Q.E.D. which stands for quod erat demonstrandum, which is just the Latin for ‘which was to be shown’. A common typographical
convention is to draw a square symbol like this instead.
Many theorems that you want to prove (for example, on homework or exams) are either
explicitly or implicity in the form ‘If P , then Q’. For example, we will see in upcoming
months that
‘If |S is a set of m vectors{zin Rn such that m > n} , then the set S is linearly dependent .’
|
{z
}
P
Q
This is the standard form of a theorem (though it can be disguised). Implications of this
form are equivalently written as
P implies Q
P ⇒Q
P only if Q
3.1
Q if P
P is a sufficient condition for Q
Q is a necessary condition for P
Direct Proofs
A direct proof should be thought of as a flow of implications beginning with ‘P ’ and ending
with ‘Q’.
P ⇒ A ⇒ B ⇒ ··· ⇒ Q
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 12 of 20
Most proofs are (and should be) direct proofs. Always try direct proof first, unless you have
a good reason not to.
Let’s start with an example related to vector spaces. Recall the axioms defining a vector
space V :
Definition 3: Let V be a set with two operations defined, addition and scalar multiplication.
Then V is a vector space if the following axioms hold for all u, v, and w in V and for all
scalars c and d:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
u+v ∈V
(closure under addition)
u+v =v+u
(commutativity)
(u + v) + w = u + (v + w)
(associativity)
There exists an element 0 ∈ V such that u + 0 = u.
(additive identity)
For each u ∈ V , there is an element −u ∈ V
(additive inverses)
such that u + (−u) = 0.
cu ∈ V
(closure under scalar multiplication)
c(u + v) = cu + cv
(distributive property)
(c + d)u = cu + du
(distributive property)
c(du) = (cd)u
(multiplicative associativity)
1u = u
(scalar identity law)
Knowing only these ten axioms, we can prove many, many things about vector spaces.
Example 2: Let V be a vector space. Prove that if r is a scalar, then r0 = 0.
Proof. We know that 0 = 0 + 0 by Axiom 4. Multiplying both sides by r, we have
r0 = r(0 + 0) = r0 + r0
by Axiom 7. Now add −(r0) to both sides to get
r0 + (−(r0)) = (r0 + r0) + (−(r0)).
Then the left-hand side is 0 by Axiom 5, while we can rearrange the parentheses on the
right-hand side by Axiom 3. We thus have
0 = r0 + (r0 + (−(r0))).
But now on the RHS, (r0 + (−(r0))) is just 0 by Axiom 5, so 0 = r0 + 0, and thus
0 = r0 by Axiom 4.
Often when we want to prove two things are equal, say a = g, we can write our proof
as a chain of equalities, like a = b = c = d = e = f = g, so that each of the equals signs
is clearly true; the conclusion that a = g is then obvious. In the case of this example, we
could write
0 = r0 + (−(r0))
by Axiom 5
= r(0 + 0) + (−(r0))
by Axiom 4
= (r0 + r0) + (−(r0))
by Axiom 7
= r0 + (r0 + (−(r0)))
by Axiom 3
= r0 + 0
by Axiom 5
= r0.
by Axiom 4
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 13 of 20
and our proof would be complete. This second proof is more elegant and polished than
our first one was, but some of its steps do seem to come out of thin air.
If you find a simple proof, and you are convinced of its correctness, then don’t be shy about
it. Many times proofs are short and sweet.
Example 3: Let V be a vector space and let v ∈ V . Prove that 0 + v = v.
Proof. 0 + v = v + 0 = v.
3.2
If and Only If
Many theorems are stated in the form ‘P if and only if Q,’ which you will often see abbreviated ‘P iff Q’ or ‘P ⇔ Q.’ This means two things: ‘If P , then Q’ and ‘If Q, then P ’. So
to prove an ‘if and only if’ statement, you must prove two implications. This usually means
writing two proofs, as in the following example.
Example 4: Let V be a vector space, and let v ∈ V . Then −v = v if and only if v = 0.
Proof. The two implications we must prove are
• −v = v ⇐= v = 0.
• −v = v =⇒ v = 0.
(⇐) First suppose v = 0. Then
v = 0 = v + (−v) = 0 + (−v) = −v,
so −v = v.
(⇒) On the other hand, suppose that −v = v. Then
0 = v + (−v) = v + v = 1v + 1v = (1 + 1)v = 2v,
so 2v = 0. Now multiply both sides by 12 , and we have
⇒
⇒
⇒
as desired.
1
2
1
2
(2v)
·2 v
1v
v
= 12 0
= 0 (by Axiom 9 and Example 2)
= 0
= 0,
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 14 of 20
Note the ‘⇒’s in front of each line, which indicate that from the previous line we can deduce
the following line. A common mistake in proof-writing is to write down a sequence of unconnected equations simply trusting that your reader will follow your reasoning with neither
English words nor symbols like ‘⇒’ to guide him. Not only is this bad style, but it can often
conceal errors in your reasoning. Treat every proof like an essay in an English or history
class: make your case in complete sentences, and remember that it is your responsibility to
convince the reader that your proof is sound, rather than his responsibility to dig the details
of the proof out of your jottings.
Sometimes you can prove an ‘if and only if’ assertion without explicitly dividing the proof
into two parts. The next example illustrates how this might be done.
Example 5: Let x be a real number. Then x2 − 6x + 13 = 4 if and only if x = 3.
Proof.
x2 − 6x + 13 = 4
3.3
⇐⇒
⇐⇒
⇐⇒
⇐⇒
x2 − 6x + 9 = 0
(x − 3)2 = 0
x−3=0
x = 3.
If P , then (Q or R)
Statements of the form ‘If P , then (Q or R)’ have a conclusion with two parts. Note that
the ‘or’ here is the mathematical ‘or’ meaning either Q, R, or both. Suppose P is true; we
need to prove either Q or R to be true. Now Q is either true or false; if Q is true, then we
are done (i.e. “there is nothing to prove”), so we can assume that Q is false. In other words,
the statement ‘If P , then (Q or R)’ is equivalent to the statement ‘If P and not Q, then R’.
[P ⇒ (Q ∨ R)] ⇐⇒ (P ∧ ¬Q ⇒ R) .
So in proving statements of this form, assume your hypothesis is true and one of your conclusions is false and from that deduce that the other conclusion must hold.
Example 6: Let V be a vector space, let v ∈ V , and let r be a scalar. Prove that if
rv = 0, then either r = 0 or v = 0.
Proof. We assume that rv = 0 but r 6= 0. Since r 6= 0, we can find its reciprocal 1/r
and multiply both sides of the equation 0 = rv by it to get
1
1
0 = (rv).
r
r
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 15 of 20
Now the left-hand side equals 0 by Example 2, and applying Axiom 9 to the right-hand
side we have
1
· r v = 1v = v
0=
r
by Axiom 10. Therefore v = 0 as desired.
3.4
Proof by Contrapositive
Proof by contrapositive takes advantage of the logical equivalence between a statement and
its contrapositive. So, to prove ‘If P , then Q’ by the method of contrapositive means to
prove ‘If not Q, then not P ’.
Example 7: Let V be a vector space, let v ∈ V , and let r be a scalar. Prove that if
rv 6= 0, then v 6= 0.
Proof. The contrapositive of the statement is ‘If v = 0, then rv = 0.’ But if v = 0, then
rv = r0 = 0
by Example 2.
3.5
Proof by Contradiction
In a proof by contradiction we assume, along with the hypotheses, the logical negation of
the result we wish to prove, and then reach some kind of contradiction. That is, if we want
to prove ‘If P , then Q’, we assume P and not-Q. The contradiction we arrive at could be
some conclusion contradicting one of our assumptions, or something that’s always untrue,
like 1 = 0.
√
2 is irrational.
√
Proof. (by contradiction) Suppose 2 is rational. Then we can write
√
a
2=
b
where a and b are positive integers. Furthermore, we can assume that gcd(a, b) = 1 (i.e.
that ab is in lowest terms), since if it were not, we could simply divide both a and b by
their common divisor. Notice that
a2
2 = 2,
b
Example 8: Show
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 16 of 20
so that
2b2 = a2 .
The left side of the equation (2b2 ) is obviously even, so a2 is even. This implies that a is
even (since the product of two even numbers is even and the product of two odd numbers
is odd). Thus a = 2k for some positive integer k and we have
2b2 = (2k)2 = 4k 2
which means
b2 = 2k 2
Now the right side (2k 2 ) is obviously even, so b2 is even. This implies that b is even.
Since a and b are both even, 2 is a common divisor of a and b,
√ which is a contradiction
of our √
assumption that gcd(a, b) = 1. So our assumption that 2 is rational is false, and
hence 2 is irrational.
How is this different from proof by contrapositive? The difference between the contrapositive
method and the contradiction method is subtle. Let’s examine how the two methods work
when trying to prove ‘If P , then Q’.
• Method of contradiction: Assume P and not Q and prove some sort of contradiction.
• Method of contrapositive: Assume not Q and prove not P .
The method of contrapositive has the advantage that your goal is clear—proving not-P —
but you can only assume not-Q. In the method of contradiction, your goal is to prove any
sort of contradiction at all, and you have more assumptions to work with—both P and not-Q.
3.6
Disproving Statements
Sometimes we are asked to prove a statement is false. This can be easy or it can be hard.
• If the statement we want to disprove involves a universal quantifier (“for all. . . ”), we
luckily need only find a counterexample. For example, to disprove the statement ‘All
prime numbers are odd,’ we just have to produce one even prime number—namely, 2.
• If the statement we want to disprove involves an existential quantifier (“there exists. . . ”), we must prove the negation of the statement, typically using direct methods.
For example, to disprove the statement ‘There exists a perfect square whose final digit
is 2,’ there’s no shortcut; we need to prove ‘There exists no perfect square whose final
digit is 2.’
Page 17 of 20
Sets, Logic, and Proof Linear Algebra, Fall 2008
3.7
Mathematical Induction
Let S(n) be a statement about the positive integer n. If
1. S(i) is true and
(Base Step)
2. for all k ≥ i, the truth of S(k) implies the truth of S(k + 1)
(Inductive Step)
then S(n) is true for all n ≥ i.
Suppose you want to prove that a statement about an integer n is true for all integers n
greater than i. That would be infinitely many calculations, which we can’t do, but mathematical induction provides a slick shortcut. The Inductive Step above says that if your
statement is true about an integer k, then it is also true about k + 1. In other words, once
you prove the Inductive Step, then the theorems are poised like dominoes, so that if one is
true, then the next is true, but then the next one after that must also be true, and so on.
All it takes is proving your statement for the integer i (the Base Step), and suddenly you
have proved it for all integers ≥ i.
Example 9: Show that
n
X
i=
i=1
n(n + 1)
for all positive integers n.
2
Proof. (by induction)
Base Step: For n = 1, we have
1
X
i=1=
i=1
1(1 + 1)
.
2
X
Inductive Step: Assume that
k
X
i=1
k+1
X
i =
i=1
i=
k(k + 1)
2
k
X
(the “Inductive Hypothesis”)
!
i
+ (k + 1)
i=1
k(k + 1)
+ (k + 1)
(by the Inductive Hypothesis)
2
k(k + 1) + 2(k + 1)
=
2
(k + 1)(k + 2)
=
2
(k + 1)[(k + 1) + 1]
.
=
2
Therefore by induction, the statement is true for all positive integers n.
=
X
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 18 of 20
Exercises
1. State the negation of the following:
(a) m and n are odd integers.
(b) Either m is odd or n is odd.
(c) x is a real number and y is an integer.
(d) x = 0 or xy > 0, for all numbers x and y in R.
(e) x 6= 0 and |x + y| = |y|, for some numbers x and y in R.
(f) For every number x in R, x2 > 0.
(g) For every x ∈ R, there is a number y ∈ R such that xy = 1.
(h) There is a set S such that for every set T , S ⊆ T .
2. State the inverse, converse, and contrapositive of the following (you do NOT need to
prove them):
(a) If m and n are odd integers, then mn is odd.
(b) If x > 4, then x2 > 16.
(c) If x2 > x, then either x < 0 or x > 1.
(d) If the function f is not continuous at a, then f is not differentiable at a.
(e) Let f and g be functions. If f and g are both differentiable at a, then f + g is
differentiable at a.
3. Determine the truth value of the statement “[P ∧ (Q ∨ X)] ∨ ¬[(P ∧ Q) ∨ (P ∧ X)]”
where X is false. Be sure to justify your answer.
4. Use truth tables to show that P ⇔ Q and (P ⇒ Q) ∧ (Q ⇒ P ) are logically equivalent.
5. (a) Using the fact that (P ⇒ Q) ⇐⇒ (Q ∨ ¬P ) and using the rules for negation in
Section 2.4, prove symbolically that
[P ⇒ (Q ∨ R)] ⇐⇒ (P ∧ ¬Q ⇒ R) .
(b) Which of our proof strategies does this justify?
6. (a) Using the fact that (P ⇒ Q) ⇐⇒ (Q ∨ ¬P ) and using the rules for negation in
Section 2.4, prove symbolically that
[P ∧ ¬Q ⇒ F] ⇐⇒ (P ⇒ Q),
(b) Which of our proof strategies does this justify?
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 19 of 20
7. Let V be a vector space and let v ∈ V .
(a) Prove that 3v + 2v = 5v
(b) Prove that (v + v) + v = 3v.
8. Prove that there is only one vector satisfying the condition of the additive identity in
Axiom 4.
9. Prove that the notation −v in Axiom 5 is unambiguous. In other words, let V be a
vector space, let v ∈ V , and show that if ∼v were another vector satisfying v + (∼v) =
0, then we must have ∼v = −v.
10. Let V be a vector space and let v ∈ V . Prove that v + v = v if and only if v = 0.
11. (a) Is it possible for a vector space to have no elements? Justify your answer.
(b) Is it possible for a vector space to have only one element? Justify your answer.
(c) Prove that if a vector space has more than one element, then it has an infinite
number of elements.
12. Let V be a vector space, let v ∈ V , and let r and s be scalars. Prove the following:
(a) −v + v = 0
(b) 0v = 0
(c) −v = (−1)v (Hint: You could use Exercise 9.)
(d) −(−v) = v
(e) (−r)v = −(rv) = r(−v) (i.e. prove both equalities)
(f) If v 6= 0 and rv = sv, then r = s.
13. Let V be a vector space and let v, w ∈ V . Show that there exist scalars a and b, with
a 6= 0, such that av + bw = 0 if and only if there exists a scalar c such that v = cw.
14. If V is a vector space and v, w, x, y ∈ V , prove that the following five expressions are
all equal:
• v + (w + (x + y))
• v + ((w + x) + y)
• (v + w) + (x + y)
• (v + (w + x)) + y
• ((v + w) + x) + y
It follows that there is no real ambiguity in writing simply v + w + x + y, because no
matter what order we do the additions in, we get the same result.
Sets, Logic, and Proof Linear Algebra, Fall 2008
Page 20 of 20
15. The previous exercise involved only four vectors. Now let V be a vector space, let n
be any positive integer, and let v1 , v2 , . . . , vn ∈ V . Prove that no matter how you
parenthesize the sum
v1 + v2 + · · · + vn ,
(keeping the vectors in the same order) you get the same answer.
(Hint: Induct on n.)