0% found this document useful (0 votes)
15 views25 pages

Lab 2 Dot Product Cross Product

Uploaded by

Amira Yassin
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)
15 views25 pages

Lab 2 Dot Product Cross Product

Uploaded by

Amira Yassin
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/ 25

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/373999608

Lab_2 Vectors. Dot product. Cross product

Presentation · September 2023

CITATIONS READS

0 149

1 author:

Eugene Marchuk
Innopolis University
48 PUBLICATIONS 51 CITATIONS

SEE PROFILE

All content following this page was uploaded by Eugene Marchuk on 21 September 2023.

The user has requested enhancement of the downloaded file.


ateneo
Analytic Geometry And Linear Algebra
AGLA – I

Dot product
Cross product
Scalar triple product

Teacher Assistant: Eugene Marchuk

September 21, 2023


Dot Product
Example. √
Find |a|2 −2 3a·b−7|b|2 given that |a| = 4, |b| = 1, ∠(a, b) = 150◦ .

Solution.
The dot product operation is:
a · b = |a| · |b| cos α
Then:
√ √
|a|2 − 2 3a · b − 7|b|2 = |4|2 − 2 3 · |4| · |1| · cos 150◦ − 7 · |1|2

2
√ 2
√ 3
|a| − 2 3a · b − 7|b| = 16 − 2 3 · 4 · 1 · (− )−7
√ 2
|a|2 − 2 3a · b − 7|b|2 = 21
q.e.d.
2 of 24
Dot Product
Example.    
1 −5
Find the angle between a= 1 and b= 1 .
  
1 −1
Solution.
a·b
α = cos−1
|a| · |b|
Then:
a · b = (1 · (−5) + 1 · 1 + 1 · (−1)) = −5
p  q 
|a| · |b| = 2 2
1 +1 +1 · 2 2 2 2
(−5) + 1 + (−1) = 9
 
−1 −5
α = cos
9
q.e.d. 3 of 24
Dot Product
Example.
All three vectors a, b and c have length of 3 and a + b + c = 0. Find
a·b+b·c+c·a

Solution.
The idea of solution was kindly suggested by Timur Usmanov.

(a + b + c)2 = a2 + b 2 + c 2 + 2 · (ab + bc + ac)


The same expression for vector form gives us:

|a + b + c|2 = |a|2 + |b|2 + |c|2 + 2 · (a · b + b · c + a · c)

4 of 24
Dot Product
According to given conditions:
|a| = |b| = |c| = 3, a+b+c=0
After substitution we have:
|0|2 = |3|2 + |3|2 + |3|2 + 2 · (a · b + b · c + a · c)
Then:
|3|2 + |3|2 + |3|2
a·b+b·c+a·c=−
2
27
a·b+b·c+a·c=−
2

q.e.d.

Thanks to Timur Usmanov for the idea how to solve a problem.5 of 24


Dot Product
Example.    
1 5
There are two vectors a= −1 and b= 1. Length of c is equal to
  
1 1
1 and 
the vector is perpendicular to a. The angle between b and c is
q 
cos−1 2
27 . Find the coordinates of c. How many solutions the
task has?

Solution.  
xc
Let us denote c= yc  and write other given conditions in the sense

zc
of analytical geometry:
6 of 24
Dot Product

p
x 2 + yc2 + zc2 = 1   2 2 2
 c xc + yc + zc = 1√


 q  
−1 b·c
cos |b|·|c| = cos −1 2 2
⇒ b · c = |b| · |c| · √27
 27 
a·c=0

 
a · c = 0

 
2 2 2 2 2 2
xc + yc + zc = 1

√ xc + yc + zc = 1


5 · xc + 1 · yc + 1 · zc = 2 ⇒ 5 · xc + 1 · yc + 1 · zc = 2
 
1 · xc − 1 · yc + 1 · zc = 0 xc + zc − yc = 0
 

 
2 2 2 2 2 2
xc + yc + zc = 1

√ xc + yc√+ zc = 1

5 · xc + 1 · (xc + zc ) + 1 · zc = 2 ⇒ xc2 = ( 62 − z3c )2
 
 2
yc = xc + zc yc = (xc + zc )2 7 of 24

Dot Product
Substituting 2nd and 3rd equations into the 1st one we have:
√ √
2 zc 2 2 2zc 2
( − ) +( + ) + zc2 = 1
6 3 6 3
√ √
2 2 zc zc2 2 2 zc 4z 2
−2 + + +2·2 + c + zc2 − 1 = 0
36 6 3 9 36 √ 6 3 9
14 2 2 8
z + zc − = 0
9 c 9 9
Solving quadratic equation:

4 2
z1 = −
√7
2
z2 =
2
8 of 24
Dot Product
Then: √ √ √
2 4 2 15 2
xc1 = + =
6 21 42
√ √
2 2
xc2 = − =0
6 6
and: √ √ √
15 2 8 2 2
yc1 = − =
42 42 6
√ √
2 2
yc2 = 0 + =
2 2

q.e.d.

9 of 24
Dot Product
In many applications it is necessary to decompose a vector into the
sum of two perpendicular vector components. Perpendicular vectors
have a dot product of zero and are called orthogonal vectors.

Let us find projection of vector u onto vector v, both vectors must be


non-zero vectors.
v |v| v
projv u = |u| · cos α · ⇒ projv u = · |u| · cos α ·
|v| |v| |v|
|v| · |u| · cos α u·v
projv u = · v ⇒ projv u = ·v
|v| · |v| |v|2
10 of 24
Dot Product
Example.
Decompose the vector p = (1; 2; 3) into components parallel and per-
pendicular to the vector q = (1; −2; 2).

Solution.
Step 1. Find the projection p onto q.
p·q
projq p = ·q
|q|2
 
(1 · 1 + 2 · (−2)) + 3 · 2) 1 1 2 2
projq p = p ·q= ·q= ;− ;
| 12 + (−2)2 + 22 |2 3 3 3 3
 
1 2 2
projq p = ;− ;
3 3 3
11 of 24
Cross Product
Step 2. Find the orthogonal component.
q⊥ = p − projq p
   
1 2 2 2 8 7
q⊥ = 1 − ; 2 − (− ); 3 − = ; ;
3 3 3 3 3 3
Step 3. Write the vector as the sum of two orthogonal vectors.
   
1 2 2 2 8 7
p = projq p + q⊥ = ;− ; + ; ; = (1; 2; 3)
3 3 3 3 3 3
Step 4. Check the solution.
 1  2
3 3
− 2  ·  8  = 1 · 2 − 2 · 8 + 2 · 7 = 0
3 3 3 3 3 3 3 3
2 7
3 3
12 of 24
q.e.d.
Cross Product
We know that cross product operation is valid only for vectors in 3D
space, e.g. R3 . In the cases of finding cross product in 2D we
assume a planar problem in 3D space.
It can be understood intuitively if a pair of vectors lays in horizontal
plane in 3D space, then vertical coordinate of both vectors is equal to
zero, and direction of the resulting vector coincides with vertical axis.
     
ax bx x y z  
ay  × by  = det ax ay 0 = x · 0 − y · 0 + z · det ax ay
bx by
az bz bx by 0
   
  0 0
a ay
z · det x = 0 · (ax · by − bx · ay ) =  0 
bx by
1 ax · by − bx · ay
Therefore, if we say ”cross product is equal to area of parallelogram”
13 of 24
in planar case in 2D, we mean a short form of 3D problem.
Cross Product
Example.    2 
x x − 2x
There are two vectors on some basis a= , b= 2 .
1−x x − 2x + 1
It is needed to find x, when:
1. vectors are collinear;
2. they have the same direction.

Solution.
Two vectors are collinear if relations of their coordinates are equal, i.e.
xa ya za
= =
xb yb zb
Note: This condition is not valid if one of the components of the
vector is zero.
14 of 24
Cross Product
On the other hand, two vectors are collinear if their cross product is
equal to the null vector.

x(x 2 − 2x + 1) − (1 − x)(x 2 − 2x) = 0


x 3 − 2x 2 + x − x 2 + 2x + x 3 − 2x 2 = 0
2x 3 − 5x 2 + 3x = 0
x(2x 2 − 5x + 3) = 0
Solving the equation we obtain the roots:
3
x1 = 0, x2 = , x3 = 1
2

q.e.d.
15 of 24
Cross Product
Solution.
If the cross product of two vectors is zero then it can be said that they
are collinear.

Two vectors are in exactly the same direction if one is a positive scalar
multiple of the other.
   
0 0
For x1 = 0, a= and b= , then k = 1;
1 1
 3   3

for x2 = 23 , a= 21 and b= 14 , then k = − 21 ;
−2
   4
1 −1
for x3 = 1, a= and b= , then k = −1.
0 0
q.e.d.
16 of 24
Cross Product
Example.
Find the crossproduct
 of:  
3 2
1. vectors a=−2 and b=−5;
1 −3
   
3 −18
2. vectors a=−2 and b= 12 .
1 −6
Solution.
 
a2 · b3 − a3 · b2
a × b = a3 · b1 − a1 · b3 
a1 · b2 − a2 · b1

17 of 24
Cross Product

 
−2 · (−3) − 1 · (−5)
a × b =  1 · 2 − 3 · (−3) 
3 · (−5) − (−2) · 2
 
11
a × b =  11 
−11
q.e.d.
Solution.

a×a=0
a × b = −6 · a × a ⇒ a × b = 0
q.e.d.
18 of 24
Cross Product
Example.
Simplify the expression: (a + b) × (a − b).

Solution.

a×a=0
a × b = −b × a
Then:
(a + b) × (a − b) = a × a − a × b + b × a − b × b
(a + b) × (a − b) = −2(a × b)
also
−2(a × b) = 2(b × a)
19 of 24
q.e.d.
Scalar Triple Product
Scalar triple product is a combination of dot product and cross product:
a · (b × c)
If we assume that vectors b and c form a base of parallepiped, and
vector a is the other edge of parallepiped then its volume is equal to
a · (b × c).

The area of base of parallepiped is the area of parallelogram such


that:      
bx cx x y z
by  × cy  = det bx by bz  =
bz cz cx cy cz
     
by bz bx bz bx by
= x · det − y · det + z · det =
cy cz cx cz cx cy
20 of 24
Scalar Triple Product

     
by bz c cz b by
= x · det + y · det x + z · det x
cy cz bx bz cx cy
On the other hand, in Cartesian coordinate system unit vectors are
orthogonal and normalized, then the result of cross product can be
represented as a vector:
     
bx cx by · cz − cy · bz
by  × cy  =  cx · bz − bx · cz  = g
bz cz bx · cy − cx · by

whose norm is numerically equal to the area of parallelogram.


Therefore, S = ||g|| in some square units.

21 of 24
Scalar Triple Product
The height of parallepiped is equal to norm of projection of vector
a on vector g.
Therefore, h = ||a|| · cos (a, g) in some units.
Then the volume of parallepiped is V = S · h, V = ||g|| · ||a|| ·
cos (a, g). But this is also a dot product of vectors g and a.
       
ax gx ax by · cz − cy · bz
V = ay  · gy  = ay  ·  cx · bz − bx · cz  =
az gz az bx · cy − cx · by
= ax · (by · cz − cy · bz ) + ay · (cx · bz − bx · cz ) + az · (bx · cy − cx · by ) =
 
ax ay az
= det bx by bz 
cx cy cz
q.e.d. 22 of 24
Scalar Triple Product
Important note!
Three vectors are coplanar if a · (b × c) = 0

or the same:

 
ax ay az
det bx by bz  = 0
cx cy cz

23 of 24
References

• Gilbert Strang. Linear Algebra and Its Applications. https:


//math.mit.edu/~gs/linearalgebra/ila5/indexila5.html
• Decomposing a Vector into Components.
https://www.softschools.com/math/pre_calculus/
decomposing_a_vector_into_components/
• https://matrixcalc.org

24 of 24
View publication stats

You might also like