How to multiply two vectors to get a number, how that number gives the angle between them, and how it tells at once whether two vectors are perpendicular or parallel.
Do two walls on a floor plan really meet at a right angle? A protractor only gives an estimate. With vectors along the walls you multiply matching components, add, and look at the result. If it is zero, the angle is exactly a right angle. That single number, the dot product, carries the angle between two vectors in a form you can compute from components alone.
Key terms
Dot product and the component formula
Definition The dot product of u=⟨u1,u2⟩ and v=⟨v1,v2⟩ is the real number
u⋅v=u1v1+u2v2.
For vectors in space it is u1v1+u2v2+u3v3. This sum of products is the component formula for the dot product. The result is a scalar, not a vector, which is why some books call it the scalar product.
In plain words Multiply the first components, multiply the second components, and add.
Example For u=⟨3,−2⟩ and v=⟨4,5⟩,
u⋅v=3⋅4+(−2)⋅5=12−10=2.
The same recipe shows up at a checkout. Buying 3, 2 and 5 of three items priced at 1.50, 4.00 and 0.80 dollars costs
⟨3,2,5⟩⋅⟨1.5,4,0.8⟩=4.5+8+4=16.5 dollars.
Rules for the dot product
Definition For all vectors u, v and w of the same dimension and every scalar c
u⋅v=v⋅u,u⋅(v+w)=u⋅v+u⋅w,(cu)⋅v=c(u⋅v),
and the dot product of a vector with itself is its squared length,
v⋅v=∥v∥2.
Also 0⋅v=0 for every v. Each rule follows from the component formula and the rules for real numbers.
In plain words The dot product can be expanded like ordinary multiplication, and dotting a vector with itself gives its length squared.
Example Suppose ∥u∥=3, ∥v∥=4 and u⋅v=−2. Expanding gives
∥u+v∥2=(u+v)⋅(u+v)=∥u∥2+2u⋅v+∥v∥2=9−4+16=21,
so ∥u+v∥=21 without knowing a single component.
Angle between nonzero vectors
Definition Let u and v be nonzero vectors, drawn from a common initial point. The angle between u and v is the angle θ between these two arrows with
0≤θ≤π,that is0∘≤θ≤180∘.
It does not depend on the order of the vectors and has no sign. The angle is 0 when the vectors point the same way and π when they point in opposite ways.
In plain words Put the two tails together and measure the opening between the arrows the short way around.
Example The vector ⟨1,0⟩ has direction angle 0∘ and ⟨−1,1⟩ has direction angle 135∘, so the angle between them is 135∘. Now take ⟨1,1⟩ and ⟨1,−1⟩, with direction angles 45∘ and 315∘. Their difference is 270∘, but going the short way around the opening is 360∘−270∘=90∘, and that is the angle between them.
Geometric formula
Definition If u and v are nonzero vectors and θ is the angle between them, then
u⋅v=∥u∥∥v∥cosθ,socosθ=∥u∥∥v∥u⋅v.
Since θ lies in [0,π], which is the range of the inverse cosine, the angle itself is
θ=arccos∥u∥∥v∥u⋅v.
To see why the formula holds, draw u and v from one point. If they do not lie along one line, they form a triangle whose third side is u−v and whose angle opposite that side is θ. Expanding (u−v)⋅(u−v) with the rules above, and applying the law of cosines to the same side, gives
∥u∥2−2u⋅v+∥v∥2=∥u−v∥2=∥u∥2+∥v∥2−2∥u∥∥v∥cosθ.
Canceling the squared lengths and dividing by −2 leaves the formula. When the vectors lie along one line there is no triangle, and the formula can be checked directly with cosθ=±1.
In plain words The component formula is easy to compute and the geometric formula is easy to interpret. Setting them equal turns components into an angle.
Example For u=⟨2,1⟩ and v=⟨1,3⟩ the dot product is 2+3=5, and the lengths are 5 and 10. So
cosθ=5105=505=21,
and θ=45∘. Both vectors point into the first quadrant, so their direction angles are arctan3 and arctan21, and these agree,
arctan3−arctan21≈71.57∘−26.57∘=45∘.
Sign of the dot product
Definition For nonzero u and v the lengths in the geometric formula are positive, so u⋅v has the sign of cosθ. It is positive when 0≤θ<π/2, zero when θ=π/2, and negative when π/2<θ≤π. The factor ∥v∥cosθ is the signed length of the shadow that v casts on the line through u, counted positive when the shadow points the way u points, so
u⋅v=∥u∥×(signed shadow of v on u).
The next lesson calls this shadow length the scalar component.
In plain words The dot product is positive when the vectors lean the same way, zero when they meet at a right angle, and negative when they lean apart.
Example Keep u=⟨2,0⟩ fixed and swing a vector v of length 3 around, so that it makes the angle θ with u. The shadow of v on the x-axis is 3cosθ, and the dot product is 2 times that.
θ
Signed shadow 3cosθ
u⋅v
0∘
3
6
60∘
1.5
3
90∘
0
0
120∘
−1.5
−3
180∘
−3
−6
Orthogonality
Definition Two vectors u and v are orthogonal when
u⋅v=0.
For nonzero vectors this happens exactly when the angle between them is π/2, so for them orthogonal means perpendicular. By this definition the zero vector is orthogonal to every vector.
In plain words Orthogonal is the vector word for perpendicular, and the dot product tests it with a few multiplications and no angles at all.
Example The vectors ⟨6,−4⟩ and ⟨2,3⟩ are orthogonal, because 12−12=0. To make ⟨k,3⟩ orthogonal to ⟨2,−5⟩, solve 2k−15=0 to get k=15/2. The test also explains the rule for perpendicular lines. Lines with slopes m1 and m2 run along ⟨1,m1⟩ and ⟨1,m2⟩, whose dot product 1+m1m2 is zero exactly when m1m2=−1.
Parallel vectors
Definition Two nonzero vectors u and v are parallel when v=cu for some scalar c. Then c=0, and the angle between them is 0 when c>0 and π when c<0. Because ∣cosθ∣≤1, the geometric formula shows that nonzero vectors satisfy
∣u⋅v∣≤∥u∥∥v∥,
and equality holds exactly when cosθ=±1, that is, exactly when the vectors are parallel.
In the plane, nonzero ⟨u1,u2⟩ and ⟨v1,v2⟩ are parallel exactly when u1v2−u2v1=0.
In plain words Parallel vectors lie along the same line, pointing the same way or opposite ways. One is a stretched or flipped copy of the other.
Example Take u=⟨6,−9⟩ and v=⟨−4,6⟩. Multiplying u by −32 gives v, so they are parallel and point in opposite directions. The dot product agrees. Here u⋅v=−24−54=−78, and the lengths are 117=313 and 52=213 with product 78. So cosθ=−1 and θ=180∘.
Zero-vector caveat
Definition The zero vector has length 0 and no direction. So the angle between 0 and another vector is not defined, and the formula for cosθ cannot be used, since its denominator ∥u∥∥v∥ is 0. Because 0⋅v=0, the zero vector counts as orthogonal to every vector. Books differ on whether it also counts as parallel to every vector, since 0=0v, which is why statements about angles and parallel vectors are made for nonzero vectors. Two more cautions follow. A dot product of 0 does not mean that one of the vectors is 0, and u⋅v=u⋅w does not mean v=w.
In plain words Check for the zero vector before you talk about angles. And remember that the dot product cannot be canceled the way a nonzero number can.
Example For ⟨0,0⟩ and ⟨3,7⟩ the dot product is 0, but the cosine formula would read 0/(0⋅58), which is undefined. The dot product ⟨1,2⟩⋅⟨2,−1⟩=2−2=0 shows that nonzero vectors can have dot product 0. Finally
⟨1,0⟩⋅⟨2,5⟩=2=⟨1,0⟩⋅⟨2,−3⟩,
although ⟨2,5⟩=⟨2,−3⟩. Only their parts along ⟨1,0⟩ agree.
Check yourself
Find u⋅v and the angle between u=⟨3,−1⟩ and v=⟨−1,2⟩.
Show the answer
The dot product is u⋅v=−3−2=−5, and the lengths are 10 and 5. So
cosθ=105−5=52−5=−21,
and θ=135∘.
For which values of c are ⟨c,2⟩ and ⟨c,−8⟩ orthogonal?
Show the answer
Set the dot product to zero, c2−16=0. So c=4 or c=−4.
Are ⟨2,−3⟩ and ⟨−6,9⟩ parallel? If so, do they point the same way or opposite ways?
Show the answer
Yes. Since ⟨−6,9⟩=−3⟨2,−3⟩ with a negative factor, they point in opposite directions. The dot product confirms it, −12−27=−39, which is minus the product of the lengths 13 and 313.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details