4.04a - Equations of straight lines

4.04a - Equations of straight lines

Describe a straight line by one point and one direction, in two dimensions or three. You will build vector equations from points, convert between vector and cartesian forms, and handle horizontal, vertical and other lines with a constant coordinate without dividing by zero.

A point and a direction

Can two equations that look different describe exactly the same line? Consider

r=(12)+λ(21)andr=(54)+μ(−4−2)\mathbf{r}=\begin{pmatrix}1\\2\end{pmatrix}+\lambda\begin{pmatrix}2\\1\end{pmatrix} \qquad\text{and}\qquad \mathbf{r}=\begin{pmatrix}5\\4\end{pmatrix}+\mu\begin{pmatrix}-4\\-2\end{pmatrix}

The first begins at (1,2)(1,2) and points up and right; the second begins at (5,4)(5,4) and points down and left. We will settle whether the lines are the same by the end of the lesson.

You already know

A position vector locates a point relative to the origin. If AA and BB have position vectors a\mathbf{a} and b\mathbf{b}, then AB→=b−a\overrightarrow{AB}=\mathbf{b}-\mathbf{a}. Multiplying a non-zero vector by a non-zero scalar preserves its line of direction.

Take the first equation. Setting λ=0\lambda=0 gives (1,2)(1,2); setting λ=1\lambda=1 gives (3,3)(3,3); setting λ=−1\lambda=-1 gives (−1,1)(-1,1). Every increase of 1 in λ\lambda adds the same displacement (2,1)(2,1), so the points lie on a straight line. Allowing every real value of λ\lambda fills the entire line, including the gaps between these three points.

[DIAGRAM: asset_name: One point and a repeated direction; asset_slug: h245_4_04a_line_parameter; caption: Changing the parameter moves along the same line through A; description: Equal-scale coordinate diagram of the line through A at (1,2) with direction (2,1), showing the points for lambda equal to -1, 0, 1 and 2, an arrow for the position vector of A and an arrow for one direction step.]
Changing the parameter moves along the same line through A

Vector equation of a line

A straight line through the point with position vector a\mathbf{a}, parallel to a non-zero direction vector d\mathbf{d}, has vector equation

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

Here r\mathbf{r} is the position vector of a general point on the line. For example, r=(1,2,3)+λ(2,−1,4)\mathbf{r}=(1,2,3)+\lambda(2,-1,4) describes a line in three dimensions, with the tuples understood as vectors. A zero direction vector gives only one point, so it does not describe a line.

The vector equation is not printed in the formula booklet: learn it. The parameter is a real number, not a coordinate or a distance. Unless a problem makes it time, it is not time either. Negative values simply move against the direction arrow.

A useful surprise is that a line has infinitely many vector equations. You may choose any point on it as the starting point, and any non-zero multiple of its direction. The point set stays the same; only the parameter labels change. Restricting the parameter changes the point set: 0≤λ≤10\le\lambda\le1 gives the segment from a\mathbf{a} to a+d\mathbf{a}+\mathbf{d}.

Key idea

Read a+λd\mathbf{a}+\lambda\mathbf{d} as “start at a\mathbf{a}, then move any real multiple of d\mathbf{d}”. A starting point is a location; a direction vector is a displacement.

That distinction catches a common first error.

Building a vector equation

To construct a line through two distinct points, use one point as the starting point and their difference as the direction.

Line through two points

If A≠BA\ne B have position vectors a\mathbf{a} and b\mathbf{b}, then the line ABAB is

r=a+λ(b−a),λ∈R\mathbf{r}=\mathbf{a}+\lambda(\mathbf{b}-\mathbf{a}),\qquad\lambda\in\mathbb{R}

Not in the formula booklet: learn it.

This works because λ=0\lambda=0 gives AA and λ=1\lambda=1 gives BB. Simplifying the direction is allowed, but it changes which parameter value reaches BB.

Worked example 1: a line in two dimensions

Question. Find a vector equation of the line through A(2,−1)A(2,-1) and B(8,3)B(8,3), using a direction vector with integer components having no common factor greater than 1.

Plan. Subtract the coordinates, simplify the direction and attach it to the position vector of AA.

AB→=(8−23−(−1))=(64)subtract A from Bd=(32)divide by 2r=(2−1)+λ(32)point plus direction\begin{aligned} \overrightarrow{AB}&=\begin{pmatrix}8-2\\3-(-1)\end{pmatrix}=\begin{pmatrix}6\\4\end{pmatrix} && \text{subtract } A \text{ from } B\\ \mathbf{d}&=\begin{pmatrix}3\\2\end{pmatrix} && \text{divide by }2\\ \mathbf{r}&=\begin{pmatrix}2\\-1\end{pmatrix}+\lambda\begin{pmatrix}3\\2\end{pmatrix} && \text{point plus direction} \end{aligned}

Why this step? The vector (6,4)(6,4) joins the two points; halving it changes its length but preserves its direction.

Answer. r=(2−1)+λ(32)\mathbf{r}=\begin{pmatrix}2\\-1\end{pmatrix}+\lambda\begin{pmatrix}3\\2\end{pmatrix}, where λ∈R\lambda\in\mathbb{R}.

Check. At λ=0\lambda=0 the point is AA; at λ=2\lambda=2 it is (2+6,−1+4)=(8,3)=B(2+6,-1+4)=(8,3)=B.

Worked example 2 changes one feature: there is a third coordinate. The subtraction and the construction work component by component in exactly the same way.

Worked example 2: a line in three dimensions

Question. Find a vector equation of the line through C(2,−1,4)C(2,-1,4) and D(8,3,−4)D(8,3,-4), with the direction in the same integer form as before. State the parameter range for the segment CDCD.

Plan. Form and simplify CD→\overrightarrow{CD}, then find the parameter values of both endpoints.

CD→=(64−8)subtract coordinatesr=(2−14)+λ(32−4)halve the directionC:λ=0,D:λ=2identify endpoints\begin{aligned} \overrightarrow{CD}&=\begin{pmatrix}6\\4\\-8\end{pmatrix} && \text{subtract coordinates}\\ \mathbf{r}&=\begin{pmatrix}2\\-1\\4\end{pmatrix}+\lambda\begin{pmatrix}3\\2\\-4\end{pmatrix} && \text{halve the direction}\\ C&:\lambda=0,\qquad D:\lambda=2 && \text{identify endpoints} \end{aligned}

Why this step? A simplified direction is only half of CD→\overrightarrow{CD}, so reaching DD takes two direction steps, not one.

Answer. The line has the displayed equation for λ∈R\lambda\in\mathbb{R}. The segment has 0≤λ≤20\le\lambda\le2.

Check. (2,−1,4)+2(3,2,−4)=(8,3,−4)(2,-1,4)+2(3,2,-4)=(8,3,-4), as required.

The starting point supplies the line's location; the parameter restriction supplies the required segment.

Watch out

Wrong: using r=λAB→\mathbf{r}=\lambda\overrightarrow{AB} for any line through AA and BB. That equation always passes through the origin. Right: include a position vector of a point on the required line, r=a+λAB→\mathbf{r}=\mathbf{a}+\lambda\overrightarrow{AB}.

OCR questions sometimes specify the form of the direction vector. Give the full equation, beginning r=\mathbf{r}=, and meet that condition; a direction vector alone is not an equation of a line.

Converting between forms

Cartesian equations describe the same points without a free vector parameter: eliminate the parameter by making its expressions equal.

For r=(a1,a2,a3)+λ(u1,u2,u3)\mathbf{r}=(a_1,a_2,a_3)+\lambda(u_1,u_2,u_3), the component equations are x=a1+λu1x=a_1+\lambda u_1, y=a2+λu2y=a_2+\lambda u_2, z=a3+λu3z=a_3+\lambda u_3. When the direction components are non-zero, rearranging each gives the same value of λ\lambda.

Cartesian equation of a three-dimensional line

For a line through (a1,a2,a3)(a_1,a_2,a_3) with direction (u1,u2,u3)(u_1,u_2,u_3), when u1u2u3≠0u_1u_2u_3\ne0,

x−a1u1=y−a2u2=z−a3u3  (=λ)\frac{x-a_1}{u_1}=\frac{y-a_2}{u_2}=\frac{z-a_3}{u_3}\;(=\lambda)

In the formula booklet.

In two dimensions, eliminating λ\lambda gives the familiar forms y=mx+cy=mx+c or ax+by=cax+by=c. These two forms are not printed in the formula booklet: learn them. The second can represent a vertical line, while the first cannot: a vertical line has no finite gradient.

Worked example 3: vector form to familiar cartesian forms

Question. Express r=(12)+λ(21)\mathbf{r}=\begin{pmatrix}1\\2\end{pmatrix}+\lambda\begin{pmatrix}2\\1\end{pmatrix} in the forms y=mx+cy=mx+c and ax+by=cax+by=c.

Plan. Write the component equations, eliminate λ\lambda and rearrange.

x=1+2λ,y=2+λequate componentsλ=y−2use the simpler componentx=1+2(y−2)=2y−3substitutey=12x+32make y the subject\begin{aligned} x&=1+2\lambda,\qquad y=2+\lambda && \text{equate components}\\ \lambda&=y-2 && \text{use the simpler component}\\ x&=1+2(y-2)=2y-3 && \text{substitute}\\ y&=\frac12x+\frac32 && \text{make }y\text{ the subject} \end{aligned}

Why this step? Both coordinates use the same parameter. Eliminating it expresses the constraint that keeps a point on this line.

Answer. y=12x+32y=\frac12x+\frac32, or x−2y=−3x-2y=-3.

Check. The starting point gives 1−2(2)=−31-2(2)=-3; the direction has gradient 1/21/2, matching the coefficient of xx.

Worked example 4 changes one feature: the same line description gains a third coordinate. Each fraction must equal the same parameter, so there are now two independent constraints on xx, yy and zz.

Worked example 4: vector and cartesian forms in space

Question. Give cartesian equations for r=(12−1)+λ(213)\mathbf{r}=\begin{pmatrix}1\\2\\-1\end{pmatrix}+\lambda\begin{pmatrix}2\\1\\3\end{pmatrix}. Hence give a vector equation using a different point on the line.

Plan. Rearrange each component to equal λ\lambda, then choose λ=1\lambda=1 to find another starting point.

x=1+2λ,y=2+λ,z=−1+3λcomponentsx−12=y−2=z+13eliminate λλ=1⇒(x,y,z)=(3,3,2)another point\begin{aligned} x&=1+2\lambda,\quad y=2+\lambda,\quad z=-1+3\lambda && \text{components}\\ \frac{x-1}{2}&=y-2=\frac{z+1}{3} && \text{eliminate }\lambda\\ \lambda=1&\Rightarrow(x,y,z)=(3,3,2) && \text{another point} \end{aligned}

Why this step? Any point on the line may replace the starting point, provided the direction is preserved.

Answer. The cartesian equations are x−12=y−2=z+13\frac{x-1}{2}=y-2=\frac{z+1}{3}. Another vector equation is r=(332)+t(213)\mathbf{r}=\begin{pmatrix}3\\3\\2\end{pmatrix}+t\begin{pmatrix}2\\1\\3\end{pmatrix}, t∈Rt\in\mathbb{R}.

Check. The two parameters satisfy λ=t+1\lambda=t+1, so substituting recovers the first vector equation for every real tt.

The reverse conversion is just as direct. In x+23=y−1−2=z−45\frac{x+2}{3}=\frac{y-1}{-2}=\frac{z-4}{5}, read the point as (−2,1,4)(-2,1,4) and the direction as (3,−2,5)(3,-2,5). In 2x+3y=72x+3y=7, choose a point such as (2,1)(2,1), then a displacement (3,−2)(3,-2): changing xx by 3 and yy by −2-2 leaves 2x+3y2x+3y unchanged. Thus r=(2,1)+λ(3,−2)\mathbf{r}=(2,1)+\lambda(3,-2).

Watch out

Wrong: reading x+2x+2 as a starting coordinate of 2. The numerator is x−a1x-a_1, so x+2=x−(−2)x+2=x-(-2) gives a1=−2a_1=-2. Right: set the common parameter to zero to read the point safely.

Use the cartesian equation to read the geometry, rather than treating its fractions as unrelated expressions.

Lines with a constant coordinate

A zero direction component means that coordinate never changes; it does not mean the coordinate is zero.

Keep any constant coordinate separately, then eliminate the parameter using the remaining components. In two dimensions, r=(4,−2)+λ(0,3)\mathbf{r}=(4,-2)+\lambda(0,3) is the vertical line x=4x=4; r=(4,−2)+λ(3,0)\mathbf{r}=(4,-2)+\lambda(3,0) is the horizontal line y=−2y=-2. These are consequences of the component equations, not additional formula-booklet results.

Worked example 5: one constant coordinate

Question. Give cartesian equations for r=(2−14)+λ(03−2)\mathbf{r}=\begin{pmatrix}2\\-1\\4\end{pmatrix}+\lambda\begin{pmatrix}0\\3\\-2\end{pmatrix}.

Plan. Write the constant component separately and eliminate λ\lambda between the other two components.

x=2,y=−1+3λ,z=4−2λequate componentsλ=y+13=z−4−2use non-zero components\begin{aligned} x&=2,\quad y=-1+3\lambda,\quad z=4-2\lambda && \text{equate components}\\ \lambda&=\frac{y+1}{3}=\frac{z-4}{-2} && \text{use non-zero components} \end{aligned}

Why this step? The first component never changes; dividing x−2x-2 by zero would replace a valid constraint with an undefined expression.

Answer. x=2,y+13=z−4−2x=2,\quad\frac{y+1}{3}=\frac{z-4}{-2}.

Check. At λ=1\lambda=1, the vector equation gives (2,2,2)(2,2,2), and the two fractions both equal 1.

Worked example 6 changes one feature: a second direction component becomes zero. There is now only one varying coordinate, so there are two separate constant-coordinate equations.

Worked example 6: two constant coordinates

Question. Give cartesian equations for r=(2−14)+λ(00−2)\mathbf{r}=\begin{pmatrix}2\\-1\\4\end{pmatrix}+\lambda\begin{pmatrix}0\\0\\-2\end{pmatrix}.

Plan. Identify the fixed coordinates and determine whether the remaining coordinate is restricted.

x=2,y=−1,z=4−2λequate componentsλ=4−z2solve for any real z\begin{aligned} x&=2,\quad y=-1,\quad z=4-2\lambda && \text{equate components}\\ \lambda&=\frac{4-z}{2} && \text{solve for any real }z \end{aligned}

Why this step? Every real zz corresponds to a real parameter, so imposing a particular value of zz would incorrectly reduce the line to a point.

Answer. x=2, y=−1x=2,\ y=-1, with z∈Rz\in\mathbb{R}. The line is parallel to the zz-axis.

Check. Both (2,−1,4)(2,-1,4) and (2,−1,2)(2,-1,2) satisfy the cartesian equations and come from λ=0\lambda=0 and λ=1\lambda=1.

Do not write a fraction with denominator zero. The separate fixed-coordinate equations are the complete cartesian description.

We can now settle the opening puzzle. The first equation is x−2y=−3x-2y=-3. The second starting point (5,4)(5,4) satisfies 5−2(4)=−35-2(4)=-3, and its direction (−4,−2)(-4,-2) is −2-2 times (2,1)(2,1). More explicitly,

(54)+μ(−4−2)=(12)+(2−2μ)(21)\begin{pmatrix}5\\4\end{pmatrix}+\mu\begin{pmatrix}-4\\-2\end{pmatrix} =\begin{pmatrix}1\\2\end{pmatrix}+(2-2\mu)\begin{pmatrix}2\\1\end{pmatrix}

As μ\mu runs through every real number, so does 2−2μ2-2\mu. Both equations therefore generate every point on the same line. The direction arrow has reversed; the line has not moved.

Key idea

Use a separate constant-coordinate equation whenever a direction component is zero. Equivalent equations describe the same points even when their starting points and parameter values differ.

The next lesson uses direction vectors to measure angles between lines, so recognising the direction independently of the starting point will matter again.

Quick Recap

  • A line is fixed by a point and a non-zero direction: r=a+λd\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}.
  • Through two distinct points, use their difference as the direction; simplifying it changes the endpoint parameter values.
  • Convert to cartesian form by eliminating the single parameter; convert back by reading a point and a direction.
  • A zero direction component gives a constant coordinate, written separately rather than divided by zero.

The opening equations describe the same line: their starting points lie on it and their directions are non-zero multiples of one another.