You are on page 1of 19

Matrices and Basic Calculus

for Non-Majors – MT161

Idrissa S. A.
Amour.Idrissa@udsm.ac.tz

Dot Product
Department of Mathematics - UDSM
November 10, 2022
Dot Product
The dot Product of Two Vectors #» a = (a1 , a2 , a3 ) and

b = (b1 , b2 , b3 ) is the scalar
#» #»
a ⋅ b = a1 b1 + a2 b2 + a3 b3
#» #» #» #» #» #» #»
Example: if #» a = 2 i + j − 4 k and b = −3 i + 5 j + 2 k ,
then
#» #»
a ⋅ b = 2(−3) + 1(5) + (−4)(2) = −9

Dot product of the basis vectors: i = (1, 0, 0),
#» #»
j = (0, 1, 0) and k = (0, 0, 1), then
#» #» #» #» #» #» #» #»
i ⋅ j = j ⋅ i = 0, i ⋅ k = k ⋅ i = 0
#» #» #» #» #» #» #» #» #» #»
j ⋅ k = k ⋅ j = 0, i ⋅ i = j ⋅ j = k . k = 1
ISA MT161 – 2022/2023 2 / 19
Properties of dot product
#» #» #» #» #»
1 a ⋅ b = 0 ⇐⇒ #» a = 0 or b = 0
#» #» #»
2 a ⋅ b = b . #» a commutative law
#» #» #» #» #» #» #»
3 a ⋅(b + c ) = a.b + b.a distributive law
#» #» #» #»
4 a ⋅ (k b ) = k( a ⋅ b ) k is a scalar
5

a ⋅ #»
a ≥0
6

a . a = ∣∣ #»
#» a ∣∣2

Proof: Let #» a = (a , a , a ) and b = (b , b , b )
1 2 3 1 2 3

#» #» #»
a ⋅ b = a1 b1 + a2 b2 + a3 b3 = b1 a1 + b2 a2 + b3 a3 = b ⋅ #»
a

a ⋅ #»
a = a1 a1 + a2 a2 + a3 a3 = a12 + a22 + a32 = ∣∣ #»
a ∣∣2

ISA MT161 – 2022/2023 3 / 19


Properties of dot product

One can define norm in terms of the dot product

∣∣ #»
a ∣∣ = #»
a ⋅ #»

a

Alternative definition: Dot product can also be


defined in terms of norms and angle θ between vectors
satisfying 0 ≤ θ ≤ π:
#» #» #»
a ⋅ b = ∣∣ #»
a ∣∣∣∣ b ∣∣ cos θ

where θ is the angle between vectors #»
a and b .

ISA MT161 – 2022/2023 4 / 19


Properties of dot product
Proof: Suppose θ is the angle between vectors
#» #» #» #» #» #» #» #»
a = a1 i + a2 j + a3 k and b = b1 i + b2 j + b3 k , then
the vector
#» #» #» #» #»
c = b − #»a = (b1 − a1 ) i + (b2 − a2 ) j + (b3 − a3 ) k

is the third side of a triangle enclosing #» a and b
Using cosine law, we have
#» #»
∣∣ #»
c ∣∣2 = ∣∣ b ∣∣2 + ∣∣ #»
a ∣∣2 − 2∣∣ #»
a ∣∣∣∣ b ∣∣ cos θ

#» 1 #»
Ô⇒ ∣∣ #»
a ∣∣∣∣ b ∣∣ cos θ = (∣∣ b ∣∣2 + ∣∣ #»
a ∣∣2 − ∣∣ #»
c ∣∣2 ) (1)
2
ISA MT161 – 2022/2023 5 / 19
Using

∣∣ #»
a ∣∣2 = a12 + a22 + a32 , ∣∣ b ∣∣2 = b12 + b22 + b32

and

∣∣ #»
c ∣∣2 = ∣∣ b − #»
a ∣∣2 = (b1 − a1 )2 + (b2 − a2 )2 + (b3 − a3 )2

substitute in 1, we have
#» #»
∣∣ #»
a ∣∣∣∣ b ∣∣ cos θ = a1 b1 + a2 b2 + a3 b3 = #»
a⋅b

What can you say on orientation of vectors #»
a and b if
#» #» #» #»
a ⋅ b > 0, #»
a ⋅ b = 0, #»
a ⋅ b < 0?

ISA MT161 – 2022/2023 6 / 19


Orthogonal Vectors

Theorem: Two vectors #» a and b are said to be

Orthogonal if and only if #»
a ⋅ b = 0.

#» #» #»
Example: Show that the vectors #»u = −3 i − j + 4 k
#» #» #»
and #»
v = 2 i + 14 j + 5 k are Orthogonal.

u ⋅ #»
v = (−3)(2) + (−1)(14) + (4)(5) = 0
hence, the vectors are #»
u and #»
v are Orthogonal.
#» #» #»
The basis vectors i , j and k constitutes Orthogonal
unit vectors.
ISA MT161 – 2022/2023 7 / 19
Angle between two Vectors
Angle between two Vectors:
#» #»
a⋅b
cos θ = #» #»
∣∣ a ∣∣∣∣ b ∣∣
#» #» #»
Example: Find the angle between u#»1 = 2 i + 3 j + k
#» #» #»
and u#»2 = − i + 5√j +k
We have ∣∣u1 ∣∣ = 14, ∣∣u#»2 ∣∣ = 27 and u#»1 ⋅ u#»2 = 14, then
#» √

14 42
cos θ = √ √ =
14 27 9

42
Ô⇒ θ = cos−1 ( ) = 43.9o
9
ISA MT161 – 2022/2023 8 / 19
Direction Angles
The angles α, β, and γ between #» a and the unit vectors
#» #» #»
i , j , and k , respectively, are direction angles of #»
a

#» #» #» #» #» #»
a⋅ i a⋅ j a⋅k
cos α = #» , cos β = #» , cos γ = #»
∣∣ a ∣∣ ∣∣ a ∣∣ ∣∣ a ∣∣
ISA MT161 – 2022/2023 9 / 19
Direction Cosines
a1 a2 a3
Ô⇒ cos α = #» , cos β = #» , cos γ = #»
∣∣ a ∣∣ ∣∣ a ∣∣ ∣∣ a ∣∣
cos α, cos β and cos γ are the direction cosines of #»a.
1 #»
The Components of unit vector #» a : ∣∣ a ∣∣

1 #» a1 #» a2 #» a3 #»
#» a = #» i + #» j + #» k
∣∣ a ∣∣ ∣∣ a ∣∣ ∣∣ a ∣∣ ∣∣ a ∣∣
#» #» #»
= cos α i + cos β j + cos γ k
Since

∣∣ #» #»
1
a ∣∣ = 1 Ô⇒ cos2 α + cos2 β + cos2 γ = 1
∣∣ a ∣∣
ISA MT161 – 2022/2023 10 / 19
Direction Cosines
Example: Find the direction cosines and direction
#» #» #»
angles of the√vector #»
a =2i √ + 5 j + 4√k .
From ∣∣ #»
a ∣∣ = 22 + 52 + 42 = 45 = 3 5, dir. cosines:
2 5 4
cos α = √ , cos β = √ , cos γ = √
3 5 3 5 3 5
direction angles are then
2
α = cos−1 ( √ ) = 1.27 radians = 72.7o
3 5
5
β = cos−1 ( √ ) = 0.73 radians = 41.8o
3 5
4
γ = cos−1 ( √ ) = 0.93 radians = 53.4o
3 5
ISA MT161 – 2022/2023 11 / 19
#» #»
Component of a on b
#» #» #»
if #»
a = a1 i + a2 j + a3 k , the distributive law and the
dot properties of basis vectors gives
#» #» #»
a1 = #»
a ⋅ i , a2 = #»
a ⋅ j , a3 = #»
a⋅k

symbolically
#» #» #»
comp #»i #»
a = #»
a ⋅ i , comp #»j #»
a = #»
a ⋅ j , comp #»
k

a = #»
a ⋅ k

Component on arbitrary vector b for 0 ≤ θ ≤ π2 :

ISA MT161 – 2022/2023 12 / 19


#» #»
Component of a on b
In both cases
comp #»b #»
a = ∣∣ #»
a ∣∣ cos θ
rewriting using dot product, we have
#» #»
#» ∣∣ #»
a ∣∣∣∣ b ∣∣ cos θ #»
a⋅b
comp #»b a = #» = #»
∣∣ b ∣∣ ∣∣ b ∣∣
alternative expression
1 #»
comp #»b #»
a = #»
a ⋅ ( #» b )
∣∣ b ∣∣

Generalization: Component of #» a on b , is a dot

product of #»
a and a unit vector in the direction of b .
ISA MT161 – 2022/2023 13 / 19
#» #»
Component of a on b
#» #» #» #» #» #» #»
Example: If #» a = 2 i + 3 j − 4 k and b = i + j + 2 k .

Find comp #»b #»
a and comp #»a b .

Determine unit vector in direction of b is:
#» √ 1 #» 1 #» #» #»
∣∣ b ∣∣ = 6, #» b = √ ( i + j + 2 k )
∣∣ b ∣∣ 6
#» #» #» 1 #» #» #»
comp #»b #»
3
a = (2 i + 3 j − 4 k ) ⋅ √ ( i + j + 2 k ) = − √
6 6
similarly,
#» #» #» #» 1 #» #» #» 3
comp #»a b = ( i + j + 2 k )⋅ √ (2 i + 3 j − 4 k ) = − √
29 29
ISA MT161 – 2022/2023 14 / 19
Projection of #»
a onto basis vectors

#» #» #»
Projection of #» a in any directions i , j , k is a vector in
that direction whose magnitude is the component of #» a
in that direction, e.g.
#» #»
proj #»i #»
a = (comp #»i #»
a ) i , proj #»j #»
a = (comp #»j #»
a)j

ISA MT161 – 2022/2023 15 / 19


#» #»
Projection of a onto b

#» #»
#» #» 1 #» a ⋅ b #»
proj #»b a = (comp #»b a ) ( #» b ) = ( #» #» ) b
∣∣ b ∣∣ b⋅b

ISA MT161 – 2022/2023 16 / 19


#» #»
Projection of a onto b
#» #» #»
Example: Find the projection of #»
a = i − j + 3 k onto
#» #» #» #»
b = 2 i + j − 4k
Computing the dot products:
#» #» #» #»
a ⋅ b = 2 − 1 − 12 = −11, b ⋅ b = 4 + 1 + 16 = 21

thus
#» #»
#» a ⋅ b #» 11 #» #» #»
proj #»b a = ( #» #» ) b = − (2 i + j − 4 k )
b⋅b 21
22 #» 11 #» 44 #»
=− i − j + k
21 21 21

ISA MT161 – 2022/2023 17 / 19


Application of dot product

Suppose a force of magnitude ∣∣ F ∣∣ is pulling a box a

horizontal distance ∣∣ d ∣∣

#» #» #» #» #» #»
Work done = (comp d#» F ) ∣∣ d ∣∣ = ∣∣ F ∣∣ cos θ∣∣ d ∣∣ = F . d
ISA MT161 – 2022/2023 18 / 19
Application of dot product

Example: Find the work done by a constant force


#» #» #»
F = 2 i + 4 j if its point of application to a block
moves from P1 (1, 1) to P2 (4, 6). (Assume SI units)


The displacement d of the block is given by
#» # » # » # » #» #»
d = P1 P2 = OP2 − OP1 = 3 i + 5 j
#» #» #» #»
W = (2 i + 4 j ).(3 i + 5 j ) = 26 Joules

ISA MT161 – 2022/2023 19 / 19

You might also like