Skip to content
IB Diploma ProgrammeSL & HL

Vector equation of a line

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Vector equation of a line notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Vector equation of a line notes as text: skim, search, and jump between subtopics.

~13 min read

1. The vector equation of a line

A line in two or three dimensions has the vector equation boldsymbolr = boldsymbola + λboldsymbolb. The vector boldsymbola is the position vector of one point on the line. The vector boldsymbolb is a direction vector, parallel to the line. The parameter λ is any real number, and each value of λ gives one point on the line.

Any point on the line can be used for boldsymbola, and any non-zero multiple of boldsymbolb is also a direction vector. So one line has many correct equations.

For a line through two points A and B, take boldsymbola as the position vector of A and boldsymbolb = overrightarrowAB. The same form works in two dimensions with two components.

boldsymbolr = boldsymbola + λboldsymbolb

overrightarrowAB = overrightarrowOB - overrightarrowOA

Worked example 13 marks

Find a vector equation of the line through the points A(1, 2, -3) and B(4, 0, 3).

  1. 1

    attempt to find a direction vector: overrightarrowAB = overrightarrowOB - overrightarrowOA (M1) [1]

  2. 2

    overrightarrowAB = beginpmatrix 4 0 3 endpmatrix - beginpmatrix 1 2 -3 endpmatrix = beginpmatrix 3 -2 6 endpmatrix (A1) [1]

  3. 3

    position vector of a point on the line: boldsymbolr = beginpmatrix 1 2 -3 endpmatrix + λbeginpmatrix 3 -2 6 endpmatrix (A1) [1]

2. Parametric and Cartesian forms

Write the vector equation component by component and you get the parametric form. If boldsymbola = (x₀, y₀, z₀) and boldsymbolb = (l, m, n), each coordinate is a separate equation in λ.

Make λ the subject of each equation and set them equal. This gives the Cartesian form. The denominators are the components of the direction vector, and the numerators subtract the point.

A zero component cannot be a denominator. If n = 0, write z = z₀ as a separate equation beside the other two parts.

x = x₀ + λ l, y = y₀ + λ m, z = z₀ + λ n

(x - x₀)/l = (y - y₀)/m = (z - z₀)/n

Worked example 13 marks

Find the Cartesian form of the line with vector equation boldsymbolr = beginpmatrix 2 -1 5 endpmatrix + λbeginpmatrix 3 4 -2 endpmatrix.

  1. 1

    parametric form: x = 2 + 3λ, y = -1 + 4λ, z = 5 - 2λ (M1) [1]

  2. 2

    make λ the subject of each: λ = (x - 2)/3, λ = (y + 1)/4, λ = (z - 5)/(-2) (M1) [1]

  3. 3

    equate: (x - 2)/3 = (y + 1)/4 = (z - 5)/(-2) (A1) [1]

3. The angle between two lines

The angle between two lines is found from their direction vectors, not their position vectors. Use the scalar product of the two direction vectors boldsymbolb₁ and boldsymbolb₂. The formula is in the data booklet.

The formula gives the angle between the two vectors. If cosθ is negative, this angle is obtuse. When a question asks for the acute angle between the lines, take 180^(°) - θ.

Calculate the scalar product and both magnitudes first, as separate lines of working. Set the calculator to degrees.

boldsymbolb₁ · boldsymbolb₂ = |boldsymbolb₁||boldsymbolb₂|cosθ

cosθ = (boldsymbolb₁ · boldsymbolb₂)/(|boldsymbolb₁||boldsymbolb₂|)

Worked example 14 marks

The line l₁ has equation boldsymbolr = beginpmatrix 1 0 2 endpmatrix + λbeginpmatrix 2 1 -2 endpmatrix and the line l₂ has equation boldsymbolr = beginpmatrix 3 -1 0 endpmatrix + μbeginpmatrix 1 -2 2 endpmatrix. Find the acute angle between l₁ and l₂.

  1. 1

    use the direction vectors boldsymbolb₁ = (2, 1, -2) and boldsymbolb₂ = (1, -2, 2) in cosθ = (boldsymbolb₁ · boldsymbolb₂)/(|boldsymbolb₁||boldsymbolb₂|) (M1) [1]

  2. 2

    boldsymbolb₁ · boldsymbolb₂ = 2 - 2 - 4 = -4 (A1) [1]

  3. 3

    |boldsymbolb₁| = √(4 + 1 + 4) = 3 and |boldsymbolb₂| = √(1 + 4 + 4) = 3, so cosθ = -4/9 (A1) [1]

  4. 4

    θ = 116.4^(°), so the acute angle is 180^(°) - 116.4^(°) = 63.6^(°) (A1) [1]

4. Kinematics: speed on a line

A line can model a body moving at constant velocity. In boldsymbolr = boldsymbola + λboldsymbolb, read λ as time t and boldsymbolb as the velocity. Then boldsymbola is the starting position and |boldsymbolb| is the speed.

The velocity is the whole vector multiplying t. If the equation is written boldsymbola + 4tboldsymbolc, the velocity is 4boldsymbolc, not boldsymbolc. Multiply out before you find the magnitude.

Check the units. Here distances are in kilometres and t is in hours, so the speed is in km h⁻¹.

boldsymbolr = boldsymbola + tboldsymbolv

speed = |boldsymbolv|

Worked example 12 marks

At 09:00 a helicopter is located at a point (10, 3, 0.5) relative to a point O on horizontal ground. The x-direction is due east, the y-direction is due north and the z-direction is vertically upwards. All distances are measured in kilometres. The helicopter is flying at a constant height. The helicopter's position relative to the point O is given by boldsymbolr = beginpmatrix 10 3 0.5 endpmatrix + 4tbeginpmatrix 10 -25 0 endpmatrix, where t represents the time in hours since 09:00.

(a) Find the speed of the helicopter.

  1. 1

    recognition that the speed is the magnitude of the velocity (M1) [1]

  2. 2

    speed = 4√(10² + (-25)²) = 107.703… = 108 km h⁻¹, which is 20√29 (A1) [1]

5. Kinematics: the angle of descent

The angle between the direction of travel and the horizontal is an angle between a direction vector and a direction in the plane z = 0. There are two routes.

In the first, draw a right-angled triangle. The horizontal speed is one side and the vertical speed is the other. Then tanβ is the vertical speed divided by the horizontal speed.

In the second, use the scalar product of the direction vector with its own horizontal part. Replace the vertical component by 0 to get that horizontal vector. The markscheme also credits a third route, the angle between the direction and a plane parallel to z = 0. The answer is degrees here, so check the calculator mode.

tanβ = (vertical speed)/(horizontal speed)

cosβ = (boldsymbolv·boldsymbolh)/(|boldsymbolv||boldsymbolh|)

Worked example 13 marks

At 10:00 the helicopter begins to descend. During descent the helicopter's vertical height decreases at a constant rate of 16 km h⁻¹ and its horizontal velocity remains unchanged. The angle of descent, β, is defined as the angle between the helicopter's direction of travel and the horizontal.

(b) Find β, giving your answer in degrees.

  1. 1

    attempt to use right-angled triangle with the horizontal speed found in (a) (M1) [1]

  2. 2

    tanβ = 16/(20√29) = 4/(5√29) (A1) [1]

  3. 3

    β = 8.44984… = 8.45^(°) (A1) [1]

Recap

  • boldsymbolr = boldsymbola + λboldsymbolb: boldsymbola is a position vector of a point on the line and boldsymbolb is a direction vector.
  • Parametric form: x = x₀ + λ l, and so on. Cartesian form: (x - x₀)/l = (y - y₀)/m = (z - z₀)/n.
  • The angle between two lines comes from cosθ = (boldsymbolb₁ · boldsymbolb₂)/(|boldsymbolb₁||boldsymbolb₂|) with the direction vectors. Take the acute angle.
  • In kinematics λ is time, boldsymbolb is the velocity and |boldsymbolb| is the speed. Multiply out any factor of t first.
  • Give an angle in the units the question asks for. A radian answer to a degrees question loses the final mark.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State a direction vector of the line l with equation boldsymbolr = beginpmatrix 3 -1 4 endpmatrix + λbeginpmatrix 2 5 -1 endpmatrix.1 mark
    Answer
    1. beginpmatrix 2 5 -1 endpmatrix (A1)

    Trap: The vector multiplying λ is the direction. The vector on its own, (3, -1, 4), is a position.

  2. Do not use a calculator. The line l has Cartesian equation (x - 3)/2 = (y + 1)/(-4) = (z - 6)/5. Write down a vector equation of l.2 marks
    Answer
    1. point on the line (3, -1, 6) (A1)
    2. boldsymbolr = beginpmatrix 3 -1 6 endpmatrix + λbeginpmatrix 2 -4 5 endpmatrix (A1)

    Trap: The factor y + 1 means y₀ = -1, not +1. The Cartesian form subtracts the point, so each sign flips.

  3. Find a vector equation of the line through the points A(2, -3) and B(-1, 5).3 marks
    Answer
    1. direction vector overrightarrowAB = (-1 - 2, 5 - (-3)) = (-3, 8) (M1)(A1)
    2. boldsymbolr = beginpmatrix 2 -3 endpmatrix + λbeginpmatrix -3 8 endpmatrix (A1)

    Trap: The point B is not a direction. Writing boldsymbolr = (2, -3) + λ(-1, 5) uses a position vector as boldsymbolb.

  4. Do not use a calculator. The line l has equation boldsymbolr = beginpmatrix 3 -1 4 endpmatrix + λbeginpmatrix 2 5 -1 endpmatrix. Determine whether the point P(7, 9, 1) lies on l.3 marks
    Answer
    1. equate the x-coordinates: 3 + 2λ = 7, so λ = 2 (M1)
    2. y: -1 + 5λ = -1 + 10 = 9, which matches (A1)
    3. z: 4 - λ = 4 - 2 = 2 ≠ 1, so P does not lie on l (R1)

    Trap: Two matching coordinates are not enough. All three must give the same λ.

  5. Do not use a calculator. A line has equation boldsymbolr = beginpmatrix 4 0 -2 endpmatrix + λbeginpmatrix 1 -3 2 endpmatrix. (a) Write down the parametric equations of the line. (b) Find the coordinates of the point on the line where y = -9.4 marks
    Answer
    1. (a)
    2. x = 4 + λ and y = -3λ (A1)
    3. z = -2 + 2λ (A1)
    4. (b)
    5. -3λ = -9, so λ = 3 (M1)
    6. x = 7, z = 4, so the point is (7, -9, 4) (A1)

    Trap: Here y₀ = 0, so y = -3λ. Solving -3λ = -9 gives λ = 3, not -3.

  6. Do not use a calculator. A drone moves so that its position at time t seconds is boldsymbolr = beginpmatrix 2 -1 10 endpmatrix + tbeginpmatrix 3 -4 12 endpmatrix, with distances in metres. Find the speed of the drone.2 marks
    Answer
    1. speed is the magnitude of the velocity: √(3² + (-4)² + 12²) (M1)
    2. = √(169) = 13 m s⁻¹ (A1)

    Trap: The speed is |boldsymbolb|. The size of the starting position, √(105), is a distance and not a speed.

  7. Do not use a calculator. A drone moves at constant velocity. At time t = 0 it is at P(1, 4, 9). At t = 3 it is at Q(7, -2, 12). Distances are in metres and t is in seconds. (a) Find the velocity of the drone. (b) Write down a vector equation for the position of the drone at time t.3 marks
    Answer
    1. (a)
    2. overrightarrowPQ = (6, -6, 3) (A1)
    3. divide by the time taken: 1/3(6, -6, 3) = (2, -2, 1) (A1)
    4. (b)
    5. boldsymbolr = beginpmatrix 1 4 9 endpmatrix + tbeginpmatrix 2 -2 1 endpmatrix (A1)

    Trap: If λ is time, boldsymbolb is the displacement in one second. Using overrightarrowPQ as boldsymbolb puts the drone at (19, -14, 18) when t = 3, not at Q.

  8. The line l₁ has equation boldsymbolr = beginpmatrix 1 2 0 endpmatrix + λbeginpmatrix 1 2 2 endpmatrix and the line l₂ has equation boldsymbolr = beginpmatrix 0 5 1 endpmatrix + μbeginpmatrix 2 -3 -6 endpmatrix. Determine the acute angle between l₁ and l₂.4 marks
    Answer
    1. use of cosθ = (boldsymbolb₁ · boldsymbolb₂)/(|boldsymbolb₁||boldsymbolb₂|) with the direction vectors (M1)
    2. boldsymbolb₁ · boldsymbolb₂ = 2 - 6 - 12 = -16, |boldsymbolb₁| = 3, |boldsymbolb₂| = 7 (A1)
    3. cosθ = -16/21, so θ = 139.6^(°) (A1)
    4. acute angle = 180^(°) - 139.6^(°) = 40.4^(°) (A1)

    Trap: A negative scalar product gives an obtuse angle. The angle between the lines is the acute one, 40.4^(°).

  9. A drone is released from a platform above flat ground, the plane z = 0. Relative to a fence post, with distances in metres, its position t seconds after release is boldsymbolr = (0, 0, 2) + 0.5t(6, 2, 3). A straight fence on the ground has equation boldsymbolr = (5, 0, 0) + μ(1, 1, 0). (a) Find the speed of the drone. (b) Find the acute angle between the path of the drone and the fence. (c) Find the time at which the drone is 20 m above the ground.7 marks
    Answer
    1. (a)
    2. speed is the magnitude of the velocity 0.5(6, 2, 3) = (3, 1, 1.5) (M1)
    3. √(3² + 1² + 1.5²) = √(12.25) = 3.5 m s⁻¹ (A1)
    4. (b)
    5. use the direction vectors: cosθ = (6 × 1 + 2 × 1 + 3 × 0)/(√49√2) (M1)
    6. = 8/(7√2) = 0.808… (A1)
    7. θ = 36.1^(°) (A1)
    8. (c)
    9. z = 2 + 1.5t = 20 (M1)
    10. t = 12 s (A1)

    Trap: The velocity is 0.5(6, 2, 3), not (6, 2, 3). Leaving out the 0.5 gives a speed of 7 m s⁻¹ and a time of 6 s. Only the angle is the same either way.

  10. A zip wire runs in a straight line from the top of a tower, T(0, 0, 39), down to a point G on flat ground, the plane z = 0. The wire has direction vector (12, 4, -3). Distances are in metres. (a) Find the coordinates of G. (b) Find the angle between the wire and the ground, giving your answer in degrees. A rider leaves T at time t = 0 and travels down the wire at a constant speed of 6.5 m s⁻¹. (c) Find the position of the rider at time t seconds, and hence find the time the rider takes to reach G.8 marks
    Answer
    1. (a)
    2. boldsymbolr = (0, 0, 39) + λ(12, 4, -3) meets the ground when 39 - 3λ = 0, so λ = 13 (M1)
    3. G(156, 52, 0) (A1)
    4. (b)
    5. angle between (12, 4, -3) and the horizontal vector (12, 4, 0): cosβ = (144 + 16 + 0)/(√(169)√(160)) (M1)
    6. = (√(160))/13 = 0.973… (A1)
    7. β = 13.3^(°) (A1)
    8. (c)
    9. |(12, 4, -3)| = 13, so the velocity is 6.5/13(12, 4, -3) = (6, 2, -1.5) (M1)(A1)
    10. boldsymbolr = (0, 0, 39) + t(6, 2, -1.5), and 39 - 1.5t = 0 gives t = 26 s (A1)

    Trap: The direction vector is not the velocity. Using (12, 4, -3) as the velocity gives a speed of 13 m s⁻¹ and a time of 13 s, so scale it to length 6.5 first.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
boldsymbola is the direction of the lineboldsymbola is a position vector of a point on the line. boldsymbolb is the direction vector
Speed = √(10² + (-25)²), leaving out the 4 in front of tThe speed is the magnitude of the velocity: 4√(10² + (-25)²) = 20√29
β = 0.147 (M1A1A0)β = 8.45^(°). The question asks for degrees, so a radian answer loses the last mark
The angle between the lines is 116.4^(°), because cosθ is negativeThe angle between the lines is the acute angle, 180^(°) - 116.4^(°) = 63.6^(°)

Frequently asked questions

What is the vector equation of a line?
A line has the vector equation boldsymbolr = boldsymbola + λboldsymbolb, where boldsymbola is the position vector of one point on the line and boldsymbolb is a direction vector. The parameter λ is any real number, and each value gives one point on the line. Any non-zero multiple of boldsymbolb is also a direction vector, so one line has many correct equations.
How do you find the vector equation of a line through two points?
Take boldsymbola as the position vector of one point A, and boldsymbolb = overrightarrowAB, which is overrightarrowOB - overrightarrowOA. For A(1, 2, -3) and B(4, 0, 3), overrightarrowAB = beginpmatrix3 -2 6endpmatrix, so one equation is boldsymbolr = beginpmatrix1 2 -3endpmatrix + λbeginpmatrix3 -2 6endpmatrix.
How do you change a vector equation of a line into Cartesian form?
Write the vector equation component by component to get the parametric form, x = x₀ + λ l, y = y₀ + λ m and z = z₀ + λ n. Make λ the subject of each equation and set them equal. For boldsymbolr = beginpmatrix2 -1 5endpmatrix + λbeginpmatrix3 4 -2endpmatrix this gives (x - 2)/3 = (y + 1)/4 = (z - 5)/(-2). A zero component cannot be a denominator, so write that coordinate as a separate equation.
How do you find the acute angle between two lines?
Use the scalar product of the two direction vectors, not the position vectors, in cosθ = (boldsymbolb₁·boldsymbolb₂)/(|boldsymbolb₁||boldsymbolb₂|). For boldsymbolb₁ = (2, 1, -2) and boldsymbolb₂ = (1, -2, 2), cosθ = -4/9 gives θ = 116.4^(°). The acute angle is 180^(°) - 116.4^(°) = 63.6^(°).
How do you find the speed of an object whose position is given by a line?
Read λ as time t and the vector multiplying t as the velocity, then take its magnitude. For boldsymbolr = beginpmatrix10 3 0.5endpmatrix + 4tbeginpmatrix10 -25 0endpmatrix the velocity is 4beginpmatrix10 -25 0endpmatrix, so the speed is 4√(10² + (-25)²) = 20√29, which is 108 km h⁻¹.
Why is the speed wrong if I leave out the number in front of t?
Leaving out the 4 gives √(10² + (-25)²), which is not the speed. The velocity is the whole vector multiplying t, so multiply it out before finding the magnitude: 4√(10² + (-25)²) = 20√29. Check the units too: distances are in kilometres and t is in hours, so the speed is in km h⁻¹.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters