Dot Product
The dot product is one way of combining (“multiplying”) two vectors. The output is a
scalar (a number). It is called the dot product because the symbol used is a dot. Because
the dot product results in a scalar it, is also called the scalar product.
As with most things in 18.02, we have a geometric and algebraic view of dot product.
Algebraic definition (for 2D vectors):
If A = (a1 , a2 ) and B = (b1 , b2 ) then
A · B = a1 b1 + a2 b2 .
Example: (6, 5) · (1, 2) = 6 · 1 + 5 · 2 = 16.
Geometric view:
The figure below shows A, B with the angle θ between them. We get
A · B = |A||B| cos θ
L�
LL
L
L
A
LL
L
LLθ
L�
LL
L
LL
A
A−B
LL
L
L
B
LLθ
B
Showing the two views (algebraic and geometric) are the same requires the law of cosines
|A − B|2 = |A|2 + |B|2 − 2|A||B| cos θ
⇒ (a21 + a22 ) + (b21 + b22 ) − ((a1 − b1 )2 + (a2 − b2 )2 ) = 2|A||B| cos θ
⇒ a1 b1 + a2 b2 = |A||B| cos θ.
Since (a1 , a2 ) · (b1 , b2 ) = a1 b1 + a2 b2 , we have shown A · B = |A||B| cos θ.
From the algebraic definition of dot product we easily get the the following algebraic law
A · (B + C) = A · B + A · C.
Example: Find the dot product of A and B.
i) |A| = 2, |B| = 5, θ = π/4.
√
√
Answer: (draw the picture yourself) A · B = |A||B| cos θ = 10 2/2 = 5 2.
ii) A = i + 2j, B = 3i + 4j.
Answer: A · B = 1 · 3 + 2 · 4 = 11.
Three dimensional vectors
The dot product works the same in 3D as in 2D. If A = (a1 , a2 , a3 ) and B = (b1 , b2 , b3 )
then
A · B = a1 · b1 + a2 · b2 + a3 · b3 .
The geometric view is identical and the same proof shows
A · B = |A||B| cos θ Example:
Show A = (4, 3, 6), B = (−2, 0, 8), C = (1, 5, 0)
are the vertices of a right triangle.
−−→
−−→
Answer: Two legs of the triangle are AC = (−3, 2, −6) and AB = (−6, −3, 2) ⇒
−−→ −−→
AC · AB = 18 − 6 − 12 = 0. The geometric view of dot product implies the angle between
the legs is π/2 (i.e cos θ = 0).
•� B
z� ��
�
��
�� �
�
��
�
A•
•C y
x
Definition of the term orthogonal and the test for orthogonality
When two vectors are perpendicular to each other we say they are orthogonal.
As seen in the example, since cos(π/2) = 0, the dot product gives a test for orthogonality
between vectors:
A ⊥ B ⇔ A · B = 0.
Dot product and length
Both the algebraic and geometric formulas for dot product show it is intimately connected
to length. In fact, they show for a vector A
A · A = |A|2 .
Let’s show this using both views.
Algebraically: suppose A = (a1 , a2 , a3 ) then
A · A = (a1 , a2 , a3 ) · (a1 , a2 , a3 ) = a21 + a22 + a32 = |A|2 .
Geometrically: the angle θ between A and itself is 0. Therefore,
A · A = |A||A| cos θ = |A||A| = |A|2 .
As promised both views give the formula.
Dot Product
of 2
Report
Tell us what’s wrong with it:
Thanks, got it!
We will moderate it soon!
Free up your schedule!
Our EduBirdie Experts Are Here for You 24/7! Just fill out a form and let us know how we can assist you.
Take 5 seconds to unlock
Enter your email below and get instant access to your document