Practice Maths

← Back to Vectors in Three DimensionsSpecialist Maths

Introduction to 3D Vectors

Key Terms

A vector in ℝ³ is written as v = (x, y, z) or v = xi + yj + zk, where i = (1,0,0), j = (0,1,0), k = (0,0,1) are the standard basis vectors.
Magnitude
|v| = √(x² + y² + z²). This extends the Pythagorean theorem into three dimensions.
Unit vector
= v / |v|. A unit vector has magnitude 1 and indicates direction only.
Direction cosines
cos α = x/|v|, cos β = y/|v|, cos γ = z/|v|, where α, β, γ are the angles v makes with the positive x-, y-, z-axes respectively. Note: cos²α + cos²β + cos²γ = 1.
Vector addition
(a,b,c) + (d,e,f) = (a+d, b+e, c+f).
Scalar multiplication
λ(x,y,z) = (λx, λy, λz).
Parallel vectors
a and b are parallel if a = λb for some scalar λ.
Position vector
The position vector of point P = (x,y,z) is OP = xi + yj + zk.
Key Formulas:
  • Magnitude: |v| = √(x² + y² + z²)
  • Unit vector: = (1/|v|)(x, y, z)
  • Direction cosines: cos α = x/|v|, cos β = y/|v|, cos γ = z/|v|
  • Identity: cos²α + cos²β + cos²γ = 1
  • Vector between two points: AB = B − A = (b₁−a₁, b₂−a₂, b₃−a₃)
Hot Tip The magnitude formula |v| = √(x²+y²+z²) is Pythagoras applied twice: first in the xy-plane giving √(x²+y²), then in 3D using that result as one leg and z as the other. The direction cosines are just the components of the unit vector — each is the cosine of the angle with its coordinate axis.

Worked Example 1 — Magnitude and unit vector

Find the magnitude and unit vector of v = (2, −1, 3).

|v| = √(2² + (−1)² + 3²) = √(4 + 1 + 9) = √14

= (1/√14)(2, −1, 3) = (2/√14, −1/√14, 3/√14)

Worked Example 2 — Direction cosines

Find the direction cosines of v = (1, 2, −2).

|v| = √(1 + 4 + 4) = √9 = 3

cos α = 1/3,   cos β = 2/3,   cos γ = −2/3

Check: (1/3)² + (2/3)² + (−2/3)² = 1/9 + 4/9 + 4/9 = 9/9 = 1. ✓

From 2D to 3D: Extending the Vector Framework

In two dimensions, a vector v = (x, y) describes displacement in a plane using two perpendicular directions. The natural extension to three dimensions introduces a third perpendicular direction, the z-axis, giving v = (x, y, z). This is not merely a notational change — it represents a fundamentally richer geometric space that is needed to describe motion, forces, and geometry in the physical world.

The three standard basis vectors are i = (1, 0, 0), j = (0, 1, 0), and k = (0, 0, 1). They are mutually perpendicular (orthogonal) unit vectors forming a right-handed coordinate system. Any vector in ℝ³ can be written uniquely as a linear combination: v = xi + yj + zk.

Why the Magnitude Formula Extends Pythagoras

In 2D, the magnitude |v| = √(x² + y²) is simply the length of the hypotenuse of a right triangle with legs x and y. In 3D, consider the vector from the origin O to point P = (x, y, z). The distance from O to the foot of the perpendicular from P to the xy-plane is √(x² + y²) by 2D Pythagoras. The vector from O to P then has this horizontal distance as one leg and z as the vertical leg, giving |OP| = √((√(x²+y²))² + z²) = √(x² + y² + z²). The formula is Pythagoras in two successive steps.

Unit Vectors and Direction

A unit vector has magnitude exactly 1 and captures pure direction. To convert any nonzero vector to a unit vector, divide by its magnitude: = v/|v|. The components of are (x/|v|, y/|v|, z/|v|).

This is useful in many contexts: finding the direction of a force, constructing a vector of specified length in a given direction (u = t has magnitude t and the same direction as v), or normalising vectors for cross products.

Direction Cosines: Angles with the Coordinate Axes

The direction cosines cos α, cos β, cos γ are the angles that a vector makes with the positive x-, y-, and z-axes respectively. From the unit vector formula:

  • cos α = x/|v|   (angle with x-axis)
  • cos β = y/|v|   (angle with y-axis)
  • cos γ = z/|v|   (angle with z-axis)

These are simply the components of the unit vector. The fundamental identity cos²α + cos²β + cos²γ = 1 follows directly from the fact that ||² = 1.

Direction cosines are useful in physics (decomposing force vectors), computer graphics (lighting calculations), and structural engineering. Given three angles satisfying the identity, you can reconstruct the direction of the vector.

Vector Arithmetic in 3D

All 2D vector operations extend component-wise to 3D:

  • Addition: (a₁,a₂,a₃) + (b₁,b₂,b₃) = (a₁+b₁, a₂+b₂, a₃+b₃)
  • Subtraction: ab = (a₁−b₁, a₂−b₂, a₃−b₃)
  • Scalar multiplication: λa = (λa₁, λa₂, λa₃)

The geometric interpretation remains the same: addition corresponds to placing vectors head-to-tail, scalar multiplication stretches or reverses direction.

Position Vectors and the Vector Between Two Points

The position vector of a point P = (x₀, y₀, z₀) is OP = x₀i + y₀j + z₀k. The vector from point A to point B is AB = OBOA = (b₁−a₁, b₂−a₂, b₃−a₃). The distance |AB| = |AB| = √((b₁−a₁)² + (b₂−a₂)² + (b₃−a₃)²).

Exam Tip: When a question asks for "the unit vector in the direction of AB", always compute AB = B − A first, then find its magnitude, then divide. Do not use the position vectors directly as the direction.
Exam Tip: To check two vectors are parallel, check if one is a scalar multiple of the other. In 3D this means all three ratios a₁/b₁ = a₂/b₂ = a₃/b₃ must be equal (and non-zero denominators). If any component is zero, all corresponding components must be zero.

Mastery Practice

  1. Find the magnitude of each vector. Fluency

    1. (a) u = (3, 4, 0)
    2. (b) v = (1, −2, 2)
    3. (c) w = (2, 3, −6)
  2. Find the unit vector in the direction of each vector. Fluency

    1. (a) a = (2, −1, 2)
    2. (b) b = (0, 1, −1)
  3. Find the direction cosines of v = (2, −3, 6). Hence find the angles α, β, γ that v makes with the coordinate axes. Fluency

  4. Given A = (1, 2, −1) and B = (4, −1, 3), find: Fluency

    1. (a) The vector AB
    2. (b) The distance |AB|
    3. (c) The unit vector in the direction of AB
  5. Let a = (2, −1, 3), b = (1, 4, −2), and c = (−3, 0, 1). Compute: Understanding

    1. (a) a + 2b
    2. (b) 3ac
    3. (c) |a + b|
  6. A vector v has magnitude 5 and direction cosines cos α = 3/5, cos β = −4/5, cos γ = 0. Find v in component form. Verify the direction cosine identity. Understanding

  7. Determine whether each pair of vectors is parallel. Understanding

    1. (a) a = (2, −4, 6) and b = (−1, 2, −3)
    2. (b) c = (1, 2, 3) and d = (2, 4, 5)
    3. (c) e = (0, 3, −6) and f = (0, −1, 2)
  8. Points P, Q, R have position vectors p = (1, 0, 2), q = (3, 1, −1), r = (7, 3, −7). Show that P, Q, R are collinear. Understanding

  9. A particle moves from A = (2, −1, 4) to B = (5, 3, −2), then from B to C where BC = 2AB. Find the position vector of C and the total distance travelled. Problem Solving

  10. The direction cosines of a vector v satisfy cos α = 1/3 and cos β = cos γ. Given that the z-component of v is positive and |v| = 6, find v in component form. Problem Solving