Skip to content
Family Table Math
Auto

Vectors in Three Dimensions

A drone, a satellite, or a character in a video game doesn’t just move left-right and up-down: it moves in three dimensions. Adding a third axis lets you describe any point in space with three coordinates and any vector with three components. The good news is that everything from Cartesian vectors carries over, with one extra number.

Three-space uses three number lines, the xx-, yy- and zz-axes, that meet at the origin OO and are each perpendicular to the other two. On paper we draw them with the yy-axis to the right, the zz-axis up, and the xx-axis coming out of the page toward you (drawn slanting down and to the left).

This arrangement is right-handed: point the fingers of your right hand along the positive xx-axis and curl them toward the positive yy-axis; your thumb points along the positive zz-axis. Ontario courses, and most math and physics books, use right-handed systems. (For example, if xx points east and yy points north, then zz points up.)

Each pair of axes forms a coordinate plane: the xyxy-plane (where z=0z = 0), the xzxz-plane (y=0y = 0), and the yzyz-plane (x=0x = 0). Together the three planes split space into eight octants.

The point P(x,y,z)P(x, y, z) is reached by moving xx units along the xx-axis, then yy units parallel to the yy-axis, then zz units parallel to the zz-axis. Drawing a box (rectangular prism) with one corner at OO and the opposite corner at PP makes the picture much easier to read.

Three-dimensional axes drawn in a right-handed system: x comes out of the page, y goes right, and z goes up. The point P(2, 3, 4) is the far corner of a box 2 units along x, 3 along y and 4 up, and the position vector OP goes from the origin to P. x y z P(2, 3, 4) 2 3 4 O
To plot P(2,3,4)P(2, 3, 4), go 22 along xx, 33 along yy, and 44 up. The blue arrow is the position vector OP→=[2,3,4]\overrightarrow{OP} = [2, 3, 4].

Just as in two dimensions, the point P(x,y,z)P(x, y, z) has position vector

OP→=[x,y,z]\overrightarrow{OP} = [x, y, z]

and any vector equal to it is also [x,y,z][x, y, z]. (Some books write (x,y,z)(x, y, z) or ⟨x,y,z⟩\langle x, y, z\rangle.) The same three numbers describe both a point and a vector; the brackets tell you which one is meant.

The standard unit vectors in three-space are

i⃗=[1,0,0],j⃗=[0,1,0],k⃗=[0,0,1]\vec{i} = [1, 0, 0], \qquad \vec{j} = [0, 1, 0], \qquad \vec{k} = [0, 0, 1]

and every vector is a linear combination of them: [x,y,z]=xi⃗+yj⃗+zk⃗[x, y, z] = x\vec{i} + y\vec{j} + z\vec{k}. For example, [2,−5,3]=2i⃗−5j⃗+3k⃗[2, -5, 3] = 2\vec{i} - 5\vec{j} + 3\vec{k}.

The standard unit vectors in three dimensions: i along the positive x-axis, j along the positive y-axis, and k along the positive z-axis, each of length 1. x y z i j k
i⃗\vec{i}, j⃗\vec{j} and k⃗\vec{k} each have length 11 and point along the positive axes.

Applying the Pythagorean theorem twice (once across the floor of the box, once up the height) gives

∣[x,y,z]∣=x2+y2+z2\lvert[x, y, z]\rvert = \sqrt{x^2 + y^2 + z^2}

For points A(x1,y1,z1)A(x_1, y_1, z_1) and B(x2,y2,z2)B(x_2, y_2, z_2), the vector between them is still “head minus tail”, and its magnitude is the distance ABAB:

AB→=[x2−x1, y2−y1, z2−z1],AB=(x2−x1)2+(y2−y1)2+(z2−z1)2\overrightarrow{AB} = [x_2 - x_1,\ y_2 - y_1,\ z_2 - z_1], \qquad AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

Add, subtract and multiply by scalars component by component, exactly as in 2-D:

[u1,u2,u3]+[v1,v2,v3]=[u1+v1, u2+v2, u3+v3],k[u1,u2,u3]=[ku1, ku2, ku3][u_1, u_2, u_3] + [v_1, v_2, v_3] = [u_1 + v_1,\ u_2 + v_2,\ u_3 + v_3], \qquad k[u_1, u_2, u_3] = [ku_1,\ ku_2,\ ku_3]

All the properties of addition and scalar multiplication still hold. Two non-zero vectors are collinear when one is a scalar multiple of the other, and points AA, BB, CC are collinear when AB→=kAC→\overrightarrow{AB} = k\overrightarrow{AC} for some scalar kk. The midpoint of ABAB is (x1+x22, y1+y22, z1+z22)\left(\dfrac{x_1 + x_2}{2},\ \dfrac{y_1 + y_2}{2},\ \dfrac{z_1 + z_2}{2}\right).

3-D graphing software (such as GeoGebra 3D) is a great way to check a sketch, but everything on this page can be done by hand.

Describe where each point is, and sketch P(2,3,4)P(2, 3, 4).

  • (a) A(0,0,−5)A(0, 0, -5)
  • (b) B(3,0,2)B(3, 0, 2)
  • (c) C(−1,4,0)C(-1, 4, 0)

Solution.

(a) Two coordinates are zero, so AA is on an axis: the negative zz-axis, 55 units below the origin.

(b) y=0y = 0, so BB is in the xzxz-plane.

(c) z=0z = 0, so CC is in the xyxy-plane.

To sketch P(2,3,4)P(2, 3, 4): mark 22 on the xx-axis, move 33 units parallel to the yy-axis to reach (2,3,0)(2, 3, 0) in the xyxy-plane, then go up 44 units. Completing the box, as in the figure above, shows clearly where PP is.

Let v⃗=[2,−3,6]\vec{v} = [2, -3, 6]. Find ∣v⃗∣\lvert\vec{v}\rvert, write v⃗\vec{v} in i⃗,j⃗,k⃗\vec{i}, \vec{j}, \vec{k} form, and find the unit vector in the direction of v⃗\vec{v}.

Solution.

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

v⃗=2i⃗−3j⃗+6k⃗\vec{v} = 2\vec{i} - 3\vec{j} + 6\vec{k}. The unit vector is

17[2,−3,6]=[27, −37, 67]\frac{1}{7}[2, -3, 6] = \left[\frac{2}{7},\ -\frac{3}{7},\ \frac{6}{7}\right]

Check: 449+949+3649=1\dfrac{4}{49} + \dfrac{9}{49} + \dfrac{36}{49} = 1. ✓

For A(1,−2,4)A(1, -2, 4) and B(4,2,−8)B(4, 2, -8), find AB→\overrightarrow{AB}, the distance ABAB, and the midpoint of ABAB.

Solution. Head minus tail:

AB→=[4−1, 2−(−2), −8−4]=[3,4,−12]\overrightarrow{AB} = [4 - 1,\ 2 - (-2),\ -8 - 4] = [3, 4, -12] AB=32+42+(−12)2=9+16+144=169=13AB = \sqrt{3^2 + 4^2 + (-12)^2} = \sqrt{9 + 16 + 144} = \sqrt{169} = 13

Midpoint: (1+42, −2+22, 4+(−8)2)=(2.5, 0, −2)\left(\dfrac{1 + 4}{2},\ \dfrac{-2 + 2}{2},\ \dfrac{4 + (-8)}{2}\right) = (2.5,\ 0,\ -2).

  • (a) For u⃗=[1,2,−3]\vec{u} = [1, 2, -3] and v⃗=[−2,0,5]\vec{v} = [-2, 0, 5], find 3u⃗−2v⃗3\vec{u} - 2\vec{v}.
  • (b) Are the points P(1,0,2)P(1, 0, 2), Q(3,4,−2)Q(3, 4, -2) and R(6,10,−8)R(6, 10, -8) collinear?

Solution.

(a)

3u⃗−2v⃗=[3,6,−9]−[−4,0,10]=[7,6,−19]3\vec{u} - 2\vec{v} = [3, 6, -9] - [-4, 0, 10] = [7, 6, -19]

(b) Find two vectors that share the point PP:

PQ→=[2,4,−4],PR→=[5,10,−10]\overrightarrow{PQ} = [2, 4, -4], \qquad \overrightarrow{PR} = [5, 10, -10]

Compare components: 52=104=−10−4=2.5\dfrac{5}{2} = \dfrac{10}{4} = \dfrac{-10}{-4} = 2.5. So PR→=2.5 PQ→\overrightarrow{PR} = 2.5\,\overrightarrow{PQ}. The vectors are parallel and share PP, so PP, QQ and RR are collinear. (In fact RR is 2.52.5 times as far from PP as QQ is.)

Drawing a left-handed system. If you put xx to the right and yy out of the page with zz up, the system is left-handed. Use the right-hand rule: fingers from +x+x to +y+y, thumb along +z+z.

Mixing up “on an axis” and “in a plane”. A point with one zero coordinate is in a coordinate plane (for example (3,0,2)(3, 0, 2) is in the xzxz-plane). A point with two zero coordinates is on an axis.

Forgetting the third component. ∣[2,−3,6]∣\lvert[2, -3, 6]\rvert is 4+9+36\sqrt{4 + 9 + 36}, not 4+9\sqrt{4 + 9}. Every formula from 2-D gets one extra term.

Subtracting in the wrong order, or mixing orders between components. AB→\overrightarrow{AB} is B−AB - A in every component. Writing x2−x1x_2 - x_1 but y1−y2y_1 - y_2 gives a vector that’s neither AB→\overrightarrow{AB} nor BA→\overrightarrow{BA}.

Checking only two components for collinearity. All three ratios must agree. [2,4,−4][2, 4, -4] and [5,10,7][5, 10, 7] have matching first two ratios, but they aren’t collinear because 7−4≠2.5\dfrac{7}{-4} \ne 2.5.

Confusing a point with its position vector. P(2,3,4)P(2, 3, 4) is a location; OP→=[2,3,4]\overrightarrow{OP} = [2, 3, 4] is the arrow from the origin to it. You can add vectors, but adding points doesn’t mean anything on its own.

1. (Warm-up) State whether each point is on an axis (which one?) or in a coordinate plane (which one?).

  • (a) (0,5,0)(0, 5, 0)
  • (b) (−2,0,3)(-2, 0, 3)
  • (c) (4,−1,0)(4, -1, 0)
Solution

(a) On the yy-axis (two coordinates are zero).

(b) In the xzxz-plane (y=0y = 0).

(c) In the xyxy-plane (z=0z = 0).

2. (Warm-up) Find the magnitude of each vector.

  • (a) [1,2,2][1, 2, 2]
  • (b) [−4,0,3][-4, 0, 3]
  • (c) 6i⃗−2j⃗+3k⃗6\vec{i} - 2\vec{j} + 3\vec{k}
Solution

(a) 1+4+4=9=3\sqrt{1 + 4 + 4} = \sqrt{9} = 3.

(b) 16+0+9=25=5\sqrt{16 + 0 + 9} = \sqrt{25} = 5.

(c) 36+4+9=49=7\sqrt{36 + 4 + 9} = \sqrt{49} = 7.

3. (Core) Let u⃗=[2,−1,3]\vec{u} = [2, -1, 3] and v⃗=[0,4,−2]\vec{v} = [0, 4, -2]. Find:

  • (a) u⃗+v⃗\vec{u} + \vec{v}
  • (b) 2u⃗−v⃗2\vec{u} - \vec{v}
  • (c) ∣u⃗−v⃗∣\lvert\vec{u} - \vec{v}\rvert
Solution

(a) [2,3,1][2, 3, 1].

(b) [4,−2,6]−[0,4,−2]=[4,−6,8][4, -2, 6] - [0, 4, -2] = [4, -6, 8].

(c) u⃗−v⃗=[2,−5,5]\vec{u} - \vec{v} = [2, -5, 5], so ∣u⃗−v⃗∣=4+25+25=54=36≈7.35\lvert\vec{u} - \vec{v}\rvert = \sqrt{4 + 25 + 25} = \sqrt{54} = 3\sqrt{6} \approx 7.35.

4. (Core) Find the distance between A(−3,2,5)A(-3, 2, 5) and B(1,−2,7)B(1, -2, 7).

Solution

AB→=[1−(−3), −2−2, 7−5]=[4,−4,2]\overrightarrow{AB} = [1 - (-3),\ -2 - 2,\ 7 - 5] = [4, -4, 2], so

AB=16+16+4=36=6AB = \sqrt{16 + 16 + 4} = \sqrt{36} = 6

5. (Core) Let w⃗=[4,−4,7]\vec{w} = [4, -4, 7].

  • (a) Find the unit vector in the direction of w⃗\vec{w}.
  • (b) Find the vector of magnitude 1818 in the direction opposite to w⃗\vec{w}.
Solution

(a) ∣w⃗∣=16+16+49=81=9\lvert\vec{w}\rvert = \sqrt{16 + 16 + 49} = \sqrt{81} = 9, so the unit vector is [49, −49, 79]\left[\dfrac{4}{9},\ -\dfrac{4}{9},\ \dfrac{7}{9}\right].

(b) Multiply the unit vector by −18-18: [−8,8,−14][-8, 8, -14]. (That’s −2w⃗-2\vec{w}.) Check: 64+64+196=324=18\sqrt{64 + 64 + 196} = \sqrt{324} = 18. ✓

6. (Core) Find aa and bb so that [a,6,−4][a, 6, -4] and [3,b,2][3, b, 2] are collinear.

Solution

We need [a,6,−4]=k[3,b,2][a, 6, -4] = k[3, b, 2]. The third components give −4=2k-4 = 2k, so k=−2k = -2.

Then a=3k=−6a = 3k = -6, and 6=kb=−2b6 = kb = -2b, so b=−3b = -3.

Check: −2[3,−3,2]=[−6,6,−4]-2[3, -3, 2] = [-6, 6, -4]. ✓

7. (Core) A drone’s position is measured from its launch pad, with xx east, yy north and zz up, in metres. It flies in a straight line from A(30,40,25)A(30, 40, 25) to B(−10,70,45)B(-10, 70, 45). Find its displacement vector and how far it flew, to one decimal place.

SolutionAB→=[−10−30, 70−40, 45−25]=[−40,30,20]\overrightarrow{AB} = [-10 - 30,\ 70 - 40,\ 45 - 25] = [-40, 30, 20]

So the drone moved 4040 m west, 3030 m north, and 2020 m up. The distance is

(−40)2+302+202=2900=1029≈53.9 m\sqrt{(-40)^2 + 30^2 + 20^2} = \sqrt{2900} = 10\sqrt{29} \approx 53.9 \text{ m}

8. (Challenge) Show that the triangle with vertices A(2,1,0)A(2, 1, 0), B(4,3,1)B(4, 3, 1) and C(3,−1,2)C(3, -1, 2) is a right isosceles triangle, and find its perimeter.

SolutionAB→=[2,2,1],AC→=[1,−2,2],BC→=[−1,−4,1]\overrightarrow{AB} = [2, 2, 1], \quad \overrightarrow{AC} = [1, -2, 2], \quad \overrightarrow{BC} = [-1, -4, 1]AB=4+4+1=3,AC=1+4+4=3,BC=1+16+1=18=32AB = \sqrt{4 + 4 + 1} = 3, \quad AC = \sqrt{1 + 4 + 4} = 3, \quad BC = \sqrt{1 + 16 + 1} = \sqrt{18} = 3\sqrt{2}

AB=ACAB = AC, so the triangle is isosceles. Also AB2+AC2=9+9=18=BC2AB^2 + AC^2 = 9 + 9 = 18 = BC^2, so by the converse of the Pythagorean theorem the angle at AA is a right angle.

Perimeter: 3+3+32=6+32≈10.243 + 3 + 3\sqrt{2} = 6 + 3\sqrt{2} \approx 10.24.

9. (Challenge) Find the point on the zz-axis that is the same distance from A(1,2,3)A(1, 2, 3) as from B(3,0,−1)B(3, 0, -1).

Solution

A point on the zz-axis has the form P(0,0,z)P(0, 0, z). Set PA2=PB2PA^2 = PB^2 (squaring avoids square roots):

12+22+(z−3)2=32+02+(z+1)25+z2−6z+9=9+z2+2z+114−6z=10+2zz=0.5\begin{aligned} 1^2 + 2^2 + (z - 3)^2 &= 3^2 + 0^2 + (z + 1)^2 \\ 5 + z^2 - 6z + 9 &= 9 + z^2 + 2z + 1 \\ 14 - 6z &= 10 + 2z \\ z &= 0.5 \end{aligned}

The point is (0,0,0.5)(0, 0, 0.5). Check: PA2=1+4+6.25=11.25PA^2 = 1 + 4 + 6.25 = 11.25 and PB2=9+0+2.25=11.25PB^2 = 9 + 0 + 2.25 = 11.25. ✓