9.4  Length and Distance

Section 9.3 attached a number to a pair of vectors, the dot product. Taken with itself, it gives ⟨x,x⟩=x12+⋯+xn2, the square of the length that Pythagoras assigns to x in the plane. This section takes its square root and calls it the length of x, defines the distance between two points, and checks that for n=2 both agree with the modulus of Chapter 3. Lengths are awkward, since each is the root of a sum, while their squares are polynomials in the coordinates. So the section’s method is to move to squares, compute there, and come back. It ends by comparing the length of x with the sizes of its coordinates, the comparison that analysis in several variables uses most often.

9.4.1. Length

In the plane, the point x=(x1,x2) is the far corner of a right triangle with legs |x1| and |x2|. By Pythagoras its distance from the origin is x12+x22. For x=(3,4) the legs are 3 and 4, and the distance is 9+16=5. Chapter 3 gave this number a name, the modulus |x1+x2i| (Definition 3.2.1). In space the same picture, used twice, gives x12+x22+x32. The pictures stop at three coordinates, but the formula does not, and the expression under the root is the dot product ⟨x,x⟩. The pictures are motivation only. What we need from them is one property: a length is zero only for the point at the origin.

Quick check. Is there a vector x≠0 in some Rn with ⟨x,x⟩=0?

Solution. No. By Proposition 9.3.1 (c), ⟨x,x⟩=∑kxk2≥0, with equality only for x=0. A nonzero x has some xk≠0, and that one term already makes the sum positive.

So ⟨x,x⟩ is never negative. Every non-negative element of a complete ordered field has exactly one non-negative square root (Number Systems: From N to R, Proposition 6.1.4). The field R is complete (Number Systems: From N to R, Theorem 5.5.2), so the root of ⟨x,x⟩ exists. This is where the completeness of R enters the chapter.

Length is the root of the dot product of a vector with itself. We take this root as the length of x.

Definition 9.4.1 (Norm)

Let x∈Rn. The norm (or length) of x is the real number ‖x‖:=⟨x,x⟩=x12+⋯+xn2, the non-negative square root of Number Systems: From N to R, Proposition 6.1.4.

For example, ‖(3,4)‖=9+16=25=5, because 5≥0 and 52=25. The uniqueness clause of Number Systems: From N to R, Proposition 6.1.4 identifies the root by these two properties. Each norm computed below can be checked the same way: the claimed root is ≥0 and its square is the given number. The norm is well defined, since ⟨x,x⟩≥0 by Proposition 9.3.1 (c).

Two facts about roots carry most of the proofs in this section. The first is the uniqueness clause just used: if s≥0 and s2=t, then s=t. The second is the rule of comparing squares from Section 3.3, a consequence of Number Systems: From N to R, Proposition 2.4.3 (g) together with trichotomy: for real p,q≥0, p≤q⟺p2≤q2,p=q⟺p2=q2, and likewise with < on both sides. The hypothesis p≥0 matters: −2≤1, but (−2)2>12. Swapping the roles shows that q≥0 matters too.

Proposition 9.4.1 (Basic Properties of the Norm)

Let x∈Rn and c∈R.

  • (a) ‖x‖≥0, and ‖x‖=0 if and only if x=0.
  • (b) ‖cx‖=|c|‖x‖.
  • (c) ‖x‖2=⟨x,x⟩.
  • (d) For n=1, ‖x‖=|x|.
  • (e) ‖ek‖=1 for every k.
  • (f) If x≠0, the vectors u with ‖u‖=1 that are parallel to x are exactly 1‖x‖x and −1‖x‖x.

Idea. Each part is a statement about a root, so it is checked on squares: compute the square with the dot-product laws of Section 9.3, then identify the root by its sign and its square.

Proof.

  • (c) This is the defining property of the root: (t)2=t.

  • (d) A square root is non-negative by definition. If x=0, then ⟨x,x⟩=0, and 0=0 by uniqueness, as 0≥0 and 02=0. Conversely, if ‖x‖=0, then ⟨x,x⟩=‖x‖2=0 by (c), so x=0 by Proposition 9.3.1 (c).

  • (e) A scalar comes out of each slot of the dot product. Then (c) turns the dot products back into squared norms: ‖cx‖2=⟨cx,cx⟩=c2⟨x,x⟩=c2‖x‖2. The number |c|‖x‖ is ≥0, as a product of two non-negative numbers: |c|≥0, and ‖x‖≥0 by (a) above. Its square is |c|2‖x‖2=c2‖x‖2. So ‖cx‖ and |c|‖x‖ are non-negative with the same square, and they are equal by comparing squares.

  • (f) For n=1, ⟨x,x⟩=x2 (Definition 9.3.1), so ‖x‖=x2. As in Proposition 3.2.1, |x|≥0 and |x|2=x2, so |x|=x2 by uniqueness.

  • (g) ⟨ek,ek⟩=1 by Proposition 9.3.1 (d), and 1=1 since 1≥0 and 12=1.

  • (h) Let x≠0, so ‖x‖>0 by (a), and put t0:=1‖x‖. The vectors ±t0x are parallel to x (Definition 9.2.3), and by (b) their norms are |±t0|‖x‖=t0‖x‖=1. Conversely, let ‖u‖=1 with u parallel to x. Since x≠0, a vector parallel to x is a multiple of x (Section 9.2, after Definition 9.2.3), so u=tx for some t∈R. Then 1=‖tx‖=|t|‖x‖ by (b), so |t|=t0. Since |t| is t or −t, we get t=t0 or t=−t0. This proves the proposition.

Uses: Proposition 9.3.1 (e), (b): the zero vector, scalars come out. Number Systems: From N to R, Proposition 4.1.3 (a), (b): |c|≥0, |c|2=c2. Number Systems: From N to R, Proposition 3.2.2: 1/p>0 for p>0. Number Systems: From N to R, Definition 4.1.1: |t| is ±t.

Part (b) says that stretching a vector by c stretches its length by |c|; the absolute value is needed, since ‖−x‖=‖x‖. Part (d) says that on R1=R the norm is the old absolute value, so the double bars extend the single ones and nothing clashes.

Dividing a nonzero vector by its norm gives a vector of length 1. For example, (3,4) has norm 5, and by (b) the vector 15(3,4)=(3/5,4/5) has norm 15⋅5=1.

Definition 9.4.2 (Unit Vector)

A unit vector is a vector u∈Rn with ‖u‖=1. For x≠0 we write x‖x‖:=1‖x‖x, and call it the unit vector in the direction of x.

The division is allowed because ‖x‖≠0 for x≠0, by part (a) of Proposition 9.4.1. Part (b) shows that x/‖x‖ is a unit vector. By part (f), the only other unit vector parallel to x is −x/‖x‖. Replacing x by x/‖x‖ is called normalizing x. For example, (3,4)/5=(3/5,4/5) is the unit vector in the direction of (3,4), and the standard vectors ek are unit vectors by (e).

Quick check. Compute ‖(1,2,2)‖. Is (3/5,0,4/5) a unit vector?

Solution. ‖(1,2,2)‖=1+4+4=9=3, since 3≥0 and 32=9. And ⟨(3/5,0,4/5),(3/5,0,4/5)⟩=9/25+0+16/25=1, so the norm is 1=1: yes.

Warning. The length of a vector is not the sum of the sizes of its coordinates. ‖(1,1)‖=2, not |1|+|1|=2; since (1,1)=e1+e2, this also shows ‖e1+e2‖=2≠2=‖e1‖+‖e2‖. (Here 2≠2 because 22=4≠2.) The norm respects scalar multiples, by Proposition 9.4.1 (b), but not sums.

9.4.2. Distance

The distance between two points should be the length of the displacement from one to the other, y−x in the language of Section 9.2. We use x−y; it has the same length, by part (b) below.

Definition 9.4.3 (Distance)

For x,y∈Rn, the distance from x to y is d(x,y):=‖x−y‖.

For example, d((1,2),(4,6))=‖(−3,−4)‖=5. For n=1, d(x,y)=|x−y| by Proposition 9.4.1 (d). That is the distance on the line of Number Systems: From N to R, Chapter 4 (Number Systems: From N to R, Definition 4.1.1).

Proposition 9.4.2 (Basic Properties of the Distance)

For all x,y,z∈Rn and c∈R:

  • (a) d(x,y)≥0, and d(x,y)=0 if and only if x=y;
  • (b) d(x,y)=d(y,x);
  • (c) d(x+z,y+z)=d(x,y);
  • (d) d(cx,cy)=|c|d(x,y).

Proof. Each part rests on a vector identity that is checked coordinatewise (Example (Method: work coordinatewise)). (a) This is Proposition 9.4.1 (a), since x−y=0 if and only if x=y. (b) y−x=(−1)(x−y), so Proposition 9.4.1 (b) with |−1|=1 gives ‖y−x‖=‖x−y‖. (c) (x+z)−(y+z)=x−y. (d) cx−cy=c(x−y), then Proposition 9.4.1 (b).

Part (c) says that sliding both points by the same vector does not change their distance; (d) says that scaling the picture by c scales distances by |c|. The property that matters most is missing from the list: the triangle inequality d(x,z)≤d(x,y)+d(y,z). It is the one property of distance that needs an idea, and Section 9.5 supplies it.

9.4.3. The plane is the complex plane

Chapter 3 defined C as the set R2 (Definition 3.1.1) and measured its elements with the modulus. This chapter has now put a second structure on the same set. The two fit together exactly.

Proposition 9.4.3 (The Plane and the Complex Numbers)

Let z=(a,b) and w=(c,d) be elements of R2=C, and let t∈R.

  • (a) The sum z+w is the same in R2 and in C, and so is the difference z−w. The scalar multiple tz equals the complex product (t,0)z, that is, the product in C of the real number t with z (Proposition 3.1.1).
  • (b) ⟨z,w⟩=Re(zw―).
  • (c) ‖z‖=|z|, and so d(z,w)=|z−w|.

Idea. Every part compares two formulas in the coordinates a,b,c,d. Write both sides out by the definitions of Chapter 3 and of this chapter, and read off that they agree.

Proof.

  • (a) Both sums are (a+c,b+d) by the two definitions. By the multiplication rule of Definition 3.1.1, (t,0)(a,b)=(ta−0⋅b,tb+0⋅a)=(ta,tb), which is tz. In particular (−1)w=(−c,−d), and (c,d)+(−c,−d)=(0,0), so (−c,−d) is the negative of w in C as well; hence both differences are (a−c,b−d).

  • (b) The conjugate of w is w―=(c,−d) (Definition 3.2.1). By the multiplication rule, zw―=(ac−b(−d),a(−d)+bc)=(ac+bd,bc−ad). Its real part is ac+bd=⟨z,w⟩ (Definition 9.3.1).

  • (c) Both are a2+b2, by the definitions of the norm and of the modulus. Then d(z,w)=‖z−w‖=|z−w| by (a).

Uses: Definition 9.2.1: the sum in R2. Definition 3.1.1: sum and product in C. Definition 9.4.1. Definition 3.2.1: the modulus.

So every result of this chapter about Rn, read at n=2, is a result about C. The order of the factors in (b) does not matter: Re(zw―)=Re(z―w), since the two products are conjugate (Theorem 3.2.2 (a), (b)). The coordinate bound (a) at the end of this section is, for n=2, the first two inequalities of Lemma 3.3.1. In the other direction, the multiplication of C has no counterpart in Rn for general n in this chapter; Section 9.5 explains why that matters.

9.4.4. Comparing lengths through their squares

Norms do not expand: ‖x+y‖ is the root of a sum, and nothing splits it. Squared norms do, because ‖v‖2=⟨v,v⟩ and the dot product is linear in each slot. The first example is the theorem of Pythagoras, with “right angle” read as “dot product zero” (Definition 9.3.2). For instance, ⟨(3,0),(0,4)⟩=0, and indeed ‖(3,0)+(0,4)‖2=‖(3,4)‖2=25=9+16.

Proposition 9.4.4 (Theorem of Pythagoras)

Let x,y∈Rn. Then ‖x+y‖2=‖x‖2+‖y‖2⟺x⊥y, and the same holds with x−y in place of x+y.

Idea (Scratch work). We want an equivalence between a statement about norms and a statement about a dot product. Norms cannot be expanded. So first we rewrite every squared norm as a dot product, and then we expand.

We know We want
x,y∈Rn ‖x+y‖2=‖x‖2+‖y‖2⟺⟨x,y⟩=0
‖v‖2=⟨v,v⟩ (Proposition 9.4.1 (c)) ⟨x+y,x+y⟩=⟨x,x⟩+⟨y,y⟩⟺⟨x,y⟩=0
linearity and symmetry (Proposition 9.3.1 (a), (b)) ⟨x,x⟩+2⟨x,y⟩+⟨y,y⟩=⟨x,x⟩+⟨y,y⟩⟺⟨x,y⟩=0
cancel ⟨x,x⟩+⟨y,y⟩; 2≠0 2⟨x,y⟩=0⟺⟨x,y⟩=0, which is true

The case x−y is the same table with −2⟨x,y⟩ in the third row.

Proof. Section 9.3 expanded ⟨x±y,x±y⟩=⟨x,x⟩±2⟨x,y⟩+⟨y,y⟩ by linearity and symmetry, just after Proposition 9.3.1. By Proposition 9.4.1 (c), these read

‖x±y‖2=‖x‖2±2⟨x,y⟩+‖y‖2.
(9.4.1)

So ‖x±y‖2=‖x‖2+‖y‖2 holds if and only if ±2⟨x,y⟩=0. This holds if and only if ⟨x,y⟩=0, since 2≠0 in R and R has no zero divisors (Number Systems: From N to R, Lemma 4.1.1 (d)). By Definition 9.3.2, ⟨x,y⟩=0 says x⊥y.

Uses: The expansion of ⟨x±y,x±y⟩ after Proposition 9.3.1 (Section 9.3); Proposition 9.4.1 (c).

The proof never mentions an angle or a triangle. Pythagoras’ theorem is now an identity about squares of norms, with a dot product as the error term. The identity Eq. 9.4.1 is behind the proofs of the parallelogram law and of polarization below, so the way of working deserves a name.

Example (Method: expand the square)

How it goes. To prove an identity or an inequality between norms:

  1. If lengths are compared, compare their squares instead. This is allowed because both sides are ≥0.
  2. Write each squared norm as a dot product, ‖v‖2=⟨v,v⟩.
  3. Expand by linearity and symmetry, as in Eq. 9.4.1.
  4. Compare the expansions. Then return from squares to lengths by comparing squares.

When to use it. Identities and inequalities among the norms of sums, differences and multiples of vectors; conditions such as d(x,a)=d(x,b).

Common mistakes. A common mistake is to drop the cross term 2⟨x,y⟩, which turns every expansion into Pythagoras. Another is to square a side that may be negative, such as ‖x‖−‖y‖; comparing squares does not apply there.

The second worked example is the law of the parallelogram. In the plane, the parallelogram spanned by x and y has diagonals x+y and x−y. The law says that the squares of the two diagonals add up to the squares of the four sides. For x=(2,0) and y=(1,1), the diagonals are (3,1) and (1,−1), and 10+2=12=2⋅4+2⋅2.

Proposition 9.4.5 (Parallelogram Law)

For all x,y∈Rn, ‖x+y‖2+‖x−y‖2=2‖x‖2+2‖y‖2.

Proof. We expand the squares, as in Example (Method: expand the square). No lengths are compared, only squares, so we never pass to roots. Each side is a sum of dot products: ‖x±y‖2=⟨x±y,x±y⟩ by Proposition 9.4.1 (c). The identity Eq. 9.4.1 expands both: ‖x+y‖2=‖x‖2+2⟨x,y⟩+‖y‖2,‖x−y‖2=‖x‖2−2⟨x,y⟩+‖y‖2. Now add the two lines: the cross terms 2⟨x,y⟩ and −2⟨x,y⟩ cancel, and what is left is 2‖x‖2+2‖y‖2. This proves the law.

Subtracting the two lines instead of adding them makes the norms cancel and keeps the cross term. That gives the dot product back from lengths.

Proposition 9.4.6 (Polarization)

For all x,y∈Rn:

  • (a) ⟨x,y⟩=14(‖x+y‖2−‖x−y‖2);
  • (b) 2⟨x,y⟩=‖x‖2+‖y‖2−‖x−y‖2.

Proof.

  • (a) Subtract the second expansion in the proof of Proposition 9.4.5 from the first: ‖x+y‖2−‖x−y‖2=4⟨x,y⟩; divide by 4≠0. (b) Solve the second expansion, ‖x−y‖2=‖x‖2−2⟨x,y⟩+‖y‖2, for 2⟨x,y⟩.

Polarization says that lengths determine dot products: whoever knows every distance knows every dot product. For instance, let f:Rn→Rn preserve distances, d(f(x),f(y))=d(x,y) for all x,y, and suppose f(0)=0. Then ‖f(x)‖=d(f(x),f(0))=d(x,0)=‖x‖, and (b) gives ⟨f(x),f(y)⟩=⟨x,y⟩. Which maps behave like this is a question for the linear algebra volumes.

9.4.5. Length against coordinates

Analysis in several variables keeps changing between two ways of saying that x is small: ‖x‖ is small, or every coordinate xk is small. The two are equivalent, with constants that depend only on n. For example, for x=(1,−2,2) the largest size of a coordinate is 2, and ‖x‖=9=3. So 2≤3≤23, where the second inequality holds since 32=9≤12=(23)2. In general, let M:=max{|x1|,…,|xn|}, the largest size of a coordinate; the maximum exists and is one of the listed numbers (Sets and Functions, Proposition 3.3.8).

Proposition 9.4.7 (Norm against Coordinates)

Let x∈Rn and M:=max{|x1|,…,|xn|}.

  • (a) |xk|≤‖x‖ for every k; hence M≤‖x‖.
  • (b) ‖x‖≤nM.

Idea. The square ‖x‖2=x12+⋯+xn2 is a sum of n non-negative terms. Keeping one term and dropping the rest makes it smaller, which gives (a); replacing every term by the largest one makes it larger, which gives (b). In both parts we work with squares and come back by comparing squares.

Proof. By Proposition 9.4.1 (c), ‖x‖2=⟨x,x⟩=∑j=1nxj2. Every term xj2 is ≥0, since a square is never negative.

  • (a) Fix k. A sum of non-negative terms is at least each of its terms (Proposition 1.1.5 (b)), so xk2≤∑j=1nxj2=‖x‖2. Since xk2=|xk|2, this reads |xk|2≤‖x‖2. Both |xk| and ‖x‖ are ≥0, so comparing squares gives |xk|≤‖x‖. The maximum M is one of the numbers |xk|, so M≤‖x‖.

  • (b) For every j, 0≤|xj|≤M, so |xj||xj|≤MM by Number Systems: From N to R, Proposition 4.1.2 (d), that is, xj2≤M2. A sum of n terms, each at most M2, is at most nM2 (Proposition 1.1.5 (c)), so ‖x‖2≤nM2. The number nM is ≥0, and its square is (n)2M2=nM2. So ‖x‖2≤(nM)2, and comparing squares gives ‖x‖≤nM.

Neither constant can be improved. For x=e1, M=‖x‖=1, so (a) is an equality. For x=(1,…,1), M=1 and ‖x‖=1+⋯+1=n, so (b) is an equality. For n=1 both parts say ‖x‖=|x|.

The proposition is used mostly in the following form, about the points near a given point a. Recall that |xk−ak|<r says ak−r<xk<ak+r (Number Systems: From N to R, Proposition 4.1.3 (d)). So “|xk−ak|<r for every k” says that x lies in the open box (a1−r,a1+r)×⋯×(an−r,an+r) of Definition 9.1.2, centered at a.

Corollary 9.4.8 (Balls and Boxes)

Let a∈Rn and r>0, and let x∈Rn.

  • (a) If ‖x−a‖<r, then |xk−ak|<r for every k.
  • (b) If |xk−ak|<r/n for every k, then ‖x−a‖<r.

Proof. The k-th coordinate of x−a is xk−ak. (a) By Proposition 9.4.7 (a) for x−a, |xk−ak|≤‖x−a‖<r. (b) Let M:=maxk|xk−ak|. It is one of the numbers |xk−ak|, so M<r/n. We have n>0, since n≥0 and n≠0, as 02≠n. So multiplying by n keeps the strict inequality (Number Systems: From N to R, Proposition 2.4.3 (c)). Then Proposition 9.4.7 (b) for x−a gives ‖x−a‖≤nM<r.

In words: take the set of points at distance less than r from a, a disc in the plane. It sits inside the open square of half-side r centered at a. It contains the smaller open square of half-side r/2, whose corners lie on the boundary circle. In Rn the same holds with boxes, and the inner box shrinks as n grows. The analysis volumes use the corollary to pass between “close in distance” and “close in every coordinate”, so that a limit in Rn can be taken one coordinate at a time.

9.4.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Compute ‖(2,−3,6)‖ and the unit vector in the direction of (2,−3,6).
  • (b) Compute d((1,−1,0),(3,1,1)).
  • (c) For x=(2,−1,2,0), compute M, ‖x‖ and nM, and check both bounds of Proposition 9.4.7.
  • (d) Where does the proof of Proposition 9.4.7 use that every term xj2 is ≥0?
  • (e) Why does Corollary 9.4.8 (b) assume |xk−ak|<r/n and not |xk−ak|<r? Answer with an example for n≥2.
  • (f) State the idea of the proof of Proposition 9.4.7 (b) in two sentences.

Solution.

  • (a) ‖(2,−3,6)‖=4+9+36=49=7, since 7≥0 and 72=49. The unit vector is (2,−3,6)/7=(2/7,−3/7,6/7).

  • (b) The difference is (1,−1,0)−(3,1,1)=(−2,−2,−1), so the distance is 4+4+1=9=3.

  • (c) M=max{2,1,2,0}=2, ‖x‖=4+1+4+0=3, and 4⋅2=4. Indeed 2≤3≤4.

  • (d) In (a), to drop all terms except xk2: the sum is at least one of its terms only because the other terms are non-negative (Proposition 1.1.5 (b)). Part (b) does not need it.

  • (e) With r in place of r/n, the statement is false for every n≥2. Since n>1, we have r/n<r, so we can choose c with r/n≤c<r; for n≥4, c=r/2 is such a choice, since then n≥2. Let x:=a+c(1,…,1). Then |xk−ak|=c<r for every k, but ‖x−a‖=cn≥r by Proposition 9.4.1 (b), since ‖(1,…,1)‖=n. For n=1, 1=1 and the two versions agree.

  • (f) The square ‖x‖2 is a sum of n squares, each at most M2, so it is at most nM2. Both ‖x‖ and nM are non-negative, so the inequality between their squares gives the inequality between the numbers.

B. Practice

Exercise (B1: Prove or disprove)

Prove or disprove each statement for all x,y∈Rn, n≥2.

  • (a) If ‖x‖=‖y‖, then x=y or x=−y.
  • (b) If ‖x‖=‖y‖, then x+y⊥x−y.
  • (c) If x⊥y, then ‖x−y‖=‖x+y‖.
  • (d) ‖x+y‖2≤2‖x‖2+2‖y‖2.
  • (e) If x⊥y, then d(x,0)+d(0,y)=d(x,y).

Solution.

  • (a) False. Take x=e1 and y=e2. Both have norm 1 (Proposition 9.4.1 (e)), but e1≠e2 and e1≠−e2 (compare first coordinates: 1≠0).

  • (b) True. By linearity and symmetry (Proposition 9.3.1 (a), (b)), ⟨x+y,x−y⟩=⟨x,x⟩−⟨x,y⟩+⟨y,x⟩−⟨y,y⟩=‖x‖2−‖y‖2, which is 0 when ‖x‖=‖y‖.

  • (c) True. By Proposition 9.4.4, used for x+y and for x−y, both ‖x+y‖2 and ‖x−y‖2 equal ‖x‖2+‖y‖2. The two norms are non-negative with equal squares, so they are equal by comparing squares.

  • (d) True. By Proposition 9.4.5, ‖x+y‖2=2‖x‖2+2‖y‖2−‖x−y‖2, and ‖x−y‖2≥0.

  • (e) False. Take x=e1, y=e2, which are orthogonal (Proposition 9.3.1 (d)). Then d(x,0)+d(0,y)=1+1=2, but d(x,y)=‖e1−e2‖=‖(1,−1,0,…,0)‖=2≠2.

Exercise (B2)

Let a=(1,2), b=(4,6) and c=(−3,5). Show that b−a⊥c−a, and check the theorem of Pythagoras for the triangle with corners a, b, c by computing the three squared side lengths.

Solution. b−a=(3,4) and c−a=(−4,3), and ⟨(3,4),(−4,3)⟩=−12+12=0. The squared sides are ‖b−a‖2=9+16=25, ‖c−a‖2=16+9=25, and, since (b−a)−(c−a)=b−c=(7,1), ‖b−c‖2=49+1=50. Indeed 25+25=50, as Proposition 9.4.4 (with x−y, x=b−a, y=c−a) predicts. The two legs have length 5, and the third side has length 50=52.

Exercise (B3)

Let a,b∈Rn with a≠b. Prove that a point x∈Rn satisfies d(x,a)=d(x,b) if and only if ⟨x,b−a⟩=12(‖b‖2−‖a‖2), and check that the midpoint 12(a+b) satisfies this equation.

Hint: which method compares two lengths?

Solution. We expand the squares (Example (Method: expand the square)). Both distances are non-negative, so by comparing squares d(x,a)=d(x,b) if and only if ‖x−a‖2=‖x−b‖2. By Eq. 9.4.1, ‖x−a‖2=‖x‖2−2⟨x,a⟩+‖a‖2,‖x−b‖2=‖x‖2−2⟨x,b⟩+‖b‖2. Cancelling ‖x‖2, the two are equal if and only if 2⟨x,b⟩−2⟨x,a⟩=‖b‖2−‖a‖2, that is, by linearity, 2⟨x,b−a⟩=‖b‖2−‖a‖2. Divide by 2.

For x=12(a+b): by linearity and symmetry, ⟨a+b,b−a⟩=‖b‖2−⟨a,b⟩+⟨a,b⟩−‖a‖2=‖b‖2−‖a‖2, so ⟨12(a+b),b−a⟩=12(‖b‖2−‖a‖2).

The hypothesis a≠b is not used in the equivalence, which holds for a=b too (both sides then hold for every x). It makes the vector b−a nonzero, so that the equation is a genuine condition on x; Chapter 10 calls such a set a hyperplane, and this one is the perpendicular bisector of a and b.

Uses: Proposition 9.3.1: linearity and symmetry.

C. Going deeper

Exercise (C1: Find the error)

The conclusion of the following argument is true. Is the argument correct? If not, name the line that fails, say why, and repair it.

“Claim. For every x∈Rn and every k, |xk|≤‖x‖.

Proof. (1) The other terms of ‖x‖2=∑jxj2 are non-negative, so ‖x‖2≥xk2. (2) Taking non-negative square roots, which preserves ≤, we get ‖x‖≥xk2. (3) Since a2=a for every real a, this gives ‖x‖≥xk. (4) Applying this to −x, whose norm is ‖x‖, gives ‖x‖≥−xk. (5) So ‖x‖≥|xk|.”

Solution. The conclusion is true: it is Proposition 9.4.7 (a). The argument is not correct. The one bad line is (3). It cites the “fact” a2=a for every real a, which is false. Citing a false general fact is never allowed; it is (N9) in the list of Logic and Proof (Logic and Proof, Example (What is not allowed)). A counterexample to the step: for a=−3, (−3)2=9=3≠−3. The correct fact is a2=|a|, by Proposition 9.4.1 (d).

The other lines are correct:

  • Line (1) is Proposition 1.1.5 (b).
  • Line (2) is comparing squares, since ‖x‖ and xk2 are non-negative with squares ‖x‖2≥xk2.
  • Line (4) uses ‖−x‖=‖x‖ (Proposition 9.4.1 (b)).
  • Line (5) holds because |xk| is xk or −xk.

Even line (3) can be saved. The true inequality a2≥a holds, as a2=|a|≥a (Number Systems: From N to R, Proposition 4.1.3 (c)). With it, lines (3)–(5) prove the claim. So the argument reaches a true conclusion, and only one of its lines needs a different justification. A correct conclusion does not make every line correct.

Repair. Replace (3) by “xk2=|xk| (Proposition 9.4.1 (d))”; then (2) gives ‖x‖≥|xk| at once, and lines (4) and (5) become unnecessary.

Uses: Proposition 3.2.1: the same fact, in Chapter 3.