0% found this document useful (0 votes)
6 views34 pages

Lecture#4

The document outlines the concepts of inner products, specifically the dot product in vector mathematics, including definitions, properties, and examples. It discusses the relationship between vectors and scalars, as well as projections in three-dimensional space. Key topics include direction angles, direction cosines, and the geometric interpretation of the dot product.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views34 pages

Lecture#4

The document outlines the concepts of inner products, specifically the dot product in vector mathematics, including definitions, properties, and examples. It discusses the relationship between vectors and scalars, as well as projections in three-dimensional space. Key topics include direction angles, direction cosines, and the geometric interpretation of the dot product.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

MATH 252 --- Calculus III

Spring 2025
Instructor: Bo-Wen Shen, Ph.D.

Lecture #4:
Section 12.3: Inner Products

[email protected]

Department of Mathematics and Statistics


San Diego State University

1
12.3 the Dot Product
(inner product; scalar product)

• Vector: (1, 2) or (1, 2, 3), magnitude and direction


• Scalar: 1, or 2, “number” (e.g., magnitude) (e.g., positive or negative)

!
a = (a1, a2 , a3 )
!
b = (b1, b2 , b3 )
! !
a ⋅ b = a1b1 + a2 b2 + a3b3

4
12.3 the Dot Product
(inner product; scalar product)

𝑎⃗ = (2, 4)
𝑏 = (3, −1)

𝑎⃗ 0 𝑏 = 6 + (−4) = 2

𝑎⃗ = (−1, 7, 4) 𝑎⃗ = (1, 2, −3) • Compute 𝑎⃗ 0 𝑏


• Raise your hand
𝑏 = (6, 2, −1/2) 𝑏 = (0, 2, −1) • You have 1 minute

𝑎⃗ 0 𝑏 = −6 + 14 + (−2) = 6 𝑎⃗ 0 𝑏 = 0 + 4 + 3 = 7

5
Scalar vs. Vector (Wikipedia)

Scalars are real numbers used in linear algebra, as opposed to vectors.


This image shows a vector, v. Its coordinates x and y are scalars, as is its
length.

7
Scalars and Vectors

8
Dot Product
! !
• Inner Product a = (a1, a2 , a3 ); b = (b1, b2 , b3 )
Ø Definition • Cross Product
! !
a ⋅ b = a1b1 + a2 b2 + a3b3
!
a = (a1, a2 , a3 ) ! ! !
! = +(...)i − (...) j + (...)k
b = (b1, b2 , b3 )
Ø Property (“Theorem”)
! !
a ⋅ b = a b cos(θ ) ! !
a × b = a b sin(θ )
• Projection è I.P.O.(d)
• Orthogonal when cos(𝜃) = 0
• Area è C.A.P.
• Parallel when sin(𝜃) = 0
10
12.3 the Dot Product: Definition and Theorem

The Law of Cosines to triangle OAB

Pythagorean Theorem To be discussed

2
a − b = ( b sin θ )2 + ( a − b cosθ )2

12
12.3 the Dot Product: Definition and Theorem

13
12.3 the Dot Product: Definition and Theorem

𝑎⃗ 0 𝑏 = 𝑎⃗ 𝑏 cos(𝜃)

𝜋
= 4 ∗ 6 ∗ cos( )
3
1
=4 ∗6∗
2
= 12

14
Properties of the Dot Product (Inner Product)

! !
a = (a1, a2 , a3 ) a = (a1, a2 , a3 )
! !
a = (a1, a2 , a3 ) b = (b1, b2 , b3 )
𝑎⃗ , 𝑎⃗ = 𝑎! 𝑎! + 𝑎" 𝑎" + 𝑎# 𝑎# ! 𝑎⃗ , 𝑏 = 𝑎!𝑏! + 𝑎"𝑏" + 𝑎#𝑏#
b = (b1, b2 , b3 )
= 𝑎!" + 𝑎"" + 𝑎#" ! 𝑎⃗ , 𝑏 = 𝑏 , 𝑎⃗
"
a = (a1, a2 , a3 )
𝑎⃗ , 𝑎⃗ = 𝑎⃗
𝑏 , 𝑎⃗ = 𝑏! 𝑎! + 𝑏" 𝑎" + 𝑏# 𝑎#
17
Properties of the Dot Product (Inner Product)

• Compute the above using special angles

𝜃 = 90! → cos 𝜃 = 0

18
Examples

orthogonal
𝑎⃗ 0 𝑏 = 𝑎⃗ 𝑏 cos(𝜃) 𝑎⃗ 0 𝑏
cos(𝜃) =
𝑎⃗ 0 𝑏 𝑎⃗ 𝑏
cos(𝜃) =
𝑎⃗ 𝑏
10 − 6 − 2 2 𝑎⃗ 0 𝑏 = 10 − 8 − 2 = 0
= =
3 38 3 38 𝜋
2 𝜃=
𝜃 = cos "# 2
3 38
19
Basis Vectors and Basis Functions SUPP
(Wikipedia)
• The following vectors are called the standard basis vectors. They
have length 1 and point in the positive direction of x-, y- and z- axes.

• A vector in 𝑅 $ can be expressed as a linear combination of the basis


vectors:
𝑎, 𝑏, 𝑐 = 𝑎 A⃗ + 𝑏 B⃗ + 𝑐 𝒌
• By comparison, every continuous function in the function space can
be represented as a linear combination of basis functions.
• The collection of quadratic polynomials with real coefficients has
{1, 𝑥, 𝑥 % } as a basis:
𝑓 𝑥 = 𝑐& + 𝑐# 𝑥 + 𝑐% 𝑥 %
• A trigonometric series is expressed as a linear combination of
trigonometric basis functions:
)
𝑛𝜋𝑥 𝑛𝜋𝑥
𝑓 𝑥 = 𝑎& + D 𝑎' cos + 𝑏' sin
𝐿 𝐿
'(#

20
Direction Angles and Direction Cosines

Ø Direction angles: the angles that a makes with the positive x-, y-, and
z-axes.
Ø A direction angle is the angle between a vector a and a basis vector.
Ø Direction cosines: the cosines of these direction angles.

𝑎⃗ = 𝑎# , 𝑎% , 𝑎$ 𝑏 = 𝚤⃗ 1, 0, 0 , 𝚥⃗ 0, 1, 0 , or 𝑘 0, 0, 1

𝑎⃗ 0 𝚤⃗ = 𝑎# 𝑎⃗ 0 𝚥⃗ = 𝑎% 𝑎⃗ 0 𝑘 = 𝑎$

21
Direction Angles and Direction Cosines

Ø 𝑎⃗ = 𝑎#% + 𝑎%% + 𝑎$% . Ø 𝑎⃗ = 14.

#
Ø cos 𝛼 =
#*
%
Ø cos 𝛽 =
#*
$
Ø cos 𝛾 =
#*

22
The Sign of the Inner Product

A. 0 ≤ 𝜃 < 90! and 𝑎⃗ 0 𝑏 > 0.


B. 𝜃 = 90! and 𝑎⃗ 0 𝑏 = 0.
C. 90! < 𝜃 ≤ 180! and 𝑎⃗ 0 𝑏 < 0.

(A) positive (C) negative

𝜃 < 90! 𝜃 > 90!


(B)

perpendicular 𝜃 = 90!
or orthogonal
24
12.3 the Dot Product
(inner product; scalar product)

• Vector: (1, 2) or (1, 2, 3), magnitude and direction


• Scalar: 1, or 2, “number” (e.g., magnitude) (e.g., positive or negative)

!
a = (a1, a2 , a3 )
!
b = (b1, b2 , b3 )
! !
a ⋅ b = a1b1 + a2 b2 + a3b3

25
Dot Product
! !
• Inner Product a = (a1, a2 , a3 ); b = (b1, b2 , b3 )
Ø Definition • Cross Product
! !
a ⋅ b = a1b1 + a2 b2 + a3b3
!
a = (a1, a2 , a3 ) ! ! !
! = +(...)i − (...) j + (...)k
b = (b1, b2 , b3 )
Ø Property (“Theorem”)
! !
a ⋅ b = a b cos(θ ) ! !
a × b = a b sin(θ )
• Projection è I.P.O.(d)
• Orthogonal when cos(𝜃) = 0
• Area è C.A.P.
• Parallel when sin(𝜃) = 0
26
Projections in 3D Coordinate Systems

Point Q is called the projection of 𝑃(𝑎, 𝑏, 𝑐) onto the xy-plane (i.e., z=0)
Q è Replace the the 3rd coordinate by 0 è 𝑄(𝑎, 𝑏, 0) xy-plane
S è Replace the the 2nd coordinate by 0 è 𝑆(𝑎, 0, 𝑐) xz-plane
R è Replace the the 1st coordinate by 0 è 𝑅(0, 𝑏, 𝑐) yz-plane

𝑄𝑃 = 𝑂𝑃 − 𝑂𝑄 = 2𝑛𝑑 − 1𝑠𝑡

= (0,0, 𝑐)
𝑃(𝑎, 𝑏, 𝑐)

𝑄𝑃 0 𝚤⃗ = 0 90!

𝑄𝑃 0 𝚥⃗ = 0 90!

90
! 𝚤⃗
90 ! ←
𝚥⃗ → 𝑄(𝑎, 𝑏, 0)
27
Projection vs. Shadow

28
Review:

1 c
sin(θ ) csin(θ )
θ θ
cos(θ ) c cos(θ )
2 2 2 2 2 2 2
1 = cos (θ ) + sin (θ ) c = c cos (θ ) + c sin (θ )
Pythagorean Theorem Pythagorean Theorem

30
Projection vs. Shadow

Ø Scalar projection of 𝑏 onto 𝑎: 𝑏 cos 𝜃

35
Projection in terms of an Inner Product
TBD

𝑂𝑃 = 𝑐 % cos % 𝜃 + 𝑐 % sin% 𝜃 = c 𝑃(𝑐 𝑐𝑜𝑠(𝜃), 𝑐 sin(𝜃))

𝑂𝑄 = c cos(𝜃) c
csin(θ )
𝑂𝑃 , 𝑂𝑄 = 𝑂𝑃 𝑂𝑄 cos(𝜃) θ
𝑂(0,0) c cos(θ ) 𝑄(𝑐 𝑐𝑜𝑠(𝜃), 0)
𝑂𝑃 𝑂𝑄 cos 𝜃 = c c cos 𝜃 cos(𝜃)
𝑂𝑃 0 𝑂𝑄 = (𝑐 𝑐𝑜𝑠(𝜃), 𝑐 sin(𝜃)) 0 𝑐 𝑐𝑜𝑠 𝜃 , 0 = 𝑐 % cos % (𝜃)

𝑂𝑃 0 𝑂𝑄 𝑂𝑃 0 𝑂𝑄
c cos 𝜃 = = projection of 𝑂𝑃 onto 𝑂𝑄
c cos 𝜃 𝑂𝑄

𝑂𝑄 𝑢 a unit vector;
c cos 𝜃 = 𝑂𝑃 0 = 𝑂𝑃 0 𝑢
𝑂𝑄 projection of 𝑂𝑃 onto 𝑂𝑄

36
Scalar Projection vs. Vector Projection

𝑎⃗ 0 𝑏 = 𝑎⃗ 𝑏 cos(𝜃)
+ -. 𝑎⃗
Ø Scalar projection of 𝑏 onto 𝑎: 𝑏 cos 𝜃 = =𝑏 0𝑢 𝑢=
+ 𝑎⃗
Ø Vector projection of 𝑏 onto 𝑎: indicating the direction
+ -. + -.
𝑏 cos 𝜃 𝑢 = 𝑢= 𝑎⃗
+ +!

𝑏 cos 𝜃 𝑏 cos 𝜃

positive scalar; “shadow” negative scalar (?)

38
Ex 6

+ -.
Ø Scalar projection of 𝑏 onto 𝑎: = 𝑏 0 𝑢 = 𝑏 cos 𝜃
+

Ø 𝑎⃗ 0 𝑏 = 𝑎⃗ 𝑏 cos 𝜃 𝑎⃗ = (−2, 3, 1)
+ -. 𝑏 = (1, 1, 2)
Ø 𝑏 cos 𝜃 =
+

$
Ø Scalar proj. 𝑏 cos 𝜃 = 𝑎⃗ 0 𝑏 = −2 + 3 + (2) = 3
#*
𝑎⃗ (−2, 3, 1)
𝑢= = 𝑎⃗ = −2 % + 3% + 1% = 14
𝑎⃗ 14
$ ("%,$,#) $ 3 $
Ø Vector proj. 𝑏 cos 𝜃 𝑢 = = (− , , )
#* #* 2 #* #*

41
Ex 7

𝐹⃗ = 70 𝐷 = 100 𝜃 = 35!

⃗ |𝐹|cos(𝜃)
Horizontal component of 𝐹: ⃗

Work = force * distance = 𝐹⃗ cos 𝜃 𝐷

=70 ∗ 100 ∗ cos(35! )

=5734 𝑗 (Joule)

𝑎⃗ 0 𝑏 = 𝑎⃗ 𝑏 cos(𝜃) 𝑎⃗ 𝑏 cos 𝜃 = 𝑎⃗ 0 𝑏

Work = 𝐹⃗ cos 𝜃 𝐷 = 𝐹⃗ 0 𝐷

42
Ex 8

Work = 𝐹⃗ cos 𝜃 𝐷 = 𝐹⃗ 0 𝐷

𝐷 = 𝑃𝑄 = 𝑂𝑄 − 𝑂𝑃 (2nd – 1st )

𝐷 = (2, 5, 2)

𝐹⃗ = (3, 4, 5)

Work = 𝐹⃗ 0 𝐷 = 6 + 20 + 10 = 36

43
12.3 the Dot Product: Definition and Theorem

The Law of Cosines to triangle OAB

Pythagorean Theorem

2
a − b = ( b sin θ )2 + ( a − b cosθ )2

45
12.3 the Dot Product: Theorem

For the triangle OPB


𝑂𝑃 = 𝑂𝐵 cos 𝜃 = 𝑏 cos(𝜃)
𝑃𝐵 = 𝑂𝐵 sin 𝜃 = 𝑏 sin(𝜃)
𝑃 For the triangle PAB

𝑃𝐴 = 𝑂𝐴 − 𝑂𝑃 = |𝑎| − 𝑏 cos(𝜃)

𝐵𝐴 = 𝑂𝐴 − 𝑂𝐵 = 𝑎⃗ − 𝑏

Pythagorean Theorem for the triangle PAB


% % %
𝐵𝐴 = 𝑃𝐵 + 𝑃𝐴

% % %
𝑎⃗ − 𝑏 = 𝑏 sin(𝜃) + |𝑎| − 𝑏 cos(𝜃)
% %
%
𝐿𝐻𝑆 = 𝑎⃗ − 𝑏 = 𝑎⃗ − 𝑏 0 𝑎⃗ − 𝑏 = 𝑎⃗ +𝑏 −2𝑎⃗ 0 𝑏
46
12.3 the Dot Product: Theorem

% % %
𝐿𝐻𝑆: 𝑎⃗ − 𝑏 = 𝑏 sin(𝜃) + |𝑎| − 𝑏 cos(𝜃) : 𝑅𝐻𝑆

% %
%
𝐿𝐻𝑆 = 𝑎⃗ − 𝑏 = 𝑎⃗ +𝑏 −2𝑎⃗ 0 𝑏

% %
% |%
𝑅𝐻𝑆 = 𝑏 sin (𝜃) + |𝑎 − 2 |𝑎| 𝑏 cos 𝜃 + 𝑏 cos % (𝜃)

%
= |𝑎 |% + 𝑏 − 2 |𝑎| 𝑏 cos 𝜃
• Use “a dot b” to represent 𝑎⃗ 0 𝑏
• Compare two boxes in green
and let LHS=RHS
−2𝑎⃗ 0 𝑏 = −2 |𝑎| 𝑏 cos 𝜃 • Remove common terms above
and report the remain terms
𝑎⃗ 0 𝑏 = |𝑎| 𝑏 cos 𝜃 • You have 1 minute

47
12.3 the Dot Product: Definition and Theorem

!
a = (a1, a2 , a3 )
!
b = (b1, b2 , b3 )
! !
a ⋅ b = a1b1 + a2 b2 + a3b3

48
Inner Product vs. Cross Product

! !
a = (a1, a2 , a3 ); b = (b1, b2 , b3 )
• Inner Product • Cross Product
! !
a ⋅ b = a1b1 + a2 b2 + a3b3
!
a = (a1, a2 , a3 ) ! ! !
! = +(...)i − (...) j + (...)k
b = (b1, b2 , b3 )

! ! ! !
a ⋅ b = a b cos(θ ) a × b = a b sin(θ )
• Projection è I.P.O.(d) • Area è C.A.P.
• Orthogonal when cos(𝜃) = 0 • Parallel when sin(𝜃) = 0
50
Inner Product vs. Cross Product

! ! ! !
a ⋅ b = a b cos(θ ) a × b = a b sin(θ )
• I.P.O.(d) • C.A.P.
• Orthogonal when cos(𝜃) = 0 • Parallel when sin(𝜃) = 0

51
Neural Network: A Simple Perceptron

input output
𝑊 = (𝑊# , 𝑊% , 𝑊$ ):
𝑌#
𝑂𝑃 = (𝑋, 𝑌, 𝑍) weights, “coefficients”

𝑊#

𝑊%

𝑊$

𝑌# = 𝑂𝑃 ⋅ 𝑊 = 𝑋, 𝑌, 𝑍 ⋅ 𝑊# , 𝑊% , 𝑊$

= 𝑊# 𝑋 + 𝑊% 𝑌 + 𝑊$ 𝑍 weighted sum

52

You might also like