20.2 Vectors in Component Form
AHL 3.12
- the base vectors \(\boldsymbol{i}\), \(\boldsymbol{j}\) (in 2D) and \(\boldsymbol{i}\), \(\boldsymbol{j}\), \(\boldsymbol{k}\) (in 3D)
- how to write a vector in component form: as \(x\boldsymbol{i} + y\boldsymbol{j} + z\boldsymbol{k}\) or as a column vector
- how to find a displacement vector from two position vectors: \(\overrightarrow{AB} = \boldsymbol{b} - \boldsymbol{a}\)
- how to find the magnitude of a vector and the unit vector in its direction
- how to add, subtract and scale vectors using components
Vectors in two dimensions
Let \(\boldsymbol{i}\) and \(\boldsymbol{j}\) be the unit vectors in the positive directions of the \(x\)-axis and the \(y\)-axis. They are called the base vectors.
Let \(R(x, y)\) be any point in the plane, and let \(\boldsymbol{r} = \overrightarrow{OR}\) be its position vector. To go from \(O\) to \(R\), move \(x\) units along the \(x\)-axis and then \(y\) units parallel to the \(y\)-axis. So
\[ \boldsymbol{r} = \overrightarrow{OR} = x\boldsymbol{i} + y\boldsymbol{j} . \]
The numbers \(x\) and \(y\) are the components of \(\boldsymbol{r}\). We can also write \(\boldsymbol{r}\) as a column vector:
\[ \boldsymbol{r} = x\boldsymbol{i} + y\boldsymbol{j} = \begin{pmatrix} x \\ y \end{pmatrix} . \]
In this book we use column vectors and \(\boldsymbol{i}, \boldsymbol{j}\) form. (Some books also write the row form \((x, y)\), but this looks like a point, so be careful.)
Magnitude and unit vector
By Pythagoras’ theorem in Figure 1, the length of \(\boldsymbol{r}\) is \(\sqrt{x^2 + y^2}\).
Magnitude and unit vector in 2D Partly in the HL formula booklet
\[ |\boldsymbol{v}| = \sqrt{v_1^2 + v_2^2}, \quad \text{where } \boldsymbol{v} = \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} \]
In the HL booklet
\[ \hat{\boldsymbol{v}} = \frac{\boldsymbol{v}}{|\boldsymbol{v}|} \]
For \(\boldsymbol{r} = \begin{pmatrix} x \\ y \end{pmatrix}\): \(\;|\boldsymbol{r}| = \sqrt{x^2 + y^2}\) and \(\hat{\boldsymbol{r}} = \dfrac{1}{\sqrt{x^2 + y^2}}\begin{pmatrix} x \\ y \end{pmatrix}\).
- \(|\boldsymbol{v}|\): the magnitude (length) of \(\boldsymbol{v}\)
- \(v_1\), \(v_2\): the components of \(\boldsymbol{v}\)
- \(\hat{\boldsymbol{v}}\): the unit vector in the direction of \(\boldsymbol{v}\)
- \(\boldsymbol{r}\): the position vector of the point \((x, y)\)
- \(x\), \(y\): the components of \(\boldsymbol{r}\)
The booklet gives the magnitude in the 3D form \(|\boldsymbol{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2}\) (3.12).
Operations with components
Add, subtract and multiply by a scalar component by component. If \(\boldsymbol{a} = x_1\boldsymbol{i} + y_1\boldsymbol{j}\) and \(\boldsymbol{b} = x_2\boldsymbol{i} + y_2\boldsymbol{j}\), then
\[ \boldsymbol{a} + \boldsymbol{b} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \end{pmatrix}, \qquad \boldsymbol{a} - \boldsymbol{b} = \begin{pmatrix} x_1 - x_2 \\ y_1 - y_2 \end{pmatrix}, \qquad \lambda\boldsymbol{a} = \begin{pmatrix} \lambda x_1 \\ \lambda y_1 \end{pmatrix} . \]
Displacement vectors
If \(A\) and \(B\) have position vectors \(\boldsymbol{a}\) and \(\boldsymbol{b}\), the triangle rule gives \(\overrightarrow{AB} = \overrightarrow{AO} + \overrightarrow{OB} = -\boldsymbol{a} + \boldsymbol{b}\).
Displacement vector Not in the formula booklet
\[ \overrightarrow{AB} = \boldsymbol{b} - \boldsymbol{a} \qquad\text{("head minus tail")} \]
The distance between \(A\) and \(B\) is \(\big|\overrightarrow{AB}\big|\).
- \(\overrightarrow{AB}\): the vector from \(A\) to \(B\)
- \(\boldsymbol{a}\), \(\boldsymbol{b}\): the position vectors of \(A\) and \(B\)
Example 1 The points \(A\) and \(B\) have position vectors \(\boldsymbol{a} = 5\boldsymbol{i} + \boldsymbol{j}\) and \(\boldsymbol{b} = -\boldsymbol{i} + 9\boldsymbol{j}\). Find
(a) \(\overrightarrow{AB}\)
(b) the distance \(AB\), and the unit vector in the direction of \(\overrightarrow{AB}\).
(a) \(\overrightarrow{AB} = \boldsymbol{b} - \boldsymbol{a} = (-1 - 5)\boldsymbol{i} + (9 - 1)\boldsymbol{j} = -6\boldsymbol{i} + 8\boldsymbol{j}\).
(b) \(\big|\overrightarrow{AB}\big| = \sqrt{(-6)^2 + 8^2} = \sqrt{100} = 10\).
Unit vector: \(\dfrac{1}{10}(-6\boldsymbol{i} + 8\boldsymbol{j}) = -\dfrac{3}{5}\boldsymbol{i} + \dfrac{4}{5}\boldsymbol{j}\).
(Check: \(\left(\frac{3}{5}\right)^2 + \left(\frac{4}{5}\right)^2 = 1\) ✓.)
Vectors in three dimensions
In three dimensions we add a \(z\)-axis, perpendicular to both the \(x\)-axis and the \(y\)-axis. The three base vectors are
\[ \boldsymbol{i} = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}, \qquad \boldsymbol{j} = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}, \qquad \boldsymbol{k} = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}, \]
the unit vectors in the positive \(x\), \(y\) and \(z\) directions.
Vectors in three dimensions Partly in the HL formula booklet
- Magnitude: \(\;|\boldsymbol{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2}\), where \(\boldsymbol{v} = \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix}\). In the HL booklet
- The point \(P(x, y, z)\) has position vector \(\;\overrightarrow{OP} = x\boldsymbol{i} + y\boldsymbol{j} + z\boldsymbol{k} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\).
- Unit vector: \(\;\hat{\boldsymbol{v}} = \dfrac{\boldsymbol{v}}{|\boldsymbol{v}|}\).
- Equal vectors: \(\begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} \iff x_1 = x_2,\; y_1 = y_2,\; z_1 = z_2\).
- \(|\boldsymbol{v}|\): the magnitude (length) of \(\boldsymbol{v}\)
- \(v_1\), \(v_2\), \(v_3\): the components of \(\boldsymbol{v}\)
- \(x\), \(y\), \(z\): the coordinates of the point \(P\)
- \(\overrightarrow{OP}\): the position vector of \(P\) (\(O\) is the origin)
- \(\boldsymbol{i}\), \(\boldsymbol{j}\), \(\boldsymbol{k}\): the unit vectors in the directions of the \(x\)-, \(y\)- and \(z\)-axes
- \(\hat{\boldsymbol{v}}\): the unit vector in the direction of \(\boldsymbol{v}\)
- \(x_1, y_1, z_1\) and \(x_2, y_2, z_2\): the components of two vectors
Only the item marked In the HL booklet is in the formula booklet. The distance between two points in 3D is in the SL section (3.1).
The magnitude comes from using Pythagoras’ theorem twice: first in the \(xy\)-plane, \(\sqrt{x^2 + y^2}\), then upwards with \(z\).
Be careful. Components are always measured along \(\boldsymbol{i}\), \(\boldsymbol{j}\), \(\boldsymbol{k}\). If \(\overrightarrow{OQ} = \boldsymbol{a} + 2\boldsymbol{b} + 4\boldsymbol{c}\) for some other vectors \(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}\), you may not write \(\overrightarrow{OQ} = \begin{pmatrix} 1 \\ 2 \\ 4 \end{pmatrix}\), unless \(\boldsymbol{a} = \boldsymbol{i}\), \(\boldsymbol{b} = \boldsymbol{j}\) and \(\boldsymbol{c} = \boldsymbol{k}\).
Operations in three dimensions
Exactly as in 2D, work component by component:
\[ \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} \pm \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} = \begin{pmatrix} x_1 \pm x_2 \\ y_1 \pm y_2 \\ z_1 \pm z_2 \end{pmatrix}, \qquad \lambda\begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} = \begin{pmatrix} \lambda x_1 \\ \lambda y_1 \\ \lambda z_1 \end{pmatrix} . \]
In component form, two vectors are parallel when all their components are in the same ratio, for example \(\begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} \parallel \begin{pmatrix} -4 \\ 2 \\ -6 \end{pmatrix}\) because the second is \(-2\) times the first.
Example 2 The points \(A\) and \(B\) have coordinates \((3, -1, 4)\) and \((-2, 5, 2)\). Find \(\overrightarrow{AB}\)
(a) in terms of \(\boldsymbol{i}\), \(\boldsymbol{j}\) and \(\boldsymbol{k}\),
(b) as a column vector.
(a) \(\overrightarrow{AB} = \boldsymbol{b} - \boldsymbol{a} = (-2 - 3)\boldsymbol{i} + (5 - (-1))\boldsymbol{j} + (2 - 4)\boldsymbol{k} = -5\boldsymbol{i} + 6\boldsymbol{j} - 2\boldsymbol{k}\).
(b) \(\overrightarrow{AB} = \begin{pmatrix} -5 \\ 6 \\ -2 \end{pmatrix}\).
Example 3 The points \(A\), \(B\) and \(C\) have position vectors
\[ \begin{pmatrix} 1 \\ 2 \\ -3 \end{pmatrix}, \qquad \begin{pmatrix} 4 \\ 0 \\ 3 \end{pmatrix} \qquad\text{and}\qquad \begin{pmatrix} -1 \\ 6 \\ -1 \end{pmatrix} \]
respectively. Find
(a) the length of \(\overrightarrow{AB}\),
(b) the unit vector in the direction of \(\overrightarrow{AC}\),
(c) the position vector of \(D\) such that \(ABCD\) is a parallelogram,
(d) the position vector of \(E\) such that \(\overrightarrow{BE} = 2\overrightarrow{AC}\).
(a) \(\overrightarrow{AB} = \begin{pmatrix} 3 \\ -2 \\ 6 \end{pmatrix}\), so \(\big|\overrightarrow{AB}\big| = \sqrt{9 + 4 + 36} = \sqrt{49} = 7\).
(b) \(\overrightarrow{AC} = \begin{pmatrix} -2 \\ 4 \\ 2 \end{pmatrix}\) and \(\big|\overrightarrow{AC}\big| = \sqrt{4 + 16 + 4} = \sqrt{24} = 2\sqrt{6}\).
\[ \text{unit vector} = \frac{1}{2\sqrt{6}}\begin{pmatrix} -2 \\ 4 \\ 2 \end{pmatrix} = \frac{1}{\sqrt{6}}\begin{pmatrix} -1 \\ 2 \\ 1 \end{pmatrix} . \]
(c) In the parallelogram \(ABCD\) (vertices in this order), \(\overrightarrow{AD} = \overrightarrow{BC}\), so \(\boldsymbol{d} - \boldsymbol{a} = \boldsymbol{c} - \boldsymbol{b}\):
\[ \boldsymbol{d} = \boldsymbol{a} + \boldsymbol{c} - \boldsymbol{b} = \begin{pmatrix} 1 - 1 - 4 \\ 2 + 6 - 0 \\ -3 - 1 - 3 \end{pmatrix} = \begin{pmatrix} -4 \\ 8 \\ -7 \end{pmatrix} . \]
(d) \(\boldsymbol{e} - \boldsymbol{b} = 2\overrightarrow{AC}\), so
\[ \boldsymbol{e} = \begin{pmatrix} 4 \\ 0 \\ 3 \end{pmatrix} + 2\begin{pmatrix} -2 \\ 4 \\ 2 \end{pmatrix} = \begin{pmatrix} 0 \\ 8 \\ 7 \end{pmatrix} . \]
To find a vector of a given length \(L\) in the direction of \(\boldsymbol{v}\), use \(L\,\hat{\boldsymbol{v}}\).
Example 4 Find the vector of magnitude \(15\) in the direction of \(\boldsymbol{v} = 2\boldsymbol{i} - \boldsymbol{j} + 2\boldsymbol{k}\).
\(|\boldsymbol{v}| = \sqrt{4 + 1 + 4} = 3\), so \(\hat{\boldsymbol{v}} = \frac{1}{3}(2\boldsymbol{i} - \boldsymbol{j} + 2\boldsymbol{k})\).
The required vector is \(15\hat{\boldsymbol{v}} = 5(2\boldsymbol{i} - \boldsymbol{j} + 2\boldsymbol{k}) = 10\boldsymbol{i} - 5\boldsymbol{j} + 10\boldsymbol{k}\).
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(\overrightarrow{AB} = \boldsymbol{a} - \boldsymbol{b}\) | \(\overrightarrow{AB} = \boldsymbol{b} - \boldsymbol{a}\) | “Head minus tail”: the end point minus the start point. |
| \(\vert 3\boldsymbol{i} - 4\boldsymbol{j}\vert = \sqrt{9 - 16}\) | \(\sqrt{3^2 + (-4)^2} = 5\) | Square each component; squares are never negative. |
| \(\vert 2\boldsymbol{i} + \boldsymbol{j} + 2\boldsymbol{k}\vert = 2 + 1 + 2 = 5\) | \(\sqrt{4 + 1 + 4} = 3\) | The magnitude is a square root of a sum of squares, not a sum. |
| Unit vector of \(\begin{pmatrix} 3 \\ 4 \end{pmatrix}\) is \(\begin{pmatrix} 1 \\ 1 \end{pmatrix}\) | \(\frac{1}{5}\begin{pmatrix} 3 \\ 4 \end{pmatrix}\) | Divide every component by the magnitude; the direction must not change. |
| \(ABCD\) parallelogram, so \(\boldsymbol{d} = \boldsymbol{b} + \boldsymbol{c} - \boldsymbol{a}\) | \(\boldsymbol{d} = \boldsymbol{a} + \boldsymbol{c} - \boldsymbol{b}\) | Use \(\overrightarrow{AD} = \overrightarrow{BC}\); the vertex order matters. |
Exercises
1 Given \(\boldsymbol{a} = 2\boldsymbol{i} - 3\boldsymbol{j}\) and \(\boldsymbol{b} = -\boldsymbol{i} + 4\boldsymbol{j}\), find
(a) \(3\boldsymbol{a} - 2\boldsymbol{b}\)
(b) \(|\boldsymbol{a} + \boldsymbol{b}|\)
(a) \((6 + 2)\boldsymbol{i} + (-9 - 8)\boldsymbol{j} = 8\boldsymbol{i} - 17\boldsymbol{j}\).
(b) \(\boldsymbol{a} + \boldsymbol{b} = \boldsymbol{i} + \boldsymbol{j}\), so \(|\boldsymbol{a} + \boldsymbol{b}| = \sqrt{2}\).
2 Find the magnitude of \(\boldsymbol{v} = \begin{pmatrix} 2 \\ -6 \\ 3 \end{pmatrix}\), and the unit vector in its direction.
\(|\boldsymbol{v}| = \sqrt{4 + 36 + 9} = \sqrt{49} = 7\). \(\qquad\) \(\hat{\boldsymbol{v}} = \dfrac{1}{7}\begin{pmatrix} 2 \\ -6 \\ 3 \end{pmatrix}\).
3 The points \(A(-1, 4, 2)\) and \(B(3, 2, -2)\) are given. Find \(\overrightarrow{AB}\) and the distance \(AB\).
\(\overrightarrow{AB} = \begin{pmatrix} 4 \\ -2 \\ -4 \end{pmatrix}\) and \(AB = \sqrt{16 + 4 + 16} = \sqrt{36} = 6\).
4 Find the vector of magnitude \(12\) in the direction of \(2\boldsymbol{i} + \boldsymbol{j} - 2\boldsymbol{k}\).
\(|2\boldsymbol{i} + \boldsymbol{j} - 2\boldsymbol{k}| = \sqrt{4 + 1 + 4} = 3\). The vector is \(\dfrac{12}{3}(2\boldsymbol{i} + \boldsymbol{j} - 2\boldsymbol{k}) = 8\boldsymbol{i} + 4\boldsymbol{j} - 8\boldsymbol{k}\).
5 Find \(p\) and \(q\) such that \(\begin{pmatrix} p \\ 3 \\ -1 \end{pmatrix} + 2\begin{pmatrix} 1 \\ q \\ 4 \end{pmatrix} = \begin{pmatrix} 5 \\ 1 \\ 7 \end{pmatrix}\).
\(x\): \(p + 2 = 5\), so \(p = 3\). \(\quad\) \(y\): \(3 + 2q = 1\), so \(q = -1\). \(\quad\) \(z\): \(-1 + 8 = 7\) ✓ (consistent).
6 Find the possible values of \(k\) such that \(\left|\begin{pmatrix} k \\ 2k \\ 2 \end{pmatrix}\right| = 7\).
\(k^2 + 4k^2 + 4 = 49 \Rightarrow 5k^2 = 45 \Rightarrow k^2 = 9 \Rightarrow k = \pm 3\).
7 Find \(m\) and \(n\) such that \(\begin{pmatrix} m \\ -4 \\ 6 \end{pmatrix}\) is parallel to \(\begin{pmatrix} 2 \\ n \\ -3 \end{pmatrix}\).
\(\begin{pmatrix} m \\ -4 \\ 6 \end{pmatrix} = t\begin{pmatrix} 2 \\ n \\ -3 \end{pmatrix}\). The \(z\)-components give \(6 = -3t\), so \(t = -2\).
Then \(m = 2t = -4\), and \(-4 = tn = -2n\), so \(n = 2\).
8 \(PQRS\) is a parallelogram with \(P(1, 0, 2)\), \(Q(4, 2, 1)\) and \(R(6, -1, 3)\). Find the coordinates of \(S\).
\(\overrightarrow{PS} = \overrightarrow{QR}\), so \(\boldsymbol{s} = \boldsymbol{p} + \boldsymbol{r} - \boldsymbol{q} = \begin{pmatrix} 1 + 6 - 4 \\ 0 - 1 - 2 \\ 2 + 3 - 1 \end{pmatrix} = \begin{pmatrix} 3 \\ -3 \\ 4 \end{pmatrix}\). So \(S\) is \((3, -3, 4)\).
9 Given \(\boldsymbol{a} = 2\boldsymbol{i} + \boldsymbol{j}\) and \(\boldsymbol{b} = \boldsymbol{i} - 3\boldsymbol{j}\), find the scalars \(\lambda\) and \(\mu\) such that \(\lambda\boldsymbol{a} + \mu\boldsymbol{b} = 7\boldsymbol{i} + 14\boldsymbol{j}\).
\(\boldsymbol{i}\): \(2\lambda + \mu = 7\). \(\qquad\) \(\boldsymbol{j}\): \(\lambda - 3\mu = 14\).
From the first, \(\mu = 7 - 2\lambda\). Then \(\lambda - 21 + 6\lambda = 14\), so \(\lambda = 5\) and \(\mu = -3\).
10 A drone takes off from a point \(O\). It flies with displacement \(\begin{pmatrix} 3 \\ 4 \\ 0 \end{pmatrix}\) km and then with displacement \(\begin{pmatrix} -1 \\ 2 \\ 2 \end{pmatrix}\) km (\(\boldsymbol{k}\) points vertically upwards).
(a) Find its final position vector relative to \(O\).
(b) Find its distance from \(O\), giving an exact answer.
(c) Find the total distance travelled along the two straight paths.
(a) \(\begin{pmatrix} 3 \\ 4 \\ 0 \end{pmatrix} + \begin{pmatrix} -1 \\ 2 \\ 2 \end{pmatrix} = \begin{pmatrix} 2 \\ 6 \\ 2 \end{pmatrix}\) km.
(b) \(\sqrt{4 + 36 + 4} = \sqrt{44} = 2\sqrt{11}\) km.
(c) \(\sqrt{9 + 16} + \sqrt{1 + 4 + 4} = 5 + 3 = 8\) km. (This is longer than the straight-line distance \(2\sqrt{11} \approx 6.63\) km, as expected.)