Mathematics/Lessons/Vectors/Coordinates and Vectors in 3D
Pure · Vectors · Year 2

Coordinates and Vectors in 3D

A third axis, a third coordinate — every idea from the flat plane carries over exactly as before, just with one more direction to track.

9 min read 4 worked examples

Describing points in 3D space

Two-dimensional coordinates $(x,y)$ locate a point using distances along two perpendicular axes. Adding a third axis — the $z$-axis, perpendicular to both the $x$- and $y$-axes — extends this to three-dimensional space: every point is now located by three coordinates, $(x,y,z)$, giving distances along each of the three axes in turn.

The position vector of a point $P(a,b,c)$ is the vector $\overrightarrow{OP}$ from the origin $O$ to $P$ — reaching it by moving $a$ units along the $x$-axis, $b$ units parallel to the $y$-axis, then $c$ units parallel to the $z$-axis (in any order; the destination is the same).

A 3D coordinate system with x, y and z axes meeting at the origin O. A point P with coordinates (a, b, c) is plotted, connected to the origin by a solid diagonal. Dashed lines show the point (a, 0, 0) on the x-axis, the point (0, b, 0) on the y-axis, the base point (a, b, 0) directly below P, and the vertical rise from the base point up to P. The base diagonal from O to (a, b, 0) is labelled d.
Locating $P(a,b,c)$ in 3D space: travel $a$, then $b$, then $c$ along the three axes to reach it. The base diagonal $d$ and the vertical rise from $(a,b,0)$ to $P$ will reappear below, in finding $|\overrightarrow{OP}|$.

Extending i, j to i, j, k

In two dimensions, every vector is built from two perpendicular unit vectors, $\mathbf{i}$ (along the x-axis) and $\mathbf{j}$ (along the y-axis). The third axis brings its own unit vector, $\mathbf{k}$, along the z-axis. Any vector in 3D space can be written uniquely as a combination of all three:

$\mathbf{a} = x\mathbf{i}+y\mathbf{j}+z\mathbf{k} = \begin{pmatrix}x\\y\\z\end{pmatrix}$

Column vector notation extends in exactly the same way, simply with a third entry. Every algebraic rule from 2D vectors — addition, subtraction, scalar multiplication — applies component-by-component, now across three components instead of two.

Magnitude in three dimensions

In 2D, the magnitude of $\mathbf{a}=x\mathbf{i}+y\mathbf{j}$ comes from a single application of Pythagoras' theorem: $|\mathbf{a}|=\sqrt{x^2+y^2}$. In 3D, the same idea applies — but reaching the full 3D diagonal takes two applications of Pythagoras' theorem, since the diagonal must first cross the base rectangle (the distance $d$ in the diagram above), then rise up to the true endpoint $P$.

ProofMagnitude of a 3D vector, |a| = √(x² + y² + z²)
1
Consider $\mathbf{a}=x\mathbf{i}+y\mathbf{j}+z\mathbf{k}$, drawn as the diagonal $\overrightarrow{OP}$ of a rectangular box with edges $x$, $y$, $z$.
Set up the 3D geometry, as in the diagram above.
2
First, find the diagonal $d$ of the base rectangle (formed by the $x$ and $y$ edges): by Pythagoras, $d^2=x^2+y^2$.
First application of Pythagoras, entirely within the horizontal base plane.
3
The full 3D diagonal $|\mathbf{a}|$, the base diagonal $d$, and the vertical edge $z$ form a second right-angled triangle, since $z$ is perpendicular to the entire base plane.
The vertical edge is perpendicular to every direction in the horizontal base.
4
By Pythagoras again: $|\mathbf{a}|^2 = d^2+z^2 = (x^2+y^2)+z^2$.
Second application, this time in the vertical plane containing the diagonal.
5
$|\mathbf{a}| = \sqrt{x^2+y^2+z^2}$.
Take the square root; magnitude is always non-negative.
▪ proven

Worked example 1

From coordinates to a position vector
Point $A$ has coordinates $(4,-1,3)$. Write down the position vector $\overrightarrow{OA}$ in column vector form and in terms of $\mathbf{i},\mathbf{j},\mathbf{k}$, and find the exact distance of $A$ from the origin.
MethodRead the components straight from the coordinates, then apply the magnitude formula
1
$\overrightarrow{OA} = \begin{pmatrix}4\\-1\\3\end{pmatrix} = 4\mathbf{i}-\mathbf{j}+3\mathbf{k}$.
The position vector's components are simply the point's coordinates, in order.
2
$|\overrightarrow{OA}| = \sqrt{4^2+(-1)^2+3^2} = \sqrt{16+1+9} = \sqrt{26}$.
Apply the 3D magnitude formula — this distance from O is exactly what the two-Pythagoras proof above computes.
▪ solved

Worked example 2

Finding the magnitude of a 3D vector
Find the magnitude of $\mathbf{a} = 2\mathbf{i}-3\mathbf{j}+6\mathbf{k}$.
MethodApply the 3D magnitude formula directly
1
$|\mathbf{a}| = \sqrt{2^2+(-3)^2+6^2}$.
Substitute the three components into |a| = √(x² + y² + z²).
2
$=\sqrt{4+9+36} = \sqrt{49}$.
Squares are always non-negative, so the negative component still contributes positively.
3
$=7$.
Final answer — a clean integer here.
▪ solved

Worked example 3

Vector arithmetic in 3D
Given $\mathbf{p}=3\mathbf{i}-\mathbf{j}+2\mathbf{k}$ and $\mathbf{q}=-\mathbf{i}+5\mathbf{j}-4\mathbf{k}$, find $2\mathbf{p}-3\mathbf{q}$ and its magnitude, giving the magnitude to 3 significant figures.
MethodScale and combine componentwise, then apply the magnitude formula
1
$2\mathbf{p} = 6\mathbf{i}-2\mathbf{j}+4\mathbf{k}$; $3\mathbf{q}=-3\mathbf{i}+15\mathbf{j}-12\mathbf{k}$.
Scalar multiplication scales each component independently.
2
$2\mathbf{p}-3\mathbf{q} = (6-(-3))\mathbf{i}+(-2-15)\mathbf{j}+(4-(-12))\mathbf{k} = 9\mathbf{i}-17\mathbf{j}+16\mathbf{k}$.
Subtract componentwise.
3
$|2\mathbf{p}-3\mathbf{q}| = \sqrt{9^2+(-17)^2+16^2} = \sqrt{81+289+256} = \sqrt{626}$.
Apply the magnitude formula to the resultant vector.
4
$\approx 25.0$ (3 s.f.).
Evaluate numerically.
▪ solved

Worked example 4

Finding an unknown component from a given magnitude · Challenge
The vector $\mathbf{v}=4\mathbf{i}-t\mathbf{j}+2t\mathbf{k}$ has magnitude $\sqrt{69}$, where $t>0$. Find the exact value of $t$.
MethodSet up an equation using the magnitude formula, then solve for t
1
$|\mathbf{v}|^2 = 4^2+(-t)^2+(2t)^2 = 16+t^2+4t^2 = 16+5t^2$.
Square the magnitude to avoid working with a square root directly.
2
Since $|\mathbf{v}|=\sqrt{69}$, $|\mathbf{v}|^2=69$, so $16+5t^2=69$.
Use the given magnitude.
3
$5t^2=53 \Rightarrow t^2=\dfrac{53}{5}$.
Rearrange to isolate t².
4
$t = \sqrt{\dfrac{53}{5}} = \dfrac{\sqrt{53}}{\sqrt5} = \dfrac{\sqrt{265}}{5}$ (taking the positive root, since $t>0$).
Rationalise the denominator for an exact simplified surd form.
▪ solved
Look deeper — one formula, one equation

Because the magnitude formula only involves squares of the components, it produces a single equation in $t^2$ regardless of how many components depend on $t$ — the same technique extends to vectors where two or even three components involve the unknown.

Common mistake

Forgetting the third component entirely when computing a magnitude — a leftover habit from 2D work. Always check a vector's dimension first: three components require $\sqrt{x^2+y^2+z^2}$, not the 2D formula with a term silently dropped.

Check yourself

Point $B$ has coordinates $(1,4,-8)$. Find the position vector $\overrightarrow{OB}$ in terms of $\mathbf{i},\mathbf{j},\mathbf{k}$, and the exact distance $OB$.
(Hint: the components of the position vector are just the coordinates, in order.)

Method
1
$\overrightarrow{OB} = \mathbf{i}+4\mathbf{j}-8\mathbf{k}$.
Read the components directly from the coordinates.
2
$OB = \sqrt{1^2+4^2+(-8)^2} = \sqrt{1+16+64} = \sqrt{81} = 9$.
Apply the 3D magnitude formula.
▪ solved