Chap. 5 Inner Product Spaces: 5.1 Length and Dot Product in R
Chap. 5 Inner Product Spaces: 5.1 Length and Dot Product in R
5
Inner Product Spaces
n
5.1 Length and Dot Product in R
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
5.1 Length and Dot Product
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 v , is defined to be v v12 v22
v v1 v2 v12 v22
2 2 2
(v1, v2 )
The length or norm of a vector
v (v1 , v2 , ..., vn ) in Rn is given
v
by v v1 v2 vn
2 2 2
v2
Unit vector: v 1
Zero vector: v 0 v
1
( 2
, 2
) 1 i
2 2
Ming-Feng Yeh Chapter 5 5-3
Section 5-1
Theorem 5.2
Unit Vector in the Direction of v
If v is a nonzero vector in Rn, then the vector u v v
has length 1 and has the same direction as v. This
vector u is called the unit vector in the direction of v.
pf: 1. v is nonzero 1 v is positive and u 1v v
Therefore u has the same direction as v.
v 1
2. u v v v 1
The above process is called normalizing the vector v.
Example 2
Find 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
v
(3, 1, 2)
3 14 , 1 14 , 2 14
v 3 (1) 2
2 2 2
3 2
14
1 2
14
2 2
14
14
14
1
u v (u1 v1 ) 2 (u2 v2 ) 2
cos
2u v
(u12 u22 ) (v12 v22 ) [( v1 u1 ) 2 (v2 u2 ) 2 ] u1v1 u2v2
2u v u v
Ming-Feng Yeh Chapter 5 5-9
Section 5-1
Dot Product
The dot product of u = (u1, u2, …, un) and
v = (v1, v2, …, vn) is the scalar quantity
u v u1v1 u2v2 unvn
Theorem 5.3: Properties of Dot Product
1. u v v u
2. u ( v w ) u v u w
3. c(u v ) (cu) v u (cv )
4. v v v 0
2
5. v v 0 if and only if v = 0.
Example 5
Given u = (2, –2), v = (5, 8) and w = (– 4, 3).
1. u v 2(5) (2)(8) 6
2. (u v)w 6w (24, 18)
3. u (2 v ) 2(u v ) 12
4. w w w (4)(4) 3(3) 25
2
5. v 2w 5 (8), 8 6 (13, 2)
u ( v 2w ) (2, 2) (13, 2) 2(13) (2)(2) 22
Example 6
Given two vectors u and v in Rn such that u u 39,
u v 3, and v v 79, evaluate (u 2 v) (3u v)
Sol: (u 2 v) (3u v) u (3u v) (2 v) (3u v)
u (3u) u v (2 v) (3u) (2 v) v
3(u u) 7(u v) 2( v v)
3(39) 7(3) 2(79)
254
0 0 2 2
2
cos 1 cos 0 cos 0 cos 0 cos 1
Theorem 5.4
Cauchy-Schwarz Inequality
If u and v are vectors in Rn, then u v u v
where u v denotes the absolute value of u v
pf: If u = 0, then u v 0 v 0, u v 0 v 0.
Hence the theorem is true if u = 0.
If u 0, from u v u v cos and cos 1,
we have u v u v cos u v cos u v .
Example 7
Verify the Cauchy-Schwarz Inequality for u = (1, –1, 3) and
v = (2, 0, –1).
Sol: Because u v 1, u u 11 and v v 5 , we have
u v 1 1
u v u u v v 11 5 55
Therefore u v u v
Examples 8 & 9
Ex 8: The angle between u = (–4, 0, 2, –2) and
v = (2, 0, –1, 1) is given by
uv 12
cos 1
u v 24 6
u and v should have opposite directions, because u = –2v.
Example 10
Determine all vectors in R2 that are orthogonal to u = (4, 2).
Sol: Let v = (v1, v2) be orthogonal to u. Then
u v (4, 2) (v1, v2 ) 4v1 2v2 0
This implies that v2 2v1.
Therefore every vector that is
orthogonal to (4, 2) is of the form
v (t , 2t ) t (1, 2), t R
uv u u 2(u v ) v v
u 2(u v ) v
2 2
u 2u v v u v u v
2 2
u 2u v v uv u v
2 2
u
v
( u v ) 2 Equality occurs if and only if
u v u v the vectors u and v have the
same directions.
Ming-Feng Yeh Chapter 5 5-18
Section 5-1
u v
2 2
Proof of Theorem 2
3. If c is any scalar, then
c u, v c(u1v1 2u2v2 )
(cu1 )v1 2(cu 2 )v2
cu, v
4. Because the square of a real number is nonnegative,
v, v v12 2v22 0
Moreover, this expression is equal to zero iff v = 0.
Example 3
Show that the following function is not an inner product on R3:
u, v u1v1 2u2v2 u3v3
where u (u1 , u2 , u3 ) and v (v1 , v2 , v3 ).
pf: Let v = (1, 2, 1). Then
v, v (1)(1) 2(2)(2) (1)(1) 6 0
Axiom 4 is not satisfied.
Theorem 5.7
Properties of Inner Products
Let u, v, and w be vectors in an inner product space
V, and let c be any real number.
1. 0, v v, 0 0
2. u v, w u, w v, w
3. u, cv c u, v
Example 6
Let p( x) 1 2 x 2 , q( x) 4 2 x x 2 , and r ( x) x 2 x 2
be polynomial in P2, and determine the following.
1. p, q a0b0 a1b1 a2b2 (1)(4) (0)(2) (2)(1) 2
2. q, r (4)(0) (2)(1) (1)(2) 0
3. q q, q 42 (2)2 12 21
4. d ( p, q) p q (1 2 x 2 ) (4 2 x x 2 )
3 2 x 3x 2
(3) 2 22 (3) 2 22
Theorem 5.8
Let u and v be vectors in an inner product space V.
1. Cauchy-Schwarz Inequality: u, v u v
2. Triangle Inequality: u v u v
3. Pythagorean Theorem:
u and v are orthogonal iff u v u v
2 2 2
Orthogonal Projections: R 2
u u
projvu
v
projvu
Ming-Feng Yeh Chapter 5 5-31
Section 5-2
Remark 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 d(u, projvu)
v
projvu
Theorem 5.9
Orthogonal Projection and Distance
Let u and v be vectors in an inner product space V,
such that v 0. Then
u, v
d (u, projvu) d (u, cv), c
v, v
u
d(u, cv)
d(u, projvu)
v
Ming-Feng Yeh
projvu Chapter 5 5-34
5.3 Orthogonal 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.
Orthonormal Basis
For S = {v1, v2, …, vn},
Orthogonal Orthonormal
1. <vi, vj> = 0, i j 1. <vi, vj> = 0, i j
2. v i 1, i 1,2,..., n
If S is a basis, then it is called an orthogonal basis or an
orthonormal basis.
The standard basis for Rn is orthomormal, but it is not the
only orthonormal basis for Rn. For example,
B {(cos , sin , 0), ( sin , cos , 0), (0, 0, 1)}
is a nonstandard orthonormal basis for R3.
Examples 1 & 2
Example 1: Show that the following set
S {v1 , v 2 , v 3} 12 , 12 , 0 , 62 , 62 , 2 3 2 , 23 , 23 , 13
is an orthonormal basis for R3.
Sol: 1. v1 v 2 0, v1 v 3 0, v 2 v 3 0
2. v1 v 2 v3 1
Therefore S is an orthonormal set.
Theorem 5.10
Orthogonal Sets Are Linearly Independent
If 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
vi , vi vi 0, ci 0
2
Theorem 5.11
Coordinates Relative to an Orthonormal Basis
If 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.
Ming-Feng Yeh Chapter 5 5-40
Section 5-3
Gram-Schmidt
Orthonormal Process #1
Let B = {v1, v2, …, vn} be a basis for an inner product
space V.
Let B {w1 , w 2 , ..., w n } is given by
w1 v1
v 2 , w1
w2 v2 w1
w 1 , w1
v 3 , w1 v3 , w 2
w 3 v3 w1 w2
w1 , w1 w2, w2
v n , w1 vn , w2 v n 1 , w n 1
wn vn w1 w2 w n 1
w 1 , w1 w2, w2 w n 1 , w n 1
Then B is an orthogonal basis for V.
Ming-Feng Yeh Chapter 5 5-42
Section 5-3
Gram-Schmidt
Orthonormal Process #2
Let ui w i w i . Then the set B {u1 , u 2 , ..., u n }
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 v1
w 2 v 2 projv1 v 2 v2
v 2 , w1 w2 v1 w1
v2 w1
w1 , w1
{w1, w2} is an orthogonal basis. projv1 v 2
w1 w 2
u1, u 2 , is an orthonormal basis
w1 w 2
Ming-Feng Yeh Chapter 5 5-43
Section 5-3
Example 6
Apply the Gram-Schmidt orthogonormal process to the
following basis for R2: B = {(1, 1), (0, 1)}.
Sol: w1 v1 (1, 1)
(1,1)
u1
w1
w1
22 , 22 (0,1)
v 2 w1
w2 v2 w1
w1 w 1
(0, 1) 12 (1, 1) 21 , 12 2
2
,
2
2
2
2
, 2
2
u2
w2
w2
2 2 , 22
Example 7
Apply the Gram-Schmidt orthogonormal process to the
following basis for R3: B = {(1, 1, 0), (1, 2, 0), (0, 1, 2)}.
Sol: w1 v1 (1, 1, 0)
u1 w1 w1 22 , 22 , 0
v w
w 2 v 2 2 1 w1 (1, 1, 0) 32 (1, 1, 0) 21 , 12 , 0
w1 w1
u 2 w 2 w 2 2 2 , 22 , 0
v 3 w1 v3 w 2 12
w 3 v3 w1 w 2 v 3 2 w1
1
w2
w1 w1 w2 w2 12
(0, 0, 2)
u 3 w 3 w 3 0, 0, 1
Ming-Feng Yeh Chapter 5 5-45
Section 5-3
Example 8
The vectors v1 = (0, 1, 0) and v2 = (1, 1, 1) span a plane in R3.
Find an orthonormal basis for this subspace.
Sol: w1 v1 (0, 1, 0)
u1 w1 w1 0, 1, 0 z
1
2
(1, 0,1) (1, 1, 1)
v 2 w1
w2 v2 w1 (0, 1, 0)
w1 w1 y
(1, 1, 1) 11 (0, 1, 0)
1, 0, 1
u 2 w 2 w 2 22 , 0, 22 x
Ming-Feng Yeh Chapter 5 5-46
Section 5-3
Example 10
Find an orthonormal basis for the solution space of the
following homogeneous system of linear equations
x1 x2 7 x4 0
2 x1 x2 2 x3 6 x4 0
Sol: 1 1 0 7 0
1 0 2 1 0
2 1 2 6 0 0 1 2 8 0
Let x3 = s and x4 = t, x1 2 1
x 2 8
2 s t
x3 1 0
x4 0 1
Ming-Feng Yeh Chapter 5 5-47
Section 5-3
Example 10 (cont.)
One basis for solution space is
B {v1, v 2} {(2, 2, 1, 0), (1, 8, 0, 1)}
Apply the Gram-Schmidt orthonormalization process process
to the basis B:
w1 v1 (2, 2, 1, 0)
u1 w1 w1 (2, 2, 1, 0)
v 2 w1
w2 v2 w1 (1, 8, 0, 1) 918 32 , 23 , 13 , 0
w1 w1
(3, 4, 2, 1)
u2 w 2 w 2 ( 3
30
, 4
30
, 2
30
, 1
30
)
Ming-Feng Yeh Chapter 5 5-48