A vector is a quantity with both a size and a direction, like a velocity (60 miles per hour heading northeast) or a force (40 newtons pulling up a ramp). A plain number with no direction, like a temperature or a mass, is called a scalar. This topic covers how to describe vectors with components, how to add and scale them, the dot product, unit vectors, and how to find angles between vectors. Vectors are the language of motion in Topic 4.9 and show up all over physics.
What a vector is
A vector is a directed line segment: a segment with an arrow showing which way it points. When a vector is drawn in the plane:
Tail: the point at the beginning of the segment.
Head: the point at the end, where the arrowhead is.
Magnitude: the length of the segment, written ∥v∥. (Some books write ∣v∣.)
A vector is set by its length and direction, not by where it's drawn. Two arrows with the same length pointing the same way are the same vector, even if they start at different points. That's what lets you slide vectors around, which is how vector addition works. A vector is written with an arrow, like v, or by naming its tail and head, like P1P2.
Components
A vector P1P2 from P1=(x1,y1) to P2=(x2,y2) is identified by two numbers, its components:
The vector is written ⟨a,b⟩, with angle brackets so it isn't confused with the point (a,b). Always subtract head minus tail.
Zero vector:⟨0,0⟩ is the trivial case where the tail and head are the same point (P1=P2). It has magnitude 0.
Direction:⟨a,b⟩ points the same way as the segment from the origin to the point (a,b). So you can always picture a vector by drawing it from the origin.
Magnitude: the components are the legs of a right triangle and the vector is the hypotenuse, so the Pythagorean theorem gives the length. The magnitude is the square root of the sum of the squares of the components:
∥⟨a,b⟩∥=a2+b2
Example 1: Components and magnitude
Find the components, the magnitude, and the direction angle of the vector from P1=(−5,1) to P2=(−1,4).
Step 1: Components, head minus tail.
P1P2=⟨−1−(−5),4−1⟩=⟨4,3⟩
Step 2: Magnitude.
∥P1P2∥=42+32=25=5
Step 3: Direction angleθ, measured counterclockwise from the positivex-axis. Both components are positive (Quadrant I), and tanθ=43:
θ=tan−1(43)≈36.87∘
Answer:P1P2=⟨4,3⟩, with magnitude 5 and direction angle about 36.87∘. The red arrow is the same vector drawn from the origin to (4,3): same length, same direction.
Watch the quadrant
tan−1 only gives angles between −90∘ and 90∘, so it can't tell ⟨3,3⟩ from ⟨−3,−3⟩. If a<0, the vector points left, so add 180∘. For example, tan−1(−3−3)=45∘, but ⟨−3,−3⟩ points down and to the left (Quadrant III), so its direction angle is 45∘+180∘=225∘.
Components from magnitude and direction
Often you know how long a vector is and which way it points, and you need its components. For a vector with magnitude ∥v∥ and direction angle θ, trigonometry gives
v=⟨∥v∥cosθ,∥v∥sinθ⟩
This is the unit circle point (cosθ,sinθ) scaled by the magnitude, so the signs of the components come out right in every quadrant.
Example 2: A sailboat's velocity
A sailboat moves at 20 kilometers per hour in the direction 150∘, measured counterclockwise from east. Let east be the positive x-direction and north the positive y-direction. Find the components of its velocity.
Answer:v=⟨−103,10⟩≈⟨−17.32,10⟩. Each hour, the boat moves about 17.32 kilometers west and 10 kilometers north.
Scalar multiplication
Multiplying a vector by a constant k (a scalar) multiplies each component by k:
k⟨a,b⟩=⟨ka,kb⟩
The new vector is parallel to the original.
Its length is multiplied by ∣k∣: ∥kv∥=∣k∣∥v∥.
If k>0, it points the same way. If k<0, it points the opposite way. So −v has the same length as v but the reverse direction.
Vector addition
Add vectors component by component:
⟨a1,b1⟩+⟨a2,b2⟩=⟨a1+a2,b1+b2⟩
Graphically, use tip to tail: place the tail of the second vector at the head of the first. The sum goes from the tail of the first vector to the head of the second. The sum is also called the resultant.
Adding in the other order gives the same vector, and the two routes form a parallelogram with the sum as its diagonal. Subtraction is adding the opposite: u−v=u+(−v).
Left: u+v=⟨4,1⟩+⟨1,3⟩=⟨5,4⟩, with the other order dashed. Right: w=⟨2,1⟩, 2w=⟨4,2⟩, and −w=⟨−2,−1⟩ are all parallel.
The dot product
The dot product of two vectors is the sum of the products of their corresponding components:
⟨a1,b1⟩⋅⟨a2,b2⟩=a1a2+b1b2
The result is a number, not a vector. What it measures comes out in the section on angles below. One quick fact: v⋅v=a2+b2=∥v∥2.
Unit vectors
A unit vector is a vector with magnitude 1. It carries direction only. To get the unit vector in the same direction as a nonzero vector v, multiply v by the reciprocal of its magnitude:
∥v∥1v=∥v∥v
Scaling by the positive number ∥v∥1 keeps the direction and divides the length by ∥v∥, which leaves a length of 1.
The unit vectors i and j
The two most important unit vectors point along the axes:
i=⟨1,0⟩,j=⟨0,1⟩
Any vector in the plane can be written with them: ⟨a,b⟩=ai+bj, meaning a steps in the x-direction plus b steps in the y-direction. For example, ⟨4,−3⟩=4i−3j. It's the same vector in different notation.
Example 3: Vector operations
Let u=⟨3,−2⟩ and v=⟨−1,4⟩. Find (a) 2u−v, (b) u⋅v, (c) the unit vector in the direction of u, and (d) v in terms of i and j.
The dot product has a geometric meaning. If θ is the angle between two nonzero vectors, with 0∘≤θ≤180∘, then
u⋅v=∥u∥∥v∥cosθ
Solve for the angle:
cosθ=∥u∥∥v∥u⋅v
Why it's true:u, v, and u−v form a triangle with angle θ between u and v. Working out ∥u−v∥2 with components gives ∥u∥2+∥v∥2−2u⋅v. The Law of Cosines says the same length squared is ∥u∥2+∥v∥2−2∥u∥∥v∥cosθ. Matching the two leaves u⋅v=∥u∥∥v∥cosθ.
Magnitudes are positive, so the sign of the dot product matches the sign of cosθ:
u⋅v
cosθ
Angle between the vectors
positive
positive
acute (θ<90∘)
zero
zero
right (θ=90∘): the vectors are perpendicular
negative
negative
obtuse (θ>90∘)
The middle row is the big one: if the dot product of two nonzero vectors is 0, the vectors are perpendicular.
Example 4: Finding angles
(a) Find the angle between u=⟨3,−2⟩ and v=⟨−1,4⟩. (b) Are ⟨6,4⟩ and ⟨−2,3⟩ perpendicular? (c) Find k so that ⟨k,3⟩ is perpendicular to ⟨4,−6⟩.
(a) From Example 3, u⋅v=−11 and ∥u∥=13. Also ∥v∥=1+16=17:
Answer: about 137.73∘. The negative dot product already told you the angle would be obtuse.
(b)⟨6,4⟩⋅⟨−2,3⟩=(6)(−2)+(4)(3)=−12+12=0.
Answer: Yes. The dot product is 0, so the vectors are perpendicular.
(c) Set the dot product equal to 0: 4k+(3)(−6)=0, so 4k=18.
Answer:k=4.5.
Vector addition and triangles
When two vectors are added tip to tail, they form a triangle with their sum. If you know magnitudes and angles instead of components, the Law of Cosines and the Law of Sines solve that triangle:
c2=a2+b2−2abcosCasinA=bsinB=csinC
The catch is the angle. If the angle between the two vectors (drawn tail to tail) is θ, then the angle inside the tip-to-tail triangle, opposite the sum, is 180∘−θ.
Example 5: Combining two forces
Two ropes pull on a crate. One pulls with a force of 30 newtons and the other with 40 newtons, and the angle between the ropes is 60∘. Find the magnitude of the resultant force and the angle it makes with the 30-newton force.
Step 1: Draw tip to tail. The angle between the forces is 60∘, so the angle inside the triangle, opposite the resultant R, is 180∘−60∘=120∘.
Step 2: Law of Cosines for the magnitude.
∥R∥2=302+402−2(30)(40)cos120∘=900+1600−2400(−0.5)=3700∥R∥=3700≈60.83 N
Step 3: Law of Sines for the angle. The angle α between R and F1 is opposite the 40-newton side:
Answer: The resultant force is about 60.83 newtons, pointing about 34.72∘ from the 30-newton force, toward the 40-newton force. It's less than 30+40=70 newtons: forces only add their full magnitudes when they point the same way.
Common mistakes
Subtracting tail minus head. Components are head minus tail: ⟨x2−x1,y2−y1⟩.
Wrong quadrant for the direction angle. Check the signs of the components, and add 180∘ to tan−1(ab) when a<0.
Adding magnitudes.∥u+v∥ is usually less than ∥u∥+∥v∥. Add the components first, then find the magnitude.
Treating the dot product as a vector. It's a single number.
Using the angle between the vectors in the Law of Cosines. Inside the tip-to-tail triangle, the angle is 180∘−θ.
A unit vector that isn't length 1. Divide by the magnitude, then check that the squared components add to 1.