Leave lesson

Pure · Vectors

1 / 12

The vector equation of a line

Describing a line in space as r = a + tb — a point on it plus a direction — and using it to test whether a point lies on a line, to decide whether two lines are parallel, intersecting or skew, to find the point of intersection, and to find the acute angle between two lines.

Pure · Vectors

The vector equation of a line

Describing a line in space as r = a + tb — a point on it plus a direction — and using it to test whether a point lies on a line, to decide whether two lines are parallel, intersecting or skew, to find the point of intersection, and to find the acute angle between two lines.

Why it works

To pin down a line you need just two things: one point it passes through and which way it goes. If a\mathbf{a} is the position vector of a known point on the line and b\mathbf{b} is any vector along it (a direction vector), then every point on the line is reached by starting at a\mathbf{a} and walking some multiple of b\mathbf{b}: r=a+tb.\mathbf{r} = \mathbf{a} + t\mathbf{b}. The parameter tt is a dial: each value of tt gives one point, and sweeping tt through all real numbers sweeps out the whole line. Negative tt simply walks backwards.

The equation is not unique, and this surprises people. Any point on the line can play the role of a\mathbf{a}, and any non-zero multiple of b\mathbf{b} can play the role of the direction. So r=a+tb\mathbf{r} = \mathbf{a} + t\mathbf{b} and r=(a+b)+t(2b)\mathbf{r} = (\mathbf{a} + \mathbf{b}) + t(2\mathbf{b}) describe the same line. Two equations looking different is never, on its own, evidence that two lines differ.

A line through two points AA and BB. Take a\mathbf{a} as the point and AB=ba\overrightarrow{AB} = \mathbf{b} - \mathbf{a} as the direction: r=a+t(ba).\mathbf{r} = \mathbf{a} + t(\mathbf{b} - \mathbf{a}).

Is a given point on the line? Set the point equal to a+tb\mathbf{a} + t\mathbf{b} and solve for tt component by component. The point lies on the line only if every component yields the same tt. One matching component proves nothing — it just means the point is somewhere in the right slab of space.

Two lines in 3D: three possibilities. In two dimensions non-parallel lines always meet; in three dimensions they usually miss each other. Given l1:r=a1+td1l_1: \mathbf{r} = \mathbf{a}_1 + t\mathbf{d}_1 and l2:r=a2+sd2l_2: \mathbf{r} = \mathbf{a}_2 + s\mathbf{d}_2:
  • Paralleld1\mathbf{d}_1 and d2\mathbf{d}_2 are scalar multiples of each other.
  • Intersecting — not parallel, and there are values of tt and ss giving the same point.
  • Skew — not parallel and never meeting. This has no 2D analogue.
Use different parameters. l1l_1 and l2l_2 must use different letters (tt and ss). They meet at a point they both pass through, but there is no reason the two lines reach it at the same parameter value — forcing t=st = s will usually make a genuine intersection look like a miss.

How to test for intersection. Equate the two expressions to get three equations. Solve two of them for tt and ss, then substitute into the third. If the third is satisfied, the lines intersect — put your tt back into l1l_1 to get the point. If the third fails, the lines are skew. That final check is the whole question: two equations in two unknowns almost always have a solution, so skipping the third makes every pair of lines look like they intersect.

The angle between two lines is the angle between their direction vectors, found with the scalar product: cosθ=d1d2d1d2.\cos\theta = \frac{\mathbf{d}_1 \cdot \mathbf{d}_2}{|\mathbf{d}_1|\,|\mathbf{d}_2|}. Because a direction vector could equally have been written the other way round, this can come out obtuse; the angle between two lines is taken as the acute one, so if you get an obtuse answer, subtract from 180180^\circ. (Two skew lines still have an angle between them — it is the angle you would see after sliding one line until they touch.)