Section 5.1 Length and Dot Product in ℝ n. Let v = ‹v 1, v 2, v 3,..., v n › and w = ‹w 1, w...

66
Section 5.1 Length and Dot Product in ℝ n

Transcript of Section 5.1 Length and Dot Product in ℝ n. Let v = ‹v 1, v 2, v 3,..., v n › and w = ‹w 1, w...

Section 5.1Length and Dot Product in ℝn

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.  

The dot product of v and w is

v ∙ w = __________________________________ 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   The length of v (magnitude of v, norm of v) is

|| v || = ___________________________________

The length of v may also be computed using the formula

_________________________________________ 

 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   The distance between v and w is

d(v, w) = _____________________________ 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   The vectors v and w are orthogonal if

________________________________________ 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   A unit vector in the direction of v is given by ___________________ 

A unit vector in the direction opposite of v is given by __________________ 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   A vector in the direction of v with magnitude of c is given by ____________ 

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   The angle between vectors v and w is given by

____________________________________

Let v = ‹v1 , v2, v3, . . . , vn› and w = ‹w1­­, w2, w3, . . . , wn› be vectors in ℝn.   || v + w ||2 = || v ||2 + || w ||2 if __________________________________

Ex. Let v = ‹4, 2›.

(a) Determine all vectors which are orthogonal to v.

Ex. Let v = ‹4, 2›.

(b) Find a vector parallel to v, but with a magnitude five times that of v.

Ex. Let v = ‹4, 2›.

(c) Find a vector in the opposite direction of v, but with a magnitude of five.

Properties of the dot product.

Let u, v, and w be vectors in ℝn and let c be a scalar.

1. u ∙ v = v ∙ u

2. u ∙ (v + w) = u ∙ v + u ∙ w

3. c (u ∙ v) = (cu) ∙ v = u ∙ (cv)

4. v ∙ v ≥ 0 and v ∙ v = 0 if and only if v = 0.

Section 5.2Inner Product Spaces

Let u, v, and w be vectors in a vector space V, and let c be a scalar. An inner product on V is a function that associates a real number < u, v > with each pair of vectors u and v and satisfies the following:

1. < u , v > = < v , u >

2. < u , v + w > = < u , v > + < u , w >

3. c­< u , v > = <­cu , v > = < u , cv >

4. < v , v > ≥ 0 and < v , v > = 0 if and only if v = 0.

Ex. An inner product on M2,2 :

Ex. An inner product on M2,2 :

Ex. An inner product on P2 .

Ex. An inner product on C[a,b]:

Def. Let v and w be vectors in an inner product space V. (a) The magnitude (norm) of v is || v || = ___________________________ 

(b) The distance between v and w is d(v, w) = _______________________ 

(c) The angle between v and w is found by the formula

________________________________________ 

(d) v and w are orthogonal (v ⊥ w) if _____________________________

Note:|| v + w ||2 = || v ||2 + || w ||2 if v and w are orthogonal.

Ex. Let f (x) = x , g(x) = x2 , and h(x) = x2 + 1 be functions in the inner product space C[0, 1].

(a) Compute || f ||

Ex. Let f (x) = x , g(x) = x2 , and h(x) = x2 + 1 be functions in the inner product space C[0, 1].

(b) Compute d( f, g) and d (g , h)

Ex. Let f (x) = x , g(x) = x2 , and h(x) = x2 + 1 be functions in the inner product space C[0, 1].

(c) Compare the distance between f and g­ with the distance between g and h.

Recall the projection vector of v onto w in ℝn:

projw v = 

v ww

w w

The projection vector of v onto w in an inner product space V:

Ex. Let f (x) = x and g(x) = x2 be functions in the inner product space ­­­­­­­­­C[a, b]. Find the projection of f onto g.

Theorem:

Let v and w be two vectors in an inner product space V with w ≠ 0. Then

d(v, projw v) ≤ d(v, cw), with equality only when c = ,

,

v w

ww

Section 5.3Orthonormal Bases &

the Gram-Schmidt Process

Def. A set of vectors S is orthogonal if every pair of vectors in S is orthogonal. If in addition, every vector in S is a unit vector then S is orthonormal.

Examples:(i) In ℝ3 the set of basis vectors {i, j, k} form an orthonormal set.

Examples:(ii) In ℝ2 the set { (2, 2), (−3, 3) } is an orthogonal set of vectors but not orthonormal. We can turn it into an orthonormal set though.

Examples:(iii) Is the set {x+1, x−1, x2} an orthogonal set in P2? Is it an orthonormal set in P2 ? (Use­the­standard­inner­product­in­P2­)

Examples:(iv) Is the set {x+1, x−1, x2} an orthogonal set in C[0,1]? Is it an orthonormal set in C[0,1]? (Use­the­standard­inner­product­in­C[0,1]­)

Ex. Create an orthonormal basis for ℝ3 that includes a vector in the direction of (3,0,3).

Ex. Verify that the set { 1, sin(x), cos(x), sin(2x), cos(2x), sin(3x), cos(3x), . . . . . , sin(nx), cos(nx) } is orthogonal in C[0, 2π] and then turn it into an orthonormal basis.

Ex. Verify that the set { 1, sin(x), cos(x), sin(2x), cos(2x), sin(3x), cos(3x), . . . . . , sin(nx), cos(nx) } is orthogonal in C[0, 2π] and then turn it into an orthonormal basis.

Ex. Verify that the set { 1, sin(x), cos(x), sin(2x), cos(2x), sin(3x), cos(3x), . . . . . , sin(nx), cos(nx) } is orthogonal in C[0, 2π] and then turn it into an orthonormal basis.

Ex. Verify that the set { 1, sin(x), cos(x), sin(2x), cos(2x), sin(3x), cos(3x), . . . . . , sin(nx), cos(nx) } is orthogonal in C[0, 2π] and then turn it into an orthonormal basis.

Ex. Verify that the set { 1, sin(x), cos(x), sin(2x), cos(2x), sin(3x), cos(3x), . . . . . , sin(nx), cos(nx) } is orthogonal in C[0, 2π] and then turn it into an orthonormal basis.

Def. The coordinate matrix of a vector w with respect to a basis B = { v1, v2, v3, . . . . , vn } is the column matrix [c1 ,­c2 ,­c3 , . . . . , cn]T , if w can be expressed as a linear combination of basis vectors with the coordinates c1 ,­c2 ,­c3 , . . . . , cn (eg if w = c1v1 +­c2v2­+­c3v3 + . . . . + cn vn )

Ex. (a) Find the coordinate matrix of (2, 3, 5) in ℝ3 with respect to the standard basis {i, j, k} and the standard inner product.

Ex. (b) Find the coordinate matrix of (2, 3, 5) in ℝ3 with respect to the standard basis {k, j, i} and the standard inner product.  

Ex. (c) Find the coordinate matrix of (2, 3, 5) in ℝ3 with respect to the basis { (1,1,1) , (1,2,3) , (−1,0,4) } and the standard inner product. 

Theorem: Let B = { v1, v2, v3, . . . . , vn } be an orthonormal basis. The coordinates of w = c1v1 +­c2v2­+­c3v3 + . . . . + cn vn can be computed by ck­=­< w , vk >

Ex. Give the coordinate matrix of (5, −5, 2) with respect to the orthonormal basis { (3⁄5, 4⁄5, 0), (−4⁄5, 3⁄5, 0), (0,0,1) }.

Gram-Schmidt Orthonormalization Process: 

Let B = { v1, v2, v3, . . . . , vn } be a basis for an inner product space.

First form B′ = { w1, w2, w3, . . . . , wn } where the wk are given by

Gram-Schmidt Orthonormalization Process: 

Let B = { v1, v2, v3, . . . . , vn } be a basis for an inner product space.

First form B′ = { w1, w2, w3, . . . . , wn } where the wk are given by

w1 = v1

2 12 2 1

1 1

,

,

v ww v w

w w

3 1 3 23 3 1 2

1 1 2 2

, ,

, ,

v w v ww v w w

w w w w

1 2 11 2 1

1 1 2 2 1 1

, , ,

, , ,n n n n

n n nn n

v w v w v w

w v w w ww w w w w w

kk

k

w

uw

Then form B″­= { u1, u2, u3, . . . . , un } where each uk is given by

Ex. Use the Gram-Schmidt process on the basis { (1,1), (0,1) } to find an orthonormal basis for ℝ2.

Ex. Use the Gram-Schmidt process on { (1,1,0), (1,2,0), (0,1,2) } to find an orthonormal basis for ℝ3.

Alternate form of the Gram-Schmidt Orthonormalization Process: 

Let B = { v1, v2, v3, . . . . , vn } be a basis for an inner product space.Form B′­= { u1, u2, u3, . . . . , un } where each uk is given by 

, where

, where

, where

1 11

1 1

w v

uw v

2 2 2 1 1, w v v u u22

2

w

uw

3 3 3 2 2 3 1 1, , w v v u u v u u3

33

w

uw

nn

n

w

uw 1 1 2 2 1 1, , ,n n n n n n n w v v u u v u u v u u

Ex. Find an orthonormal basis for the vector space of solutions to the homogenous set of equations:­­­­­­­x1 + x2 + 7x4 = 0 2x1 + x2 + 2x3 + 6x4 = 0

Section 5.5Applications of Inner Product Spaces

Def. Let f be in C[a,b] and let W be a subspace of C[a,b]. A function g in W is called a least squares approximation of f with respect to W when the value of

is a minimum with respect to all other functions in W. 2

( ) ( )b

af x g x dx

Ex. Find the least squares approximation g(x) = a2x2 + a1x + ao of f (x) = ex on C[0,1].

Ex. Find the least squares approximation g(x) = a2x2 + a1x + ao of f (x) = ex on C[0,1].

Theorem Let f be in C[a,b] and let W be a finite dimensional subspace of C[a,b]. The least squares approximation function of f with respect to W is given by

g­ = < f , w1> w1 + < f , w2> w2 + …… + < f , wn> wn

where B = { w1, w2, w3, . . . . , wn } is an orthonormal basis for W.

Ex. Find the least squares approximation of sin(x) on [0, π] with respect to the subspace of all polynomial functions of degree two or less.

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)2

oa

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

in the subspace of C[0,2π] spanned by the basis { 1, cos(x), cos(2x), . . . . , cos(nx), sin(x), sin(2x), . . . . , sin(nx) } 

2oa

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

in the subspace of C[0,2π] spanned by the basis { 1, cos(x), cos(2x), . . . . , cos(nx), sin(x), sin(2x), . . . . , sin(nx) } This is an orthogonal basis and if we normalize it we get a basis denoted as B = { wo, w1, w2 , . . . . , wn , wn+1, . . . . , w2n }

=

2oa

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

in the subspace of C[0,2π] spanned by the basis { 1, cos(x), cos(2x), . . . . , cos(nx), sin(x), sin(2x), . . . . , sin(nx) } This is an orthogonal basis and if we normalize it we get a basis denoted as B = { wo, w1, w2 , . . . . , wn , wn+1, . . . . , w2n }

=

2oa

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

in the subspace of C[0,2π] spanned by the basis { 1, cos(x), cos(2x), . . . . , cos(nx), sin(x), sin(2x), . . . . , sin(nx) } This is an orthogonal basis and if we normalize it we get a basis denoted as B = { wo, w1, w2 , . . . . , wn , wn+1, . . . . , w2n }

=

With this orthonormal basis we can write g(x) above as: g(x) = < f , wo> wo + < f , w1> w1 + < f , w2> w2 + …… + < f , w2n> w2n

2oa

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

in the subspace of C[0,2π] spanned by the basis { 1, cos(x), cos(2x), . . . . , cos(nx), sin(x), sin(2x), . . . . , sin(nx) } This is an orthogonal basis and if we normalize it we get a basis denoted as B = { wo, w1, w2 , . . . . , wn , wn+1, . . . . , w2n }

=

With this orthonormal basis we can write g(x) above as: g(x) = < f , wo> wo + < f , w1> w1 + < f , w2> w2 + …… + < f , w2n> w2n

Then:

2oa

2

0

1( )oa f x dx

2

0

1( )cos( )ja f x jx dx

2

0

1( )sin( )jb f x jx dx

Fourier Approximations

Consider functions of the form

g(x) = + a1 cos(x) + a2 cos(2x) + . . . + an cos(nx) + b1 sin(x) + b2 sin(2x) + . . . + bn sin(nx)

The function g(x) is called the nth order Fourier approximation of f on the interval [0,2π].

2oa

2

0

1( )oa f x dx

2

0

1( )cos( )ja f x jx dx

2

0

1( )sin( )jb f x jx dx

Ex. Find the third order Fourier approximation of f­(x) = x on [0, 2π].