48
Chap. 5 Chap. 5 Inner Product Inner Product Spaces Spaces 5.1 Length and Dot Product in R n 5.2 Inner Product Spaces 5.3 Orthonormal Bases: Gram-Schmidt Process 5.4 Mathematical Models & Least Squares Analysis 5.5 Applications of Inner Product Spaces

Chap. 5 Inner Product Spaces 5.1 Length and Dot Product in R n 5.2 Inner Product Spaces 5.3 Orthonormal Bases: Gram-Schmidt Process 5.4 Mathematical Models

Embed Size (px)

Citation preview

Chap. 5 Chap. 5 Inner Product SpacesInner Product Spaces

5.1 Length and Dot Product in Rn

5.2 Inner Product Spaces

5.3 Orthonormal Bases: Gram-Schmidt Process

5.4 Mathematical Models & Least Squares Analysis

5.5 Applications of Inner Product Spaces

Ming-Feng Yeh Chapter 5 5-2

Vectors in the plane can be characterized as directed line segments having a certain length and direction.

If v = (v1, v2), then the length, or magnitude, of v, denoted by , is defined to be

The length or norm of a vector

in Rn is given

by Unit vector: Zero vector:

5.1 5.1 Length and Dot ProductLength and Dot Product

v 22

21 vv v

),( 21 vv

v

1v

2v

22

21

2

2

2

1

2vvvv v

)...,,,( 21 nvvvv22

221 nvvv v

1v0v

Ming-Feng Yeh Chapter 5 5-3

Standard Unit VectorStandard Unit Vector Each vector in the standard basis for Rn has length 1 and is

called a standard unit vector. R2: {i, j} = {(1, 0), (0, 1)}

R3: {i, j, k} = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} (1, 1) = (1, 0) + (0, 1) = i + j (2, 2) = 2(1, 1) = 2i + 2j

Section 5-1

(1, 1)

(2, 2) = 2(1, 1)

i

j)1,1(2)1,1(2)2,2(

22)2,2(,2)1,1(

1),(

),()1,1(

22

22

22

22

21

Ming-Feng Yeh Chapter 5 5-4

Length of a Scalar MultipleLength of a Scalar Multiple Two nonzero vectors u and v in Rn are parallel if

one is a scalar multiple of the other, i.e., u = cv.If c > 0, then u and v have the same direction, and if c < 0, then u and v have the opposite direction.

Theorem 5.1: Length of a Scalar MultipleLet v be a vector in Rn and c be a scalar. Then

where is the absolute value of c.vv cc

c

Section 5-1

Ming-Feng Yeh Chapter 5 5-5

Theorem 5.2Theorem 5.2

Unit Vector in the Direction of vIf v is a nonzero vector in Rn, then the vectorhas length 1 and has the same direction as v. Thisvector u is called the unit vector in the direction of v.

pf: 1. v is nonzero is positive and Therefore u has the same direction as v.

2. The above process is called normalizing the vector v.

vvu

v1 vuv1

11 vvv

vu

Section 5-1

Ming-Feng Yeh Chapter 5 5-6

Example 2Example 2Find the unit vector in the direction of v = (3, 1, 2), and

verify that this vector has length 1.

Sol: The unit vector in the direction of v is

which is a unit vector because

142,141,1432)1(3

)2,1,3(222

v

v

114

142

1422

1412

143

Section 5-1

Ming-Feng Yeh Chapter 5 5-7

Distance Between 2 Vectors: RDistance Between 2 Vectors: R22

The distance between two points in the plane,(u1, u2) and (v1, v2), is given by

In vector terminology,this distance can be viewedas the length of u – v, i.e., u

v

),( 21 uu

),( 21 vv),( vud

222

211 )()( vuvud

222

211 )()( vuvu vu

Section 5-1

Ming-Feng Yeh Chapter 5 5-8

Distance Between 2 Vectors: RDistance Between 2 Vectors: Rnn

The distance between two vectors u and v in Rn is

Properties of distance:1.2. if and only if u = v.3.

Let u = (0, 2, 2) and v = (2, 0, 1). Then

vuvu ),(d

0),( vud0),( vud

),(),( uvvu dd

312)2(

)12,02,20(),(

222

vuvud

Section 5-1

Ming-Feng Yeh Chapter 5 5-9

Angle Between Two Vectors: RAngle Between Two Vectors: R22

The angle between two nonzero vector u = (u1, u2) and v = (v1, v2) is

The Law of Cosines

)0(

vu2211cos

vuvu

uv

uv

cos2

222vuvuuv

vuvu

vu

uvvu

22112

222

1122

21

22

21

222

2

])()[()()(

2cos

vuvuuvuvvvuu

Section 5-1

Ming-Feng Yeh Chapter 5 5-10

Dot ProductDot Product The dot product of u = (u1, u2, …, un) and

v = (v1, v2, …, vn) is the scalar quantity

Theorem 5.3: Properties of Dot Product1.2.3.4.5. if and only if v = 0.

nnvuvuvu 2211vu

uvvu wuvuwvu )(

)()()( vuvuvu ccc 0

2 vvv0vv

Section 5-1

Ming-Feng Yeh Chapter 5 5-11

Example 5Example 5Given u = (2, –2), v = (5, 8) and w = (– 4, 3).

1.

2.

3.

4.

5.

6)8)(2()5(2 vu

)18,24(6)( wwvu

12)(2)2( vuvu

25)3(3)4)(4(2 www

)2,13(68),8(52 wv22)2)(2()13(2)2,13()2,2()2( wvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-12

Example 6Example 6Given two vectors u and v in Rn such that

, and evaluate

Sol:

,39uu

3vu ,79vv )3()2( vuvu

254

)79(2)3(7)39(3

)(2)(7)(3

)2()3()2()3(

)3()2()3()3()2(

vvvuuu

vvuvvuuu

vuvvuuvuvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-13

Angle Between Two Vectors: RAngle Between Two Vectors: Rnn

The angle between two nonzero vectors u and v in Rn is

Two vectors u and v in Rn is orthogonal if The zero vector 0 is orthogonal to every vector.

0,cosvu

vu

2

0cos 20 0 2

1cos 0cos 1cos 0cos

0vu

Section 5-1

Ming-Feng Yeh Chapter 5 5-14

Theorem 5.4Theorem 5.4

Cauchy-Schwarz InequalityIf u and v are vectors in Rn, then

where denotes the absolute value ofpf: If u = 0, then

Hence the theorem is true if u = 0. If from and we have

vuvu vu vu

.00,0 vvuv0vu

,0u cosvuvu ,1cos .coscos vuvuvuvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-15

Example 7Example 7Verify the Cauchy-Schwarz Inequality for u = (1, –1, 3) and

v = (2, 0, –1).

Sol: Because and , we have

Therefore

11,1 uuvu 5vv

11 vu

55511 vvuuvu

vuvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-16

Examples 8 & 9Examples 8 & 9Ex 8: The angle between u = (–4, 0, 2, –2) and

v = (2, 0, –1, 1) is given by

u and v should have opposite directions, because u = –2v.

Ex 9: The vectors u = (3, 2, –1, 4) and v = (1, –1, 1, 0) are orthogonal because

1624

12cos

vu

vu

0)0)(4()1)(1()1)(2()1)(3( vu

Section 5-1

Ming-Feng Yeh Chapter 5 5-17

Example 10Example 10Determine all vectors in R2 that are orthogonal to u = (4, 2).Sol: Let v = (v1, v2) be orthogonal to u. Then

This implies that

Therefore every vector that is

orthogonal to (4, 2) is of the form

024),()2,4( 2121 vvvvvu

.2 12 vv

Rtttt ),2,1()2,(v

Section 5-1

Ming-Feng Yeh Chapter 5 5-18

Theorem 5.5: Triangle InequalityTheorem 5.5: Triangle Inequality

If u and v are vectors in Rn, then

pf:

.vuvu

2

22

22

22

2

)(

2

2

)(2

)(2

)()()()(

vu

vuvuvvuu

vuvuvvuu

vvuu

vvvuuu

vuvvuuvuvuvu

vuvu

Section 5-1

uv

vu

Equality occurs if and only if the vectors u and v have the same directions.

Ming-Feng Yeh Chapter 5 5-19

Theorem 5.6: Pythagorean ThmTheorem 5.6: Pythagorean Thm

If u and v are vectors in Rn, then u and v are

orthogonal iffpf: If u and v are orthogonal, then

.222

vuvu 0vu

22

222)(2

vu

vvuuvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-20

Dot Product and Dot Product and Matrix Multiplication Matrix Multiplication Represent a vector in Rn as an n 1 column matrix.

Let and . Then

nu

u

u

2

1

u

nv

v

v

2

1

v

][ 22112

1

21 nn

n

nT vuvuvu

v

v

v

uuu

vuvu

Section 5-1

Ming-Feng Yeh Chapter 5 5-21

5.2 5.2 Inner Product SpacesInner Product Spaces = dot product (Euclidean inner product for Rn)

= general inner product for vector space V.

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

vu vu,

uvvu ,, wuuvwvu ,,,

vuvu ,, cc 0, vv 0, vv

Ming-Feng Yeh Chapter 5 5-22

Inner Product SpaceInner Product Space A vector space V with an inner product is called an inner

product space. Show that the following function defines an inner product

on R2:where and

pf: 1.

2. Let . Then

2211 2, vuvu vu),( 21 uuu ).,( 21 vvv

uvvu ,22, 22112211 uvuvvuvu

),( 21 www

wuuv

wvu

,,

)2()2(

)(2)(,

22112211

222111

wuwuvuvu

wvuwvu

Section 5-2

2211 vuvu vu

Ming-Feng Yeh Chapter 5 5-23

Proof of Theorem 2Proof of Theorem 23. If c is any scalar, then

4. Because the square of a real number is nonnegative,

Moreover, this expression is equal to zero iff v = 0.

vu

vu

,

)(2)(

)2(,

2211

2211

c

vcuvcu

vuvucc

02, 22

21 vvvv

Section 5-2

Ming-Feng Yeh Chapter 5 5-24

Example 3Example 3Show that the following function is not an inner product on

R3:

where and

pf: Let v = (1, 2, 1). Then

Axiom 4 is not satisfied.

332211 2, vuvuvu vu

),,( 321 uuuu ).,,( 321 vvvv

06)1)(1()2)(2(2)1)(1(, vv

Section 5-2

Ming-Feng Yeh Chapter 5 5-25

Inner Product on MInner Product on M2,22,2 & P & Pnn

Let and

be matrices in the vector space M2,2. The function given by

is an inner product on M2,2. Let and

be polynomials in the vector space Pn. The function given

by

is an inner product on Pn.

The verification of the four inner product axioms is left to you.

2221

1211

aa

aaA

2221

1211

bb

bbB

2222121221211111, babababaBA

nnxaxaap 10

nnxbxbbq 10

nnbababaqp 1100,

Section 5-2

Ming-Feng Yeh Chapter 5 5-26

Theorem 5.7Theorem 5.7

Properties of Inner ProductsLet u, v, and w be vectors in an inner product space

V, and let c be any real number.

1.

2.

3.

0, 0vv0,

wvwuwvu ,,,

vuvu ,, cc

Section 5-2

Ming-Feng Yeh Chapter 5 5-27

Norm, Distance & AngleNorm, Distance & AngleLet u and v be vectors in an inner product space V.

1. The norm (or length) of u is

2. The distance between u and v is

3. The angle between two nonzero vectors u and v is given by

4. u and v are orthogonal if If , then v is called a unit vector. If v is any nonzero vector, then the vector

is called the unit vector in the direction of v.

uuu ,vuvu ),(d

0,,

cosvu

vu

0, vu

1v

vvu

Section 5-2

Ming-Feng Yeh Chapter 5 5-28

Example 6Example 6Let and

be polynomial in P2, and determine the following.

1.

2.

3.

4.

,24)(,21)( 22 xxxqxxp 22)( xxxr

2)1)(2()2)(0()4)(1(, 221100 bababaqp

0)2)(1()1)(2()0)(4(, rq

211)2(4, 222 qqq

22)3(2)3(

323

)24()21(),(

222

2

22

xx

xxxqpqpd

Section 5-2

Ming-Feng Yeh Chapter 5 5-29

Theorem 5.8Theorem 5.8

Let u and v be vectors in an inner product space V.

1. Cauchy-Schwarz Inequality:

2. Triangle Inequality:

3. Pythagorean Theorem:u and v are orthogonal iff

vuvu ,

vuvu

222vuvu

Section 5-2

Ming-Feng Yeh Chapter 5 5-30

Orthogonal Projections: ROrthogonal Projections: R22

Let u and v be vectors in the plane. If v is nonzero, then u can be orthogonally projected onto v. This projection is denoted by projvu.

projvu is a scalar multiple of v, i.e., projvu = av. If a > 0, then and

Therefore

0cos

)()(

coscos

2vvvuvvu

v

vu

v

vuuvv

a

aa

vvv

vuuv

proj

u

v

projvu

Section 5-2

Ming-Feng Yeh Chapter 5 5-31

ProjProjvvu in Ru in R22 & Example 9 & Example 9

If a < 0, then The orthogonal projection of u onto v is given by the same formula.

Example 9: The orthogonal projection of u = (4, 2) onto v = (3, 4) is given by

.0cos

),()4,3( 516

512

2520

vvv

vuuvproj

u

v

projvu

v

u projvu

Section 5-2

Ming-Feng Yeh Chapter 5 5-32

Orthogonal Projection & Ex 10Orthogonal Projection & Ex 10 Let u and v be vectors in an inner product space V, such

that Then the orthogonal projection of u onto v is

given by

Example 10: The orthogonal projection of u = (6, 2, 4) onto v = (1, 2, 0) is given by

.0v

vvv

vuuv ,

,proj

)0,4,2()0,2,1(510

vvv

vuuvproj

Section 5-2

Ming-Feng Yeh Chapter 5 5-33

Remark of Example 10Remark of Example 10 In Example 10, u = (6, 2, 4), v = (1, 2, 0), and

projvu = (2, 4, 0).u – projvu = (6, 2, 4) – (2, 4, 0) = (4, –2, 4) is orthogonal to v = (1, 2, 0).

If u and v are nonzero vectors in an inner product space, then u – projvu is orthogonal to v.

u

v

projvu

d(u, projvu)

Section 5-2

Ming-Feng Yeh Chapter 5 5-34

Theorem 5.9Theorem 5.9

Orthogonal Projection and Distance Let u and v be vectors in an inner product space V,

such that Then.0v

vv

vuvuuu v ,

,),,(),( ccdprojd

u

v projvu

d(u, cv)d(u, projvu)

Section 5-2

Ming-Feng Yeh Chapter 5 5-35

5.3 5.3 Orthogonal BasesOrthogonal Bases The standard basis for R3: B = {(1, 0, 0), (0, 1, 0), (0, 0,

1)}1. The three vectors are mutually orthogonal.2. Each vector in the basis is a unit vector.

Definition: Orthogonal & Orthonormal SetsA set S of vectors in an inner product space V is called orthogonal if every pair of vectors in S is orthogonal. If, in addition, each vector in the set is a unit vector, then S is called orthonomal.

Ming-Feng Yeh Chapter 5 5-36

Orthonormal BasisOrthonormal Basis For S = {v1, v2, …, vn},

Orthogonal Orthonormal1. <vi, vj> = 0, i j 1. <vi, vj> = 0, i j 2.If S is a basis, then it is called an orthogonal basis or anorthonormal basis.

The standard basis for Rn is orthomormal, but it is not the only orthonormal basis for Rn. For example,

is a nonstandard orthonormal basis for R3.

nii ,...,2,1,1 v

)}1,0,0(),0,cos,sin(),0,sin,{(cos B

Section 5-3

Ming-Feng Yeh Chapter 5 5-37

Examples 1 & 2Examples 1 & 2 Example 1: Show that the following set

is an orthonormal basis for R3.Sol: 1. 2. Therefore S is an orthonormal set.

Example 2: In P3, with inner product<p, q> = a0b0 + a1b1 + a2b2 + a3b3, the standard basis B = {1, x, x2, x3} is orthonormal

31

32

32

322

62

62

21

21

321 ,,,,,,0,,},,{ vvvS

0,0,0 323121 vvvvvv1321 vvv

Section 5-3

Ming-Feng Yeh Chapter 5 5-38

Theorem 5.10Theorem 5.10

Orthogonal Sets Are Linearly IndependentIf S = {v1, v2, …, vn} is an orthogonal set of nonzero vectors in

an inner product space V, then S is linearly independent.

pf: Because S is orthogonal, <vi, vj> = 0, i j.<( c1v1+ c2v2 + … + cnvn), vi>

= c1<v1, vi>+ c2<v2, vi>+ …+ ci<vi, vi>+…+ cn<vn, vi>= ci <vi, vi> = 0

Hence every ci must be zero and the set must be linearly independent.

0,0,2 iiii cvvv

Section 5-3

Ming-Feng Yeh Chapter 5 5-39

Corollary 5.10 & Example 4Corollary 5.10 & Example 4 Corollary 5.10If V is an inner product space of dimension n, then any

orthogonal set of n nonzero vectors is a basis for V. Example 4: Show that the following set is a basis for R4.

Sol: Because

Thus S is orthogonal.

)}1,1,2,1(),1,2,0,1(),1,0,0,1(),2,2,3,2{( S

0

0,0

0,0,0

43

4232

413121

vv

vvvv

vvvvvv

Section 5-3

Ming-Feng Yeh Chapter 5 5-40

Theorem 5.11Theorem 5.11

Coordinates Relative to an Orthonormal BasisIf B = {v1, v2, …, vn} is an orthonormal basis for an inner

product space V, then the coordinate representation of a vector w with respect to B is

w = <w, v1>v1 + <w, v2>v2 + … + <w, vn>vn pf: Because B is a basis for V, then there exists unique scalars c1, c2, …, cn, such that w = c1v1 + c2v2 + … + cnvn.

Taking the inner product of the both sides of this equation,<w, vi> = <(c1v1 + c2v2 + … + cnvn), vi> = c1<v1, vi> + c2<v2, vi> + … + cn<vn, vi> = ci<vi, vi>Because <vi, vi> = 1, <w, vi> = ci.

Section 5-3

Ming-Feng Yeh Chapter 5 5-41

Coordinate Matrix & Example 5Coordinate Matrix & Example 5 The coordinates representation of w relative to the

orthonormal basis B = {v1, v2, …, vn} is w = <w, v1>v1 + <w, v2>v2 + … + <w, vn>vn The corresponding coordinate matrix of w relative to B is

Example 5: Find the coordinates of w = (5, –5, 2) relative to

Sol: Because B is orthonormal,

Thus

TnT

nB ccc vwvwvww ,,, 2121

)1,0,0(),0,,(),0,,( 53

54

54

53 B

2,7,1 321 vwvwvw TB 271][ w

Section 5-3

Ming-Feng Yeh Chapter 5 5-42

Gram-SchmidtGram-Schmidt Orthonormal Process Orthonormal Process #1#1 Let B = {v1, v2, …, vn} be a basis for an inner product

space V. Let is given by

Then is an orthogonal basis for V.

}...,,,{ 21 nB www

111

112

22

21

11

1

222

231

11

1333

111

1222

11

,

,

,

,

,

,

,

,

,

,,

,

nnn

nnnnnn w

ww

wvw

ww

wvw

ww

wvvw

www

wvw

ww

wvvw

www

wvvw

vw

B

Section 5-3

Ming-Feng Yeh Chapter 5 5-43

Gram-SchmidtGram-Schmidt Orthonormal Process Orthonormal Process #2#2 Let . Then the set

is an orthonormal basis for V. Moreover,span{v1, v2, …, vk} = span{u1, u2, …, uk} for k = 1,2,…,n.

Let {v1, v2} be a basis for R2.

{w1, w2} is an orthogonal basis.

is an orthonormal basis

iii wwu }...,,,{ 21 nB uuu

111

122

222

11

,

,1

www

wvv

vvwvw

v

proj

2

2

1

121 ,,

w

w

w

wuu

11 wv 2v

2w

21vvproj

Section 5-3

Ming-Feng Yeh Chapter 5 5-44

Example 6Example 6Apply the Gram-Schmidt orthogonormal process to the

following basis for R2: B = {(1, 1), (0, 1)}.

Sol:

2

22

2

2

22

21

21

21

111

1222

22

22

1

11

11

,

,)1,1()1,0(

,

)1,1(

w

wu

www

wvvw

w

wu

vw

)1,0()1,1(

22

22 , 2

222 ,

Section 5-3

Ming-Feng Yeh Chapter 5 5-45

Example 7Example 7Apply the Gram-Schmidt orthogonormal process to the

following basis for R3: B = {(1, 1, 0), (1, 2, 0), (0, 1, 2)}.

Sol:

1,0,0)2,0,0(

21

210,,

0,,)0,1,1()0,1,1(

0,,

)0,1,1(

333

2121

3222

231

11

1333

22

22

222

21

21

23

111

1222

22

22

111

11

wwu

wwvwww

wvw

ww

wvvw

wwu

www

wvvw

wwu

vw

Section 5-3

Ming-Feng Yeh Chapter 5 5-46

Example 8Example 8The vectors v1 = (0, 1, 0) and v2 = (1, 1, 1) span a plane in R3.

Find an orthonormal basis for this subspace.

Sol:

x

y

z

(0, 1, 0)

(1, 1, 1))1,0,1(2

1

2

222

222

11

111

1222

111

11

,0,

1,0,1)0,1,0()1,1,1(

0,1,0)0,1,0(

wwu

www

wvvw

wwuvw

Section 5-3

Ming-Feng Yeh Chapter 5 5-47

Example 10Example 10Find an orthonormal basis for the solution space of the

following homogeneous system of linear equations

Sol:

Let x3 = s and x4 = t,

0622

07

4321

421

xxxx

xxx

08210

01201

06212

07011

1

0

8

1

0

1

2

2

4

3

2

1

ts

x

x

x

x

Section 5-3

Ming-Feng Yeh Chapter 5 5-48

Example 10 (cont.)Example 10 (cont.)One basis for solution space is

Apply the Gram-Schmidt orthonormalization process process to the basis B:

)}1,0,8,1(),0,1,2,2{(},{ 21 vvB

Section 5-3

),,,(

)1,2,4,3(

0,,,)1,0,8,1(

)0,1,2,2(

)0,1,2,2(

301

302

304

303

222

31

32

32

918

111

1222

111

11

wwu

www

wvvw

wwu

vw