STEMviz
Mathematics · Geometry, Vectors and Statistics

Vectors in 3D - Coordinates in Space

Extends vectors to three dimensions: coordinates in space, component form, magnitude via double Pythagoras, and the vector operations carried over unchanged.

Vectors in 3D - Coordinates in Space

Everything built for vectors in the plane carries over to space with one addition: a third coordinate. This chapter extends components, magnitude, addition, subtraction and scalar multiplication to three dimensions, and introduces the extra geometric intuition needed to "see" a point or a vector in space. The algebra barely changes; the payoff is that the whole of the rest of this block — lines, planes, angles and distances in space — depends on being fluent with it.

To follow the chapter you need everything from the 2D vector chapter: components, magnitude, addition, scalar multiplication and parallel vectors. Have a clear mental (or physical) model of three mutually perpendicular axes ready, since sketches in 3D are harder to draw accurately than in 2D and intuition has to compensate.

A third axis, a third coordinate. Space is described by three mutually perpendicular axes, xx, yy and zz, meeting at the origin OO. Every point PP in space corresponds to exactly one ordered triple (x,y,z)(x,y,z), exactly as a point in the plane corresponds to an ordered pair.

1. Coordinates in Three-Dimensional Space

The three coordinate axes are conventionally drawn so that xx, yy and zz obey the right-hand rule: point the fingers of the right hand along xx and curl them toward yy; the thumb points along zz. A point P(x,y,z)P(x,y,z) is located by moving xx units along the xx-axis, then yy units parallel to the yy-axis, then zz units parallel to the zz-axis.

The three coordinate planes are xyxy (where z=0z=0), xzxz (where y=0y=0) and yzyz (where x=0x=0); together they divide space into eight regions called octants, the 3D analogue of the plane's four quadrants.

2. Vectors in Component Form

A vector in space has three components:

v⃗=(v1v2v3)=v1i⃗+v2j⃗+v3k⃗\vec{v} = \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = v_1\vec{i} + v_2\vec{j} + v_3\vec{k}

where i⃗=(100)\vec{i}=\begin{pmatrix}1\\0\\0\end{pmatrix}, j⃗=(010)\vec{j}=\begin{pmatrix}0\\1\\0\end{pmatrix}, k⃗=(001)\vec{k}=\begin{pmatrix}0\\0\\1\end{pmatrix} are the three standard unit vectors along the axes. Given A(x1,y1,z1)A(x_1,y_1,z_1) and B(x2,y2,z2)B(x_2,y_2,z_2),

AB→=(x2−x1y2−y1z2−z1)\overrightarrow{AB} = \begin{pmatrix} x_2-x_1 \\ y_2-y_1 \\ z_2-z_1 \end{pmatrix}

exactly as in two dimensions, just with one extra row. A position vector OP→=(xyz)\overrightarrow{OP} = \begin{pmatrix}x\\y\\z\end{pmatrix} again lets any point be treated as a vector from the origin.

3. Magnitude in Three Dimensions

The magnitude of v⃗=(abc)\vec{v}=\begin{pmatrix}a\\b\\c\end{pmatrix} requires two applications of Pythagoras' theorem, not one. First, the diagonal across the base rectangle (sides aa and bb) has length a2+b2\sqrt{a^2+b^2}. This diagonal and the vertical side cc are then the two legs of a second right triangle, whose hypotenuse is v⃗\vec v itself:

∣v⃗∣=(a2+b2)2+c2=a2+b2+c2|\vec{v}| = \sqrt{\left(\sqrt{a^2+b^2}\right)^2 + c^2} = \sqrt{a^2+b^2+c^2}

The same two-step argument applied to two points A(x1,y1,z1)A(x_1,y_1,z_1), B(x2,y2,z2)B(x_2,y_2,z_2) gives the distance formula in space:

∣AB∣=(x2−x1)2+(y2−y1)2+(z2−z1)2|AB| = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}

Worked example. Find ∣v⃗∣|\vec v| for v⃗=(2−36)\vec v = \begin{pmatrix}2\\-3\\6\end{pmatrix}.

∣v⃗∣=22+(−3)2+62=4+9+36=49=7|\vec v| = \sqrt{2^2+(-3)^2+6^2} = \sqrt{4+9+36} = \sqrt{49} = 7

4. Addition, Subtraction and Scalar Multiplication

All three operations extend component-wise, exactly as in the plane, now with three rows instead of two:

u⃗±v⃗=(u1±v1u2±v2u3±v3),kv⃗=(kv1kv2kv3)\vec{u}\pm\vec{v} = \begin{pmatrix}u_1\pm v_1\\u_2\pm v_2\\u_3\pm v_3\end{pmatrix}, \qquad k\vec{v} = \begin{pmatrix}kv_1\\kv_2\\kv_3\end{pmatrix}

The geometric pictures (triangle rule, parallelogram rule, direction reversal under a negative scalar) are unchanged — they simply now live in three dimensions rather than two, and the parallel vectors condition u⃗=kv⃗\vec u = k\vec v (proportional components in all three coordinates) extends identically.

Worked example. Let u⃗=(14−2)\vec u=\begin{pmatrix}1\\4\\-2\end{pmatrix}, v⃗=(−305)\vec v=\begin{pmatrix}-3\\0\\5\end{pmatrix}. Find 2u⃗−v⃗2\vec u - \vec v.

2u⃗−v⃗=(28−4)−(−305)=(58−9)2\vec u - \vec v = \begin{pmatrix}2\\8\\-4\end{pmatrix} - \begin{pmatrix}-3\\0\\5\end{pmatrix} = \begin{pmatrix}5\\8\\-9\end{pmatrix}

5. Unit Vectors in Space

The unit vector in the direction of a non-zero v⃗\vec v is still v^=v⃗∣v⃗∣\hat v = \dfrac{\vec v}{|\vec v|}, and a unit vector still satisfies ∣v^∣=1|\hat v|=1. The three axis unit vectors i⃗,j⃗,k⃗\vec i, \vec j, \vec k themselves have magnitude 1, and are mutually perpendicular — a fact this chapter states and the dot-product chapter will shortly prove algebraically.

Worked example. Find the unit vector in the direction of v⃗=(2−36)\vec v=\begin{pmatrix}2\\-3\\6\end{pmatrix} (the vector from the earlier worked example, with ∣v⃗∣=7|\vec v|=7).

v^=17(2−36)=(2/7−3/76/7)\hat v = \frac{1}{7}\begin{pmatrix}2\\-3\\6\end{pmatrix} = \begin{pmatrix}2/7\\-3/7\\6/7\end{pmatrix}

6. Midpoint and Section Formula in Space

The midpoint and section formulas extend with one more component each, by exactly the same averaging argument as in the plane:

M=(x1+x22,y1+y22,z1+z22),p⃗=na⃗+mb⃗m+nM = \left(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}, \frac{z_1+z_2}{2}\right), \qquad \vec p = \frac{n\vec a+m\vec b}{m+n}

Worked example — the harder case. A(2,−1,5)A(2,-1,5), B(−4,7,2)B(-4,7,2). Find the point PP dividing ABAB in the ratio 2:12:1, and verify it lies strictly between AA and BB by checking that each coordinate of PP lies between the corresponding coordinates of AA and BB.

P=1⋅(2,−1,5)+2⋅(−4,7,2)3=(2−8, −1+14, 5+4)3=(−6,13,9)3=(−2,133,3)P = \frac{1\cdot(2,-1,5) + 2\cdot(-4,7,2)}{3} = \frac{(2-8,\,-1+14,\,5+4)}{3} = \frac{(-6,13,9)}{3} = (-2, \tfrac{13}{3}, 3)

Checking: xx-coordinate −2-2 lies between 22 and −4-4 ✓; yy-coordinate 133≈4.33\tfrac{13}{3}\approx4.33 lies between −1-1 and 77 ✓; zz-coordinate 33 lies between 55 and 22 ✓. The edge case worth noting: a student who only checks one coordinate (commonly just xx) can be fooled if an arithmetic slip happened in another — checking all three is the only reliable verification in three dimensions.

Common Exam Pitfalls

  • Forgetting the third component entirely. Under exam pressure, a student used to 2D habitually drops the zz-row when adding, subtracting or finding a magnitude — always count that every vector has exactly three rows before starting arithmetic.
  • Applying the 2D distance formula with only two terms. The 3D magnitude needs three squared terms under the root, not two; a common error is to use the familiar two-term formula out of habit.
  • Misreading the right-hand rule / axis orientation, which affects how a sketch is drawn (though not any algebraic answer) — algebraic results do not depend on how the axes are drawn, only on consistent labelling of coordinates.
  • Assuming the three coordinate planes behave like three separate 2D planes with no relationship. The xyxy-, xzxz- and yzyz-planes are literally defined by one coordinate being zero; a point's membership in a plane is checked by substitution, not by inspecting a drawing.
  • Treating a 3D unit vector's components as if they must be "nice" fractions. Unlike many textbook 2D examples, 3D unit vector components are frequently irrational; don't assume an error just because a2+b2+c2\sqrt{a^2+b^2+c^2} isn't a perfect square.
  • Checking only one coordinate when verifying that a point lies on a segment or between two others. All three coordinates must be checked; an error affecting only the yy- or zz-coordinate can otherwise go unnoticed.

Summary

  • A point in space is (x,y,z)(x,y,z); a vector in space is (v1v2v3)=v1i⃗+v2j⃗+v3k⃗\begin{pmatrix}v_1\\v_2\\v_3\end{pmatrix} = v_1\vec i+v_2\vec j+v_3\vec k.
  • AB→=(x2−x1y2−y1z2−z1)\overrightarrow{AB} = \begin{pmatrix}x_2-x_1\\y_2-y_1\\z_2-z_1\end{pmatrix}, exactly as in 2D with an extra row.
  • Magnitude: ∣v⃗∣=a2+b2+c2|\vec v|=\sqrt{a^2+b^2+c^2}, from two applications of Pythagoras; distance formula: ∣AB∣=(x2−x1)2+(y2−y1)2+(z2−z1)2|AB|=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}.
  • Addition, subtraction, scalar multiplication and the parallel-vectors condition all extend component-wise, unchanged in structure from 2D.
  • Unit vector: v^=v⃗/∣v⃗∣\hat v = \vec v/|\vec v|; the axis unit vectors i⃗,j⃗,k⃗\vec i,\vec j,\vec k are mutually perpendicular unit vectors.
  • Midpoint: average each coordinate; section formula: p⃗=na⃗+mb⃗m+n\vec p = \dfrac{n\vec a+m\vec b}{m+n}, identical in form to 2D.