Vectors
A vector is a quantity with both a size and a direction, like a displacement, a velocity or a force. This guide covers components and magnitude, combining vectors, unit vectors, the dot product, and solving vector triangles.
The vector from \(P_1(x_1, y_1)\) to \(P_2(x_2, y_2)\) is \(\langle a, b\rangle = \langle x_2 - x_1, y_2 - y_1\rangle\), also written \(a\vec i + b\vec j\). Its magnitude is \(\sqrt{a^2 + b^2}\) and its direction is that of the segment from the origin to \((a, b)\); with direction angle \(\theta\), the components are \(\langle |\vec v|\cos\theta, |\vec v|\sin\theta\rangle\). Vectors add and scale component by component. A unit vector has magnitude 1: divide a vector by its magnitude. The dot product \(\langle a_1, b_1\rangle \cdot \langle a_2, b_2\rangle = a_1a_2 + b_1b_2\) equals \(|\vec u||\vec v|\cos\theta\), so for nonzero vectors it is 0 when, and only when, they are perpendicular.
1Components and magnitude
Find the vector from \(P_1(1, -2)\) to \(P_2(4, 2)\), its magnitude and its direction angle.
- 1Components: \(\langle 4 - 1, 2 - (-2)\rangle = \langle 3, 4\rangle\).
- 2Magnitude: \(|\vec v| = \sqrt{3^2 + 4^2} = 5\).
- 3Direction: the angle with the positive x-axis has \(\tan\theta = \frac43\); in quadrant I, \(\theta \approx 53.13°\).
A vector has magnitude 10 and direction 150°. Find its components.
- 1\(\vec v = \langle |\vec v|\cos\theta, |\vec v|\sin\theta\rangle = \langle 10\cos 150°, 10\sin 150°\rangle\).
- 2\(= \langle -5\sqrt3, 5\rangle \approx \langle -8.660, 5\rangle\).
“\(\vec v = \langle 3, 4\rangle\) has magnitude \(\sqrt{3^2 + 4^2} = 5\) and points about 53.13° above the positive x-axis.”
The vector from \(P_1\) to \(P_2\) is end minus start. \(P_1 - P_2 = \langle -3, -4\rangle\) has the same length but points the opposite way.
2Adding and scaling vectors
With \(\vec u = \langle 2, -1\rangle\) and \(\vec v = \langle -3, 4\rangle\), find \(\vec u + \vec v\), \(3\vec u\), \(\vec u - \vec v\) and \(2\vec u - \vec v\).
- 1Add or subtract matching components: \(\vec u + \vec v = \langle -1, 3\rangle\), \(\vec u - \vec v = \langle 5, -5\rangle\).
- 2Scalar multiples multiply each component: \(3\vec u = \langle 6, -3\rangle\), parallel to \(\vec u\) and 3 times as long.
- 3\(2\vec u - \vec v = \langle 4, -2\rangle - \langle -3, 4\rangle = \langle 7, -6\rangle\).
\(|\vec u + \vec v|\) is not \(|\vec u| + |\vec v|\) unless the vectors point the same way. Here \(\sqrt5 + 5 \approx 7.24\), but \(|\langle -1, 3\rangle| = \sqrt{10} \approx 3.16\).
3Unit vectors
Find the unit vector in the direction of \(\langle 3, 4\rangle\), and write \(\langle 3, 4\rangle\) with \(\vec i\) and \(\vec j\).
- 1Divide by the magnitude: \(\frac15\langle 3, 4\rangle = \langle 0.6, 0.8\rangle\). Its length is \(\sqrt{0.36 + 0.64} = 1\).
- 2\(\vec i = \langle 1, 0\rangle\) and \(\vec j = \langle 0, 1\rangle\), so \(\langle 3, 4\rangle = 3\vec i + 4\vec j\).
4The dot product
Find \(\vec u \cdot \vec v\) and the angle between \(\vec u = \langle 2, -1\rangle\) and \(\vec v = \langle -3, 4\rangle\). Are \(\langle 2, 3\rangle\) and \(\langle -3, 2\rangle\) perpendicular?
- 1\(\vec u \cdot \vec v = 2(-3) + (-1)(4) = -10\). \(|\vec u| = \sqrt5\), \(|\vec v| = 5\).
- 2\(\cos\theta = \dfrac{\vec u \cdot \vec v}{|\vec u||\vec v|} = \dfrac{-10}{5\sqrt5} \approx -0.894\), so \(\theta \approx 153.43°\).
- 3\(\langle 2, 3\rangle \cdot \langle -3, 2\rangle = -6 + 6 = 0\): a dot product of 0 means perpendicular.
The dot product of two vectors is a single number, not a vector. A negative value means the angle between them is more than 90°.
5Vector triangles
Adding two vectors tip to tail forms a triangle. Its unknown side or angle can be found from components, or with the Law of Cosines (\(c^2 = a^2 + b^2 - 2ab\cos C\)) and the Law of Sines (\(\frac{\sin A}{a} = \frac{\sin B}{b}\)).
A hiker walks 4 km east, then 3 km in the direction 60° north of east. How far is she from the start?
- 1Components: \(\langle 4, 0\rangle + \langle 3\cos 60°, 3\sin 60°\rangle = \langle 5.5, 2.598\rangle\), with length \(\approx 6.083\) km.
- 2Check with a triangle: the two legs meet at an angle of \(180° - 60° = 120°\), so \(d^2 = 4^2 + 3^2 - 2(4)(3)\cos 120° = 25 + 12 = 37\).
- 3\(d = \sqrt{37} \approx 6.083\) km, in the direction \(\arctan\frac{2.598}{5.5} \approx 25.28°\) north of east.
Quick reference
| Operation | Formula |
|---|---|
| From \(P_1\) to \(P_2\) | \(\langle x_2 - x_1, y_2 - y_1\rangle\) |
| Magnitude | \(\sqrt{a^2 + b^2}\) |
| From length and angle | \(\langle |\vec v|\cos\theta, |\vec v|\sin\theta\rangle\) |
| Sum, scalar multiple | Component by component |
| Unit vector | \(\frac{\vec v}{|\vec v|}\) |
| Dot product | \(a_1a_2 + b_1b_2 = |\vec u||\vec v|\cos\theta\) |
| Perpendicular | \(\vec u \cdot \vec v = 0\) |