It turns out that the dot product is equal to the product of the magnitudes of the vectors times the cosine of the angle between the vectors (a⋅b=∣∣a∣∣⋅∣∣b∣∣cosα). Therefore, we can easily figure out whether or not two lines or planes or etc. are perpendicular by computing the dot product.
Are the vectors ⟨1,2,0⟩ and ⟨−1,0,4⟩ perpendicular?
How about ⟨−1,2⟩ and ⟨4,2⟩?
What about ⟨1,0,3,−2⟩ and ⟨0,0,0,0⟩
And that's it! If you really want a challenge, try to figure out a way to make complex vectors multiply.
Check what you really know
If you can solve a contest problem with this idea, you know it well. If not, you know exactly what to review. These are real problems from the AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.
Mathematicians have a nasty habit of asking questions by stringing together words and hoping they can somehow be interpreted. So it was with the dot product. The dot product was invented when mathematicians first asked "What do I get when I multiply two vectors?" As it turned out this question is impossible to answer.
Oops!
The Standard Definition
That's not because this is the most impossible problem in the world. Rather, the question turns out to have so many answers. "Multiplication" in terms of vectors is ambiguous. However, only two products are really important right nowt: the dot product and the cross product. Josiah Willard Gibbs, of Gibbs free energy fame soon gave these products symbols: "⋅" for the dot product, and "×" for the cross product. We still use these.
The dot product came about because mathematicians wanted something similar to scalar multiplication. For example, the dot product should satisfy commutativity, linearity, etc. It turned out that there was only one formula that worked, made logical sense, and appeared naturally.
The original definition of the dot product of two vectors, u=⟨a1,a2,…,an⟩ and v=⟨b1,b2,…,bn⟩ is:
u⋅v=a1b1+a2b2+⋯+anbn
(From now on, vectors will just be bolded letters)
Note that this is a scalar! Now find the dot product of the vectors ⟨0,1,−3,1⟩ and ⟨5,7,0,3⟩
Find the dot product!
A Better Definition?
Honestly, though, this is a terrible definition. It is very unwieldy for calculus (you will see it sometimes defined like this in terms of matrices, but it might be called the inner product.
There is another definition, but it's derivation is almost magic and requires the law of cosines. First, consider vector addition. We know that the vectors u, v, and u−v form a "triangle". If you draw out the vector u−v, you will see it is opposite the angle between u and v.
Now, the law of cosines. The standard formulation is that c2=a2+b2−2abcosC, where a, b, and c are lengths. Because of the above reasoning on what vectors form a triangle, this relation must also apply to ∥u−v∥, ∥u∥, and ∥v∥.
Let θ equal the angle measure between u and v. We're just going to plug and chug for a few lines.
The Magical Derivation
We know from the law of cosines,
∥u−v∥2=∥u∥2+∥v∥2−2∥u∥∥v∥cosθ
or
∥u∥2+∥v∥2−∥u−v∥2=2∥u∥∥v∥cosθ
Now, expanding the magnitudes, based on the definition of vector magnitude,
a12+a22+⋯+an2+b12+b22+⋯⋯+bn2−(a1−b1)2−(a2−b2)2−⋯−(an−b2)2
Note a12+b12−(a1−b1)2=−2a1b1. Then, it shouldn't be too much of a stretch to convince yourself that that gigantic sum up there is actually (you should try this on a clean sheet of paper),
−2(a1b1+a2b2+⋯+anbn)
Wait a minute. That's just −2(u⋅v)! Therefore,
−2(u⋅v)=−2∥u∥∥v∥cosθ
and so
u⋅v=∥u∥∥v∥cosθ
Mind blown. This is a much more wieldy definition of the dot product in calculus. There is in fact another purpose. Angles are extremely annoying to calculate, but just by rearranging the definition of the dot product up there, we get (entirely for free!),
cosθ=∥u∥∥v∥u⋅v
With this relation, we can always figure out the angle between any two vectors, and similarly, we can always remove angles from equations by replacing them with more "algebraic" dot products and vectors. This will turn out to be very useful.
For now, here are three practice problems.
What is the dot product of two unit vectors 120∘ from each other?
Given the vectors, u=⟨1,2,3⟩ and v=⟨−2,3,1⟩, compute the acute angle between them (in degrees).
Are u=⟨0,7,1⟩ and v=⟨1,1,−7⟩ perpendicular?
Dot Product Properties
Finally, I will conclude with some properties of the dot product. You can try to prove all of these as exercises, with either definition of the dot product. Let 0^ be the zero vector in enough dimensions for the dot product to be defined.
(In most contexts, a plain 0 is assumed to be this 0^ if it makes the problem make sense. Just make sure your 0 is specifically a scalar, because you cannot take the dot product of a scalar with anything!)
u⋅u=∥u∥2
0^⋅u=0
u⋅v=v⋅u
u⋅v=0 if and only if u and v are perpendicular.
a(u⋅v)=(au)⋅v
w(u⋅v)=w⋅u+w⋅v
As one last parting shot, it turns the dot product has several cool applications. For example, the projection of u onto v (projvu) is, intuitively, the vector that describes the shadow of u on v if light were to be shined at u at v perpendicular to v. If you drew a diagram on paper, you would see that the projection has magnitude ucos(θ) and is in the direction of v, or more strictly, the unit vector Uv. Then, a formula for projvu might be
∥v∥2u⋅vv
Prove it.
Finally, if you somehow still think the dot product could never be applied to the real world, it turns out work can defined at the dot product of force and distance (or lever arm). Yes, work is a vector. This is where you would get the formula that the magnitude of work (W) is
W=Fdcos(θ)
So what happens if force is perpendicular to distance? Like if you moved forward, holding a box steady?