The dot product measures how much two arrows point in the same direction.
1
What the dot product measures
Given two vectors in coordinates, like [3,1] and [2,4], we can calculate their dot product in seconds by multiplying matching coordinates and adding them up. To see what that number actually means in space, we look at the shadow one arrow casts onto the other.
What the dot product measures
Shining a light at a 90∘ angle onto the bottom arrow picks out the exact piece of the top arrow that goes along the bottom arrow's line. Multiplying that shadow by the bottom arrow's length gives the dot product:
As the pulling arrow turns around the starting point of the track, the shadow (and the dot product with it) stays positive while the arrows point mostly the same way, shrinks to zero right at 90∘, and turns negative once the pull tilts past 90∘.
Turn the pulling arrow to see how its shadow along the track, times the track's length, shrinks to zero at 90° and turns negative past 90°.
2
Why either arrow can cast the shadow
In the shadow formula, we chose one arrow to cast the shadow and the other to catch it. When one arrow is short and the other is long, shining the light onto the second arrow gives a completely different shadow, yet the final dot product comes out to the exact same number either way.
light onto the short arrow
light onto the long arrow
Why either arrow can cast the shadow
Start with two arrows of length 1, where the picture is symmetric and the two shadows are equal. If we stretch one arrow to 3 times its length, its shadow triples when it is the arrow casting the shadow, and its own length triples when it is the arrow catching the shadow. Either way, the product triples. The same happens when we stretch either arrow by any amount, and any two arrows can be made by stretching two arrows of length 1, so it never matters which arrow casts the shadow.
3
Why multiplying coordinates measures the shadow
Measuring a slanted shadow directly on a grid seems to need rulers, square roots, or trigonometry. We can find the shadow dot product of [3,1] and [2,4] without any of that by breaking [2,4] into its horizontal step of 2 and vertical step of 4.
Why multiplying coordinates measures the shadow
Text solution
Find the shadow on the horizontal stepBecause either arrow can cast the shadow, shine [3,1] onto the x-axis to get a shadow of length 3, and multiply by the horizontal step of 2 from [2,4]:
(x-shadow of [3,1])×(x-step of [2,4])=3×2=6
Find the shadow on the vertical stepShine [3,1] onto the y-axis to get a shadow of length 1, and multiply by the vertical step of 4 from [2,4]:
(y-shadow of [3,1])×(y-step of [2,4])=1×4=4
Add the two piecesBecause the horizontal and vertical steps of [2,4] go from the same start to the same tip as the diagonal arrow, their two shadow products add up to the full dot product:
[3,1]⋅[2,4]=(3×2)+(1×4)=6+4=10
So the shadow dot product of [3,1] and [2,4] is 10, found straight from the coordinates without measuring a single angle.
Because the horizontal and vertical steps go from the same start to the same tip as the diagonal arrow, their shadows on the other arrow's line add up to the full arrow's shadow.
A vector's horizontal and vertical steps start and end where the vector does, so their shadows always add up to the full vector's shadow.
4
Dot products without coordinates
Sometimes we have no grid or coordinates at all, and only know the dot products of two vectors u and v with themselves and each other: u⋅u=6,v⋅v=4, and u⋅v=−2. We can still find the dot product of combinations like (u+2v)⋅(3u−v) because the dot product follows the same rules as ordinary multiplication for expanding brackets.
Dot products without coordinates
u⋅uv⋅vu⋅v=6=4=−2
(u+2v)⋅(3u−v)=?
Because either arrow can cast the shadow, tip-to-tail steps add their shadows, and stretching an arrow scales its shadow by the same number, three algebra rules always hold:
u⋅vu⋅(v+w)(cu)⋅v=v⋅u(Order doesn’t matter)=u⋅v+u⋅w(Splits over a sum)=c(u⋅v)(Numbers pull out front)
Text solution
Multiply out the brackets and pull numbers out frontMultiply each piece in (u+2v) with each piece in (3u−v):
(u+2v)⋅(3u−v)=3(u⋅u)−(u⋅v)+6(v⋅u)−2(v⋅v)
Rewrite v⋅u as u⋅v and combine the middle termsSince order doesn't matter, v⋅u is the same as u⋅v:
Plug in the given valuesPut in u⋅u=6,u⋅v=−2, and v⋅v=4:
=3(6)+5(−2)−2(4)=18−10−8=0
So (u+2v)⋅(3u−v)=0, worked out without any coordinates.
5
Spotting right angles and opposite directions
In the problem above, (u+2v)⋅(3u−v) came out to 0. Because multiplying coordinates and measuring shadows give the exact same number, we can use quick coordinate math to check whether two arrows in 2D or 3D meet at a 90∘ right angle or point mostly opposite ways.
Spotting right angles and opposite directions
[−42]⋅[12]=?
perpendicular?
Text solution
Check for a dot product of 0 to spot a right angleFor the 3D vectors [2,5,−3] and [4,−1,1], multiply matching coordinates and add:
[2,5,−3]⋅[4,−1,1]=(2×4)+(5×−1)+(−3×1)=8−5−3=0
Because neither arrow has length 0, a dot product of 0 means the shadow has length 0, so [2,5,−3] and [4,−1,1] are perpendicular at 90∘ (just as [−4,2]⋅[1,2]=−4+4=0 and (u+2v)⋅(3u−v)=0 showed those pairs are perpendicular).
Check for a negative sign to spot opposite directionsFor [1,−4,2] and [−3,2,1], multiply matching coordinates and add:
[1,−4,2]⋅[−3,2,1]=(1×−3)+(−4×2)+(2×1)=−3−8+2=−9
Because the result is negative (just like [2,3]⋅[−5,1]=−10+3=−7), the shadow points backward, meaning the two 3D arrows are tilted more than 90∘ apart and point mostly opposite ways.
6
Unit vectors, shadow length, and the angle between vectors
The full dot product multiplies the shadow of b by the length of the receiving arrow a. When we want the actual length of the shadow itself along a rail or wall, we need to divide out that receiving arrow's length, and when we want the exact angle θ between two vectors, we divide out both arrows' lengths.
Unit vectors, shadow length, and the angle between vectors
If the receiving direction arrow a has length 1, multiplying by its length changes nothing, so the dot product gives the shadow length directly:
b⋅unit vector (length 1)a=(Shadow of b)×1=Shadow of b
So whenever a rail's direction is given by a unit vector of length 1, dotting a motion arrow with that unit vector gives the signed shadow length along the rail right away.
When the rail arrow has length 1, the dot product is just the shadow's length along the rail, positive or negative.
When both arrows have length 1, the right triangle gives cosθ for the shadow length. Stretching the arrows to any lengths multiplies that shadow by (Length of b) and then multiplies the dot product by (Length of a):
a⋅b=(Length of a)×Shadow of b(Length of b)×cosθ
Dividing the dot product by both lengths leaves cosθ:
cosθ=(Length of a)×(Length of b)a⋅b
If a question only asks whether two arrows are perpendicular or point mostly the same or opposite ways, don't spend time computing lengths or cosθ. Arrow lengths are always positive, so the sign of a⋅b already answers the question.
7
Measuring how well lists of numbers line up
Because multiplying matching numbers and adding works on any two lists of numbers, we can use the dot product to measure how well two profiles match, such as a viewer's taste vector [4,−3,5] and a movie's vector [5,−2,2] across [Action,Comedy,Sci-Fi], even when there are no arrows in space.
Measuring how well lists of numbers line up
Text solution
Multiply matching scoresMultiply the viewer's rating by the movie's rating in each genre. Notice that the viewer dislikes comedy and the movie avoids it, so both Comedy numbers are negative, and two negative numbers multiply to a positive:
Add the products for the total scoreAdd the three genre scores together:
[4,−3,5]⋅[5,−2,2]=20+6+10=36
So the dot product is 36: a high positive score showing that the movie and the viewer's tastes line up strongly.
Key concepts
Every dot product problem connects the fast coordinate sum to the shadow picture:
Coordinate sum=Length of b×cosθ(Shadow of b)×(Length of a)
When you have coordinates or lists of numbers
multiply matching numbers and add, like [3,1]⋅[2,4]=(3×2)+(1×4)=10. Two negatives multiply to a positive and raise the score just like two positives.
When you only need to know how the directions compare (<90∘,90∘, or >90∘)
stop right after finding a⋅b and check its sign: [−4,2]⋅[1,2]=0 means perpendicular (90∘), positive means mostly the same way (<90∘), and [2,3]⋅[−5,1]=−7 means mostly opposite ways (>90∘). Do not calculate lengths or cosθ when only the sign is needed.
When you want the shadow length or the exact angle θ
check the receiving arrow's length first. If the direction is already a unit vector of length 1, the dot product is the shadow length directly (b⋅a=Shadow of b). If the arrows have other lengths, divide by the receiving length for the shadow, or divide by both lengths for the angle:
cosθ=(Length of a)×(Length of b)a⋅b
When no coordinates are given
multiply out brackets like ordinary algebra, pull numbers out front, and rewrite v⋅u as u⋅v, as in (u+2v)⋅(3u−v)=3(u⋅u)+5(u⋅v)−2(v⋅v).
8
Practice
1
Find the dot product of [4,−3] and [−2,1], and state whether the two arrows point mostly the same way, are perpendicular, or point mostly opposite ways.
Watch the negative sign on (−3)×1=−3 (dropping that minus sign gives −8+3=−5, and multiplying the wrong pairs 4×1+(−3)×(−2) gives +10, which gets the direction backward).
Multiply the first coordinates together, multiply the second coordinates together, add them, and look at the sign of the total.
Multiply matching coordinates and add:
[4,−3]⋅[−2,1]=(4×−2)+(−3×1)=−8+(−3)=−11
Watch the negative sign on (−3)×1=−3 (dropping that minus sign gives −8+3=−5, and multiplying the wrong pairs 4×1+(−3)×(−2) gives +10, which gets the direction backward). Because the dot product is negative, the shadow points backward and the arrows point mostly opposite ways.
2
A viewer's taste vector across [Action,Comedy,Sci-Fi] is [3,−4,2]. Movie A has ratings [2,−3,1] and Movie B has ratings [5,2,3]. Find the dot product for each movie and state which movie lines up better with the viewer's taste.
In the Comedy spot, the viewer dislikes comedy and Movie A avoids it, so both numbers are negative, and two negatives multiply to a positive: (−4)×(−3)=+12 (keeping the minus sign to write −12 gives 6−12+2=−4 and picks Movie B by mistake).
Take the dot product of [3,−4,2] with each movie's vector separately, paying close attention to what happens when both the viewer and the movie give Comedy a negative score.
For Movie A:
[3,−4,2]⋅[2,−3,1]=(3×2)+(−4×−3)+(2×1)=6+12+2=20
In the Comedy spot, the viewer dislikes comedy and Movie A avoids it, so both numbers are negative, and two negatives multiply to a positive: (−4)×(−3)=+12 (keeping the minus sign to write −12 gives 6−12+2=−4 and picks Movie B by mistake). For Movie B:
[3,−4,2]⋅[5,2,3]=(3×5)+(−4×2)+(2×3)=15−8+6=13
Movie A gives 20 and Movie B gives 13, so Movie A lines up better.
3
Arrow a has length 4 and arrow b has length 10. When light shines at 90∘ to a, arrow b casts a shadow of length 5 pointing along a. What is a⋅b, and how long is the shadow of a when light shines at 90∘ to b?
Multiply the shadow of b (5) by the receiving arrow a's length (4), not by b's own length 10, which would give 50.
Use (shadow of b on a)×(Length of a) to find a⋅b first, then use the fact that shining light the other way must give the exact same dot product.
Multiply the shadow of b (5) by the receiving arrow a's length (4), not by b's own length 10, which would give 50:
a⋅b=5×4=20
When light shines at 90∘ to b, the dot product is still 20, and now b (length 10) is the receiving arrow (don't assume the two shadows have the same length 5):
(Shadow of a on b)×10=20
So a⋅b=20, and the shadow of a on b has length 2.
4
Find the value of k that makes the 3D vectors [3,−2,4] and [2,k,−1] perpendicular.
Set the coordinate dot product equal to 0, keeping the negative sign on −2 in (−2)×k=−2k (writing +2k gives 2+2k=0 and the wrong sign k=−1).
What number must the dot product equal when two non-zero vectors meet at 90∘?
Set the coordinate dot product equal to 0, keeping the negative sign on −2 in (−2)×k=−2k (writing +2k gives 2+2k=0 and the wrong sign k=−1):
(3×2)+(−2×k)+(4×−1)=6−2k−4=2−2k=0
k=1
5
A game character moves along the vector [5,10] beside a slanted rail whose direction is given by the unit vector [0.8,0.6] of length 1. What is the length of the shadow of the character's motion along the rail?
Because the receiving rail vector [0.8,0.6] is a unit vector of length 1, the dot product gives the shadow length directly. Don't divide by the character's motion length 52+102=125 (which gives 12510).
Check the length of the receiving rail vector before deciding whether you need to divide by any length at the end.
Because the receiving rail vector [0.8,0.6] is a unit vector of length 1, the dot product gives the shadow length directly. Don't divide by the character's motion length 52+102=125 (which gives 12510):
[5,10]⋅[0.8,0.6]=(5×0.8)+(10×0.6)=4+6=10
6
Vector a=[1,2,2] has length 3, and vector b=[4,0,−3] has length 5. Find cosθ for the angle θ between them.
First calculate a⋅b, remembering that 2×0=0, not 2 (writing 2 makes the top 4+2−6=0 and gives cosθ=0).Now divide by the product of the two lengths, 3×5=15 (stopping at the dot product −2 forgets to divide out the arrow lengths).
Find a⋅b from the coordinates first, then divide by the lengths of both arrows.
First calculate a⋅b, remembering that 2×0=0, not 2 (writing 2 makes the top 4+2−6=0 and gives cosθ=0):
a⋅b=(1×4)+(2×0)+(2×−3)=4+0−6=−2
Now divide by the product of the two lengths, 3×5=15 (stopping at the dot product −2 forgets to divide out the arrow lengths):
cosθ=3×5−2=−152
7
For two vectors u and v with no coordinates given, u⋅u=5,v⋅v=3, and u⋅v=−2. Find (2u−v)⋅(u+3v).
Multiply out the brackets and rewrite v⋅u as u⋅v, keeping the minus sign on −v⋅u=−(u⋅v) (adding it as +1(u⋅v) gives 7(u⋅v) and −13).Plug in u⋅u=5,u⋅v=−2, and v⋅v=3, watching the negative sign on 5(−2)=−10 (writing +10 gives 11).
Multiply out the two brackets term by term just like ordinary algebra, and combine the u⋅v and v⋅u pieces before plugging in the numbers.
Multiply out the brackets and rewrite v⋅u as u⋅v, keeping the minus sign on −v⋅u=−(u⋅v) (adding it as +1(u⋅v) gives 7(u⋅v) and −13):