This note covers vectors in two and three dimensions: magnitude and unit vectors, the scalar (dot) product, the vector (cross) product, and lines written in vector form. These tools let you find angles, areas and the relationship between two lines in space, and they feed straight into vector kinematics.
Key ideas
A vector has both size and direction. In three dimensions we write it with components, for example \( \mathbf{a} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} = 2\mathbf{i} - \mathbf{j} + 3\mathbf{k} \). A position vector \( \overrightarrow{OA} \) goes from the origin to the point \( A \). The vector from \( A \) to \( B \) is \( \overrightarrow{AB} = \mathbf{b} - \mathbf{a} \) (end minus start).
- Magnitude. \( |\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2} \). A unit vector has magnitude 1; the unit vector in the direction of \( \mathbf{a} \) is \( \dfrac{\mathbf{a}}{|\mathbf{a}|} \).
- Parallel vectors. \( \mathbf{a} \) and \( \mathbf{b} \) are parallel if one is a scalar multiple of the other: \( \mathbf{a} = k\mathbf{b} \).
- Scalar product. The dot product gives a number. In components, \( \mathbf{a}\cdot\mathbf{b} = a_1b_1 + a_2b_2 + a_3b_3 \). Geometrically, \( \mathbf{a}\cdot\mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta \), where \( \theta \) is the angle between the two vectors when they are placed tail to tail (\( 0^\circ \le \theta \le 180^\circ \)).
- Perpendicular vectors. For non-zero vectors, \( \mathbf{a}\cdot\mathbf{b} = 0 \) exactly when they are perpendicular.
- Vector product. The cross product gives a vector that is perpendicular to both \( \mathbf{a} \) and \( \mathbf{b} \). Its magnitude is \( |\mathbf{a}||\mathbf{b}|\sin\theta \), which equals the area of the parallelogram with sides \( \mathbf{a} \) and \( \mathbf{b} \). The order matters: \( \mathbf{b}\times\mathbf{a} = -(\mathbf{a}\times\mathbf{b}) \).
- Vector equation of a line. A line through the point with position vector \( \mathbf{a} \), with direction vector \( \mathbf{d} \), is \( \mathbf{r} = \mathbf{a} + \lambda\mathbf{d} \). Each value of the parameter \( \lambda \) gives one point on the line. A line can be written in many equivalent ways, because any point on it and any multiple of \( \mathbf{d} \) will do.
Two lines in three dimensions can be parallel (directions are multiples of each other), coincident (parallel and sharing a point), intersecting (one common point) or skew (not parallel and never meeting). Skew lines only happen in three dimensions.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \( \overrightarrow{AB} = \mathbf{b} - \mathbf{a} \) | Vector from \( A \) to \( B \) using position vectors. |
| \( |\mathbf{a}| = \sqrt{a_1^2+a_2^2+a_3^2} \) | Length of a vector, or distance between points when applied to \( \overrightarrow{AB} \). |
| \( \mathbf{a}\cdot\mathbf{b} = a_1b_1+a_2b_2+a_3b_3 \) | Scalar product from components. |
| \( \cos\theta = \dfrac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|} \) | Angle between two vectors. If the result is negative, \( \theta \) is obtuse. |
| \( \mathbf{a}\times\mathbf{b} = \begin{pmatrix} a_2b_3-a_3b_2 \\ a_3b_1-a_1b_3 \\ a_1b_2-a_2b_1 \end{pmatrix} \) | Vector perpendicular to both \( \mathbf{a} \) and \( \mathbf{b} \). |
| \( |\mathbf{a}\times\mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta \) | Area of the parallelogram with sides \( \mathbf{a} \) and \( \mathbf{b} \). |
| \( \text{Area of triangle} = \tfrac12|\mathbf{a}\times\mathbf{b}| \) | Triangle with two sides given by \( \mathbf{a} \) and \( \mathbf{b} \). |
| \( \mathbf{r} = \mathbf{a} + \lambda\mathbf{d} \) | Line through \( \mathbf{a} \) with direction \( \mathbf{d} \). |
| Angle between two lines | Use the angle between their direction vectors. Take the acute angle (use \( |\mathbf{d}_1\cdot\mathbf{d}_2| \)) if the question asks for the angle between the lines. |
Worked examples
Example 1 Given \( \mathbf{a} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} \) and \( \mathbf{b} = \begin{pmatrix} 1 \\ 4 \\ -2 \end{pmatrix} \), find (a) the angle between them, (b) \( \mathbf{a}\times\mathbf{b} \) and its magnitude.
(a) Scalar product: \( \mathbf{a}\cdot\mathbf{b} = (2)(1) + (-1)(4) + (3)(-2) = 2 - 4 - 6 = -8 \).
Magnitudes: \( |\mathbf{a}| = \sqrt{4+1+9} = \sqrt{14} \) and \( |\mathbf{b}| = \sqrt{1+16+4} = \sqrt{21} \).
\( \cos\theta = \dfrac{-8}{\sqrt{14}\sqrt{21}} = \dfrac{-8}{\sqrt{294}} \approx -0.4666 \), so \( \theta = \cos^{-1}(-0.4666) \approx 117.8^\circ \).
(b) \( \mathbf{a}\times\mathbf{b} = \begin{pmatrix} (-1)(-2) - (3)(4) \\ (3)(1) - (2)(-2) \\ (2)(4) - (-1)(1) \end{pmatrix} = \begin{pmatrix} 2-12 \\ 3+4 \\ 8+1 \end{pmatrix} = \begin{pmatrix} -10 \\ 7 \\ 9 \end{pmatrix} \).
Magnitude: \( \sqrt{100+49+81} = \sqrt{230} \approx 15.2 \).
Check: \( |\mathbf{a}|^2|\mathbf{b}|^2 - (\mathbf{a}\cdot\mathbf{b})^2 = 294 - 64 = 230 \), which matches \( |\mathbf{a}\times\mathbf{b}|^2 \).
Answer: (a) \( 118^\circ \) (3 s.f.); (b) \( \begin{pmatrix} -10 \\ 7 \\ 9 \end{pmatrix} \), magnitude \( \sqrt{230} \approx 15.2 \).
Example 2 A triangular solar panel has corners at \( A(1,0,2) \), \( B(3,1,5) \) and \( C(2,4,3) \), with lengths in metres. Find its area.
Choose two sides from the same corner: \( \overrightarrow{AB} = \begin{pmatrix} 2 \\ 1 \\ 3 \end{pmatrix} \) and \( \overrightarrow{AC} = \begin{pmatrix} 1 \\ 4 \\ 1 \end{pmatrix} \).
\( \overrightarrow{AB}\times\overrightarrow{AC} = \begin{pmatrix} (1)(1)-(3)(4) \\ (3)(1)-(2)(1) \\ (2)(4)-(1)(1) \end{pmatrix} = \begin{pmatrix} -11 \\ 1 \\ 7 \end{pmatrix} \).
Magnitude: \( \sqrt{121+1+49} = \sqrt{171} \approx 13.08 \).
The triangle is half of the parallelogram, so area \( = \tfrac12\sqrt{171} \approx 6.54 \).
Answer: \( 6.54\ \text{m}^2 \) (3 s.f.).
Example 3 Line \( L_1 \): \( \mathbf{r} = \begin{pmatrix} 1 \\ 2 \\ 0 \end{pmatrix} + \lambda\begin{pmatrix} 2 \\ 1 \\ -1 \end{pmatrix} \). Line \( L_2 \): \( \mathbf{r} = \begin{pmatrix} 0 \\ 5 \\ 2 \end{pmatrix} + \mu\begin{pmatrix} 3 \\ -2 \\ -3 \end{pmatrix} \). (a) Show the lines intersect and find the point. (b) Find the acute angle between them. (c) Show that \( L_1 \) and \( L_3 \): \( \mathbf{r} = \begin{pmatrix} 4 \\ 0 \\ 5 \end{pmatrix} + \mu\begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix} \) are skew.
(a) The directions \( (2,1,-1) \) and \( (3,-2,-3) \) are not multiples of each other, so the lines are not parallel. Set the coordinates equal:
\( x \): \( 1 + 2\lambda = 3\mu \) \( y \): \( 2 + \lambda = 5 - 2\mu \) \( z \): \( -\lambda = 2 - 3\mu \).
From \( y \): \( \lambda = 3 - 2\mu \). Substitute into \( x \): \( 1 + 6 - 4\mu = 3\mu \), so \( 7 = 7\mu \) and \( \mu = 1 \), \( \lambda = 1 \).
Check in \( z \): left side \( -1 \), right side \( 2 - 3 = -1 \). It works, so the lines intersect.
Point: \( \lambda = 1 \) in \( L_1 \) gives \( (3, 3, -1) \).
(b) \( \mathbf{d}_1\cdot\mathbf{d}_2 = 6 - 2 + 3 = 7 \). \( |\mathbf{d}_1| = \sqrt{6} \), \( |\mathbf{d}_2| = \sqrt{22} \). \( \cos\theta = \dfrac{7}{\sqrt{132}} \approx 0.6093 \), so \( \theta \approx 52.5^\circ \).
(c) Equate coordinates, using \( \mu \) for \( L_3 \): \( 1 + 2\lambda = 4 + \mu \), \( 2 + \lambda = -\mu \), \( -\lambda = 5 + 2\mu \).
From the second, \( \mu = -2 - \lambda \). The first gives \( 1 + 2\lambda = 2 - \lambda \), so \( \lambda = \tfrac13 \) and \( \mu = -\tfrac73 \).
Third equation: left side \( -\tfrac13 \), right side \( 5 - \tfrac{14}{3} = \tfrac13 \). They differ, so there is no common point. The directions are not parallel, so the lines are skew.
Answer: (a) intersect at \( (3,3,-1) \); (b) \( 52.5^\circ \); (c) no solution and not parallel, so skew.
Common errors
- Common error: using \( \mathbf{a} - \mathbf{b} \) for \( \overrightarrow{AB} \). It is end minus start, \( \mathbf{b} - \mathbf{a} \).
- Common error: writing the scalar product as a vector, or the vector product as a number. The dot product is a number; the cross product is a vector.
- Common error: using the same letter for the parameter in both lines when solving for an intersection. Use \( \lambda \) and \( \mu \), otherwise you force the two parameters to be equal.
- Common error: stopping after two equations. With three coordinates you must check the third equation before claiming the lines meet.
- Common error: reporting an obtuse angle between directions as "the angle between the lines" when an acute angle is asked for.
Exam tip: When asked to "show" two lines intersect, solve two equations and then substitute into the third to verify. Always give the coordinates of the point, not just the parameter values.
Check yourself
- Find the angle between \( \mathbf{a} = (1, 2, 2) \) and \( \mathbf{b} = (3, 0, -4) \).
Answer
\( \mathbf{a}\cdot\mathbf{b} = 3 + 0 - 8 = -5 \); \( |\mathbf{a}| = 3 \); \( |\mathbf{b}| = 5 \). \( \cos\theta = \dfrac{-5}{15} = -\tfrac13 \), so \( \theta \approx 109^\circ \). - Find \( k \) so that \( (2, k, -3) \) is perpendicular to \( (4, 1, 2) \).
Answer
Dot product \( = 8 + k - 6 = 0 \), so \( k = -2 \). - Find the area of the parallelogram with sides \( (2, 1, 0) \) and \( (1, 3, 0) \).
Answer
Cross product \( = (0, 0, 6 - 1) = (0, 0, 5) \). Area \( = 5 \). - A line passes through \( (1,1,1) \) and \( (3,0,4) \). Write its equation and decide whether \( (5,-1,7) \) lies on it.
Answer
Direction \( = (2, -1, 3) \), so \( \mathbf{r} = (1,1,1) + t(2,-1,3) \). For \( t = 2 \): \( (5, -1, 7) \). It matches, so the point lies on the line.