← Back to Math 010

6.2 Angle and Orthogonality in Inner Product Spaces: Class Notes

Definition

The angle θ between vectors 𝐮 and 𝐯 in a real inner product space V is θ=cos−1⁡(⟨𝐮,𝐯⟩‖𝐮‖‖𝐯‖).

This is the same formula we saw with the dot product, where now ‖𝐮‖=⟨𝐮,𝐮⟩ comes from the inner product.

Example

Find the cosine of the angle between A and B with respect to the standard inner product on M22.

A=[2−4−13],B=[−3142]

Solution

The standard inner product on M22 multiplies entries in matching positions and adds the products:

⟨A,B⟩=2(−3)+(−4)(1)+(−1)(4)+3(2)=−6−4−4+6=−8

‖A‖=⟨A,A⟩=4+16+1+9=30‖B‖=⟨B,B⟩=9+1+16+4=30

cos⁡θ=⟨A,B⟩‖A‖‖B‖=−83030=−830=−415

Answer: cos⁡θ=−415

(So θ≈105.5∘.)

Theorem 6.2.1 Cauchy-Schwarz Inequality (generalization of Theorem 3.2.4)

If 𝐮 and 𝐯 are vectors in a real inner product space V, then |⟨𝐮,𝐯⟩|≤‖𝐮‖‖𝐯‖.

This is a necessary result in order to compute the angle between vectors in an inner product space: it guarantees that the quotient inside the inverse cosine is between −1 and 1.

Proof

If 𝐮=𝟎, then ⟨𝐮,𝐯⟩=0 and ‖𝐮‖=0, so both sides are 0 and the inequality holds.

If 𝐮≠𝟎, then let ⟨𝐮,𝐮⟩=a, 2⟨𝐮,𝐯⟩=b, ⟨𝐯,𝐯⟩=c, and let t be any real number. By the positivity axiom,

0≤⟨t𝐮+𝐯,t𝐮+𝐯⟩=⟨𝐮,𝐮⟩t2+2⟨𝐮,𝐯⟩t+⟨𝐯,𝐯⟩0≤at2+bt+c

Since 𝐮≠𝟎, a>0, so y=at2+bt+c is a parabola that opens upward and is never below the axis. It either touches the axis once or does not cross it at all, so it has at most one real root. Then its discriminant is not positive:

Two upward parabolas: one touching the horizontal axis at one point, one entirely above the axis

Two sketches of y=at2+bt+c≥0 with a>0. Left: the parabola opens upward and touches the horizontal axis at exactly one point (one real root). Right: the parabola opens upward and lies entirely above the axis (no real roots). In both cases b2−4ac≤0.

b2−4ac≤0

Substituting for a, b, and c:

4⟨𝐮,𝐯⟩2−4⟨𝐮,𝐮⟩⟨𝐯,𝐯⟩≤0

Dividing by 4 and moving the second term to the right side gives the inequality in three equivalent forms:

⟨𝐮,𝐯⟩2≤⟨𝐮,𝐮⟩⟨𝐯,𝐯⟩(one form)

⟨𝐮,𝐯⟩2≤‖𝐮‖2‖𝐯‖2(another form)

|⟨𝐮,𝐯⟩|≤‖𝐮‖‖𝐯‖(yet another form)

The last form comes from taking square roots of both sides, and it is the statement of the theorem.

Theorem 6.2.2 Triangle inequalities (generalization of Theorem 3.2.5)

If 𝐮, 𝐯, and 𝐰 are vectors in a real inner product space V, then:

a. ‖𝐮+𝐯‖≤‖𝐮‖+‖𝐯‖ (triangle inequality for vectors)

b. d(𝐮,𝐯)≤d(𝐮,𝐰)+d(𝐰,𝐯) (triangle inequality for distances)

Proof of (a)

‖𝐮+𝐯‖2=⟨𝐮+𝐯,𝐮+𝐯⟩=⟨𝐮,𝐮⟩+2⟨𝐮,𝐯⟩+⟨𝐯,𝐯⟩≤⟨𝐮,𝐮⟩+2|⟨𝐮,𝐯⟩|+⟨𝐯,𝐯⟩(property of absolute value)≤‖𝐮‖2+2‖𝐮‖‖𝐯‖+‖𝐯‖2(Cauchy-Schwarz inequality)=(‖𝐮‖+‖𝐯‖)2

The first inequality holds because any real number is at most its absolute value, so 2⟨𝐮,𝐯⟩≤2|⟨𝐮,𝐯⟩|. The second uses the Cauchy-Schwarz inequality, |⟨𝐮,𝐯⟩|≤‖𝐮‖‖𝐯‖. Taking square roots (both sides are nonnegative) finishes the proof.

Proof of (b)

Subtract and add 𝐰 inside the norm, then use part (a) in the form ‖𝐚+𝐛‖≤‖𝐚‖+‖𝐛‖:

d(𝐮,𝐯)=‖𝐮−𝐯‖=‖(𝐮−𝐰)+(𝐰−𝐯)‖≤‖𝐮−𝐰‖+‖𝐰−𝐯‖=d(𝐮,𝐰)+d(𝐰,𝐯)

Definition

Two vectors 𝐮 and 𝐯 in a real inner product space V are orthogonal if ⟨𝐮,𝐯⟩=0.

#10

Show that the vectors are orthogonal with respect to the standard inner product on P2.

𝐩=2−3x+x2, 𝐪=4+2x−2x2

Solution

Multiply matching coefficients and add:

⟨𝐩,𝐪⟩=2(4)+(−3)(2)+1(−2)=8−6−2=0

Answer: ⟨𝐩,𝐪⟩=0, so 𝐩⟂𝐪

#33

Let C[−1,1] have the integral inner product ⟨𝐩,𝐪⟩=∫−11p(x)q(x)dx and let 𝐩=p(x)=x2−x and 𝐪=q(x)=x+1.

a. Find ⟨𝐩,𝐪⟩.

b. Find ‖𝐩‖ and ‖𝐪‖.

Solution

a. Expand: (x2−x)(x+1)=x3+x2−x2−x=x3−x, an odd function, so its integral over [−1,1] is 0.

⟨𝐩,𝐪⟩=∫−11(x2−x)(x+1)dx=∫−11(x3−x)dx=0

Answer: ⟨𝐩,𝐪⟩=0

b. In (x2−x)2=x4−2x3+x2, the term −2x3 is odd, so its integral over [−1,1] is 0 and it drops out.

‖𝐩‖=(∫−11(x2−x)2dx)1/2=(∫−11(x4−2x3+x2)dx)1/2=(∫−11(x4+x2)dx)1/2=(25+23)1/2=1615=415

Similarly, in (x+1)2=x2+2x+1 the odd term 2x integrates to 0:

‖𝐪‖=(∫−11(x+1)2dx)1/2=(∫−11(x2+2x+1)dx)1/2=(23+2)1/2=83=223

Answer: ‖𝐩‖=415,‖𝐪‖=223

Explore

What is ‖𝐩+𝐪‖2? What about ‖𝐩‖2+‖𝐪‖2?

Using 𝐩 and 𝐪 from #33: 𝐩+𝐪=(x2−x)+(x+1)=x2+1, so

‖𝐩+𝐪‖2=∫−11(x2+1)2dx=∫−11(x4+2x2+1)dx=25+43+2=5615

‖𝐩‖2+‖𝐪‖2=1615+83·55=1615+4015=5615

So ‖𝐩‖2+‖𝐪‖2=‖𝐩+𝐪‖2. This works because 𝐩 and 𝐪 are orthogonal (#33a).

Theorem 6.2.3 Generalized Theorem of Pythagoras

If 𝐮 and 𝐯 are orthogonal vectors in a real inner product space, then ‖𝐮+𝐯‖2=‖𝐮‖2+‖𝐯‖2.

Proof

‖𝐮+𝐯‖2=⟨𝐮+𝐯,𝐮+𝐯⟩=‖𝐮‖2+2⟨𝐮,𝐯⟩+‖𝐯‖2=‖𝐮‖2+‖𝐯‖2

since 𝐮⟂𝐯 means ⟨𝐮,𝐯⟩=0.

Example

Let 𝐩=p(x)=1−2x2, 𝐪=q(x)=4−2x+x2, 𝐫=r(x)=x+2x2 and let P2 have the standard inner product.

a. Compute the following: ⟨𝐩,𝐪⟩ and ⟨𝐪,𝐫⟩.

b. Now let P2 have the inner product ⟨𝐩,𝐪⟩=a0b0+a1b1+ka2b2. Find k so that 𝐩 and 𝐪 are orthogonal.

c. Using this new inner product, compute ⟨𝐪,𝐫⟩.

Solution

a. The polynomial 𝐩 has no x term and 𝐫 has no constant term.

⟨𝐩,𝐪⟩=1(4)+0(−2)+(−2)(1)=2⟨𝐪,𝐫⟩=4(0)+(−2)(1)+1(2)=0

Answer: ⟨𝐩,𝐪⟩=2,⟨𝐪,𝐫⟩=0  (so 𝐪⟂𝐫)

b. With the new inner product, set ⟨𝐩,𝐪⟩ equal to 0 and solve for k:

⟨𝐩,𝐪⟩=1(4)+0(−2)+k(−2)(1)=0⇒4−2k=0⇒k=2

Answer: k=2

c. Now k=2, so the x2 coefficients are multiplied by 2:

⟨𝐪,𝐫⟩=4(0)+(−2)(1)+2(1)(2)=0−2+4=2

Answer: ⟨𝐪,𝐫⟩=2

Under the standard inner product 𝐪 and 𝐫 were orthogonal, but under the new one they are not. Orthogonality is based on the vectors and how the inner product is defined.

#17

Do there exist scalars k and l such that the vectors 𝐩1=2+kx+6x2, 𝐩2=l+5x+3x2, 𝐩3=1+2x+3x2 are mutually orthogonal with respect to the standard inner product on P2?

Solution

Each pair must have inner product 0:

𝐩1⟂𝐩2:2l+5k+18=0𝐩2⟂𝐩3:l+10+9=0 ⇒ l=−19𝐩1⟂𝐩3:2+2k+18=0 ⇒ k=−10

The second and third conditions force l=−19 and k=−10. But then the first condition fails:

2(−19)+5(−10)+18=−38−50+18=−70≠0

Answer: No such l and k exist.

Definition

(inner product space analog of Definition 2 in Section 4.9) If W is a subspace of a real inner product space V, then the set of all vectors in V that are orthogonal to every vector in W is called the orthogonal complement of W and is denoted by the symbol W⟂ (pronounced “W perp”).

Theorem 6.2.4 (generalization of Theorem 4.9.6 (a) and (b))

If W is a subspace of a real inner product space V, then:

a) W⟂ is a subspace of V.

b) W∩W⟂={𝟎}.

Theorem 6.2.5 (generalization of Theorem 4.9.6(c))

If W is a subspace of a real finite-dimensional inner product space V, then the orthogonal complement of W⟂ is W, that is, (W⟂)⟂=W.

#28

Find a basis for the orthogonal complement of the subspace of R5 spanned by the vectors.

𝐯1=(1,4,5,6,9), 𝐯2=(3,−2,1,4,−1), 𝐯3=(−1,0,−1,−2,−1), 𝐯4=(2,3,5,7,8)

Solution

Let 𝐰 be a vector in the orthogonal complement. Then 𝐯1·𝐰=0, and so on for 𝐯2, 𝐯3, and 𝐯4. For example, the first condition is

1w1+4w2+5w3+6w4+9w5=0

Recall

The solution space of a homogeneous system is the orthogonal complement of the row space of the coefficient matrix.

So put the vectors in the rows of a matrix and row reduce:

[145693−214−1−10−1−2−123578] ⟶ [10121011120000000000]

Writing the unknowns as x1,x2,…,x5, the nonzero rows give

x1=−x3−2x4−x5x2=−x3−x4−2x5

Let r=x3, s=x4, and t=x5 (the free variables). Then

𝐱=[−r−2s−t−r−s−2trst]=r[−1−1100]+s[−2−1010]+t[−1−2001]

These three vectors form a basis for the orthogonal complement. Multiplying each one by −1 gives another basis, with fewer minus signs:

Answer: {(1,1,−1,0,0), (2,1,0,−1,0), (1,2,0,0,−1)}