Chapter 2: Vectors in Space
2.2 Vectors in Three Dimensions
Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
Adding a third coordinate costs very little and buys a great deal. The algebra of the previous section carries over untouched: you still add componentwise, you still scale componentwise, and the magnitude is still the square root of the sum of the squares. What changes is the geometry you can describe. A plane vector can only turn within a sheet of paper, while a space vector can tilt out of it, and that single extra degree of freedom is what lets vectors model positions of objects, forces on a bridge, and the velocity of anything that flies.
The coordinate system itself deserves a moment. Three mutually perpendicular axes meet at the origin, and each pair of axes spans a coordinate plane: the $xy$-plane, the $xz$-plane and the $yz$-plane. Those three planes cut space into eight regions, and a point is located by how far you travel along each axis. The orientation of the axes is a convention, and the one everyone uses is the right-handed one, because the cross product two sections from now produces different answers in a left-handed system.
The two facts of solid geometry you need immediately are the distance between two points and the equation of a sphere, and both are the Pythagorean theorem applied twice. Once you have the distance formula, the magnitude of a vector, the length of a segment and the radius of a sphere are all the same computation wearing different names.
Everything that follows in this chapter is built on this setup. Lines, planes, dot products and cross products are all statements about triples of numbers, and the reason they stay manageable is that the arithmetic never becomes harder than what you are doing here.
Decoder
A point in space is a location, recorded by three coordinates, while a vector in space is a displacement, recorded by three components; the distance between two points and the magnitude of the vector joining them are the same number.
The first half of that statement is the bookkeeping distinction from the plane, repeated in one more dimension. The second half is the reason the distinction is safe to blur in practice. Subtracting the coordinates of $P$ from the coordinates of $Q$ produces the components of $\overrightarrow{PQ}$, and the length of that vector is exactly the distance from $P$ to $Q$. So a question about how far apart two objects are and a question about how long a vector is never require separate techniques.
Why the square root of a sum of three squares measures distance is worth seeing once. Given two points, first move within a horizontal plane to get the horizontal displacement, whose length is $\sqrt{(\Delta x)^2 + (\Delta y)^2}$ by the ordinary Pythagorean theorem. Then rise by $\Delta z$ perpendicular to that plane. The two legs are perpendicular, so the Pythagorean theorem applies again and the squares simply accumulate.
The classic mistake in three dimensions is sketching. A point such as $(2, -3, 5)$ is easy to misplace on a hand-drawn axis system, and a sign error in the drawing survives into the algebra. Trust the components over the picture, and use the picture only to check that an answer is plausible.
Definitions and results
The three-dimensional rectangular system. Three perpendicular number lines meet at the origin. A point is written $(x, y, z)$. The coordinate planes $z = 0$, $y = 0$ and $x = 0$ divide space into eight octants, the first being the one where all three coordinates are positive.
Right-handed orientation. Point the fingers of your right hand along the positive $x$-axis and curl them toward the positive $y$-axis; your thumb points along the positive $z$-axis. Every formula in this chapter assumes this orientation.
Equations with a missing variable. In space, an equation in two of the variables describes a surface, not a curve. The equation $z = 4$ is a horizontal plane, and $x^2 + y^2 = 9$ is an infinite circular cylinder of radius $3$ around the $z$-axis, since $z$ is free to be anything.
Distance and midpoint. For $P(x_1, y_1, z_1)$ and $Q(x_2, y_2, z_2)$,
$$ d(P, Q) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $$
and the midpoint is the componentwise average $\left( \frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2} \right)$.
Spheres. The sphere of radius $r$ centered at $(a, b, c)$ is the set of points at distance $r$ from the center:
$$ (x - a)^2 + (y - b)^2 + (z - c)^2 = r^2 $$
An equation with equal coefficients on $x^2$, $y^2$ and $z^2$ and some linear terms is recognized as a sphere by completing the square three times.
Component form and magnitude. The vector from $P$ to $Q$ is $\overrightarrow{PQ} = \langle x_2 - x_1, \; y_2 - y_1, \; z_2 - z_1 \rangle$, and for $\mathbf{v} = \langle v_1, v_2, v_3 \rangle$,
$$ \|\mathbf{v}\| = \sqrt{v_1^2 + v_2^2 + v_3^2} $$
Operations. Sums, differences and scalar multiples are computed one component at a time, and they obey the same algebraic rules as in the plane: commutativity, associativity, both distributive laws, and $\|c\mathbf{v}\| = |c|\,\|\mathbf{v}\|$. Two nonzero vectors are parallel exactly when one is a scalar multiple of the other, so $\langle 2, -4, 6 \rangle$ and $\langle -1, 2, -3 \rangle$ are parallel and point opposite ways.
Unit vectors and the standard basis. Dividing a nonzero vector by its magnitude produces the unit vector in its direction, and multiplying that unit vector by $L$ produces a vector of length $L$ pointing the same way. With $\mathbf{i} = \langle 1,0,0\rangle$, $\mathbf{j} = \langle 0,1,0\rangle$ and $\mathbf{k} = \langle 0,0,1\rangle$, every space vector is $v_1\mathbf{i} + v_2\mathbf{j} + v_3\mathbf{k}$.
Worked examples
Distance and midpoint
Let $A(1, 2, 2)$ and $B(4, 6, 14)$. The vector from $A$ to $B$ is
$$ \overrightarrow{AB} = \langle 3, 4, 12 \rangle, \qquad \|\overrightarrow{AB}\| = \sqrt{9 + 16 + 144} = \sqrt{169} = 13 $$
so the two points are $13$ units apart. The midpoint is $\left( \tfrac{5}{2}, 4, 8 \right)$. As a check, the vector from $A$ to the midpoint is $\left\langle \tfrac{3}{2}, 2, 6 \right\rangle$, which is exactly half of $\overrightarrow{AB}$, and its length is $\tfrac{13}{2}$.
Recognizing a sphere
Identify the surface $x^2 + y^2 + z^2 - 6x + 4y - 2z - 11 = 0$.
Group the variables and complete the square in each:
$$ (x^2 - 6x) + (y^2 + 4y) + (z^2 - 2z) = 11 $$
$$ (x - 3)^2 - 9 + (y + 2)^2 - 4 + (z - 1)^2 - 1 = 11 $$
$$ (x - 3)^2 + (y + 2)^2 + (z - 1)^2 = 25 $$
This is the sphere of radius $5$ centered at $(3, -2, 1)$. Test a point: $(3, -2, 6)$ should lie on it, and substituting gives $0 + 0 + 25 = 25$.
A sum and the triangle inequality
Let $\mathbf{u} = \langle 1, -2, 2 \rangle$ and $\mathbf{v} = \langle 2, 3, 6 \rangle$. Their magnitudes are
$$ \|\mathbf{u}\| = \sqrt{1 + 4 + 4} = 3, \qquad \|\mathbf{v}\| = \sqrt{4 + 9 + 36} = 7 $$
Adding componentwise gives $\mathbf{u} + \mathbf{v} = \langle 3, 1, 8 \rangle$, whose magnitude is $\sqrt{9 + 1 + 64} = \sqrt{74} \approx 8.60$. That is less than $3 + 7 = 10$, as the triangle inequality requires: the two vectors do not point the same way, so their lengths do not simply add. For contrast, $2\mathbf{u} = \langle 2, -4, 4 \rangle$ has magnitude exactly $6$, since scaling does not change direction.
A unit vector and a prescribed length
Let $\mathbf{w} = \langle -4, 4, -7 \rangle$. Then
$$ \|\mathbf{w}\| = \sqrt{16 + 16 + 49} = \sqrt{81} = 9 $$
so the unit vector in the direction of $\mathbf{w}$ is
$$ \mathbf{u} = \left\langle -\tfrac{4}{9}, \; \tfrac{4}{9}, \; -\tfrac{7}{9} \right\rangle $$
To produce a vector of length $18$ pointing the same way, multiply by $18$:
$$ 18\mathbf{u} = \langle -8, 8, -14 \rangle $$
Check it directly: $\sqrt{64 + 64 + 196} = \sqrt{324} = 18$, and each component is exactly twice the corresponding component of $\mathbf{w}$, so the direction is unchanged.
Practice
These drills cover the whole section: locating points, computing distances, recognizing spheres, and performing the three operations on space vectors, including normalizing to unit length.
Practice
Generated problems for this section, graded instantly.
Quiz
Five items on coordinates and distance in space, component form and magnitude, and sums, scalar multiples and unit vectors.
Quiz
5 problems with a score at the end.