Section 9.4 gave a length and a
distance and proved every basic property of the distance
except one: that a detour through a third point is never
shorter than the direct route. This section proves it.
Everything rests on one inequality between the dot
product and the lengths, the Cauchy–Schwarz inequality.
The method that proves it is called
normalizing: shrink or stretch both
vectors to length , prove the inequality
there, and scale back.
Two earlier
proofs, and why neither transfers
The triangle inequality has been proved before in
this series in two settings, for real numbers and for
complex numbers. Each proof used a tool that lacks.
In . Number
Systems: From
to ,
Section 4.1, trapped each number between its absolute value,
, and added the two traps. That is how
it proved the triangle inequality for absolute values,
Number Systems: From to , Proposition 4.1.3
(c)–(e). The trap compares with the number . For a vector
with
, “” compares
a vector with a number, and has been given no
order at all.
In . Section 3.3 expanded and met the
cross term ,
which it bounded by (Theorem 3.3.2). By
Proposition 9.4.3,
and , so
the key step was proved with the multiplication of : the product and the rule
. For this book defines
no such multiplication on .
The expansion itself does survive. Section 9.4
compared lengths by comparing their squares (Example (Method: expand the square)).
Expanding both squares by Eq. 9.4.1
gives Everything matches except the cross terms. So
the triangle inequality in rests on one
inequality, , and that inequality now
needs a proof that uses only the laws of the dot
product.
An attempt that stalls. Work
coordinatewise: for each , and ,
by Proposition 9.4.7
(a). Adding the
bounds gives which is off by the factor . Try :
then and ,
so the inequality we want holds with equality, while the
attempt only gives . Each bound is
sharp only when all of sits in coordinate
. For and , the bounds cannot all be
sharp at once. A coordinate-by-coordinate bound loses
the geometry. The proof below uses the length of a whole
vector instead.
The
Cauchy–Schwarz inequality
Start with two vectors of , and . Their dot
product is , and both have length , so .
The dot product is a little smaller than the product of
the lengths. Now take instead. Then and : the two are equal. The theorem says that
the dot product never exceeds the product of the
lengths, and that equality up to sign happens exactly
for parallel vectors.
Equality can hold with either sign, and the sign
tells which way
points along .
Theorem
9.5.1 (Cauchy–Schwarz Inequality)
Let and
.
(a) .
(b) if and only if and are parallel.
(c) if and only if or for some real
.
(c′) if and only if or for some real
.
Try it first (ten minutes): for unit vectors
, expand .
What does it say about ? What else
could you expand?
Idea (Scratch work). The attempt
gives , so . That
is one half of the goal for unit vectors, and nothing
yet about general . For general vectors the same expansion gives
only . Its right side equals
only when . So we make the lengths equal, to
, and pay for it
by scaling back.
|
|
| (if
one is , both
sides are ); ,
are unit vectors |
, because both sides of the old goal are times
those of the new one |
|
; the upper half is done |
|
the lower half is done: the gap closes |
The passage to unit vectors is allowed because the
statement is homogeneous: replacing
by with multiplies both
sides by , and
likewise for . For
the equality cases, ask when or is .
Before reading on: where is used, and why are
both expansions needed?
Proof. Let .
- (a) If or , then , because
a dot product with the zero vector is . Also ,
since .
So (a) reads .
Let and
. Then and , because
only the zero vector has length (Proposition 9.4.1
(a)). So and are unit vectors, and , . Pulling
the two scalars out of the dot product gives
(9.5.1)
Expanding by Eq. 9.4.1,
with , Add to the
first line and
to the second, and multiply both by . This
gives , that is, .
Now multiply by . By Eq. 9.5.1
and the rule ,
- (c) If , both sides are
. If with , then . Also , because
.
If
we are done,
and if , then
with . Otherwise . With as in (a), Eq. 9.5.1
gives . Cancelling the non-zero
factor gives
.
Then , so , and because only the zero vector has length . Hence
with .
(c′) Replacing
by changes the
sign of the dot product but not the length: and . So
holds if and only if . By (c) applied to and , this holds if and
only if or
with . That is, with .
- (b) Since ,
the definition of the absolute value gives if and only if . By (c) and (c′) this
holds if and only if or for some real . That is exactly the
statement that
and are parallel.
Indeed, is
parallel to every vector, and for , is parallel to if and only if for some . Section 9.2 noted this
right after defining parallel vectors (Definition 9.2.3).
This proves the theorem.
Uses: Proposition 9.3.1
(a), (b), (e) (symmetry, scalars, zero vector); Proposition 9.4.1
(a)–(c) (length zero, scaling, squares); Definition 9.4.2;
Proposition 9.2.1
(e), (f), (i) (scalar rules, signs); Number Systems: From to , Proposition 2.4.3
(b), (c), (e) (adding, multiplying, squares); Number Systems: From to , Proposition 4.1.3
(b), (d) (products, two-sided bounds); Number Systems: From to , Definition 4.1.1.
For the
theorem says little: always, and any two reals are
parallel. The content is in , where most pairs
of vectors are not parallel and the inequality is strict
for them.
Quick check. For and , compute
both sides of (a). Is the inequality strict, and does
(b) predict the answer?
Solution. , and . Since and both numbers are
non-negative, : strict. Yes: would need from the first
coordinate and from the second. And is impossible
since . So ,
are not parallel
and (b) forbids equality.
Squaring (a) gives the form used for sums of real
numbers. For example, with and the sum of
products is , and the sums of squares are and . The squared form
reads .
Corollary
9.5.2 (Cauchy–Schwarz Inequality for
Sums)
Let and
. Then with equality if and only if and
are parallel vectors of .
Proof. Let and . The three sums are
, and . By Theorem 9.5.1
(a), .
Squaring keeps an inequality between non-negative
numbers, so . And . Two non-negative reals with
equal squares are equal (comparing squares, Section
9.4). So equality holds exactly when , that is, by Theorem 9.5.1
(b), when and
are parallel.
In the example above the inequality is strict,
because the two triples are not parallel. Exercise C2
below proves it a second way, from Lagrange’s identity.
For that
identity reads . Chapter 3
mentioned this case as a second route in the solution of
its chapter check, Exercise C1 of Section 3.3 (Exercise (C1: Exit check: the triangle inequality)).
The method:
normalize
The proof of Theorem 9.5.1
did its work for unit vectors and then scaled back. This
way of proving is called normalizing.
Example
(Method: normalize)
How it goes. Suppose a statement
about and is
homogeneous: replacing by with multiplies both
sides by the same positive factor, and likewise for
. Then:
- Settle
and
separately.
- For ,
put and , and prove the statement
for the unit vectors , .
- Scale back, multiplying by the positive factor.
When to use it. Inequalities between
and
products of lengths; statements about directions rather
than sizes.
Common mistakes. Normalizing the
zero vector is impossible: it has no direction, and
would
divide by .
Scaling by a negative factor breaks the method, since
changes the sign of but not of
.
A statement that is not homogeneous cannot be
normalized. For example, holds
for all unit .
By Cauchy–Schwarz, , and comparing squares of non-negative
numbers gives . And yet fails
for ,
where .
The proof of Theorem 9.5.1
is the first worked example. It settles the zero case,
proves the bound for unit vectors by expanding , and
scales back by multiplying by . Part
(b) below is a second.
Example
(Two uses of Cauchy–Schwarz)
(a) Show that
for all real , with equality if
and only if .
(b) Find the
largest value of over all unit vectors , and every
unit vector where it is attained.
Solution.
(a) Apply Corollary 9.5.2
to and
. The left side is and the
right side is . Equality holds if and only if
is
parallel to .
Since , this
means for some , that is, .
(b) Let ,
so the expression is and . The
statement is homogeneous in . So by normalizing it
is enough to look at unit , which is what the
question does. For unit , using and then Theorem 9.5.1
(a), The value is attained at
, a unit vector, since (because ). Conversely, suppose . Since , Theorem 9.5.1
(c), with in the
first place, gives with . Then , so and . The largest
value is ,
attained only at . For both sides of are . Scaling back the other
, for every .
The
triangle inequality
With the cross term under control, the expansion at
the start of the section finishes the job. For instance,
and
give
, and
.
Theorem
9.5.3 (Triangle Inequality for Vectors)
Let .
- (a) , with equality if and only if or for some real
.
- (b) .
- (c) .
Idea. As in Example (Method: expand the square):
compare squares, expand, and bound the cross term by , now
with Cauchy–Schwarz. Parts (b) and (c) are (a) applied
to well-chosen vectors.
Before reading on: which equality case of Theorem 9.5.1
does the equality case of (a) use, and why not
(b)?
Proof.
(a) Expand the
square, then use and Theorem 9.5.1
(a), adding the inequalities: Both and are non-negative, so comparing squares
(Section 9.4) gives . For the same
reason the two lengths are equal if and only if their
squares are. Comparing the first and last expressions of
the display, this means . By Theorem 9.5.1
(c), this holds if and only if or with .
(b) The argument
is the one Section 3.3 used for complex numbers (Corollary 3.3.3
(a)), with in place of
. Apply
(a) to . This gives . Exchanging and gives . Also , since . The
two bounds together say , which is
(b).
(c) By Proposition 9.2.1,
. So by (a) and the definition of distance,
This proves the theorem.
The equality case of (a) uses Theorem 9.5.1
(c), not (b). The first inequality of the display is an
equality only when . So a
negative with still leaves a gap.
Warning. “Equality in
Cauchy–Schwarz holds for parallel vectors, and the
triangle inequality comes from Cauchy–Schwarz, so
parallel vectors give .” The conclusion is false. For and , which are
parallel, and . The argument forgets the step
, which is strict whenever
.
For , (a)
is the triangle inequality of Section 3.3 (Theorem 3.3.2),
now proved by a route with no complex multiplication.
The translation between the two is Proposition 9.4.3
(c). Chapter 3 found its equality case in a different
form: is
a non-negative real (Exercise (B1: The equality case)).
Section 9.6 returns to the comparison in a review
exercise.
Quick check. Let and . Is ? Is ?
Solution. and : yes, as (b) of Theorem 9.5.1
predicts for parallel vectors. But , so ,
while : no, since with .
Sums of
many vectors
Adding one vector at a time extends (a) to any finite
number of terms. For instance, in , has length , while the three lengths add up to , and because
.
Corollary
9.5.4 (Triangle Inequality for Finite
Sums)
For every and all ,
Proof. We use induction on . The sums are
defined by recursion, as in Lemma 9.2.2.
For both
sides are .
Suppose the inequality holds for . Split off the last
term by the recursion, apply Theorem 9.5.3
(a), and then add to both
sides of the inequality for :
Length and the sum of the absolute values of the
coordinates are comparable, with constants and . For , the length is
and the sum is
. Indeed , and
because .
Corollary
9.5.5 (Length against the Sum of the
Coordinates)
For every ,
Proof. By Proposition 9.2.3,
.
So Corollary 9.5.4
gives , since . For the second inequality let and . Then and . Also
: both are non-negative with the same
square , and a non-negative square root is unique
(Number Systems: From to , Proposition 6.1.4).
Using
and then Theorem 9.5.1
(a),
For the
first inequality is the last one of Lemma 3.3.1. Both
are sharp:
gives equality on the left, and on the
right.
Exercises
A. Check your
understanding
Exercise
(A1)
These questions are about the proof of Theorem 9.5.1.
- (a) Where is used?
- (b) Which expansion
gives which half of ?
- (c) Run the proof on
, : compute , , and .
- (d) In the scratch
work, what goes wrong with the expansion of if is not a unit
vector?
- (e) Give the idea of
the proof in two sentences.
Solution.
(a) To form , which
needs , that is, (Proposition 9.4.1
(a)). The zero case is settled separately.
(b) gives ; gives .
(c) ,
, , , and . Scaling back, .
(d) The expansion
becomes , not
.
It only gives , which
exceeds unless
, since for real .
(e) The
inequality is homogeneous, so after disposing of zero
vectors it is enough to prove
for unit vectors. That follows from .
B. Practice
Exercise
(B1: Proof ordering)
The eight lines below are shuffled. Six of them, in a
suitable order, prove Theorem 9.5.3
(b) from (a); the other two belong in no proof. Write an
admissible order without rereading the proof above, and
say why each of the two other lines fails.
(i) So .
(ii) .
(iii) So , and Number Systems: From to , Proposition 4.1.3
(d) gives .
(iv) .
(v) , by Proposition 9.4.1
(b) with .
(vi) The same
with and exchanged: .
(vii) , by (a) applied to and .
(viii) So , by (a).
Solution. An admissible order is
(iv), (viii), (i), (vi), (v), (iii). Line (iv) must
precede (viii), and (viii) must precede (i). Line (i)
must precede (vi), which repeats (iv), (viii), (i) with
the letters exchanged. Line (v) may stand anywhere
before (iii). Line (iii) comes last, since it uses (i),
(vi) and (v).
Line (vii) fails: (a) applied to and gives , with a plus
sign. The claim itself is false: at it reads
.
Line (ii) is false for every : by Proposition 9.4.1
(b), .
Exercise
(B2)
Prove that if and only if . You may start
from the two expansions Name the method, then use it.
Solution. The method is to expand
the square (Example (Method: expand the square)).
Both lengths are non-negative, so they are equal if and
only if their squares are (comparing squares, Section
9.4). Subtracting the two expansions gives , which is Proposition 9.4.6
(a) multiplied by . This is if and only if . Indeed,
if , then or (Number Systems: From to , Lemma 4.1.1
(d)), and
since in
the ordered field . By the definition of
orthogonal vectors, holds if
and only if .
Exercise
(B3: Prove or disprove)
For each statement about all (or all
unit vectors ),
prove it or give a counterexample.
- (a) .
- (b) .
- (c) Unit vectors
with are
equal.
- (d) Equality holds only when .
- (e) .
Solution.
(a)
True. ; add and
halve.
(b)
False. For , : .
(c)
True. , so by Proposition 9.4.1
(a).
(d)
False. For , : , and .
(e)
False. For it reads
. The
statement is homogeneous, so normalizing is legitimate
here: it reduces the claim to “
for unit ”,
which fails at .
Exercise
(B4)
- (a) Prove that for real , with
equality if and only if all are equal.
- (b) Find the
smallest value of over all with ,
and every where
it is attained.
Solution.
(a) Apply Corollary 9.5.2
to and , with . Equality holds if and only if is parallel to , that is, for some : all are equal.
(b) Let , so
and
the condition is . By Theorem 9.5.1
(a), . So , and
squaring gives . If , then
and
. Since , Theorem 9.5.1
(c) gives
with , and
the condition gives , so . This point satisfies the condition, , and .
The smallest value is , attained only at .
C. Going deeper
Exercise
(C1: Chapter check: Cauchy–Schwarz)
Use only the definitions of the dot product and the
length and the results of Sections 9.2–9.4. Prove that
for all : (a) ; (b) equality holds if and
only if and are parallel.
Solution (Hint 1). Dispose of the
zero cases, then scale both vectors to length .
Solution (Hint 2). For unit , expand and .
Solution.
(a) If or , both sides are
. Otherwise . Let and : these are unit vectors
with . From we get , so .
Multiplying by
gives (a).
(b) If or , the two vectors
are parallel and both sides of (a) are . Let . If equality
holds, then , so . Hence and : parallel.
Conversely, if they are parallel, then for some (remark after Definition 9.2.3),
and .
What a complete answer needs. (10
points) - 1: settles or . - 2: reduces the general case to one it can
bound, saying why the reduction is legitimate; for unit
vectors: the statement is homogeneous and the factor
is positive. - 3: proves
for unit vectors, by any correct route. - 1: scales back
to (a). - 3: proves the equality case in both
directions, zero vectors included.
A proof through Lagrange’s identity (C2) scores on
the same points. It gets 1 for the zero cases, which are
automatic there. It gets 2 + 3 + 1 for proving the
identity, reading off and taking roots. It gets
3 for “all if and only if parallel”.
A proof that normalizes nothing, expanding
with , also scores on the
same points. It gets 1 for , 2 for setting up using , 3 for the
inequality on squares, 1 for taking roots, and 3 for the
equality case through .
Slips that lose the step: dividing by without ; proving only
and claiming the absolute
value; omitting the converse of (b).
Exercise
(C2: Lagrange’s identity)
Let . Prove that and deduce Corollary 9.5.2
with its equality case: equality holds if and only if
for all , if
and only if and
are parallel.
Solution (Hint 1). Expand the
square inside the double sum and use the product form of
Proposition 1.1.6
three times.
Solution (Hint 2). For “parallel”:
if it is
clear; otherwise pick with and set .
Solution. Write ,
, . Expanding each term, Sum over and , splitting termwise (Lemma 1.1.3
(a), (b)). By the product form of Proposition 1.1.6,
, and . The double sum is , and halving
proves the identity.
Each term is a square, so it is . So each inner sum
is , and then
so is the double sum (Proposition 1.1.5
(b)). Hence , which is Corollary 9.5.2.
Equality holds if and only if the double sum is . Apply Proposition 1.1.5
(e) to the outer sum and then to each inner sum. So
equality holds if and only if every term is , that is, for all
.
It remains to match this with “parallel”. If , each ; if , likewise .
Conversely, suppose all . If , is
parallel to .
Otherwise choose
with and
let . For every , gives
, so
.
For the
terms with
vanish and the other two are both , so
the identity is .