• Foundation
  • About 20 min
  • 5 practice questions

Components, the vector joining two points and the section formula

Write vectors in component form using î, ĵ, k̂, add and scale them by components, find unit vectors and direction cosines, the vector joining two points, and the position vector of a point dividing a segment.

If something looks wrong, please tell us.

Drawing arrows is good for ideas but slow for calculation. Writing a vector in terms of three fixed unit vectors along the axes turns vector algebra into arithmetic with three numbers. This lesson develops that component form and two results used constantly in the next chapter: the vector joining two points and the section formula.

Component form

Let î, ĵ and k̂ be the unit vectors along the positive x-, y- and z-axes (the position vectors of (1, 0, 0), (0, 1, 0) and (0, 0, 1)). For a point P(x, y, z), going x units along OX, then y units parallel to OY, then z units parallel to OZ reaches P. So the position vector of P is r = x î + y ĵ + z k̂. This is the component form of r. The numbers x, y, z are its scalar components, and xî, yĵ, zk̂ are its vector components along the axes. Applying Pythagoras' theorem twice, |r| = √(x² + y² + z²).

For a = a₁î + a₂ĵ + a₃k̂ and b = b₁î + b₂ĵ + b₃k̂: (1) a + b = (a₁ + b₁)î + (a₂ + b₂)ĵ + (a₃ + b₃)k̂, and similarly for a − b; (2) λa = (λa₁)î + (λa₂)ĵ + (λa₃)k̂; (3) a = b if and only if a₁ = b₁, a₂ = b₂ and a₃ = b₃; (4) a and b are collinear if and only if b₁/a₁ = b₂/a₂ = b₃/a₃ (= λ), that is, their components are proportional (with the usual care when a component is zero).

The components of a vector are its direction ratios, and dividing by its magnitude gives its direction cosines. If l, m, n are the direction cosines of a vector, then l î + m ĵ + n k̂ = (cos α)î + (cos β)ĵ + (cos γ)k̂ is the unit vector in its direction.

Worked example 1: unit vector and a vector of given length

Let a = 2î − ĵ + 2k̂. Then |a| = √(4 + 1 + 4) = 3, so the unit vector is â = (1/3)(2î − ĵ + 2k̂), and the direction cosines of a are 2/3, −1/3, 2/3. A vector of magnitude 9 in the direction of a is 9â = 6î − 3ĵ + 6k̂.

Worked example 2: collinearity

Are a = 2î − 3ĵ + k̂ and b = −6î + 9ĵ − 3k̂ collinear? The ratios of components are −6/2 = −3, 9/(−3) = −3, −3/1 = −3. They are equal, so b = −3a: the vectors are collinear and point in opposite directions.

The vector joining two points

If P₁(x₁, y₁, z₁) and P₂(x₂, y₂, z₂) are two points, then by the triangle law OP₁ + P₁P₂ = OP₂, so P₁P₂ = OP₂ − OP₁: P₁P₂ = (x₂ − x₁)î + (y₂ − y₁)ĵ + (z₂ − z₁)k̂, with magnitude √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]. Always subtract 'terminal point minus initial point'.

Worked example 3

Find the vector from P(1, 2, −1) to Q(3, −2, 5) and its length. PQ = (3 − 1)î + (−2 − 2)ĵ + (5 + 1)k̂ = 2î − 4ĵ + 6k̂. |PQ| = √(4 + 16 + 36) = √56 = 2√14.

Section formula

Let P and Q have position vectors a and b, and let R divide PQ internally in the ratio m : n, so that n PR = m RQ as vectors (both point from P towards Q). With r the position vector of R, PR = r − a and RQ = b − r. So n(r − a) = m(b − r), giving (m + n) r = mb + na:

Internal division in m : n: r = (mb + na)/(m + n). External division in m : n: r = (mb − na)/(m − n). Midpoint: r = (a + b)/2.

For external division (R on line PQ extended, with PR/QR = m/n), the same method gives r = (mb − na)/(m − n). Putting m = n in the internal formula gives the midpoint (a + b)/2.

Internal and external division

  • Internal, ratio m : n
    • R lies between P and Q
    • r = (mb + na)/(m + n)
    • Weights m on b and n on a
  • External, ratio m : n
    • R lies on PQ extended
    • r = (mb − na)/(m − n)
    • Needs m ≠ n

Worked example 4

P and Q have position vectors a = î + 2ĵ − k̂ and b = −î + ĵ + k̂. Find the position vector of R dividing PQ in the ratio 2 : 1 (i) internally, (ii) externally. (i) r = (2b + a)/3 = [(−2î + 2ĵ + 2k̂) + (î + 2ĵ − k̂)]/3 = (−î + 4ĵ + k̂)/3. (ii) r = (2b − a)/(2 − 1) = (−2î + 2ĵ + 2k̂) − (î + 2ĵ − k̂) = −3î + 3k̂.

Worked example 5: collinear points

Show that A(1, 2, 3), B(2, 4, 4) and C(4, 8, 6) are collinear. AB = î + 2ĵ + k̂ and AC = 3î + 6ĵ + 3k̂ = 3AB. So AB and AC are collinear vectors with the common point A, and A, B, C lie on one line, with B one third of the way from A to C.

Key takeaways

  • r = xî + yĵ + zk̂ and |r| = √(x² + y² + z²).
  • Add, subtract and scale vectors component by component; equal vectors have equal components.
  • Components are direction ratios; divide by the magnitude to get direction cosines.
  • Vector P₁P₂ = (position vector of P₂) − (position vector of P₁).
  • Section formula: (mb + na)/(m + n) internally, (mb − na)/(m − n) externally, (a + b)/2 for the midpoint.

Check your understanding

  1. 1. What is the magnitude of 3î − 4ĵ + 12k̂?

    1. 13
    2. 19
    3. 169
    4. 11
    Show answer

    Answer: A. √(3² + (−4)² + 12²) = √(9 + 16 + 144) = √169 = 13.

  2. 2. What is the unit vector in the direction of î + 2ĵ − 2k̂?

    1. î + 2ĵ − 2k̂
    2. (î + 2ĵ − 2k̂)/9
    3. (î + 2ĵ − 2k̂)/3
    4. (î + 2ĵ − 2k̂)/√5
    Show answer

    Answer: C. The magnitude is √(1 + 4 + 4) = 3, so the unit vector is (î + 2ĵ − 2k̂)/3. Dividing by 9 would use the square of the magnitude.

  3. 3. What is the vector from A(1, −1, 2) to B(4, 1, 0)?

    1. −3î − 2ĵ + 2k̂
    2. 3î + 2ĵ − 2k̂
    3. 5î + 0ĵ + 2k̂
    4. 3î + 0ĵ − 2k̂
    Show answer

    Answer: B. AB = (4 − 1)î + (1 − (−1))ĵ + (0 − 2)k̂ = 3î + 2ĵ − 2k̂. The answer −3î − 2ĵ + 2k̂ is BA, the vector in the opposite direction.

  4. 4. What is the position vector of the midpoint of the segment joining P(1, 5, −3) and Q(3, −1, 7)?

    1. 4î + 4ĵ + 4k̂
    2. î − 3ĵ + 5k̂
    3. 2î + 3ĵ − 2k̂
    4. 2î + 2ĵ + 2k̂
    Show answer

    Answer: D. Midpoint = (a + b)/2 = [(1 + 3)î + (5 − 1)ĵ + (−3 + 7)k̂]/2 = (4î + 4ĵ + 4k̂)/2 = 2î + 2ĵ + 2k̂.

  5. 5. For what value of λ are 2î + λĵ − k̂ and 6î − 9ĵ − 3k̂ collinear?

    1. 3
    2. −3
    3. 9
    4. −9
    Show answer

    Answer: B. The components must be proportional. From the î and k̂ parts the ratio is 6/2 = 3 and −3/(−1) = 3. So −9 = 3λ, giving λ = −3.

Sign in to keep track of the lessons you finish.

Next lesson → Scalar (dot) product and projection

Privacy · Terms · Refunds · Delivery