---
title: The Cross Product, Lines, and Planes
module: Vectors and the Geometry of Space
moduleNumber: 10
lessonNumber: 2
order: 1002
summary: >
  The cross product multiplies two vectors into a third perpendicular to both,
  with length equal to the area of the parallelogram they span. That one
  construction supplies the direction of a line, the normal of a plane, and,
  through the scalar triple product, the volume of a parallelepiped. Lines carry
  a point and a direction vector; planes carry a point and a normal, which fixes
  the angle between planes and the distance from a point to a plane.
topics: [Vectors and the Geometry of Space]
sources:
  - book: Stewart
    ref: "Ch. 12; §12.4 The Cross Product; §12.5 Equations of Lines and Planes"
draft: false
---

The [dot product](/calculus/vectors-and-space-curves/vectors-and-the-dot-product)
returns a number. The second vector product returns a vector: given
$\vec a$ and $\vec b$, the **cross product** $\vec a \times \vec b$ is
perpendicular to both, with length the area of the parallelogram they span. That
single construction orients a plane in space, measures parallelogram area and
parallelepiped volume, and supplies the direction of a line and the normal of a
plane.

## The cross product

A vector $\vec c = \vector{c_1, c_2, c_3}$ perpendicular to both
$\vec a$ and $\vec b$ must satisfy $\vec a \cdot \vec c = 0$ and
$\vec b \cdot \vec c = 0$ — two equations in three unknowns, so solutions form
a line through the origin. The cross product is the solution obtained by
eliminating one unknown between the two equations.

> **Definition (Cross product).** For $\vec a = \vector{a_1, a_2, a_3}$ and
> $\vec b = \vector{b_1, b_2, b_3}$,
>
> $$
> \vec a \times \vec b = \vector{a_2 b_3 - a_3 b_2,\ a_3 b_1 - a_1 b_3,\ a_1 b_2 - a_2 b_1}.
> $$
>
> Unlike the dot product, the result is a **vector**, defined only in three
> dimensions.

The component pattern is hard to remember but easy to reconstruct as a symbolic
$3 \times 3$ **determinant** with the standard basis in the first row:

$$
\vec a \times \vec b =
\begin{vmatrix}
\hat\imath & \hat\jmath & \hat k \\
a_1 & a_2 & a_3 \\
b_1 & b_2 & b_3
\end{vmatrix}
= \begin{vmatrix} a_2 & a_3 \\ b_2 & b_3 \end{vmatrix}\hat\imath
- \begin{vmatrix} a_1 & a_3 \\ b_1 & b_3 \end{vmatrix}\hat\jmath
+ \begin{vmatrix} a_1 & a_2 \\ b_1 & b_2 \end{vmatrix}\hat k,
$$

where a $2 \times 2$ determinant is $\left|\begin{smallmatrix} p & q \\ r & s \end{smallmatrix}\right| = ps - qr$.
For $\vec a = \vector{1, 3, 4}$ and $\vec b = \vector{2, 7, -5}$,

$$
\vec a \times \vec b = (-15 - 28)\hat\imath - (-5 - 8)\hat\jmath + (7 - 6)\hat k = -43\hat\imath + 13\hat\jmath + \hat k.
$$

### Geometry of the cross product

> **Theorem (Perpendicularity).** $\vec a \times \vec b$ is orthogonal to
> both $\vec a$ and $\vec b$.

The computation $(\vec a \times \vec b) \cdot \vec a$ expands to a sum
in which every term cancels, giving $0$; the same holds for $\vec b$. So
$\vec a \times \vec b$ is perpendicular to the plane the two vectors span.
Which of the two perpendicular directions it takes is set by the **right-hand
rule**: curl the fingers of your right hand from $\vec a$ toward $\vec b$
through the angle between them, and your thumb points along
$\vec a \times \vec b$.

$$
% caption: The cross product is perpendicular to the plane of a and b, with the
% direction given by the right-hand rule and length equal to the area of the
% parallelogram they span.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % projection: (X,Y,Z) -> (X + 0.5 Y, 0.35 Y + Z); a, b lie in the z=0 plane
  \coordinate (O) at (0,0);
  \coordinate (A) at (2.8,0.14);   % a = (2.6,0.4,0)
  \coordinate (B) at (1.5,0.7);    % b = (0.5,2.0,0)
  \coordinate (AB) at (4.3,0.84);  % a+b = (3.1,2.4,0)
  \draw[black] (O) -- (A) -- (AB) -- (B) -- cycle;
  \draw[very thick, ->] (O) -- (A) node[anchor=north west, black] {$\mathbf{a}$};
  \draw[black, very thick, ->] (O) -- (B) node[anchor=east, black] {$\mathbf{b}$};
  % cross product straight up (z-axis)
  \draw[acc, very thick, ->] (O) -- (0,3.0)
    node[anchor=south, black] {$\mathbf{a}\times\mathbf{b}$};
  \draw[black] (0,0.3) -- (0.3,0.3) -- (0.3,0);
  \node[black, anchor=north] at (2.4,0.55) {parallelogram area};
\end{tikzpicture}
$$

> **Theorem (Length of the cross product).** If $\theta$ is the angle between
> $\vec a$ and $\vec b$ ($0 \le \theta \le \pi$), then
>
> $$
> \norm{\vec a \times \vec b} = \norm{\vec a}\,\norm{\vec b}\sin\theta.
> $$

Expanding $\norm{\vec a \times \vec b}^2$ and using
$\norm{\vec a}^2\norm{\vec b}^2 - (\vec a\cdot\vec b)^2$ from the
dot-product identity yields
$\norm{\vec a}^2\norm{\vec b}^2(1 - \cos^2\theta)$, whose square root is
the claimed formula. Two consequences follow at once. First, since
$\sin\theta = 0$ exactly when the vectors are parallel, the cross product detects
parallelism.

> **Corollary (Parallelism test).** Nonzero $\vec a$ and $\vec b$ are
> parallel if and only if $\vec a \times \vec b = \vec 0$.

Second, $\norm{\vec a}(\norm{\vec b}\sin\theta)$ is base times height for
the parallelogram with sides $\vec a$ and $\vec b$:

$$
% caption: The parallelogram on a and b has base the length of a and height the
% length of b times the sine of the angle, so its area is the cross-product
% magnitude.
\begin{tikzpicture}[scale=1.1, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[acc, fill=acc!10] (0,0) -- (3,0) -- (4.1,1.7) -- (1.1,1.7) -- cycle;
  \draw[very thick, ->] (0,0) -- (3,0) node[midway, below] {$\mathbf{a}$};
  \draw[black, very thick, ->] (0,0) -- (1.1,1.7) node[midway, left] {$\mathbf{b}$};
  \draw[black, dashed] (1.1,1.7) -- (1.1,0);
  \draw[black] (1.1,0) -- (1.1,0.2) -- (0.9,0.2);
  \node[black, anchor=west] at (1.15,0.85) {height};
  \draw[black] (0.5,0) arc (0:57:0.5);
\end{tikzpicture}
$$

> **Theorem (Parallelogram area).** The area of the parallelogram determined by
> $\vec a$ and $\vec b$ equals $\norm{\vec a \times \vec b}$.

To find a vector perpendicular to the plane through $P(1,4,6)$, $Q(-2,5,-1)$, and
$R(1,-1,1)$, cross two edge vectors:
$\overrightarrow{PQ} = \vector{-3,1,-7}$, $\overrightarrow{PR} = \vector{0,-5,-5}$,
and $\overrightarrow{PQ} \times \overrightarrow{PR} = \vector{-40, -15, 15}$.
Half its length, $\tfrac{1}{2}\norm{\vector{-40,-15,15}}$, is the area of triangle
$PQR$.

### Algebra of the cross product

The cross product does not obey the usual rules of multiplication: it is
**anticommutative** and not associative, so order and grouping matter.

| Property | Statement |
| --- | --- |
| Anticommutative | $\vec a \times \vec b = -(\vec b \times \vec a)$ |
| Scalar factoring | $(c\vec a) \times \vec b = c(\vec a \times \vec b) = \vec a \times (c\vec b)$ |
| Distributive | $\vec a \times (\vec b + \vec c) = \vec a \times \vec b + \vec a \times \vec c$ |
| Self-cross | $\vec a \times \vec a = \vec 0$ |
| Scalar triple swap | $\vec a \cdot (\vec b \times \vec c) = (\vec a \times \vec b) \cdot \vec c$ |

The last row introduces the **scalar triple product**
$\vec a \cdot (\vec b \times \vec c)$, computable as a determinant
whose rows are the three vectors:

$$
\vec a \cdot (\vec b \times \vec c) =
\begin{vmatrix}
a_1 & a_2 & a_3 \\
b_1 & b_2 & b_3 \\
c_1 & c_2 & c_3
\end{vmatrix}.
$$

Its absolute value is the **volume of the parallelepiped** with edges
$\vec a, \vec b, \vec c$: the base parallelogram has area
$\norm{\vec b \times \vec c}$, and $\norm{\vec a}\abs{\cos\theta}$ is
the height, so
$V = \abs{\vec a \cdot (\vec b \times \vec c)}$. A zero triple product means
zero height: the three vectors are **coplanar**.

$$
% caption: The parallelepiped on a, b, c has base area the length of b cross c
% and height the length of a times |cos theta|, so its volume is the scalar
% triple product.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % projection: (X,Y,Z) -> (X + 0.42 Y, 0.32 Y + Z)
  \coordinate (O) at (0,0);
  \coordinate (A) at (2.7,0.2);       % a
  \coordinate (B) at (0.95,0.72);     % b
  \coordinate (C) at (0.5,2.1);       % c
  \coordinate (AB) at (3.65,0.92);
  \coordinate (AC) at (3.2,2.3);
  \coordinate (BC) at (1.45,2.82);
  \coordinate (ABC) at (4.15,3.02);
  % faces
  \draw[acc, fill=acc!8] (O) -- (A) -- (AB) -- (B) -- cycle;
  \draw[acc, fill=acc!12] (O) -- (A) -- (AC) -- (C) -- cycle;
  \draw[acc, fill=acc!10] (O) -- (B) -- (BC) -- (C) -- cycle;
  \draw[black] (A) -- (AB) -- (ABC) -- (AC) -- cycle;
  \draw[black] (B) -- (BC) -- (ABC) -- (AB);
  \draw[black] (C) -- (AC) -- (ABC) -- (BC);
  \draw[very thick, ->] (O) -- (A) node[anchor=north, black] {$\mathbf{a}$};
  \draw[black, very thick, ->] (O) -- (B) node[anchor=north, black] {$\mathbf{b}$};
  \draw[black, very thick, ->] (O) -- (C) node[anchor=east, black] {$\mathbf{c}$};
  \node[black, anchor=north] at (2.0,-0.3) {volume $=$ triple product};
\end{tikzpicture}
$$

> **Worked example.** Do $\vec a = \vector{1, 4, -7}$,
> $\vec b = \vector{2, -1, 4}$, and $\vec c = \vector{0, -9, 18}$ lie in a
> common plane?
>
> Compute the scalar triple product as the determinant with the three vectors as
> rows:
>
> $$
> \vec a \cdot (\vec b \times \vec c) =
> \begin{vmatrix} 1 & 4 & -7 \\ 2 & -1 & 4 \\ 0 & -9 & 18 \end{vmatrix}
> = 1(-18 + 36) - 4(36 - 0) + (-7)(-18 - 0) = 18 - 144 + 126 = 0.
> $$
>
> The parallelepiped they span has volume $0$, so the three vectors are
> coplanar.

When a force $\vec F$ acts at a point with position vector $\vec r$, the
**torque** about the origin is the cross product
$\vec\tau = \vec r \times \vec F$, whose direction is the axis of rotation and
whose magnitude $\norm{\vec r}\norm{\vec F}\sin\theta$ is the turning effect.

## Lines in space

In the plane a line is fixed by a point and a slope. In space a slope is not
enough; the direction is carried by a **direction vector** $\vec v$. A point
$\vec r$ is on the line through $\vec r_0$ parallel to $\vec v$ exactly
when $\vec r - \vec r_0$ is a multiple of $\vec v$, which gives the
vector equation $\vec r = \vec r_0 + t\vec v$.

> **Definition (Equations of a line).** The line through $P_0(x_0, y_0, z_0)$
> with direction $\vec v = \vector{a, b, c}$ has
>
> $$
> \text{parametric:}\quad x = x_0 + at,\quad y = y_0 + bt,\quad z = z_0 + ct,
> $$
>
> and, when $a, b, c \ne 0$, the **symmetric equations**
>
> $$
> \frac{x - x_0}{a} = \frac{y - y_0}{b} = \frac{z - z_0}{c}.
> $$
>
> The numbers $a, b, c$ are **direction numbers**; any nonzero multiple of
> $\vec v$ serves equally well.

For the line through $A(2, 4, -3)$ and $B(3, -1, 1)$, take
$\vec v = \overrightarrow{AB} = \vector{1, -5, 4}$ and the point $A$:

$$
x = 2 + t,\quad y = 4 - 5t,\quad z = -3 + 4t,
\qquad
\frac{x - 2}{1} = \frac{y - 4}{-5} = \frac{z + 3}{4}.
$$

Setting $z = 0$ finds where it pierces the $xy$-plane. Restricting the parameter
to $0 \le t \le 1$ describes just the **segment** from $\vec r_0$ to
$\vec r_1$: $\vec r(t) = (1 - t)\vec r_0 + t\vec r_1$.

Two lines in space that are neither parallel nor intersecting are **skew**: they
lie in parallel planes and never meet. Parallel lines have proportional
direction vectors; intersecting lines admit a common point. When both fail, the
lines are skew.

$$
% caption: Two skew lines run in parallel planes and never meet, unlike lines in
% the plane, which are parallel or cross.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % upper plane and its line
  \draw[black, fill=black!4] (-1.8,1.5) -- (2.6,1.5) -- (3.6,2.4) -- (-0.8,2.4) -- cycle;
  \draw[acc, very thick, ->] (-1.2,1.7) -- (2.95,2.18);
  \node[black, anchor=south] at (3.05,2.62) {$L_1$};
  % lower plane and its line
  \draw[black, fill=black!4] (-1.8,-0.2) -- (2.6,-0.2) -- (3.6,0.7) -- (-0.8,0.7) -- cycle;
  \draw[acc, very thick, ->] (2.9,-0.1) -- (-0.75,0.57);
  \node[black, anchor=south] at (-0.7,0.92) {$L_2$};
  \node[black, anchor=west] at (2.9,1.15) {parallel planes};
\end{tikzpicture}
$$

> **Worked example.** Show that
> $L_1: x = 1 + t,\ y = -2 + 3t,\ z = 4 - t$ and
> $L_2: x = 2s,\ y = 3 + s,\ z = -3 + 4s$ are skew.
>
> The direction vectors $\vector{1, 3, -1}$ and $\vector{2, 1, 4}$ are not
> scalar multiples of each other, so the lines are not parallel. For an
> intersection the coordinates must agree for some $t, s$. Matching $x$ and $y$,
>
> $$
> 1 + t = 2s, \qquad -2 + 3t = 3 + s,
> $$
>
> solves to $t = \tfrac{11}{5}$, $s = \tfrac{8}{5}$. But these values give
> $z = 4 - t = \tfrac{9}{5}$ on $L_1$ and $z = -3 + 4s = \tfrac{17}{5}$ on
> $L_2$, which disagree. No $(t, s)$ satisfies all three equations, so the lines
> neither meet nor are parallel: they are skew.

## Planes

A single direction does not orient a plane, but a single perpendicular does. A
**normal vector** $\vec n$ is orthogonal to every vector lying in the plane.
If $\vec r_0$ is a known point and $\vec r$ is arbitrary, then
$\vec r - \vec r_0$ lies in the plane, so $\vec n \cdot (\vec r - \vec r_0) = 0$.

> **Definition (Equation of a plane).** The plane through $P_0(x_0, y_0, z_0)$
> with normal $\vec n = \vector{a, b, c}$ satisfies
>
> $$
> a(x - x_0) + b(y - y_0) + c(z - z_0) = 0,
> $$
>
> which rearranges to the **linear equation** $ax + by + cz + d = 0$. The
> coefficients $\vector{a, b, c}$ are the components of a normal vector.

$$
% caption: A plane is fixed by one point P0 and a normal vector n; every vector
% r - r0 lying in the plane is perpendicular to n.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % the plane drawn as a slanted quad; P0 and P lie in it, normal points up
  \draw[black, fill=black!4] (-1.9,-0.4) -- (2.9,0.2) -- (4.0,1.7) -- (-0.8,1.1) -- cycle;
  \coordinate (P0) at (0.4,0.55);
  \coordinate (P) at (2.5,1.05);
  \fill[black!70] (P0) circle (1.7pt);
  \node[anchor=north east, black] at (P0) {$P_0$};
  \fill[black] (P) circle (1.4pt);
  \node[anchor=north west, black] at (P) {$P$};
  \draw[black, thick, ->] (P0) -- (P) node[midway, below] {$\mathbf{r}-\mathbf{r}_0$};
  \draw[acc, very thick, ->] (P0) -- (0.4,3.0) node[anchor=south, black] {$\mathbf{n}$};
  \draw[black] (0.4,0.85) -- (0.7,0.85) -- (0.7,0.55);
\end{tikzpicture}
$$

The cross product supplies the normal when a plane is given by three points. For
$P(1,3,2)$, $Q(3,-1,6)$, $R(5,2,0)$, the edge vectors
$\overrightarrow{PQ} = \vector{2,-4,4}$ and $\overrightarrow{PR} = \vector{4,-1,-2}$
cross to $\vec n = \vector{12, 20, 14}$, and the plane through $P$ is
$12(x-1) + 20(y-3) + 14(z-2) = 0$, i.e. $6x + 10y + 7z = 50$.

Three further computations recur:

- **Line meets plane.** Substitute the line's parametric $x, y, z$ into the
  plane equation and solve for $t$. For $x = 2+3t$, $y = -4t$, $z = 5+t$ and the
  plane $4x + 5y - 2z = 18$, the substitution gives $-10t = 20$, so $t = -2$ and
  the point is $(-4, 8, 3)$.
- **Angle between planes.** The angle between two planes is the angle between
  their normals: $\cos\theta = (\vec n_1 \cdot \vec n_2)/(\norm{\vec n_1}\norm{\vec n_2})$.
  Parallel planes have parallel normals.
The third computation, the distance from a point to a plane, is again a scalar
projection onto the normal.

> **Theorem (Distance from a point to a plane).** The distance from
> $P_1(x_1, y_1, z_1)$ to the plane $ax + by + cz + d = 0$ is
>
> $$
> D = \frac{\abs{ax_1 + by_1 + cz_1 + d}}{\sqrt{a^2 + b^2 + c^2}}.
> $$

Take any point $P_0$ on the plane; the distance is the length of the projection
of $\overrightarrow{P_0 P_1}$ onto $\vec n = \vector{a, b, c}$. Writing that
scalar projection out and using $ax_0 + by_0 + cz_0 = -d$ collapses it to the
formula.

$$
% caption: The distance from a point to a plane is the length of the shadow of a
% connecting vector on the normal n, not the slanted distance to any point on
% the plane.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black, fill=black!4] (-2.3,-0.5) -- (2.7,-0.5) -- (3.7,0.9) -- (-1.3,0.9) -- cycle;
  \coordinate (P0) at (0.3,0.15);
  \coordinate (P1) at (1.7,2.3);        % point off the plane
  \coordinate (F) at (1.24,0.66);       % foot of perpendicular
  \fill[black!70] (P0) circle (1.5pt) node[anchor=north east, black] {$P_0$};
  \fill[black!70] (P1) circle (1.7pt) node[anchor=south, black] {$P_1$};
  \draw[black, thick, ->] (P0) -- (P1) node[midway, anchor=south east] {};
  \draw[acc, very thick, ->] (P0) -- ++(0.62,0.9) node[anchor=east, black] {$\mathbf{n}$};
  \draw[acc, line width=1.4pt] (P1) -- (F) node[midway, anchor=west] {$D$};
  \draw[black] (F) ++(-0.14,0.2) -- ++(0.16,-0.11) -- ++(-0.11,-0.16);
\end{tikzpicture}
$$

> **Worked example.** Find the distance between the parallel planes
> $10x + 2y - 2z = 5$ and $5x + y - z = 1$.
>
> The normals $\vector{10, 2, -2}$ and $\vector{5, 1, -1}$ are proportional, so
> the planes are parallel and the distance from any point of one to the other is
> constant. Pick a point on the first plane by setting $y = z = 0$: then
> $10x = 5$, so $\bigl(\tfrac12, 0, 0\bigr)$ lies on it. Its distance to the
> second plane $5x + y - z - 1 = 0$ is
>
> $$
> D = \frac{\abs{5 \cdot \tfrac12 + 0 - 0 - 1}}{\sqrt{5^2 + 1^2 + (-1)^2}}
> = \frac{\tfrac{3}{2}}{\sqrt{27}} = \frac{3}{2 \cdot 3\sqrt{3}} = \frac{\sqrt{3}}{6}.
> $$
