Dove's LibraryDove's Library

4.8 - Vectors

Overview

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⃗∥\|\vec{v}\|. (Some books write ∣v⃗∣|\vec{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⃗\vec{v}, or by naming its tail and head, like P1P2→\overrightarrow{P_1P_2}.

Components

A vector P1P2→\overrightarrow{P_1P_2} from P1=(x1,y1)P_1 = (x_1, y_1) to P2=(x2,y2)P_2 = (x_2, y_2) is identified by two numbers, its components:
a=x2−x1(horizontal change),b=y2−y1(vertical change)a = x_2 - x_1 \quad \text{(horizontal change)}, \qquad b = y_2 - y_1 \quad \text{(vertical change)}
The vector is written ⟨a,b⟩\langle a, b \rangle, with angle brackets so it isn't confused with the point (a,b)(a, b). Always subtract head minus tail.
  • Zero vector: ⟨0,0⟩\langle 0, 0 \rangle is the trivial case where the tail and head are the same point (P1=P2P_1 = P_2). It has magnitude 0.
  • Direction: ⟨a,b⟩\langle a, b \rangle points the same way as the segment from the origin to the point (a,b)(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\|\langle a, b \rangle\| = \sqrt{a^2 + b^2}

Example 1: Components and magnitude

Find the components, the magnitude, and the direction angle of the vector from P1=(−5,1)P_1 = (-5, 1) to P2=(−1,4)P_2 = (-1, 4).
Step 1: Components, head minus tail.
P1P2→=⟨−1−(−5), 4−1⟩=⟨4, 3⟩\overrightarrow{P_1P_2} = \langle -1 - (-5), \ 4 - 1 \rangle = \langle 4, \, 3 \rangle
Step 2: Magnitude.
∥P1P2→∥=42+32=25=5\|\overrightarrow{P_1P_2}\| = \sqrt{4^2 + 3^2} = \sqrt{25} = 5
Step 3: Direction angle θ\theta, measured counterclockwise from the positive xx-axis. Both components are positive (Quadrant I), and tan⁡θ=34\tan\theta = \frac{3}{4}:
θ=tan⁡−1(34)≈36.87∘\theta = \tan^{-1}\left(\frac{3}{4}\right) \approx 36.87^\circ
4.8 - Vectors
Answer: P1P2→=⟨4,3⟩\overrightarrow{P_1P_2} = \langle 4, 3 \rangle, with magnitude 5 and direction angle about 36.87∘36.87^\circ. The red arrow is the same vector drawn from the origin to (4,3)(4, 3): same length, same direction.

Watch the quadrant

tan⁡−1\tan^{-1} only gives angles between −90∘-90^\circ and 90∘90^\circ, so it can't tell ⟨3,3⟩\langle 3, 3 \rangle from ⟨−3,−3⟩\langle -3, -3 \rangle. If a<0a < 0, the vector points left, so add 180∘180^\circ. For example, tan⁡−1(−3−3)=45∘\tan^{-1}\left(\frac{-3}{-3}\right) = 45^\circ, but ⟨−3,−3⟩\langle -3, -3 \rangle points down and to the left (Quadrant III), so its direction angle is 45∘+180∘=225∘45^\circ + 180^\circ = 225^\circ.

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⃗∥\|\vec{v}\| and direction angle θ\theta, trigonometry gives
v⃗=⟨∥v⃗∥cos⁡θ, ∥v⃗∥sin⁡θ⟩\vec{v} = \langle \|\vec{v}\|\cos\theta, \ \|\vec{v}\|\sin\theta \rangle
This is the unit circle point (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta) 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∘150^\circ, measured counterclockwise from east. Let east be the positive xx-direction and north the positive yy-direction. Find the components of its velocity.
v⃗=⟨20cos⁡150∘, 20sin⁡150∘⟩=⟨20(−32), 20(12)⟩=⟨−103, 10⟩\vec{v} = \langle 20\cos 150^\circ, \ 20\sin 150^\circ \rangle = \left\langle 20\left(-\frac{\sqrt{3}}{2}\right), \ 20\left(\frac{1}{2}\right) \right\rangle = \langle -10\sqrt{3}, \ 10 \rangle
Check: (−103)2+102=300+100=20\sqrt{(-10\sqrt{3})^2 + 10^2} = \sqrt{300 + 100} = 20.
Answer: v⃗=⟨−103,10⟩≈⟨−17.32,10⟩\vec{v} = \langle -10\sqrt{3}, 10 \rangle \approx \langle -17.32, 10 \rangle. Each hour, the boat moves about 17.32 kilometers west and 10 kilometers north.

Scalar multiplication

Multiplying a vector by a constant kk (a scalar) multiplies each component by kk:
k⟨a,b⟩=⟨ka, kb⟩k\langle a, b \rangle = \langle ka, \ kb \rangle
  • The new vector is parallel to the original.
  • Its length is multiplied by ∣k∣|k|: ∥kv⃗∥=∣k∣ ∥v⃗∥\|k\vec{v}\| = |k| \, \|\vec{v}\|.
  • If k>0k > 0, it points the same way. If k<0k < 0, it points the opposite way. So −v⃗-\vec{v} has the same length as v⃗\vec{v} but the reverse direction.

Vector addition

Add vectors component by component:
⟨a1,b1⟩+⟨a2,b2⟩=⟨a1+a2, b1+b2⟩\langle a_1, b_1 \rangle + \langle a_2, b_2 \rangle = \langle a_1 + a_2, \ b_1 + b_2 \rangle
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⃗)\vec{u} - \vec{v} = \vec{u} + (-\vec{v}).
4.8 - Vectors
Left: u⃗+v⃗=⟨4,1⟩+⟨1,3⟩=⟨5,4⟩\vec{u} + \vec{v} = \langle 4, 1 \rangle + \langle 1, 3 \rangle = \langle 5, 4 \rangle, with the other order dashed. Right: w⃗=⟨2,1⟩\vec{w} = \langle 2, 1 \rangle, 2w⃗=⟨4,2⟩2\vec{w} = \langle 4, 2 \rangle, and −w⃗=⟨−2,−1⟩-\vec{w} = \langle -2, -1 \rangle 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\langle a_1, b_1 \rangle \cdot \langle a_2, b_2 \rangle = a_1a_2 + b_1b_2
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\vec{v} \cdot \vec{v} = a^2 + b^2 = \|\vec{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⃗\vec{v}, multiply v⃗\vec{v} by the reciprocal of its magnitude:
1∥v⃗∥ v⃗=v⃗∥v⃗∥\frac{1}{\|\vec{v}\|}\,\vec{v} = \frac{\vec{v}}{\|\vec{v}\|}
Scaling by the positive number 1∥v⃗∥\frac{1}{\|\vec{v}\|} keeps the direction and divides the length by ∥v⃗∥\|\vec{v}\|, which leaves a length of 1.

The unit vectors i⃗\vec{i} and j⃗\vec{j}

The two most important unit vectors point along the axes:
i⃗=⟨1,0⟩,j⃗=⟨0,1⟩\vec{i} = \langle 1, 0 \rangle, \qquad \vec{j} = \langle 0, 1 \rangle
Any vector in the plane can be written with them: ⟨a,b⟩=ai⃗+bj⃗\langle a, b \rangle = a\vec{i} + b\vec{j}, meaning aa steps in the xx-direction plus bb steps in the yy-direction. For example, ⟨4,−3⟩=4i⃗−3j⃗\langle 4, -3 \rangle = 4\vec{i} - 3\vec{j}. It's the same vector in different notation.

Example 3: Vector operations

Let u⃗=⟨3,−2⟩\vec{u} = \langle 3, -2 \rangle and v⃗=⟨−1,4⟩\vec{v} = \langle -1, 4 \rangle. Find (a) 2u⃗−v⃗2\vec{u} - \vec{v}, (b) u⃗⋅v⃗\vec{u} \cdot \vec{v}, (c) the unit vector in the direction of u⃗\vec{u}, and (d) v⃗\vec{v} in terms of i⃗\vec{i} and j⃗\vec{j}.
(a) Scale, then subtract component by component:
2u⃗−v⃗=⟨6,−4⟩−⟨−1,4⟩=⟨6−(−1), −4−4⟩=⟨7,−8⟩2\vec{u} - \vec{v} = \langle 6, -4 \rangle - \langle -1, 4 \rangle = \langle 6 - (-1), \ -4 - 4 \rangle = \langle 7, -8 \rangle
(b) Multiply matching components and add:
u⃗⋅v⃗=(3)(−1)+(−2)(4)=−3−8=−11\vec{u} \cdot \vec{v} = (3)(-1) + (-2)(4) = -3 - 8 = -11
(c) ∥u⃗∥=32+(−2)2=13\|\vec{u}\| = \sqrt{3^2 + (-2)^2} = \sqrt{13}, so
u⃗∥u⃗∥=⟨313, −213⟩≈⟨0.832, −0.555⟩\frac{\vec{u}}{\|\vec{u}\|} = \left\langle \frac{3}{\sqrt{13}}, \ \frac{-2}{\sqrt{13}} \right\rangle \approx \langle 0.832, \ -0.555 \rangle
Check: 913+413=1\frac{9}{13} + \frac{4}{13} = 1, so the magnitude is 1.
(d) v⃗=−i⃗+4j⃗\vec{v} = -\vec{i} + 4\vec{j}.
Answer: (a) ⟨7,−8⟩\langle 7, -8 \rangle, (b) −11-11, (c) ⟨313,−213⟩\left\langle \frac{3}{\sqrt{13}}, \frac{-2}{\sqrt{13}} \right\rangle, (d) −i⃗+4j⃗-\vec{i} + 4\vec{j}.

Angles between vectors

The dot product has a geometric meaning. If θ\theta is the angle between two nonzero vectors, with 0∘≤θ≤180∘0^\circ \le \theta \le 180^\circ, then
u⃗⋅v⃗=∥u⃗∥ ∥v⃗∥cos⁡θ\vec{u} \cdot \vec{v} = \|\vec{u}\| \, \|\vec{v}\| \cos\theta
Solve for the angle:
cos⁡θ=u⃗⋅v⃗∥u⃗∥ ∥v⃗∥\cos\theta = \frac{\vec{u} \cdot \vec{v}}{\|\vec{u}\| \, \|\vec{v}\|}
Why it's true: u⃗\vec{u}, v⃗\vec{v}, and u⃗−v⃗\vec{u} - \vec{v} form a triangle with angle θ\theta between u⃗\vec{u} and v⃗\vec{v}. Working out ∥u⃗−v⃗∥2\|\vec{u} - \vec{v}\|^2 with components gives ∥u⃗∥2+∥v⃗∥2−2 u⃗⋅v⃗\|\vec{u}\|^2 + \|\vec{v}\|^2 - 2\,\vec{u} \cdot \vec{v}. The Law of Cosines says the same length squared is ∥u⃗∥2+∥v⃗∥2−2∥u⃗∥∥v⃗∥cos⁡θ\|\vec{u}\|^2 + \|\vec{v}\|^2 - 2\|\vec{u}\|\|\vec{v}\|\cos\theta. Matching the two leaves u⃗⋅v⃗=∥u⃗∥∥v⃗∥cos⁡θ\vec{u} \cdot \vec{v} = \|\vec{u}\|\|\vec{v}\|\cos\theta.
Magnitudes are positive, so the sign of the dot product matches the sign of cos⁡θ\cos\theta:
u⃗⋅v⃗\vec{u} \cdot \vec{v}
cos⁡θ\cos\theta
Angle between the vectors
positive
positive
acute (θ<90∘\theta < 90^\circ)
zero
zero
right (θ=90∘\theta = 90^\circ): the vectors are perpendicular
negative
negative
obtuse (θ>90∘\theta > 90^\circ)
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⟩\vec{u} = \langle 3, -2 \rangle and v⃗=⟨−1,4⟩\vec{v} = \langle -1, 4 \rangle. (b) Are ⟨6,4⟩\langle 6, 4 \rangle and ⟨−2,3⟩\langle -2, 3 \rangle perpendicular? (c) Find kk so that ⟨k,3⟩\langle k, 3 \rangle is perpendicular to ⟨4,−6⟩\langle 4, -6 \rangle.
(a) From Example 3, u⃗⋅v⃗=−11\vec{u} \cdot \vec{v} = -11 and ∥u⃗∥=13\|\vec{u}\| = \sqrt{13}. Also ∥v⃗∥=1+16=17\|\vec{v}\| = \sqrt{1 + 16} = \sqrt{17}:
cos⁡θ=−1113 17=−11221≈−0.7399\cos\theta = \frac{-11}{\sqrt{13}\,\sqrt{17}} = \frac{-11}{\sqrt{221}} \approx -0.7399θ=cos⁡−1(−0.7399)≈137.73∘\theta = \cos^{-1}(-0.7399) \approx 137.73^\circ
Answer: about 137.73∘137.73^\circ. The negative dot product already told you the angle would be obtuse.
(b) ⟨6,4⟩⋅⟨−2,3⟩=(6)(−2)+(4)(3)=−12+12=0\langle 6, 4 \rangle \cdot \langle -2, 3 \rangle = (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)=04k + (3)(-6) = 0, so 4k=184k = 18.
Answer: k=4.5k = 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−2abcos⁡Csin⁡Aa=sin⁡Bb=sin⁡Ccc^2 = a^2 + b^2 - 2ab\cos C \qquad \qquad \frac{\sin A}{a} = \frac{\sin B}{b} = \frac{\sin C}{c}
The catch is the angle. If the angle between the two vectors (drawn tail to tail) is θ\theta, then the angle inside the tip-to-tail triangle, opposite the sum, is 180∘−θ180^\circ - \theta.

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∘60^\circ. 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∘60^\circ, so the angle inside the triangle, opposite the resultant R⃗\vec{R}, is 180∘−60∘=120∘180^\circ - 60^\circ = 120^\circ.
4.8 - Vectors
Step 2: Law of Cosines for the magnitude.
∥R⃗∥2=302+402−2(30)(40)cos⁡120∘=900+1600−2400(−0.5)=3700\|\vec{R}\|^2 = 30^2 + 40^2 - 2(30)(40)\cos 120^\circ = 900 + 1600 - 2400(-0.5) = 3700∥R⃗∥=3700≈60.83 N\|\vec{R}\| = \sqrt{3700} \approx 60.83 \text{ N}
Step 3: Law of Sines for the angle. The angle α\alpha between R⃗\vec{R} and F⃗1\vec{F}_1 is opposite the 40-newton side:
sin⁡α40=sin⁡120∘3700⇒sin⁡α=40sin⁡120∘3700≈0.5695\frac{\sin\alpha}{40} = \frac{\sin 120^\circ}{\sqrt{3700}} \quad \Rightarrow \quad \sin\alpha = \frac{40\sin 120^\circ}{\sqrt{3700}} \approx 0.5695α=sin⁡−1(0.5695)≈34.72∘\alpha = \sin^{-1}(0.5695) \approx 34.72^\circ
The inverse sine is safe here: the triangle already has a 120∘120^\circ angle, so α\alpha has to be acute.
Step 4: Check with components. Put F⃗1\vec{F}_1 along the positive xx-axis, so F⃗1=⟨30,0⟩\vec{F}_1 = \langle 30, 0 \rangle and F⃗2=⟨40cos⁡60∘, 40sin⁡60∘⟩=⟨20, 203⟩\vec{F}_2 = \langle 40\cos 60^\circ, \ 40\sin 60^\circ \rangle = \langle 20, \ 20\sqrt{3} \rangle:
R⃗=⟨50, 203⟩,∥R⃗∥=2500+1200=3700,tan⁡−1(20350)≈34.72∘\vec{R} = \langle 50, \ 20\sqrt{3} \rangle, \qquad \|\vec{R}\| = \sqrt{2500 + 1200} = \sqrt{3700}, \qquad \tan^{-1}\left(\frac{20\sqrt{3}}{50}\right) \approx 34.72^\circ
Answer: The resultant force is about 60.83 newtons, pointing about 34.72∘34.72^\circ from the 30-newton force, toward the 40-newton force. It's less than 30+40=7030 + 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⟩\langle x_2 - x_1, \ y_2 - y_1 \rangle.
  • Wrong quadrant for the direction angle. Check the signs of the components, and add 180∘180^\circ to tan⁡−1(ba)\tan^{-1}\left(\frac{b}{a}\right) when a<0a < 0.
  • Adding magnitudes. ∥u⃗+v⃗∥\|\vec{u} + \vec{v}\| is usually less than ∥u⃗∥+∥v⃗∥\|\vec{u}\| + \|\vec{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∘−θ180^\circ - \theta.
  • A unit vector that isn't length 1. Divide by the magnitude, then check that the squared components add to 1.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.