A vector gives us steps along the grid, and we want to find the straight-line length of the arrow from start to finish.
1
Finding the length of a vector
For a vector like v=[34], walking 3 steps right and 4 steps up forms the two legs of a right triangle with the vector itself as the hypotenuse. What happens when we add a third step straight up, like w=3412, or move to even more dimensions?
Finding the length of a vector
x
y
v=[34]
3
4
∥v∥=?
Text solution
Square each coordinate and add them upIn 3D, the base diagonal 32+42 and the vertical step 12 form a second right triangle, and squaring the base diagonal cancels its square root so all three squared coordinates add together directly.
(32+42)2+122=32+42+122=9+16+144=169
Take the square root to get the lengthWe write double bars around the vector so its length doesn't look like the absolute value of a single number.
norm (length)∥w∥=32+42+122=169=13
2
Length and the dot product
Squaring coordinates works whenever we know the numbers inside the vector. What if we don't have the coordinates at all, only that ∥u∥=3,∥v∥=5, and u⋅v=1, and we want to find the length of the sum, ∥u+v∥?
Length and the dot product
u
v
u+v
∥u∥∥v∥u⋅v∥u+v∥=3=5=1=?
Taking the dot product of any vector with itself multiplies each coordinate by itself and adds them up, which is the exact same sum of squares inside the length formula:
∥v∥=v⋅vor∥v∥2=v⋅v
Text solution
Rewrite the squared length as a dot productSquaring the length first gets rid of the square root and turns ∥u+v∥2 into a dot product we can expand.
∥u+v∥2=(u+v)⋅(u+v)
Expand the dot product and plug in the known lengths and dot productSince u⋅v and v⋅u are the same number, the two middle terms combine into 2(u⋅v), while u⋅u and v⋅v become the squared lengths ∥u∥2 and ∥v∥2.
Take the square root to get the lengthThe expansion gives the squared length, so we take the square root at the end.
∥u+v∥=36=6
So the shortcut arrow u+v has a length of 6, which is shorter than 3+5=8 because u and v meet at an angle instead of pointing in the exact same direction.
Even when the lengths ∥u∥=3 and ∥v∥=5 stay fixed, the length ∥u+v∥ varies between 2 and 8 as the angle between the vectors changes. That's because the 2(u⋅v) term grows when they point together and shrinks when they work against each other.
Even when two vectors keep their lengths of 3 and 5, the length of their sum stretches anywhere from 2 to 8 depending on whether they point the same way or work against each other.
3
Distance between two vectors
The distance between two vectors u and v is the straight-line length between their tips. Let's find the distance between u=[15] and v=[41].
Distance between two vectors
x
y
u=[15]
v=[41]
?
1
2
3
4
5
1
2
3
4
5
6
Text solution
Subtract the vectors to get the arrow from one tip to the otherTaking where we end up minus where we started gives the horizontal and vertical steps from the tip of u to the tip of v.
v−u=[41]−[15]=[4−11−5]=[3−4]
Find the length of that difference vectorSubtracting in the reverse order (u−v=[−34]) points the arrow the other way, and the flipped signs disappear as soon as we square the coordinates.
Distance=∥v−u∥=32+(−4)2=9+16=25=5
The distance ∥v−u∥ depends only on the gap between the two tips: as the tip of v moves around a circle centered at the tip of u, the vector v and its length ∥v∥ change while the distance ∥v−u∥ stays the same.
Moving the tip of one vector in a circle around the tip of the other changes the first vector and its length, while the distance between the two tips stays the same.
4
How scaling changes length
Now suppose we multiply a vector by a scalar c. If a vector u has length ∥u∥=4, what is the length of −3u?
How scaling changes length
x
y
v=[34]
3
4
5
∥2v∥=?
Multiplying a vector by c multiplies every coordinate by c, so c2 factors out of the sum of squares and comes out of the square root as c2=∣c∣:
∥cv∥=∣c∣∥v∥
Text solution
Take the absolute value of the scalarMultiplying by −3 flips the arrow to point in the opposite direction, but a length is never negative, so it scales by ∣−3∣.
∣−3∣=3
Multiply by the original lengthWe don't need any coordinates of u because the original length scales directly by ∣c∣.
∥−3u∥=∣−3∣∥u∥=3×4=12
5
Unit vectors and normalizing
A unit vector is a vector with a length of 1. When we only care about the direction a vector points and not how long it is, we want a unit vector pointing in the exact same direction. Let's find the unit vector in the same direction as v=[34].
Unit vectors and normalizing
x
y
v=[34]
3
4
5
∥v^∥v^=1=?
Dividing a vector by its own length shrinks or stretches it to a length of 1 in the same direction, which we call normalizing:
unit vectorv^=∥v∥1v
The hat on v^ shows that this vector has a length of 1.
Text solution
Find the length of the vectorThis tells us what number we need to divide by so the length becomes 1.
∥v∥=32+42=9+16=25=5
Divide each coordinate by the lengthMultiplying v by 51 keeps the 3-to-4 ratio between the steps while scaling the length from 5 down to 1.
v^=51[34]=[5354]
Stretching or shrinking v along the same line changes ∥v∥ without changing v^, and rotating v moves v^ around the unit circle at a constant length of 1.
Dividing a vector by its own length keeps its unit vector on the circle at length 1, so changing the vector's length leaves the unit vector still while turning it moves the unit vector around the circle.
6
All unit vectors parallel to a vector
Normalizing gives the single unit vector pointing in the same direction as v. What if we want every scalar c that turns v=[34] into a unit vector, or all unit vectors parallel to v?
All unit vectors parallel to a vector
x
y
v=[34]
5
∥cv∥c=1=?
Text solution
Set the scaled length equal to 1Using the scaling rule with ∥v∥=5 keeps the absolute value bars on c.
∥cv∥=∣c∣∥v∥∣c∣⋅5∣c∣=1=1=51
Write both positive and negative solutionsBoth +51 and −51 have an absolute value of 51, giving one unit vector in the same direction as v and a second unit vector in the opposite direction along the same line.
c=51⟹[5354],c=−51⟹[−53−54]
x
y
v=[34]
5
[5354]
[−53−54]
7
Scaling a vector to any length
Once we can shrink a vector to a unit vector of length 1, we can use it to make a vector of any length in that direction. Let's find a vector of length 10 in the same direction as a=1−22.
Scaling a vector to any length
a=1−22
?
10
Text solution
Find the current length of the vectorSquare the coordinates, add them up, and take the square root to see how long a is right now.
∥a∥=12+(−2)2+22=1+4+4=9=3
Normalize the vector to length 1Divide each coordinate by 3 to get the unit vector a^ in the same direction.
a^=311−22=31−3232
Multiply by the target lengthScale the length-1 vector by 10 to get length 10 in the same direction (or multiply by −10 if you want length 10 in the opposite direction).
10a^=1031−3232=310−320320
Key concepts
Everything here comes down to whether you are working with coordinates or with lengths and directions:
Finding length when you have coordinates
Square every coordinate, add them up, and take the square root. For v=[34],∥v∥=32+42=5. When you want the distance between two vectors like u=[15] and v=[41], don't memorize a separate formula: subtract first to get the difference vector v−u=[3−4], then find its length ∥v−u∥=5.
Finding length when you don't have coordinates
Don't look for coordinates if a problem gives you lengths and dot products instead. For a scaled vector, multiply the length by the absolute value of the scalar: ∥cv∥=∣c∣∥v∥, so ∥u∥=4 gives ∥−3u∥=∣−3∣(4)=12. For the length of a sum like ∥u+v∥ (when given ∥u∥=3,∥v∥=5, and u⋅v=1), expand the dot product: start from ∥v∥2=v⋅v to write ∥u+v∥2=(u+v)⋅(u+v)=∥u∥2+2(u⋅v)+∥v∥2=36, then take the square root to get ∥u+v∥=6.
Changing length while keeping direction
Divide a vector by its own length to normalize it to a unit vector of length 1 in the same direction, v^=∥v∥1v=[5354] (use both ±∥v∥1v if asked for all parallel unit vectors). To make a vector of any target length k, normalize to length 1 first and then multiply by k (or −k for the opposite direction): for a=1−22 with ∥a∥=3, length 10 in the same direction is 10a^=310−320320.
8
Practice
1
Find the length of the vector v=1−224.
Watch the negative coordinate: (−2)2=+4, whereas writing −22=−4 subtracts 4 and gives the wrong answer 17.Don't stop at the squared length 25.
Four coordinates work just like two or three: what do you do to each coordinate before adding them together?
Square each coordinate and add them upWatch the negative coordinate: (−2)2=+4, whereas writing −22=−4 subtracts 4 and gives the wrong answer 17.
12+(−2)2+22+42=1+4+4+16=25
Take the square rootDon't stop at the squared length 25.
∥v∥=25=5
2
Find the distance between u=−142 and v=118.
Be careful with the negative sign in the first coordinate: 1−(−1)=2, whereas dropping the minus sign gives 0 and leads to 45.
Before finding any length, what single vector connects the tip of u to the tip of v?
Subtract the vectors to find the arrow between their tipsBe careful with the negative sign in the first coordinate: 1−(−1)=2, whereas dropping the minus sign gives 0 and leads to 45. (Also don't find ∥u∥ and ∥v∥ separately and subtract them.)
v−u=118−−142=2−36
Find the length of the difference vector
∥v−u∥=22+(−3)2+62=4+9+36=49=7
3
A vector u has length ∥u∥=6. What is the length of −4u?
Multiplying directly by −4 gives −24, which is impossible because a length cannot be negative.
How does multiplying a vector by a negative number change its direction and its length?
Multiply the length by the absolute value of the scalarMultiplying directly by −4 gives −24, which is impossible because a length cannot be negative.
∥−4u∥=∣−4∣∥u∥=4×6=24
4
Find the unit vector v^ in the same direction as v=[−815].
Keep the negative sign on −8: squaring made (−8)2 positive when finding the length, but dropping the minus sign here gives [1781715], which points in a different direction.Remember to take the square root of 289 rather than dividing the vector by 289.
How long is v right now, and what do you divide v by to shrink that length down to 1?
Find the length of vRemember to take the square root of 289 rather than dividing the vector by 289.
∥v∥=(−8)2+152=64+225=289=17
Divide each coordinate of v by 17Keep the negative sign on −8: squaring made (−8)2 positive when finding the length, but dropping the minus sign here gives [1781715], which points in a different direction.
v^=171[−815]=[−1781715]
5
Find all scalars c that turn v=30−4 into a unit vector.
Set ∥cv∥=∣c∣∥v∥=1. Which two numbers have that absolute value?
Find the length of v
∥v∥=32+02+(−4)2=9+0+16=25=5
Solve ∣c∣∥v∥=1 for cDropping the absolute value bars gives only c=51 and misses the unit vector pointing in the opposite direction.
∣c∣⋅5=1⟹∣c∣=51⟹c=51 and c=−51
6
Find the vector of length 14 that points in the opposite direction of a=23−6.
Multiplying a by −14 without dividing by ∥a∥=7 first would give −28−4284, which has length 98 instead of 14.Use −14 rather than +14 (which gives 46−12 in the same direction) so the vector flips to the opposite direction.
First turn a into a unit vector of length 1. Then what scalar stretches it to length 14 while flipping its direction?
Find the length of a and normalize to length 1(Multiplying a by −14 without dividing by ∥a∥=7 first would give −28−4284, which has length 98 instead of 14.)
∥a∥=22+32+(−6)2=4+9+36=49=7⟹a^=7273−76
Multiply the unit vector by −14Use −14 rather than +14 (which gives 46−12 in the same direction) so the vector flips to the opposite direction.
−14a^=−147273−76=−4−612
7
Suppose ∥u∥=2,∥v∥=5, and u⋅v=−2. Find ∥u+v∥.
Remember to square ∥u∥ and ∥v∥ (using 2 and 5 directly gives 3) and to double the middle term 2(u⋅v) (forgetting the 2 gives 27).Don't stop at ∥u+v∥2=25.
Without coordinates, start with ∥u+v∥2=(u+v)⋅(u+v) and expand the dot product.
Expand the squared length and plug in the given valuesRemember to square ∥u∥ and ∥v∥ (using 2 and 5 directly gives 3) and to double the middle term 2(u⋅v) (forgetting the 2 gives 27).