3.14 · AHL · HL onlyPaper 1Paper 2

Vector equations of lines

In a minute

A line in 2D or 3D is fixed by one point on it and one direction. The r=a+λb\boldsymbol{r} = \boldsymbol{a} + \lambda\boldsymbol{b} turns that into a formula for every point on the line. From it you get the line's other forms, the angle between two lines, and a model of straight-line motion.

You'll be able to

  • Write a vector equation of a line from a point and a direction, or from two points, in 2D and 3D.
  • Move between vector, parametric and Cartesian forms, reading the point and the direction correctly.
  • Find the acute angle between two lines from their direction vectors, and test whether they are perpendicular.
  • Model straight-line motion: read the starting position, velocity and speed, and find where and when things happen.
Before you start3 quick questions on what this builds on
Check yourself
The points A(2,−1,4)\mathrm{A}(2, -1, 4) and B(5,1,0)\mathrm{B}(5, 1, 0) are given. Find AB→\overrightarrow{\mathrm{AB}}.
Check yourself
Find ∣(4−47)∣\left\lvert\begin{pmatrix}4\\-4\\7\end{pmatrix}\right\rvert.
Check yourself
Find the (1−24)⋅(351)\begin{pmatrix}1\\-2\\4\end{pmatrix} \cdot \begin{pmatrix}3\\5\\1\end{pmatrix}.

Revise first: 3.12 Vectors in 2D and 3D and 3.13 Scalar product and angles

The vector equation of a line

In 2D you can fix a line by a point and a gradient. In 3D there is no single gradient, so you give the direction as a vector instead. One point plus one direction pins down exactly one line.

Picture standing at a point A on the line. To reach any other point on it, you walk forwards or backwards along the line's direction. A says this in symbols.

In the formula booklet
r=a+λb\boldsymbol{r} = \boldsymbol{a} + \lambda\boldsymbol{b}

Here is what each letter means. a\boldsymbol{a} is the position vector of a known point A: the vector OA→\overrightarrow{\mathrm{OA}} from the origin O, as in 3.12. b\boldsymbol{b} is a : any non-zero vector parallel to the line.

λ\lambda (lambda) is a real number you choose. Each value of λ\lambda gives one point, and r\boldsymbol{r} is that point's position vector. λ=0\lambda = 0 gives A, λ=1\lambda = 1 gives the point one step of b\boldsymbol{b} further on, and negative values go backwards.

As λ\lambda runs through every real number, the points fill the whole line. That is why it is called the vector equation of the line.

A line through A built from the position vector a and steps of the direction vector b O λ = −1 A, λ = 0 λ = 1 λ = 2 λ = 3 L a b r
Each value of λ\lambda picks out one point. Here r=a+2b\boldsymbol{r} = \boldsymbol{a} + 2\boldsymbol{b}.

The formula is in the booklet. Always write the r=\boldsymbol{r} = at the start. Without it you have an expression, not an equation, and you lose the mark.

A line has many vector equations. You can start from any point on it, and use any non-zero multiple of b\boldsymbol{b} as the direction. So r=(12)+λ(2−4)\boldsymbol{r} = \begin{pmatrix}1\\2\end{pmatrix} + \lambda\begin{pmatrix}2\\-4\end{pmatrix} and r=(3−2)+μ(−12)\boldsymbol{r} = \begin{pmatrix}3\\-2\end{pmatrix} + \mu\begin{pmatrix}-1\\2\end{pmatrix} are the same line.

The same equation works in 2D, with two components, and in 3D, with three.

For a line through two points P and Q, start from either point. For the direction, use the displacement PQ→=q−p\overrightarrow{\mathrm{PQ}} = \boldsymbol{q} - \boldsymbol{p}.

Learn this
r=p+λ(q−p)\boldsymbol{r} = \boldsymbol{p} + \lambda(\boldsymbol{q} - \boldsymbol{p})
Worked exampleThe line LL passes through (−3,2)(-3, 2) and is parallel to (5−2)\begin{pmatrix}5\\-2\end{pmatrix}. Write down a vector equation of LL, and find where LL crosses the xx-axis.

Try it first, then reveal one step at a time.

  1. Use the point as a\boldsymbol{a} and the parallel vector as b\boldsymbol{b}: r=(−32)+λ(5−2)\boldsymbol{r} = \begin{pmatrix}-3\\2\end{pmatrix} + \lambda\begin{pmatrix}5\\-2\end{pmatrix}.
Worked exampleFind a vector equation of the line LL through P(4,0,−3)\mathrm{P}(4, 0, -3) and Q(1,5,−1)\mathrm{Q}(1, 5, -1). Determine whether R(−5,15,1)\mathrm{R}(-5, 15, 1) lies on LL.

Try it first, then reveal one step at a time.

  1. Find the direction: PQ→=(1−45−0−1−(−3))=(−352)\overrightarrow{\mathrm{PQ}} = \begin{pmatrix}1 - 4\\5 - 0\\-1 - (-3)\end{pmatrix} = \begin{pmatrix}-3\\5\\2\end{pmatrix}.
Check yourself
Which is a vector equation of the line through C(2,−1,3)\mathrm{C}(2, -1, 3) and D(0,4,1)\mathrm{D}(0, 4, 1)?
Check yourself
The point (k,7,−1)(k, 7, -1) lies on the line r=(1−25)+λ(33−2)\boldsymbol{r} = \begin{pmatrix}1\\-2\\5\end{pmatrix} + \lambda\begin{pmatrix}3\\3\\-2\end{pmatrix}. Find kk.

Parametric and Cartesian forms

A packs three equations into one. Write r\boldsymbol{r} as (xyz)\begin{pmatrix}x\\y\\z\end{pmatrix}, the known point as (x0,y0,z0)(x_0, y_0, z_0) and the direction as (lmn)\begin{pmatrix}l\\m\\n\end{pmatrix}. Then read off each component.

In the formula booklet
x=x0+λl,y=y0+λm,z=z0+λnx = x_{0} + \lambda l, \quad y = y_{0} + \lambda m, \quad z = z_{0} + \lambda n

These are the of the line. Use them whenever you need a general point on the line, as in the last two examples.

Now make λ\lambda the subject of each one: λ=x−x0l\lambda = \frac{x - x_0}{l}, and so on. All three equal the same λ\lambda, so they equal each other. That removes λ\lambda and gives the of the line.

In the formula booklet
x−x0l=y−y0m=z−z0n\dfrac{x - x_{0}}{l} = \dfrac{y - y_{0}}{m} = \dfrac{z - z_{0}}{n}

Both forms are in the booklet. In Cartesian form, the numbers subtracted in the numerators give the point. The denominators give the direction.

If a component of the direction is 00, you can't divide by it. For example, r=(20−1)+λ(403)\boldsymbol{r} = \begin{pmatrix}2\\0\\-1\end{pmatrix} + \lambda\begin{pmatrix}4\\0\\3\end{pmatrix} has y=0y = 0 for every λ\lambda. Its Cartesian equations are x−24=z+13\frac{x - 2}{4} = \frac{z + 1}{3} with y=0y = 0.

In 2D, the Cartesian form x−x0l=y−y0m\frac{x - x_0}{l} = \frac{y - y_0}{m} rearranges to y−y0=ml(x−x0)y - y_0 = \frac{m}{l}(x - x_0). That is a straight line from 2.1, with gradient ml\frac{m}{l}.

Worked exampleThe line MM has vector equation r=(−431)+λ(2−53)\boldsymbol{r} = \begin{pmatrix}-4\\3\\1\end{pmatrix} + \lambda\begin{pmatrix}2\\-5\\3\end{pmatrix}. Write down parametric equations for MM, and find its Cartesian equations.

Try it first, then reveal one step at a time.

  1. Read off each component: x=−4+2λx = -4 + 2\lambda, y=3−5λy = 3 - 5\lambda and z=1+3λz = 1 + 3\lambda.

Going the other way, each numerator must read xx minus a number, with xx having coefficient 11. The same goes for yy and zz.

Exam questions often hide a coefficient, as in 6−x3\frac{6 - x}{3} or 2y+12y + 1. The safest move is to set every part equal to λ\lambda and solve for xx, yy and zz.

Worked exampleFind a vector equation of the line 6−x3=2y+14=z+2\frac{6 - x}{3} = \frac{2y + 1}{4} = z + 2.

Try it first, then reveal one step at a time.

  1. Set each part equal to λ\lambda and solve for the coordinate.
Check yourself
A line has Cartesian equations x−23=1−y4=z+52\frac{x - 2}{3} = \frac{1 - y}{4} = \frac{z + 5}{2}. Which vector is a of the line?
Check yourself
The line r=(14)+λ(2−6)\boldsymbol{r} = \begin{pmatrix}1\\4\end{pmatrix} + \lambda\begin{pmatrix}2\\-6\end{pmatrix} lies in the xyxy-plane. Which is its Cartesian equation?

The angle between two lines

Two lines that cross make two angles, θ\theta and 180∘−θ180^{\circ} - \theta. The means the acute one, or 90∘90^{\circ} if they are perpendicular.

The angle depends only on which way the lines point, not on where they are. So you need just the two and the from 3.13.

In the formula booklet
cos⁡θ=v1w1+v2w2+v3w3∣v∣∣w∣\cos\theta = \dfrac{v_{1}w_{1} + v_{2}w_{2} + v_{3}w_{3}}{\lvert\boldsymbol{v}\rvert\lvert\boldsymbol{w}\rvert}

Use it with v\boldsymbol{v} and w\boldsymbol{w} as the lines' direction vectors. You also need their magnitudes, which are in the booklet too:

In the formula booklet
∣v∣=v12+v22+v32\lvert\boldsymbol{v}\rvert = \sqrt{v_{1}^{2} + v_{2}^{2} + v_{3}^{2}}

Think of a\boldsymbol{a} and b\boldsymbol{b} below as the directions of two lines through the origin. Now reverse b\boldsymbol{b} by moving its tip to (2,−3)(2, -3), so that b=(2−3)\boldsymbol{b} = \begin{pmatrix}2\\-3\end{pmatrix}. It still lies along the same line, but θ\theta changes from about 110∘110^{\circ} to about 70∘70^{\circ}.

The angle between two vectorsDrag the tips or use the sliders
−6−4−2246−6−4−2246aba (drag tip)b (drag tip)
4
1
−2
3

a·b = 4 × −2 + 1 × 3 = −5.00

|a| = 4.123, |b| = 3.606

cos θ = −0.3363

a·b = −5.00, θ = 109.7°

The scalar product a·b = a₁b₁ + a₂b₂ = |a||b| cos θ, so cos θ = a·b / (|a||b|). The vectors are perpendicular exactly when a·b = 0.

In particular, two lines are perpendicular exactly when b1⋅b2=0\boldsymbol{b}_1 \cdot \boldsymbol{b}_2 = 0. In 3D the lines don't have to meet for this to work, since it compares directions only. You'll sort lines that meet from lines that don't in 3.15.

Worked exampleFind the angle between the lines L1:r=(102)+λ(21−2)L_1: \boldsymbol{r} = \begin{pmatrix}1\\0\\2\end{pmatrix} + \lambda\begin{pmatrix}2\\1\\-2\end{pmatrix} and L2:r=(31−1)+μ(0−11)L_2: \boldsymbol{r} = \begin{pmatrix}3\\1\\-1\end{pmatrix} + \mu\begin{pmatrix}0\\-1\\1\end{pmatrix}.

Try it first, then reveal one step at a time.

  1. Take the direction vectors only: b1=(21−2)\boldsymbol{b}_1 = \begin{pmatrix}2\\1\\-2\end{pmatrix} and b2=(0−11)\boldsymbol{b}_2 = \begin{pmatrix}0\\-1\\1\end{pmatrix}. The points play no part.
Worked exampleThe line L1L_1 has x−52=4−y=z+12\frac{x - 5}{2} = 4 - y = \frac{z + 1}{2}, and L2:r=(026)+μ(14−8)L_2: \boldsymbol{r} = \begin{pmatrix}0\\2\\6\end{pmatrix} + \mu\begin{pmatrix}1\\4\\-8\end{pmatrix}. Find the acute angle between L1L_1 and L2L_2. Give your answer in degrees to 3 s.f.

Try it first, then reveal one step at a time.

  1. Read the direction of L1L_1. Setting 4−y=λ4 - y = \lambda gives y=4−λy = 4 - \lambda, so b1=(2−12)\boldsymbol{b}_1 = \begin{pmatrix}2\\-1\\2\end{pmatrix}. The direction of L2L_2 is b2=(14−8)\boldsymbol{b}_2 = \begin{pmatrix}1\\4\\-8\end{pmatrix}.
Check yourself
The lines r=(013)+λ(k2−1)\boldsymbol{r} = \begin{pmatrix}0\\1\\3\end{pmatrix} + \lambda\begin{pmatrix}k\\2\\-1\end{pmatrix} and r=(2−20)+μ(3k4)\boldsymbol{r} = \begin{pmatrix}2\\-2\\0\end{pmatrix} + \mu\begin{pmatrix}3\\k\\4\end{pmatrix} are perpendicular. Find kk.
Check yourself
Find the acute angle between L1:r=(201)+λ(122)L_1: \boldsymbol{r} = \begin{pmatrix}2\\0\\1\end{pmatrix} + \lambda\begin{pmatrix}1\\2\\2\end{pmatrix} and L2:r=(−134)+μ(2−2−1)L_2: \boldsymbol{r} = \begin{pmatrix}-1\\3\\4\end{pmatrix} + \mu\begin{pmatrix}2\\-2\\-1\end{pmatrix}.

Lines as motion

A can also describe motion. Replace λ\lambda by the time tt, and r\boldsymbol{r} gives an object's position at each moment. As tt increases, the object moves along the line at a steady rate.

Learn this
r=a+tv\boldsymbol{r} = \boldsymbol{a} + t\boldsymbol{v}

Each part has a meaning. a\boldsymbol{a} is the position at t=0t = 0, the starting position. v\boldsymbol{v} is the velocity: the displacement in one unit of time. The is its magnitude, ∣v∣\lvert\boldsymbol{v}\rvert.

Keep track of units. If distances are in km and tt is in hours, the speed is in km per hour, written km h−1\text{km h}^{-1}.

To get a velocity with a given speed, scale a direction to the right length. A ship heading along (34)\begin{pmatrix}3\\4\end{pmatrix} at 15 km h−115\text{ km h}^{-1} has v=155(34)=(912)\boldsymbol{v} = \frac{15}{5}\begin{pmatrix}3\\4\end{pmatrix} = \begin{pmatrix}9\\12\end{pmatrix}, since ∣(34)∣=5\left\lvert\begin{pmatrix}3\\4\end{pmatrix}\right\rvert = 5.

Worked exampleA harbour is at the origin O, and the yy-axis points north. A boat's position tt hours after 09:00 is r=(−94)+t(68)\boldsymbol{r} = \begin{pmatrix}-9\\4\end{pmatrix} + t\begin{pmatrix}6\\8\end{pmatrix}, in kilometres. Find the boat's speed, and the value of tt when it is due north of the harbour.

Try it first, then reveal one step at a time.

  1. The velocity is v=(68)\boldsymbol{v} = \begin{pmatrix}6\\8\end{pmatrix}, so the speed is ∣v∣=36+64=10 km h−1\lvert\boldsymbol{v}\rvert = \sqrt{36 + 64} = 10\text{ km h}^{-1}.
Check yourself
A drone's position after tt seconds is r=(10−40)+t(2−63)\boldsymbol{r} = \begin{pmatrix}10\\-4\\0\end{pmatrix} + t\begin{pmatrix}2\\-6\\3\end{pmatrix}, in metres. How far does it travel in the first 55 seconds?
Check yourself
A ship starts at (1,2)(1, 2) and sails in the direction (4−3)\begin{pmatrix}4\\-3\end{pmatrix} at 20 km h−120\text{ km h}^{-1}. Which equation gives its position after tt hours?

Two moving objects collide only if they are in the same place at the same time. Paths that cross at different times don't meet. So give both objects the same tt, and look at the vector between them.

The distance between them at time tt is the magnitude of that vector, a function of tt. On Paper 2 you can graph it and find its minimum.

Worked exampleTwo ships move with constant velocities. Their positions tt hours after noon, in km, are rA=(29)+t(5−1)\boldsymbol{r}_{\mathrm{A}} = \begin{pmatrix}2\\9\end{pmatrix} + t\begin{pmatrix}5\\-1\end{pmatrix} and rB=(−41)+t(73)\boldsymbol{r}_{\mathrm{B}} = \begin{pmatrix}-4\\1\end{pmatrix} + t\begin{pmatrix}7\\3\end{pmatrix}. Use your calculator to find the shortest distance between the ships. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. Both positions use the same tt, so subtract them: rB−rA=(−4−21−9)+t(7−53−(−1))=(2t−64t−8)\boldsymbol{r}_{\mathrm{B}} - \boldsymbol{r}_{\mathrm{A}} = \begin{pmatrix}-4 - 2\\1 - 9\end{pmatrix} + t\begin{pmatrix}7 - 5\\3 - (-1)\end{pmatrix} = \begin{pmatrix}2t - 6\\4t - 8\end{pmatrix}.

Common mistakes

  • Leaving out r=\boldsymbol{r} =. Without it you have written an expression, not an equation, and the mark for the equation is lost.
  • Reading the direction from Cartesian form without tidying it first. In 7−z2\frac{7 - z}{2} the zz-component is −2-2, and in 3y−16\frac{3y - 1}{6} it is 22. Rewrite each part as the coordinate minus a number, or set each part equal to λ\lambda.
  • Using a position vector as the direction. The direction through P and Q is q−p\boldsymbol{q} - \boldsymbol{p}, not q\boldsymbol{q}.
  • Stopping at an obtuse angle. A negative scalar product gives an angle over 90∘90^{\circ}, so subtract it from 180∘180^{\circ}.
  • Leaving out the zz-components of a scalar product or a magnitude. Every component counts.
  • Using one parameter letter for two different lines. Give each line its own, such as λ\lambda and μ\mu. In motion questions the shared tt is right, because both objects run on the same clock.

Exam tips

  • "Write down" a vector equation needs no working, but it must start with r=\boldsymbol{r} =. Any point on the line and any parallel direction earn the marks.
  • "Find the angle" between two lines: use the direction vectors only, and give the acute angle. Paper 1 expects exact values such as 45∘45^{\circ}. On Paper 2, give degrees to 3 s.f.
  • To show that two lines are perpendicular, show the scalar product of their directions working out to 00. Saying it looks like a right angle earns nothing.
  • In motion questions, give speeds and distances with units. If the question uses clock times, turn your value of tt into one.

Key takeaways

In bookletr=a+λb\boldsymbol{r} = \boldsymbol{a} + \lambda\boldsymbol{b}
Learn thisr=p+λ(q−p)\boldsymbol{r} = \boldsymbol{p} + \lambda(\boldsymbol{q} - \boldsymbol{p})
In bookletx=x0+λl,y=y0+λm,z=z0+λnx = x_{0} + \lambda l, \quad y = y_{0} + \lambda m, \quad z = z_{0} + \lambda n
In bookletx−x0l=y−y0m=z−z0n\dfrac{x - x_{0}}{l} = \dfrac{y - y_{0}}{m} = \dfrac{z - z_{0}}{n}
In bookletcos⁡θ=v1w1+v2w2+v3w3∣v∣∣w∣\cos\theta = \dfrac{v_{1}w_{1} + v_{2}w_{2} + v_{3}w_{3}}{\lvert\boldsymbol{v}\rvert\lvert\boldsymbol{w}\rvert}
Learn thisr=a+tv\boldsymbol{r} = \boldsymbol{a} + t\boldsymbol{v}
In bookletA line needs a point and a direction: r=a+λb\boldsymbol{r} = \boldsymbol{a} + \lambda\boldsymbol{b}. Always start with r=\boldsymbol{r} =.
Learn thisThrough two points P and Q, use PQ→=q−p\overrightarrow{\mathrm{PQ}} = \boldsymbol{q} - \boldsymbol{p} as the direction, not a position vector.
Learn thisIn Cartesian form the denominators give the direction, but only once each numerator reads x−x0x - x_0, y−y0y - y_0 or z−z0z - z_0. If in doubt, set each part equal to λ\lambda.
Learn thisAcute angle between two lines: cos⁡θ=∣b1⋅b2∣∣b1∣∣b2∣\cos\theta = \frac{\lvert \boldsymbol{b}_1 \cdot \boldsymbol{b}_2\rvert}{\lvert \boldsymbol{b}_1\rvert\lvert \boldsymbol{b}_2\rvert}, using direction vectors only. The lines are perpendicular when b1⋅b2=0\boldsymbol{b}_1 \cdot \boldsymbol{b}_2 = 0.
Learn thisMotion: r=a+tv\boldsymbol{r} = \boldsymbol{a} + t\boldsymbol{v}, with a\boldsymbol{a} the starting position, v\boldsymbol{v} the velocity and ∣v∣\lvert\boldsymbol{v}\rvert the speed.

Practise this

16 past-paper questions on 3.14 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 3.14 →