Dot Product
Pre-requisites: Vectors
The dot product is a miracle composed of two definitions. The first
definition, the geometric definition, is that
where is the angle between
the two vectors. We call this the geometric definition because it
is composed entirely of terms with geometric meaning: angles and lengths.
The algebraic definition of the dot product is that
(v1, v2, v3) ·
(w1, w2, w3) =
v1 w1 + v2 w2 +
v3 w3
The miracle is that these two definitions,
the geometric and the algebraic, are the same.
This is by no means obvious, and indeed you should spend several minutes
(or more) thinking about how, why, and if this could be true. Try
applying both definitions to pairs of vectors with easily calculatable
angles like (1,0,0) and (0,0,1), or between two arbitrary vectors in
the plane, or between a vector and itself.
Before we prove that the two definitions are the same, let's look at some of
the properties of the dot product. First and foremost, both definitions
agree that the dot product of two vectors is a scalar
real number. It is not a vector.
Second, both definitions agree that the dot product is commutative
(that ) and that it absorbs constants:
.
Also, both definitions imply that
.
Finally, both definitions (with a little bit of help from the Pythagorean
theorem) give
. This is nice, and it further implies
that and that
if and only if
.
Okay, so our two definitions of the dot product agree on lots of things.
What is even more important is their different strengths:
- The algrebraic definition of the dot product is great for calculation.
Given the cartesian coordinates of two vectors, you can calculate their dot
product lickety-split. It is also very helpful in proving algebraic
identities like
. Try proving this with
the geometric definition!
- The geometric definition of the dot product is great for, well, geometry.
For example, if two vectors are orthogonal (perpendicular) than
their dot product is 0 because the cosine of 90 (or 270) degrees is 0.
Another example is finding the projection of a vector onto another vector.
By trigonometry, the length of the projection of the vector
onto the
vector is
If you want the projection of the vector
onto the vector
as a vector,
then just multiply the above magnitude by
normalized:
These expressions get used all the time, so either remember them or
remember how to derive them. Here's one application: the work done
by exerting a force
over a displacement
is equal to
the product of the magnitude of the displacement and the component
of the force in the direction of the displacement:
Work =
- Of course, the dot product is at its most powerful when you combine the
strengths of its two definitions, when you use the fact that
For example, here is a formula for the angle between two vectors
that is great if you have a calculator with an inverse cosine button:
Well, enough with the suspense. Here's the proof that the two definitions
of the dot product. It uses the law of cosines, which says that
where
is the angle opposite side C in the triangle ABC. We apply
it to the triangle with sides v, w, and v-w to get
Right. You may have noticed that we have been very careful to always
call the dot product the dot product, rather than just the product of
two vectors. This is because there are many different ways to take the
product of two vectors, including as we will soon see,
cross product.
Exercises:
- Why can't you prove that the dot product is associative?
- Calculate the dot product of (1,2,3) and (4,5,6).
- Calculate the dot product of two unit vectors separated by an
angle of 60 degrees.
- What is ?
?
- Find a vector orthogonal to (1,2,3).
- Prove that projection is additive; i.e., that
.
- Calculate the angle between (0,4,-6) and (3,0,-2).
- Calculate the projection of (1,2,3) onto (4,4,4).
- Calculate the work done against the force (0,0,-30) by moving
an object from (1,1,1) to (-10,3,7).
- Prove the Cauchy-Bunyakovskii-Schwarz inequality:
.
- Prove the triangle inequality:
.
[Hint: square both sides and apply Cauchy-Bernard-Schwartz.]
Where does the name triangle inequality come from?
Solutions to Exercises |
Vector Calculus Index |
World Web Math Main Page
thomasc@athena.mit.edu
last modified 1 July 1997