Analytic Geometry · Vectors

Vectors Made Simple: From Arrows to Areas and Volumes

Vectors are the language of analytic geometry and physics. This post builds them up from scratch: what a vector is, how to add and scale vectors, and the three products (dot, cross and triple) that turn vectors into angles, areas and volumes.

1. What is a vector?

Some quantities are fully described by a single number: temperature, mass, time. These are scalars. Others need more: to describe the wind, you need to say how strong it is and which way it blows. Those are vectors.

Definition A vector is determined by three things:
  • its direction (the line it lies on, up to parallel shifts),
  • its orientation (which way along that line it points),
  • its magnitude (length, intensity), written \(|\vec a|\).
Every vector can be represented by an oriented segment \(AB\): the point \(A\) is the start (tail) and \(B\) is the end (head) of the vector \( \overrightarrow{AB} = \vec a \). The length of the segment \(\overline{AB}\) is the magnitude, the line through \(A\) and \(B\) gives the direction, and the orientation is from \(A\) towards \(B\).
Vector from A to B A B a direction (line)
Figure 1. The vector \( \overrightarrow{AB} = \vec a \): tail \(A\), head \(B\), lying on a line that gives its direction.

A few important special cases:

2. Multiplying a vector by a number

Definition The product of a scalar \(m\) and a vector \(\vec a\) is the vector \(m\vec a\) with
  • magnitude \( |m|\,|\vec a| \),
  • the same direction (line) as \(\vec a\),
  • the same orientation as \(\vec a\) if \(m > 0\), and the opposite orientation if \(m < 0\).

So \(2\vec a\) is twice as long, \(\frac12\vec a\) half as long, and \(-\vec a\) has the same length but points the other way. Two non-zero vectors are collinear (parallel) exactly when one is a scalar multiple of the other: \( \vec b = m\vec a \).

3. Adding and subtracting vectors

Definition · Triangle rule The sum \( \vec c = \vec a + \vec b \) is obtained by placing the tail of \(\vec b\) at the head of \(\vec a\). Then \(\vec c\) starts at the start of the first vector and ends at the end of the second.
Triangle rule for vector addition a b c=a+b
Figure 2. The triangle rule (solid arrows). The dashed sides show the equivalent parallelogram rule: \(\vec a + \vec b = \vec b + \vec a\).

Equivalently, put both vectors at the same starting point and complete the parallelogram: the sum is the diagonal (the parallelogram rule). The figure also shows why addition is commutative: going "\(\vec a\) then \(\vec b\)" or "\(\vec b\) then \(\vec a\)" leads to the same point.

Subtraction is just addition of the opposite vector:

\[ \vec a - \vec b = \vec a + (-\vec b). \]

A handy geometric fact: if \(\vec a\) and \(\vec b\) start at the same point, then \(\vec a - \vec b\) is the vector from the head of \(\vec b\) to the head of \(\vec a\). In particular, for any points \(A\), \(B\) and origin \(O\): \( \overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA} \).

4. Projections and coordinates

Projection onto an axis The projection of \(\vec a\) onto the axis \(x\) is the scalar \[ \operatorname{Pr}_x \vec a = |\vec a|\cos\varphi = |\vec a|\cos(\vec a, x), \] where \(\varphi\) is the angle between \(\vec a\) and the axis.

Think of it as the shadow of the vector on the axis when light falls perpendicularly. It is signed: positive when \(\varphi < 90^\circ\), negative when \(\varphi > 90^\circ\), zero when the vector is perpendicular to the axis.

The projection is linear. In particular, the projection of a sum equals the sum of projections:

\[ \operatorname{Pr}_x(\vec a + \vec b) = \operatorname{Pr}_x \vec a + \operatorname{Pr}_x \vec b. \]

Coordinates

Projections onto the coordinate axes are exactly the coordinates of a vector: \( a_x = \operatorname{Pr}_x\vec a,\ a_y = \operatorname{Pr}_y\vec a,\ a_z = \operatorname{Pr}_z\vec a \). With unit vectors \(\vec i, \vec j, \vec k\) along the axes,

\[ \vec a = a_x\vec i + a_y\vec j + a_z\vec k, \qquad \text{written } \vec a\{a_x, a_y, a_z\}. \]

Coordinates turn geometry into arithmetic:

\[ |\vec a| = \sqrt{a_x^2 + a_y^2 + a_z^2}, \qquad \vec a \pm \vec b = \{a_x \pm b_x,\ a_y \pm b_y,\ a_z \pm b_z\}, \qquad m\vec a = \{ma_x, ma_y, ma_z\}. \]

For points \(A(x_1, y_1, z_1)\) and \(B(x_2, y_2, z_2)\): \( \overrightarrow{AB} = \{x_2 - x_1,\ y_2 - y_1,\ z_2 - z_1\} \) ("head minus tail").

Example 1 For \(A(1, -2, 3)\) and \(B(3, 0, 2)\): \( \overrightarrow{AB} = \{2, 2, -1\} \), \( |\overrightarrow{AB}| = \sqrt{4 + 4 + 1} = 3 \). The unit vector in its direction is \( \{\tfrac23, \tfrac23, -\tfrac13\} \). Its coordinates are the cosines of the angles the vector makes with the axes (the direction cosines).

5. The dot (scalar) product

Definition The scalar product of \(\vec a\) and \(\vec b\) is the product of their magnitudes and the cosine of the angle between them. If \( \alpha = \angle(\vec a, \vec b) \), then \[ \vec a\cdot\vec b = |\vec a|\,|\vec b|\cos\alpha = |\vec a|\operatorname{Pr}_{\vec a}\vec b = |\vec b|\operatorname{Pr}_{\vec b}\vec a. \] The result is a number (scalar), hence the name.

Intuition: the dot product measures how much two vectors "agree". In physics, the work done by a force \(\vec F\) along a displacement \(\vec s\) is \( W = \vec F\cdot\vec s \): only the component of the force along the motion does any work.

Key properties

In coordinates

Since \( \vec i\cdot\vec i = \vec j\cdot\vec j = \vec k\cdot\vec k = 1 \) and \( \vec i\cdot\vec j = \vec j\cdot\vec k = \vec k\cdot\vec i = 0 \), expanding with distributivity gives the formula you will use most often:

\[ \vec a\cdot\vec b = a_xb_x + a_yb_y + a_zb_z, \qquad \cos\alpha = \frac{\vec a\cdot\vec b}{|\vec a|\,|\vec b|}. \]
Example 2 · Angle and projection \( \vec a\{2, -1, 2\} \), \( \vec b\{1, 2, 2\} \). Then \( |\vec a| = |\vec b| = 3 \) and \[ \vec a\cdot\vec b = 2 - 2 + 4 = 4, \qquad \cos\alpha = \frac{4}{9}, \qquad \operatorname{Pr}_{\vec a}\vec b = \frac{\vec a\cdot\vec b}{|\vec a|} = \frac{4}{3}. \]
Example 3 · Perpendicular? \( \{1, 2, -1\}\cdot\{3, -1, 1\} = 3 - 2 - 1 = 0 \), so these vectors are perpendicular. No angles or drawings needed.

6. The cross (vector) product

Definition The vector product of \(\vec a\) and \(\vec b\) is a third vector \(\vec c\), written \( \vec a\times\vec b \) or \( [\vec a\,\vec b] \), with:
  1. \( |\vec c| = |\vec a|\,|\vec b|\sin\alpha \);
  2. \( \vec c \perp \vec a \) and \( \vec c \perp \vec b \);
  3. \(\vec a, \vec b, \vec c\) form a right-handed triple: looking from the head of \(\vec c\), the shortest rotation taking \(\vec a\) onto \(\vec b\) is counter-clockwise.
Cross product perpendicular to a and b a b c=a×b α area = |a×b|
Figure 3. \( \vec a\times\vec b \) is perpendicular to both vectors; its length equals the shaded area.

Right-hand rule: curl the fingers of your right hand from \(\vec a\) towards \(\vec b\); your thumb points along \( \vec a\times\vec b \). For the basis vectors this gives

\[ \vec i\times\vec j = \vec k, \qquad \vec j\times\vec k = \vec i, \qquad \vec k\times\vec i = \vec j, \qquad \vec i\times\vec i = \vec j\times\vec j = \vec k\times\vec k = \vec 0. \]

Properties

Two traps
  • The order matters: \( \vec a\times\vec b \ne \vec b\times\vec a \) (they are opposite).
  • The cross product is not associative: \( (\vec i\times\vec i)\times\vec j = \vec 0 \), but \( \vec i\times(\vec i\times\vec j) = \vec i\times\vec k = -\vec j \). Always keep the brackets.

In coordinates

If \( \vec a\{a_x, a_y, a_z\} \) and \( \vec b\{b_x, b_y, b_z\} \), then

\[ \vec a\times\vec b = \begin{vmatrix} \vec i & \vec j & \vec k \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix} = (a_yb_z - a_zb_y)\,\vec i - (a_xb_z - a_zb_x)\,\vec j + (a_xb_y - a_yb_x)\,\vec k. \]

Expand the "determinant" along the first row. Don't forget the minus sign in front of the \(\vec j\) term!

Geometric meaning: area

The magnitude \( |\vec a|\,|\vec b|\sin\alpha \) is base times height of the parallelogram spanned by \(\vec a\) and \(\vec b\). So

\[ P_{\text{parallelogram}} = |\vec a\times\vec b|, \qquad P_{\text{triangle}} = \tfrac12|\vec a\times\vec b|. \]
Example 4 · Computing a cross product \( \vec a\{1, 2, 3\} \), \( \vec b\{4, 5, 6\} \): \[ \vec a\times\vec b = \begin{vmatrix} \vec i & \vec j & \vec k \\ 1 & 2 & 3 \\ 4 & 5 & 6 \end{vmatrix} = (12 - 15)\vec i - (6 - 12)\vec j + (5 - 8)\vec k = \{-3, 6, -3\}. \] Check: \( \{-3, 6, -3\}\cdot\{1, 2, 3\} = -3 + 12 - 9 = 0 \) and \( \{-3, 6, -3\}\cdot\{4, 5, 6\} = -12 + 30 - 18 = 0 \). Perpendicular to both, as it should be. The parallelogram area is \( \sqrt{9 + 36 + 9} = 3\sqrt6 \).
Example 5 · Area of a triangle Triangle with vertices \(A(1, 0, 0)\), \(B(0, 2, 0)\), \(C(0, 0, 3)\). Take \( \overrightarrow{AB} = \{-1, 2, 0\} \), \( \overrightarrow{AC} = \{-1, 0, 3\} \): \[ \overrightarrow{AB}\times\overrightarrow{AC} = (6 - 0)\vec i - (-3 - 0)\vec j + (0 + 2)\vec k = \{6, 3, 2\}, \qquad |\{6, 3, 2\}| = 7. \] Hence \( P_{\triangle ABC} = \frac72 \).

7. The scalar triple product

Definition The (mixed) triple product of \(\vec a, \vec b, \vec c\) is the number \[ (\vec a\times\vec b)\cdot\vec c. \] In coordinates it is a genuine 3×3 determinant: \[ (\vec a\times\vec b)\cdot\vec c = \begin{vmatrix} a_x & a_y & a_z \\ b_x & b_y & b_z \\ c_x & c_y & c_z \end{vmatrix}. \]

Geometric meaning: volume

\( |\vec a\times\vec b| \) is the area of the base parallelogram, and \( \vec a\times\vec b \) is perpendicular to that base. Dotting with \(\vec c\) multiplies the area by the projection of \(\vec c\) onto the normal, which is the height. Area × height = volume:

\[ V_{\text{parallelepiped}} = \big|(\vec a\times\vec b)\cdot\vec c\big|, \qquad V_{\text{tetrahedron}} = \tfrac16\big|(\vec a\times\vec b)\cdot\vec c\big|. \]

Useful consequences:

Example 6 · Volume \( \vec a\{2, 0, 0\} \), \( \vec b\{1, 3, 0\} \), \( \vec c\{1, 1, 4\} \): \[ \begin{vmatrix} 2 & 0 & 0 \\ 1 & 3 & 0 \\ 1 & 1 & 4 \end{vmatrix} = 2\cdot(12 - 0) = 24. \] The parallelepiped has volume 24, and the tetrahedron on the same vectors has volume \( \frac{24}{6} = 4 \).
Example 7 · Coplanar vectors Using Example 4, for \( \vec c\{7, 8, 9\} \): \( (\vec a\times\vec b)\cdot\vec c = \{-3, 6, -3\}\cdot\{7, 8, 9\} = -21 + 48 - 27 = 0 \). The three vectors \(\{1,2,3\}, \{4,5,6\}, \{7,8,9\}\) are coplanar (indeed, \( \vec c = 2\vec b - \vec a \)).

8. Summary: which product for which job?

OperationResultFormula in coordinatesUse it to find
Dot product \( \vec a\cdot\vec b \)number\( a_xb_x + a_yb_y + a_zb_z \)angles, projections, perpendicularity (\(=0\)), work
Cross product \( \vec a\times\vec b \)vectordeterminant with \( \vec i, \vec j, \vec k \)a normal vector, areas, parallelism (\(=\vec 0\)), torque
Triple product \( (\vec a\times\vec b)\cdot\vec c \)number3×3 determinantvolumes, coplanarity (\(=0\)), orientation

A nice identity tying the first two together: since \( \sin^2\alpha + \cos^2\alpha = 1 \),

\[ |\vec a\times\vec b|^2 + (\vec a\cdot\vec b)^2 = |\vec a|^2|\vec b|^2. \]

9. Practice problems

Try these before opening the solution. More solved problems from this topic are in Geometry.

Problem 1: Find the angle between \( \vec a\{1, 1, 0\} \) and \( \vec b\{0, 1, 1\} \).

\( \vec a\cdot\vec b = 1 \), \( |\vec a| = |\vec b| = \sqrt2 \), so \( \cos\alpha = \frac12 \) and \( \alpha = 60^\circ \).

Problem 2: For which \(m\) are \( \{m, 2, 1\} \) and \( \{3, -1, 4\} \) perpendicular?

\( 3m - 2 + 4 = 0 \Rightarrow m = -\frac23 \).

Problem 3: Find a unit vector perpendicular to both \( \vec a\{1, 0, 1\} \) and \( \vec b\{0, 1, 1\} \).

\( \vec a\times\vec b = (0 - 1)\vec i - (1 - 0)\vec j + (1 - 0)\vec k = \{-1, -1, 1\} \), with length \(\sqrt3\). Answer: \( \pm\frac{1}{\sqrt3}\{-1, -1, 1\} \) (two possible orientations).

Problem 4: Are \( \{1, 2, -1\} \), \( \{2, 1, 3\} \), \( \{3, 3, 2\} \) coplanar?

\( \begin{vmatrix} 1 & 2 & -1 \\ 2 & 1 & 3 \\ 3 & 3 & 2 \end{vmatrix} = 1(2 - 9) - 2(4 - 9) - 1(6 - 3) = -7 + 10 - 3 = 0. \) Yes, they are coplanar (the third is the sum of the first two).

Problem 5: Volume of the tetrahedron with vertices \(O(0,0,0)\), \(A(1,2,3)\), \(B(0,1,1)\), \(C(2,0,1)\).

\( \begin{vmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 2 & 0 & 1 \end{vmatrix} = 1(1 - 0) - 2(0 - 2) + 3(0 - 2) = -1. \) So \( V = \frac16|-1| = \frac16 \).

Problem 6: Show that \( |\vec a + \vec b|^2 + |\vec a - \vec b|^2 = 2\big(|\vec a|^2 + |\vec b|^2\big) \). What does it say geometrically?

Expand with the dot product: \( |\vec a \pm \vec b|^2 = |\vec a|^2 \pm 2\,\vec a\cdot\vec b + |\vec b|^2 \). Adding the two, the middle terms cancel. Geometrically: in any parallelogram, the sum of the squares of the diagonals equals the sum of the squares of all four sides (the parallelogram law).

Final thoughts

Vectors are arrows you can slide, stretch and chain together. The three products each answer a geometric question: the dot product asks "how aligned are they?", the cross product asks "what is perpendicular to both, and how much area do they span?", and the triple product asks "how much space do three of them enclose?". Once you know which question you are asking, you know which product to compute.

Next in the series: lines and planes in space, where these products become the tools for writing their equations.