Inner Product

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

Inner product

Hoang Hai Ha

HCMUT-OISP
Email: hoanghaiha@hcmut.edu.vn

Hoang Hai Ha (HCMUT) Inner product 1 / 29


Outline

1 Real world problems

2 Real inner product space

3 Orthogonality

4 MatLab

Hoang Hai Ha (HCMUT) Inner product 2 / 29




Work done by a force F

Hoang Hai Ha (HCMUT) Inner product 3 / 29




Work done by a force F


− −
W = F .→
s = F .s. cos α

Hoang Hai Ha (HCMUT) Inner product 3 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied
1 ⟨x, y ⟩ = ⟨y , x⟩, ∀x, y ∈ V

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied
1 ⟨x, y ⟩ = ⟨y , x⟩, ∀x, y ∈ V
2 ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩, ∀x, y , z ∈ V

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied
1 ⟨x, y ⟩ = ⟨y , x⟩, ∀x, y ∈ V
2 ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩, ∀x, y , z ∈ V
3 ⟨αx, y ⟩ = α⟨x, y ⟩, ∀x, y ∈ V , ∀α ∈ R

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied
1 ⟨x, y ⟩ = ⟨y , x⟩, ∀x, y ∈ V
2 ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩, ∀x, y , z ∈ V
3 ⟨αx, y ⟩ = α⟨x, y ⟩, ∀x, y ∈ V , ∀α ∈ R
4 ⟨x, x⟩ > 0, x ̸= 0 and ⟨x, x⟩ = 0 ⇔ x = 0.

Hoang Hai Ha (HCMUT) Inner product 4 / 29


A real vector space V is called a real Euclidean inner product space if
⟨·⟩· : V × V → R
(x, y ) 7−→ ⟨x, y ⟩− which is called inner product of 2
vectors.
The following 4 axioms are satisfied
1 ⟨x, y ⟩ = ⟨y , x⟩, ∀x, y ∈ V
2 ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩, ∀x, y , z ∈ V
3 ⟨αx, y ⟩ = α⟨x, y ⟩, ∀x, y ∈ V , ∀α ∈ R
4 ⟨x, x⟩ > 0, x ̸= 0 and ⟨x, x⟩ = 0 ⇔ x = 0.

Example 2.1
On Rn , dot product is standard inner product
n
xi yi = x.y T
P
(x, y ) 7−→ ⟨x, y ⟩ =
i=1
where x = (x1 , x2 , . . . , xn ), y = (y1 , y2 , . . . , yn ).

Hoang Hai Ha (HCMUT) Inner product 4 / 29


Example 2.2
On R2 we define the mapping (x, y ) → ⟨x, y ⟩ ∈ R as below:

(x, y ) 7−→ ⟨x, y ⟩ = x1 y1 + 2x2 y2 + x1 y2 + x2 y1

where x = (x1 , x2 ), y = (y1 , y2 ).


Explain why this mapping is an inner product?
Find ⟨x, y ⟩ where x = (1, 1), y = (2, −1).

Hoang Hai Ha (HCMUT) Inner product 5 / 29


Example 2.2
On R2 we define the mapping (x, y ) → ⟨x, y ⟩ ∈ R as below:

(x, y ) 7−→ ⟨x, y ⟩ = x1 y1 + 2x2 y2 + x1 y2 + x2 y1

where x = (x1 , x2 ), y = (y1 , y2 ).


Explain why this mapping is an inner product?
Find ⟨x, y ⟩ where x = (1, 1), y = (2, −1).

⟨y , x⟩ = y1 x1 + 2y2 x2 + y1 x2 + y2 x1 = ⟨x, y ⟩.

Hoang Hai Ha (HCMUT) Inner product 5 / 29


Example 2.2
On R2 we define the mapping (x, y ) → ⟨x, y ⟩ ∈ R as below:

(x, y ) 7−→ ⟨x, y ⟩ = x1 y1 + 2x2 y2 + x1 y2 + x2 y1

where x = (x1 , x2 ), y = (y1 , y2 ).


Explain why this mapping is an inner product?
Find ⟨x, y ⟩ where x = (1, 1), y = (2, −1).

⟨y , x⟩ = y1 x1 + 2y2 x2 + y1 x2 + y2 x1 = ⟨x, y ⟩.
For z = (z1 , z2 ), we see that ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩.

Hoang Hai Ha (HCMUT) Inner product 5 / 29


Example 2.2
On R2 we define the mapping (x, y ) → ⟨x, y ⟩ ∈ R as below:

(x, y ) 7−→ ⟨x, y ⟩ = x1 y1 + 2x2 y2 + x1 y2 + x2 y1

where x = (x1 , x2 ), y = (y1 , y2 ).


Explain why this mapping is an inner product?
Find ⟨x, y ⟩ where x = (1, 1), y = (2, −1).

⟨y , x⟩ = y1 x1 + 2y2 x2 + y1 x2 + y2 x1 = ⟨x, y ⟩.
For z = (z1 , z2 ), we see that ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩.
⟨αx, y ⟩ = α⟨x, y ⟩.

Hoang Hai Ha (HCMUT) Inner product 5 / 29


Example 2.2
On R2 we define the mapping (x, y ) → ⟨x, y ⟩ ∈ R as below:

(x, y ) 7−→ ⟨x, y ⟩ = x1 y1 + 2x2 y2 + x1 y2 + x2 y1

where x = (x1 , x2 ), y = (y1 , y2 ).


Explain why this mapping is an inner product?
Find ⟨x, y ⟩ where x = (1, 1), y = (2, −1).

⟨y , x⟩ = y1 x1 + 2y2 x2 + y1 x2 + y2 x1 = ⟨x, y ⟩.
For z = (z1 , z2 ), we see that ⟨x + y , z⟩ = ⟨x, z⟩ + ⟨y , z⟩.
⟨αx, y ⟩ = α⟨x, y ⟩.
⟨x, x⟩ = x12 + 2x22 + 2x1 x2 = (x1 + x2 )2 + x22 ≥ 0 and
⟨x, x⟩ = 0 ⇔ x = (x1 , x2 ) = (0, 0).

Hoang Hai Ha (HCMUT) Inner product 5 / 29


Length of a vector in an inner product space

Definition 2.1
If V is a real inner product space, then the length of a vector x ∈ V
is denoted by ||x|| and is defined by

p
||x|| = ⟨x, x⟩ . (1)

Hoang Hai Ha (HCMUT) Inner product 6 / 29


Length of a vector in an inner product space

Definition 2.1
If V is a real inner product space, then the length of a vector x ∈ V
is denoted by ||x|| and is defined by

p
||x|| = ⟨x, x⟩ . (1)

Definition 2.2
If V is a real inner product space, then the distance between two
vectors u, v ∈ V is denoted by d(u, v ) and is defined by

p
d(u, v ) = ||u − v || = ⟨u − v , u − v ⟩ (2)

Hoang Hai Ha (HCMUT) Inner product 6 / 29


Definition 2.3
The angle α between two vectors x, y ∈ V is defined by
⟨x, y ⟩
cos α = , (0 ⩽ α ⩽ π)
||x|| ||y ||

Hoang Hai Ha (HCMUT) Inner product 7 / 29


Definition 2.3
The angle α between two vectors x, y ∈ V is defined by
⟨x, y ⟩
cos α = , (0 ⩽ α ⩽ π)
||x|| ||y ||

Example 2.3
In R2 the inner product is given

⟨x, y ⟩ = 3x1 y1 + x1 y2 + x2 y1 + x2 y2

where x = (x1 , x2 ), y = (y1 , y2 ). Find the length of vector x = (1, 2).


Find the distance between u = (1, −1), v = (0, 2) and the angle
between them.
Answer. √
∥x∥ = 11.

Hoang Hai Ha (HCMUT) Inner product 7 / 29


Definition 2.3
The angle α between two vectors x, y ∈ V is defined by
⟨x, y ⟩
cos α = , (0 ⩽ α ⩽ π)
||x|| ||y ||

Example 2.3
In R2 the inner product is given

⟨x, y ⟩ = 3x1 y1 + x1 y2 + x2 y1 + x2 y2

where x = (x1 , x2 ), y = (y1 , y2 ). Find the length of vector x = (1, 2).


Find the distance between u = (1, −1), v = (0, 2) and the angle
between them.
Answer. √
∥x∥ = 11. √
u − v = (1, −3), d(u,
√ v ) = 6.
⟨u, v ⟩ = 0, ∥u∥ = 2, ∥v ∥ = 2.
Hoang Hai Ha (HCMUT) Inner product 7 / 29
The matrix form of an inner product

Evaluating inner product using matrix form


Every inner product in Rn can be written in the matrix form, i.e., for
every pair of vectors x = (x1 , x2 , .., xn ), y = (y1 , y2 , ..., yn ) their inner
product is:

⟨x, y ⟩ = xAy T

where A is a symmetric square matrix whose coefficients aij are


numbers standing before xi yj .

Hoang Hai Ha (HCMUT) Inner product 8 / 29


Example 2.4
In R3 the inner product is given

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

where x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ). And given


u = (1, 1, 1), v = (1, 0, 1). Determine ⟨u, v ⟩ and angle between u, v .

Hoang Hai Ha (HCMUT) Inner product 9 / 29


Example 2.4
In R3 the inner product is given

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

where x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ). And given


u = (1, 1, 1), v = (1, 0, 1). Determine ⟨u, v ⟩ and angle between u, v .

Solution.
T
Rewrite the  using the matrix form: ⟨x, y ⟩ = xAy ,
formula by
1 2 0
where A = 2 5 0.

0 0 3

Hoang Hai Ha (HCMUT) Inner product 9 / 29


Example 2.4
In R3 the inner product is given

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

where x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ). And given


u = (1, 1, 1), v = (1, 0, 1). Determine ⟨u, v ⟩ and angle between u, v .

Solution.
Rewrite the  using the matrix form: ⟨x, y ⟩= 
formula by xAy T ,
1 2 0  1
where A = 2 5 0 . Then ⟨u, v ⟩ = 1 1 1 A 0
  
0 0 3 1
Find ⟨u, v ⟩, ⟨u, ⟨v , v ⟩ by multiplying
 u⟩, 
  1 1    
1 1 1 ⟨u, u⟩ ⟨u, v ⟩ 13 6
A 1 0 =
  = .
1 0 1 ⟨v , u⟩ ⟨v , v ⟩ 6 4
1 1
Hoang Hai Ha (HCMUT) Inner product 9 / 29
Orthogonality

Hoang Hai Ha (HCMUT) Inner product 10 / 29


Orthogonality

Definition 3.1
1 Two vectors x, y ∈ V in an inner product space V is called
orthogonal ⇔ ⟨x, y ⟩ = 0. We denote it by x ⊥ y .

Hoang Hai Ha (HCMUT) Inner product 11 / 29


Orthogonality

Definition 3.1
1 Two vectors x, y ∈ V in an inner product space V is called
orthogonal ⇔ ⟨x, y ⟩ = 0. We denote it by x ⊥ y .
2 Vector x is orthogonal to the set M ⊂ V if x is orthogonal to
every vector in M. We denote it by x ⊥ M.

Hoang Hai Ha (HCMUT) Inner product 11 / 29


Example 3.1
On R2 the inner product is given

⟨x, y ⟩ = 2x1 y1 − x1 y2 − x2 y1 + x2 y2

where x = (x1 , x2 ), y = (y1 , y2 ), and let u = (1, −1), v = (2, m). Find
m such that u ⊥ v .

Hoang Hai Ha (HCMUT) Inner product 12 / 29


Example 3.1
On R2 the inner product is given

⟨x, y ⟩ = 2x1 y1 − x1 y2 − x2 y1 + x2 y2

where x = (x1 , x2 ), y = (y1 , y2 ), and let u = (1, −1), v = (2, m). Find
m such that u ⊥ v .
Ans: m = 3

Hoang Hai Ha (HCMUT) Inner product 12 / 29


Theorem 3.1
Vector x is orthogonal to a subspace F if and only if x is orthogonal
to a basis of F .

Hoang Hai Ha (HCMUT) Inner product 13 / 29


Theorem 3.1
Vector x is orthogonal to a subspace F if and only if x is orthogonal
to a basis of F .

Example 3.2
On R3 given the standard inner product and the subspace
 
x1 + 2x2 − x3 = 0
F = x = (x1 , x2 , x3 ) ∈ R3
2x1 + 3x2 + x3 = 0

Find m such that vector v = (2, 3, m) is orthogonal to F .

Hoang Hai Ha (HCMUT) Inner product 13 / 29


Theorem 3.1
Vector x is orthogonal to a subspace F if and only if x is orthogonal
to a basis of F .

Example 3.2
On R3 given the standard inner product and the subspace
 
x1 + 2x2 − x3 = 0
F = x = (x1 , x2 , x3 ) ∈ R3
2x1 + 3x2 + x3 = 0

Find m such that vector v = (2, 3, m) is orthogonal to F .

A basis of F is {e = (−5, 3, 1)}.

Hoang Hai Ha (HCMUT) Inner product 13 / 29


Theorem 3.1
Vector x is orthogonal to a subspace F if and only if x is orthogonal
to a basis of F .

Example 3.2
On R3 given the standard inner product and the subspace
 
x1 + 2x2 − x3 = 0
F = x = (x1 , x2 , x3 ) ∈ R3
2x1 + 3x2 + x3 = 0

Find m such that vector v = (2, 3, m) is orthogonal to F .

A basis of F is {e = (−5, 3, 1)}.


v ⊥ F ⇔ v ⊥ e ⇔ −10 + 9 + m = 0.

Hoang Hai Ha (HCMUT) Inner product 13 / 29


Orthogonal and Orthonormal Sets

Hoang Hai Ha (HCMUT) Inner product 14 / 29


Definition 3.2
1 A
n set of two oromore vectors in a real inner product space
x1 , x2 , . . . , xn is called orthogonal ⇔ all pairs of distinct
vectors in the set are orthogonal.

Hoang Hai Ha (HCMUT) Inner product 15 / 29


Definition 3.2
1 A
n set of two oromore vectors in a real inner product space
x1 , x2 , . . . , xn is called orthogonal ⇔ all pairs of distinct
vectors in the set are orthogonal.
2 An orthogonal set in which each vector has norm 1 is said to be
orthonormal
||xk || = 1, (k = 1, 2, . . . , n)

Hoang Hai Ha (HCMUT) Inner product 15 / 29


Definition 3.2
1 A
n set of two oromore vectors in a real inner product space
x1 , x2 , . . . , xn is called orthogonal ⇔ all pairs of distinct
vectors in the set are orthogonal.
2 An orthogonal set in which each vector has norm 1 is said to be
orthonormal
||xk || = 1, (k = 1, 2, . . . , n)

Example 3.3
On Rn
2 the standard inner
o product is given. Then the set
M = (1, −2), (2, 1) is orthogonal set.

Hoang Hai Ha (HCMUT) Inner product 15 / 29


Definition 3.2
1 A
n set of two oromore vectors in a real inner product space
x1 , x2 , . . . , xn is called orthogonal ⇔ all pairs of distinct
vectors in the set are orthogonal.
2 An orthogonal set in which each vector has norm 1 is said to be
orthonormal
||xk || = 1, (k = 1, 2, . . . , n)

Example 3.3
On Rn
2 the standard inner
o product is given. Then the set
M = (1, −2), (2, 1) is orthogonal set.
   
1 2 2 1
N= √ , −√ , √ , √ is the orthonormal set.
5 5 5 5

Hoang Hai Ha (HCMUT) Inner product 15 / 29


Orthogonal Complements

Definition 3.3
If F is a subspace of a real inner product space V , then the set F ⊥ of
all vectors in V that are orthogonal to F is called the orthogonal
complement of F .

Hoang Hai Ha (HCMUT) Inner product 16 / 29


Orthogonal Complements

Definition 3.3
If F is a subspace of a real inner product space V , then the set F ⊥ of
all vectors in V that are orthogonal to F is called the orthogonal
complement of F .

Theorem 3.2
Let F be a subspace of a real inner product space V , then F ⊥ is a
subspace of V , and:

dimF + dimF ⊥ = dimV

Hoang Hai Ha (HCMUT) Inner product 16 / 29


Finding F ⊥ of a subspace F

1 Find a basis of F . Assume that basis of F contains vectors


{e1 , e2 , .., em }
⟨e1 , y ⟩ = 0 
 

⟨e2 , y ⟩ = 0 

 

2 F = (y1 , y2 , ...yn ) .. ⇒ find the dim and a

 . 

⟨em , y ⟩ = 0
 
basis of this null space.

Hoang Hai Ha (HCMUT) Inner product 17 / 29


Example 3.4
n o
Let F = (x1 , x2 , x3 ) ∈ R3 : x1 + x2 + x3 = 0 be the subspace of R3
and given the inner product

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

Find the dim and a basis of F ⊥ .


A basis of F is {e1 = (−1, 1, 0), e2 = (−1, 0, 1)}.

Hoang Hai Ha (HCMUT) Inner product 18 / 29


Example 3.4
n o
Let F = (x1 , x2 , x3 ) ∈ R3 : x1 + x2 + x3 = 0 be the subspace of R3
and given the inner product

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

Find the dim and a basis of F ⊥ .


A basis of F is {e1 = (−1, 1, 0), e2 = (−1, 0,
1)}. 
1 2 0
The matrix in inner product formula is A = 2 5 0.
0 0 3

Hoang Hai Ha (HCMUT) Inner product 18 / 29


Example 3.4
n o
Let F = (x1 , x2 , x3 ) ∈ R3 : x1 + x2 + x3 = 0 be the subspace of R3
and given the inner product

⟨x, y ⟩ = x1 y1 + 2x1 y2 + 2x2 y1 + 5x2 y2 + 3x3 y3

Find the dim and a basis of F ⊥ .


A basis of F is {e1 = (−1, 1, 0), e2 = (−1, 0, 1)}. 
1 2 0
The matrix in inner product formula is A = 2 5 0.
0 0 3

Let y = (y1 , y2 , y3 ) ∈ F , we have
⟨e1 , y ⟩ = e1 Ay T = 0, ⟨e2 , y ⟩ = e2 Ay T = 0.  
 y
3 0  1
  
−1 1 0 T 1
⇒ Ay = 0 ⇒ y2 = 0. Thus,
−1 0 1 −1 −2 3
y3
⊥ ⊥
dim F = 1, a basis of F is {(9, −3, 1)}.
Hoang Hai Ha (HCMUT) Inner product 18 / 29
Example 3.5
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = span {(1, 2, 1), (2, −1, 4), (1, −3, 3), (5, 0, 9)}.
Find the dim of F ⊥ and one its basis.
Solution.
A basis of F is E = {e1 = (1, 2, 1), e2 = (2, −1, 4)}.
Similarly to the previous
 example,
 we find
  4 0 0
1 2 1 
B= 0 5 −1, then F ⊥ ≡ null(B).
2 −1 4
0 −1 4

Hoang Hai Ha (HCMUT) Inner product 19 / 29


Orthogonal Projections

Hoang Hai Ha (HCMUT) Inner product 20 / 29


Theorem 3.3
If F is a finite-dimensional subspace of an inner product space V ,
then every vector x in V can be expressed in exactly one way as

x = y + z,

where y ∈ F , z ∈ F ⊥ .

Hoang Hai Ha (HCMUT) Inner product 21 / 29


Theorem 3.3
If F is a finite-dimensional subspace of an inner product space V ,
then every vector x in V can be expressed in exactly one way as

x = y + z,

where y ∈ F , z ∈ F ⊥ .

Definition 3.4
Vector y is called the orthogonal projection of x on F . We denote it
by y = prF x.

Hoang Hai Ha (HCMUT) Inner product 21 / 29


Find y = prF x

1 Find a basis of F , let it be S = {e1 , e2 , ..., em }.

Hoang Hai Ha (HCMUT) Inner product 22 / 29


Find y = prF x

1 Find a basis of F , let it be S = {e1 , e2 , ..., em }.


2 Since y ∈ F ⇒ y = λ1 e1 + λ2 e2 + ... + λm em

Hoang Hai Ha (HCMUT) Inner product 22 / 29


Find y = prF x

1 Find a basis of F , let it be S = {e1 , e2 , ..., em }.


2 Since y ∈ F ⇒ y = λ1 e1 + λ2 e2 + ... + λm em
3 x = y + z, then

x = λ1 e1 + λ2 e2 + ... + λm em + z

Hoang Hai Ha (HCMUT) Inner product 22 / 29


Find y = prF x

1 Find a basis of F , let it be S = {e1 , e2 , ..., em }.


2 Since y ∈ F ⇒ y = λ1 e1 + λ2 e2 + ... + λm em
3 x = y + z, then

x = λ1 e1 + λ2 e2 + ... + λm em + z




 ⟨x, e1 ⟩ = ⟨e1 , e1 ⟩λ1 + ⟨e2 , e1 ⟩λ2 + ... + ⟨em , e1 ⟩λm
⟨x, e2 ⟩ = ⟨e1 , e2 ⟩λ1 + ⟨e2 , e2 ⟩λ2 + ... + ⟨em , e2 ⟩λm

⇔ .

..


⟨x, e ⟩ = ⟨e , e ⟩λ + ⟨e , e ⟩λ + ... + ⟨e , e ⟩λ .
m 1 m 1 2 m 2 m m m

Hoang Hai Ha (HCMUT) Inner product 22 / 29


Definition 3.5
The distance between a vector x and the subspace F is defined by

d(x, F ) = ||x − projF x||. (3)

Hoang Hai Ha (HCMUT) Inner product 23 / 29


Example 3.6
On R3 given
n the dot product, o the subspace
F = span (1, 1, 1), (0, 1, 1) and the vector x = (1, 1, 2) are given.
Find the orthogonal projection prF x of x on F .
Solution.
Let y ∈ F be the projection vector, then
y = α1 (1, 1, 1) + α2 (0, 1, 1). Denote e1 = (1, 1, 1), e2 = (0, 1, 1).

Hoang Hai Ha (HCMUT) Inner product 24 / 29


Example 3.6
On R3 given
n the dot product, o the subspace
F = span (1, 1, 1), (0, 1, 1) and the vector x = (1, 1, 2) are given.
Find the orthogonal projection prF x of x on F .
Solution.
Let y ∈ F be the projection vector, then
y = α1 (1, 1, 1) + α2 (0, 1, 1). Denote e1 = (1, 1, 1), e2 = (0, 1, 1).
We solve the system
(
⟨x, e1 ⟩ = ⟨e1 , e1 ⟩α1 + ⟨e1 , e2 ⟩α2
⟨x, e2 ⟩ = ⟨e1 , e2 ⟩α1 + ⟨e2 , e2 ⟩α2
(
4 = 3α1 + 2α2
→ → Solve α1 , α2 → y .
3 = 2α1 + 2α2

Hoang Hai Ha (HCMUT) Inner product 24 / 29


Example 3.7
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = {(x1 , x2 , x3 ) : −x1 + x2 + 2x3 = 0}. Find the


orthogonal projection of the vector x = (2, 1, 5) onto F .

Hoang Hai Ha (HCMUT) Inner product 25 / 29


Example 3.7
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = {(x1 , x2 , x3 ) : −x1 + x2 + 2x3 = 0}. Find the


orthogonal projection of the vector x = (2, 1, 5) onto F .

A basis of F is {e1 = (1, 1, 0), e2 = (2, 0, 1)}.

Hoang Hai Ha (HCMUT) Inner product 25 / 29


Example 3.7
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = {(x1 , x2 , x3 ) : −x1 + x2 + 2x3 = 0}. Find the


orthogonal projection of the vector x = (2, 1, 5) onto F .

A basis of F is {e1 = (1, 1, 0), e2 = (2, 0, 1)}.


 
4 0 0
The matrix in inner product formula is A = 0 5 −1.
0 −1 4

Hoang Hai Ha (HCMUT) Inner product 25 / 29


Example 3.7
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = {(x1 , x2 , x3 ) : −x1 + x2 + 2x3 = 0}. Find the


orthogonal projection of the vector x = (2, 1, 5) onto F .

A basis of F is {e1 = (1, 1, 0), e2 = (2, 0, 1)}.


 
4 0 0
The matrix in inner product formula is A = 0 5 −1.
0 −1 4
     
2 1 5 1 2 8 35
Evaluate: 1 1 0 A 1 0 = 9 7 .
2 0 1 0 1 7 20

Hoang Hai Ha (HCMUT) Inner product 25 / 29


Example 3.7
In R3 given the inner product x = (x1 , x2 , x3 ), y = (y1 , y2 , y3 ) as:

⟨x, y ⟩ = 4x1 y1 + 5x2 y2 − x2 y3 − x3 y2 + 4x3 y3 ,

and the subspace F = {(x1 , x2 , x3 ) : −x1 + x2 + 2x3 = 0}. Find the


orthogonal projection of the vector x = (2, 1, 5) onto F .

A basis of F is {e1 = (1, 1, 0), e2 = (2, 0, 1)}.


 
4 0 0
The matrix in inner product formula is A = 0 5 −1.
0 −1 4
     
2 1 5 1 2 8 35
Evaluate: 1 1 0 A 1 0 = 9 7 .
2 0 1 0 1 7 20
Then the orthogonal
( projection is y = α1 e1 + α2 e2 , we find
8 = 9α1 + 7α2
α1 , α2 from: → find y .
35 = 7α1 + 20α2
Hoang Hai Ha (HCMUT) Inner product 25 / 29
The standard inner product on Rn

1 < x, y >= dot(x, y )


2 ||x|| = norm(x)
3 d(x, y ) = norm(x − y )
4 cos α = dot(x, y )/(norm(x) ∗ norm(y ))

Hoang Hai Ha (HCMUT) Inner product 26 / 29


Orthogonal Complement

1 f1 , f2 ,
. . . , fm: basis of F . A = [f1 ; f2 ; . . . ; fm ]
f1
 f2  ⊥ ′ ′
A=  . . .  ⇒ Basis of F : null(A, r )

fm
2 If F is the solution subspace of homogeneous system AX = 0
then the basis of F ⊥ consists of all row vectors of matrix B

B = rref (A)

Hoang Hai Ha (HCMUT) Inner product 27 / 29


The standard inner product on Rn
Suppose
 the set of f1 , f2 , . . . , fm is a basis of F . 
dot(f1 , f1 ) dot(f1 , f2 ) . . . dot(f1 , fm )
 dot(f2 , f1 ) dot(f2 , f2 ) . . . dot(f2 , fm ) 
A= ,
 ... ... ... ... 
dot(fm , f1 ) dot(fm , f2 ) . . . dot(fm , fm )
 
dot(x, f1 )
 dot(x, f2 ) 
B =  , λ = (λ1 , λ2 , . . . , λm )T = inv (A) ∗ B
 ... 
dot(x, fm )

1 Projection f = λ(1) ∗ f1 + λ(2) ∗ f2 + . . . + λ(m) ∗ fm


2 Distance ||g || = ||x − f || = norm(x − f )
Hoang Hai Ha (HCMUT) Inner product 28 / 29
THANK YOU FOR YOUR ATTENTION

Hoang Hai Ha (HCMUT) Inner product 29 / 29

You might also like