<<

Section 7.5 Inner Product Spaces

With the “” defined in Chapter 6, we were able to study the following properties of vectors in Rn. 1) Length or of a vector u. ( u = p u u ) || || · 2) Distance of two given vectors u and v. (||u - v||) 3) Orthogonality of two vectors u and v. (whether u v = 0) · Now, how do we describe the same properties of vectors in other types of vector spaces?

For example, 1) How do we define the norm of the function f(x) in C([a, b])? 2) How do we determine whether the f(x) and

g(x) in P2 are orthogonal? 3) How do we calculate the distance between the two matrices

A and B in M4x3? 1 Section 7.5 Inner Product Spaces Definition.

Property: Many inner products may be defined on a .

Proof If 〈·, ·〉 is an inner product, then 〈·, ·〉r defined by 〈u, v〉r = r〈u, v〉 is also an inner product for any r > 0. Definition.

2 Example: The dot product is an inner product on Rn.

Definition.

3 Example: V = C([a, b]) = {f | f : [a, b] → R, f is continuous} is a vector space, and the function 〈·, ·〉 : V×V → R defined by b 〈 f , g〉 = f (t)g(t)dt ∫a ∀ f , g ∈ V is an inner product on V. Axiom 1: f 2 is continuous and non-negative. 2 f ≠ 0 ⇒ f (t0) > 0 for some t0 ∈ [a, b]. 2 ⇒ f (t) > p > 0 ∀ [t0-r/2, t0+r/2] ⊆ [a, b]. b ⇒ 〈 f , f 〉 = f 2 (t)dt ≥ r ⋅ p > 0. ∫a Axioms 2 - 4: You examine them.

4 Example: 〈A, B〉 = trace(ABT) is the Frobenius inner product on Rn×n. T 2 Axiom 1: 〈A, A〉 = trace(AA ) = Σ1≤i,j≤n(aij) > 0 ∀ A ≠ O. Axiom 2: trace(ABT) = trace(ABT)T = trace(BAT). Axioms 3 - 4: You examine them.

5 Definition. For any vector v in an V ,thenorm or length of v is denoted and defined as v = v, v 1/2.Thedistance between u, v V is defined as u v . || || h i 2 || || n×n 2 1/2 Example: The Frobenius norm in R is ||A|| = [Σ1≤i,j≤n(aij) ] , since T 〈A, B〉 = trace(AB ) = Σ1≤i,j≤naijbij.

Property: Inner products and norms satisfy the elementary properties stated in Theorem 6.1, the Cauchy-Schwarz inequality, and the triangle inequality in Section 6.1. Proof You show it.

6 Theorem 6.1 Let u and v be vectors in n and c be a in . (a) u u = u 2. R R (b) u · u =|| 0 if|| and only if u = 0. (c) u ·v = v u. (d) u· (v + w·)=u v + u w. (e) (v·+ w) u = v ·u + w · u. (f) (cu) v =· c(u u·)=u (·cu). (g) cu · = c u ·. · || || | ||| ||

Let V be an inner product space and let u and v be vectors in V and c be a scalar in . It can be shown that (a) u, u R= u 2. (b) hu, ui =|| 0 if|| and only if u = 0. (c) hu, v i = v, u . (d) hu, vi+ wh = iu, v + u, w . (e) hv + w, ui = hv, ui+ hw, ui. (f) hcu, v = ic u,hu =i uh,cu .i (g) h cu i= c hu . i h i || || | ||| || 7 Theorem 6.2 (Pythagorean theorem in Rn) Let u and v be vectors in n.Thenu and v are orthogonal if and only if R u + v 2 = u 2 + v 2. || || || || || || Proof u + v 2 = u 2 +2u v + v 2 || || || || · || || = 0 if and only if u and v are orthogonal

Pythagorean theorem in any inner product space V Let V be an inner product space and let u and v be vectors in V .Thenu and v are orthogonal if and only if

u + v 2 = u 2 + v 2. || || || || || || u + v 2 = u 2 +2 u, v + v 2 Proof || || || || h i || || = 0 if and only if 8 u and v are orthogonal Theorem 6.3 (Cauchy-Schwarz inequality) For any vectors u and v in n,wehave R u v u v . | · ||| || · || || Proof Using Theorem 6.2.

Cauchy-Schwarz inequality in any inner product space V Let V be an inner product space. For any vectors u and v in V ,wehave

u, v u v . |h i||| || · || || Proof Using Pythagorean Theorem.

Example: A Cauchy-Schwarz inequality in C([a, b]) 2 b b b f(t)g(t)dt f 2(t)dt g2(t)dt a  a a 9 Z ! Z ! Z ! Theorem 6.4 (Triangle inequality) For any vectors u and v in n,wehave R u + v u + v . || || || || || || Proof Using Theorem 6.3.

Triangle inequality in any inner product space V Let V be an inner product space. For any vectors u and v in V ,wehave

u + v u + v . || || || || || || Proof Using Cauchy-Schwartz inequality.

10 Definition. In an inner product space V , the vectors u, v are called orthogonal if u, v = 0, a vector u is called a unit vector if u = 1, a subset S is called orthogonalh i if u, v = 0 for all distinct u, v S||, and|| S is called orthonormal if S is orthogonalh i and u = 1 for all u2 S. || || 2

Properties: 1. Every nonzero vector v in an inner product space may be changed into a unit normalized vector (1/||v||)v, and every orthogonal subset with only nonzero vectors may be changed into an orthonormal subset without affecting the subspace spanned. 2. An orthogonal set of nonzero vectors is L.I., no matter the set is finite or infinite.

Example: In the inner product space C([0, 2π]), the vectors f (t) = sin 3t and g(t) = cos 2t are orthogonal, since

11 Example: In the vector space of trigonometric polynomials

[0, 2⇡] = Span 1, cos t, sin t, cos 2t, sin 2t, , cos nt, sin nt, T { ··· ···} = Span S ⇒ S is orthogonal, since 2⇡ cos nt, sin mt = cos nt sin mtdt =0, n, m 0 h i 0 8 Z 2⇡ cos nt, cos mt = cos nt cos mtdt =0, n = m h i 0 8 6 Z 2⇡ sin nt, sin mt = sin nt sin mtdt =0, n = m h i 8 6 Z0

S is a of [0, 2 ]. ⇒ T π

12 Theorem 6.5 (Gram-Schmidt Process) Let u , u , , u be a basis for a subspace W of n.Define { 1 2 ··· k} R

v1 = u1, u v v = u 2 · 1 v , 2 2 v 2 1 || 1|| . . uk v1 uk v2 uk vk 1 vk = uk · 2 v1 · 2 v2 · 2 vk 1. v1 v2 ··· vk 1 || || || || || || Then v , v , , v is an orthogonal set of nonzero vectors such that { 1 2 ··· i} Span v , v , , v = Span u , u , , u { 1 2 ··· i} { 1 2 ··· i} for each i.So v , v , , v is an orthogonal basis for W . { 1 2 ··· k}

13 Gram-Schmidt Process for any inner product space Let u , u , , u be a basis for an inner product space V .Define { 1 2 ··· k}

v1 = u1, u , v v = u h 2 1iv , 2 2 v 2 1 || 1|| . . uk, v1 uk, v2 uk, vk 1 vk = uk h iv1 h iv2 h ivk 1. v 2 v 2 ··· v 2 || 1|| || 1|| || 1|| Then v , v , , v is an orthogonal set of nonzero vectors such that { 1 2 ··· i} Span v , v , , v = Span u , u , , u { 1 2 ··· i} { 1 2 ··· i} for each i.So v , v , , v is an orthogonal basis for W . { 1 2 ··· k} Proposition: The Gram-Schmidt process is valid for any inner product space. Proof You show it.

Corollary: Every finite-dimensional inner product space has an

14 . Example: P2 is an inner product space with the following inner product 1 〈 f , g〉 = f (x)g(x)dx ∫−1 2 ∀ f , g ∈ P2. From a basis B = {1, x, x } = {u1, u2, u3} of P2,

an orthogonal basis {v1, v2, v3} may be obtained by applying the Gram-Schmidt process.

15 Example: P2 is an inner product space with the following inner product 1 〈 f , g〉 = f (x)g(x)dx ∫−1 2 ∀ f , g ∈ P2. From a basis B = {1, x, x } = {u1, u2, u3} of P2,

an orthogonal basis {v1, v2, v3} may be obtained by applying the Gram-Schmidt process.

v1 = u1 =1

1 u2, v1 1 t 1dt · v2 = u2 h 2iv1 = x 1 (1) = x 0 1=x v1 2 · R 1 1 dt || || R 1 2 1 2 u3, v1 u3, v2 2 1 t 1dt 1 t tdt v3 = u3 h 2iv1 h 2iv2 = x · (1) · (x) v1 v2 1 2 1 2 || || || || R 1 1 dt R 1 t dt R R 2 1 = x2 3 1 0 x = x2 . 2 · · 3

16 To get an orthonormal basis, compute

1 1 2 2 p 2 v1 = 1 dx = 2 v2 = x dx = || || s 1 || || s 1 3 Z Z r

1 2 2 1 8 v3 = x dx = || || s 1 3 45 Z ✓ ◆ r and get

1 1 1 1 3 45 2 1 v1, v2, v3, = , x, x v1 v2 v3 p2 2 8 3 ⇢|| || || || || || ( r r ✓ ◆)

2 For P with the same inner product and the basis B = {1, x, x , }, the same procedure may be applied to obtain an orthonormal basis

{p0(x), p1(x), p2(x),  }, called the normalized Legendre polynomials. Note that p0(x), p1(x), and p2(x) are the above three orthonormal ones.

17 Proposition Suppose that V is an inner product space and at W is a finite-dimensional subspace of V . For every v in V ,thereexistuniquew W and z W ? such that v = w + z. The vector v is called the orthogonal2 projection2 of v onto W , and we have

w = v, v v + v, v v + + v, v v h 1i 1 h 2i 2 ··· h ni n if v , v , , v is an orthonormal basis of W . { 1 2 ··· n} Proof You show that the proof of Theorem 6.7 in Section 6.3 is also applicable here. Corollary: Under the notations in the above Proposition, among all vectors in W, the vectors closest to v is w. Proof Follow the derivations of the closest vector property in Section 6.3. Since the closeness is measured by the distance, which involves the sum (integral) of a square of the difference vector (function), the closest vector is called the least-square approximation. 18 f , g 1 f (x)g(x)dx Example: P2 with the inner product 〈 〉 = ∫ − 1 for all f , g ∈ P2 is a finite-dimensional subspace of C([-1, 1]).

3 To v = f (x) = p x ∈ C([-1, 1]), the least-squares approxi- mation by a with degree ≤ 2 is the orthogonal

projection of f onto P2. odd function

Thus take the orthonormal basis {v1, v2, v3}, where 1 3 45 2 1 v = v = x v3 = x 1 p 2 2 8 3 2 r r ✓ ◆ and get even function

w = v, v1 v1 + v, v2 v2 + v, v3 v3 h i h i h i 0 1 0 3 3 = p3 x xdx x 1 · 2 2 Z r ! r 9 = x 7 19 Definition.

The least-squares approximation by the trigonometric polynomials of a continuous periodic function f (t) of period 2π. Periodicity ⇒ consider the approximation over a period [0, 2π].

⇒ f (·) ∈ C([0, 2π]), and can be orthogonally projected onto a subspace Wn spanned by an orthogonal set

Sn = {1, cos t, sin t, cos 2t, sin 2t, , …, cos nt, sin nt}

To have an orthonormal basis for Wn, compute 2⇡ 1 = 1dt = p2⇡ || || s Z0 2⇡ 1 2⇡ cos kt = cos2 ktdt = (1 + cos 2kt)dt = p⇡ || || s s2 Z0 Z0 20 sin kt = p⇡ || || and get the orthonormal basis 1 1 1 1 1 1 1 n = , cos t, sin t, , cos 2t, sin 2t, , cos nt, sin nt B p2⇡ p⇡ p⇡ p⇡ p⇡ ··· p⇡ p⇡ ⇢

Suppose that f (·) is the sawtooth function +1 0 -1

0 2π

1 2 t if 0 t ⇡ f(t)= ⇡ 2 t 3if⇡  t  2⇡ ⇢ ⇡  

21 Let f n be the least-squares approximation of f by Wn (the orthogonal projection of f onto Wn). Then 1 1 1 1 1 1 fn = f, + f, cos t cos t + f, sin t sin t + p2⇡ p2⇡ p⇡ p⇡ p⇡ p⇡ ··· ⌧ ⌧ ⌧ 1 1 1 1 + f, cos nt cos nt + f, sin nt sin nt p⇡ p⇡ p⇡ p⇡ ⌧ ⌧ Now, 1 1 ⇡ 2 1 2⇡ 2 f, = 1 t dt + t 3 dt =0+0 p2⇡ p2⇡ ⇡ p2⇡ ⇡ ⌧ Z0 ✓ ◆ Z⇡ ✓ ◆ 1 1 ⇡ 2 1 2⇡ 2 f, cos kt = 1 t cos kt dt + t 3 cos kt dt p⇡ p⇡ ⇡ p⇡ ⇡ ⌧ Z0 ✓ ◆ Z⇡ ✓ ◆ 4 = (1 ( 1)k) ⇡p⇡k2

1 f, sin kt =0 and p⇡ 22 ⌧ 8 cos t cos 3t cos nt fn(t)= + + + ⇒ ⇡2 12 32 ··· n2 

23 Homework Set for Section 7.5 — Section 7.5: Problems 1, 4, 9, 13, 17, 45, 46, 51, 53, 60, 62, 63, 64, 71, 75

24