Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Specialist (Unit 3 & 4) Vectors in two and three dimensions

Equations of lines

20 practice questions 0 video lessons Theory + worked examples

Master the equations of lines for Year 12 Specialist Mathematics in Queensland (QCAA). A straight line is fixed by one point and a direction, and is written three equivalent ways: the vector equation \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\), the parametric equations, and the Cartesian (symmetric) equation, in both two and three dimensions.

You will learn to build the line through two points using \(\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\), convert freely between the three forms, describe line segments with a restricted parameter, and test whether a point lies on a line or whether two lines are parallel — core skills for the 3D vectors topic and everything that follows.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

An equation of a line pins down every point on a straight line using a known point and a direction. In Year 12 Specialist Mathematics (QCAA, Queensland) a line is written three equivalent ways — the vector equation \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\), the parametric equations, and the Cartesian (symmetric) equation — in both two and three dimensions.

A straight line is fixed by one point on it and a direction. If \(\mathbf{a}\) is the position vector of a known point and \(\mathbf{d}\) is any vector along the line, then the position vector \(\mathbf{r}\) of a general point is

\(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\),

where the parameter \(\lambda\) is a scalar that can take any real value. As \(\lambda\) runs over \(\mathbb{R}\), \(\mathbf{r}\) sweeps out the whole line. This is the vector equation of the line.

Given two points \(A\) and \(B\) on the line, the direction is the displacement between them, \(\mathbf{d}=\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\). Any point on the line and any non-zero multiple of the direction may be used, so the equation of a line is not unique.

Writing \(\mathbf{r}=(x,y,z)\) and reading off each coordinate gives the parametric equations \(x=a_1+\lambda d_1\), \(y=a_2+\lambda d_2\), \(z=a_3+\lambda d_3\). Solving each for \(\lambda\) and equating gives the Cartesian (symmetric) equation. Restricting \(\lambda\) to an interval such as \([0,1]\) describes a line segment rather than the full line.

Vector equation of a line in two dimensions On x-y axes, the position vector a points from the origin to A(1,1); the direction vector d = AB points from A(1,1) to B(3,4); the straight line r = a + lambda d passes through A and B and is extended both ways. x y a d = AB A(1,1) B(3,4) r = a + λd
A 2D line: position vector \(\mathbf{a}\) to \(A(1,1)\), direction \(\mathbf{d}=\overrightarrow{AB}\), line \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\).
Vector equation of a line in three dimensions In an isometric view of the x, y and z axes, the position vector a points from the origin to A(1,2,1); the direction d = AB points from A to B(3,1,4); the straight line r = a + lambda d passes through A and B. x y z a d = AB A(1,2,1) B(3,1,4) r = a + λd
The same idea in 3D: \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\) through \(A(1,2,1)\) with direction \(\overrightarrow{AB}\).

The vector equation of the line through the point with position vector \(\mathbf{a}\) in the direction \(\mathbf{d}\) is:

\[ \mathbf{r}=\mathbf{a}+\lambda\mathbf{d},\qquad \lambda\in\mathbb{R} \]
r=a+λd

For a line through two points \(A\) and \(B\), the direction is:

\[ \mathbf{d}=\overrightarrow{AB}=\mathbf{b}-\mathbf{a} \]
d=ba

Reading off the coordinates gives the parametric equations:

\[ x=a_1+\lambda d_1,\quad y=a_2+\lambda d_2,\quad z=a_3+\lambda d_3 \]
x=a1+λd1

Eliminating \(\lambda\) gives the Cartesian (symmetric) equation:

\[ \dfrac{x-a_1}{d_1}=\dfrac{y-a_2}{d_2}=\dfrac{z-a_3}{d_3} \]
xa1d1
Parallel and point-on-line tests. Two lines are parallel when their direction vectors are scalar multiples, \(\mathbf{d}_2=k\mathbf{d}_1\). A point lies on \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\) only if one value of \(\lambda\) satisfies every coordinate.

How to find the equation of a line

  1. Find a point and a direction. Use a given point for \(\mathbf{a}\); if two points \(A\), \(B\) are given, take \(\mathbf{d}=\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\).
  2. Write the vector equation \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\), keeping \(\mathbf{a}\) as the point and \(\mathbf{d}\) as the direction.
  3. Split into parametric form by reading each coordinate: \(x=a_1+\lambda d_1\), and likewise for \(y\) and \(z\).
  4. Eliminate \(\lambda\) by solving each parametric equation for \(\lambda\) and equating to get the Cartesian form.
Example 1 — Line through two points (3D)
Find a vector equation of the line through \(A(2,1,0)\) and \(B(5,3,4)\).
Solution

Direction is \(\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\); then use \(\mathbf{r}=\mathbf{a}+\lambda\overrightarrow{AB}\):

\(\overrightarrow{AB}\)\(=\)\((5-2,\ 3-1,\ 4-0)\)
\(=\)\((3,\,2,\,4)\)
\(\mathbf{r}\)\(=\)\(\mathbf{a}+\lambda\overrightarrow{AB}\)
\(=\)\((2\mathbf{i}+\mathbf{j})+\lambda(3\mathbf{i}+2\mathbf{j}+4\mathbf{k})\)

\(\mathbf{r}=2\mathbf{i}+\mathbf{j}+\lambda(3\mathbf{i}+2\mathbf{j}+4\mathbf{k})\).

Example 2 — Parametric and Cartesian forms
A line has vector equation \(\mathbf{r}=3\mathbf{i}-\mathbf{j}+2\mathbf{k}+\lambda(\mathbf{i}+4\mathbf{j}-\mathbf{k})\). Write its parametric and Cartesian equations.
Solution

Read \(\mathbf{a}=(3,-1,2)\) and \(\mathbf{d}=(1,4,-1)\); each coordinate is \(a_i+\lambda d_i\):

\(x\)\(=\)\(3+\lambda\)
\(y\)\(=\)\(-1+4\lambda\)
\(z\)\(=\)\(2-\lambda\)

Solve each for \(\lambda\) and equate (\(\lambda=\dfrac{x_i-a_i}{d_i}\)):

\(\lambda\)\(=\)\(\dfrac{x-3}{1}\)
\(\lambda\)\(=\)\(\dfrac{y+1}{4}\)
\(\lambda\)\(=\)\(\dfrac{z-2}{-1}\)
\(\dfrac{x-3}{1}\)\(=\)\(\dfrac{y+1}{4}=\dfrac{z-2}{-1}\)

\(x=3+\lambda,\ y=-1+4\lambda,\ z=2-\lambda\); Cartesian \(\dfrac{x-3}{1}=\dfrac{y+1}{4}=\dfrac{z-2}{-1}\).

Example 3 — Does a point lie on the line?
Does the point \((7,-1,8)\) lie on the line \(\mathbf{r}=\mathbf{i}+2\mathbf{j}-\mathbf{k}+\lambda(2\mathbf{i}-\mathbf{j}+3\mathbf{k})\)?
Solution

Match the \(x\)-coordinate to find \(\lambda\), then check that the SAME \(\lambda\) fits \(y\) and \(z\):

\(x:\quad 1+2\lambda\)\(=\)\(7\)
\(2\lambda\)\(=\)\(6\)
\(\lambda\)\(=\)\(3\)
\(y:\quad 2-3\)\(=\)\(-1\ \checkmark\)
\(z:\quad -1+3(3)\)\(=\)\(8\ \checkmark\)

Yes; every coordinate gives \(\lambda=3\), so \((7,-1,8)\) lies on the line.

Example 4 — Parallel line through a point
Find a vector equation of the line through \(P(1,0,4)\) that is parallel to \(\mathbf{r}=2\mathbf{i}+3\mathbf{j}-\mathbf{k}+\lambda(3\mathbf{i}-2\mathbf{j}+5\mathbf{k})\).
Solution

Parallel lines share a direction, so keep \(\mathbf{d}=(3,-2,5)\) and use \(P\) as the point \(\mathbf{a}\):

\(\mathbf{d}\)\(=\)\((3,-2,5)\)
\(\mathbf{a}\)\(=\)\((1,0,4)\)
\(\mathbf{r}\)\(=\)\(\mathbf{a}+\lambda\mathbf{d}\)
\(=\)\((\mathbf{i}+4\mathbf{k})+\lambda(3\mathbf{i}-2\mathbf{j}+5\mathbf{k})\)

\(\mathbf{r}=\mathbf{i}+4\mathbf{k}+\lambda(3\mathbf{i}-2\mathbf{j}+5\mathbf{k})\).

Common pitfalls

Swapping the point and the direction. In \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\), \(\mathbf{a}\) is a point on the line and \(\mathbf{d}\) is the direction — watch out for using the direction as the point, or a coordinate triple as a direction.
Getting the direction from two points wrong. The direction is \(\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\), a subtraction, not \(\mathbf{a}+\mathbf{b}\). Using \(\mathbf{a}-\mathbf{b}\) instead just reverses it, which still gives the same line.
Checking only one coordinate for a point. A point is on the line only if a single \(\lambda\) fits every coordinate. Solve one coordinate for \(\lambda\), then confirm the rest.
Sign slips in the Cartesian form. The denominators are the direction components, keeping their signs: a direction of \(-1\) gives \(\dfrac{z-a_3}{-1}\), not \(\dfrac{z-a_3}{1}\).

Frequently asked questions

What is the vector equation of a line?

It is \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\), where \(\mathbf{a}\) is the position vector of a known point on the line, \(\mathbf{d}\) is a direction vector along the line, and \(\lambda\) is a scalar parameter that sweeps out every point.

How do you find the equation of a line through two points?

Take the direction \(\mathbf{d}=\overrightarrow{AB}=\mathbf{b}-\mathbf{a}\), then write \(\mathbf{r}=\mathbf{a}+\lambda\overrightarrow{AB}\) using either point as \(\mathbf{a}\).

What is the difference between the vector, parametric and Cartesian forms?

They describe the same line. The vector form is \(\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}\); the parametric form lists \(x,y,z\) separately as \(a_i+\lambda d_i\); the Cartesian form eliminates \(\lambda\) to give \(\dfrac{x-a_1}{d_1}=\dfrac{y-a_2}{d_2}=\dfrac{z-a_3}{d_3}\).

How do you tell if a point lies on a line?

Substitute the point and solve one coordinate for \(\lambda\); the point is on the line only if that same \(\lambda\) satisfies every other coordinate.

How do you know if two lines are parallel?

Two lines are parallel when their direction vectors are scalar multiples of one another, that is \(\mathbf{d}_2=k\mathbf{d}_1\) for some scalar \(k\).

Is the equation of a line unique?

No. Any point on the line can be used for \(\mathbf{a}\), and any non-zero multiple of the direction can be used for \(\mathbf{d}\), so a line has many correct vector equations.