A point and a direction
A straight line is fixed by one point on it and the direction it runs in. Give the point A by its position vector, a = (1, 2), and the direction by a vector d = (2, 1), called the direction vector.
Start at A and walk one copy of d: 2 across and 1 up, to (3, 3). Walk a second copy, to (5, 4). Every copy of d points the same way, so every stride lands on the same straight line through A. Walking backward, with −d, lands on it too: (1 − 2, 2 − 1) = (−1, 1).
a = (1, 2) runs from the origin to the start. Two strides of d = (2, 1) reach (3, 3) and then (5, 4), all on one line.
r = a + t d
Every point of the line is reached by going to A and then some number of strides of d. Call that number t. The position vector r of the point is r = a + t d, the vector equation of the line. The number t is called the parameter.
For this line, r = (1, 2) + t(2, 1). At t = 0, r = (1, 2), the point A itself. At t = 1, r = (1 + 2, 2 + 1) = (3, 3), one stride out. At t = 2, r = (1 + 2 × 2, 2 + 2 × 1) = (5, 4), two strides out.
t does not have to be a positive whole number. At t = −1, r = (−1, 1), one stride back behind A. At , r = (1 + 1, 2 + 0.5) = (2, 2.5), halfway through the first stride. Each value of t gives one point of the line, and every point of the line comes from one value of t.
λ = −1 < 0: r = a + λd walks the other way along d, behind A, and it is still the same line
Slide P to λ = 2 and read r = a + 2d
Here a = (1, 1) and d = (2, 1). At , the point is (1, 1) − (2, 1) = (−1, 0), one stride behind A. Drag it along the line: at the point is (1 + 4, 1 + 2) = (5, 3), and sweeping through every value traces the whole line.
The equation in components
Written one component at a time, r = (1, 2) + t(2, 1) says x = 1 + 2t and y = 2 + t.
The parameter can be removed. From the second equation t = y − 2, and putting that into the first gives x = 1 + 2(y − 2) = 2y − 3, which rearranges to . The gradient is the rise over the run of d, 1 ÷ 2.
Is a point on the line?
A point lies on the line when one value of t gives both of its coordinates. Is (9, 6) on r = (1, 2) + t(2, 1)? The x-coordinate needs 1 + 2t = 9, so t = 4. Then y = 2 + 4 = 6, which matches, so (9, 6) is on the line, at t = 4.
Is (7, 4) on it? The x-coordinate needs 1 + 2t = 7, so t = 3, but then y = 2 + 3 = 5, not 4. No single value of t fits both coordinates, so (7, 4) is not on the line; it is 1 below the point (7, 5).
Many equations for one line
Doubling the direction vector does not change the line. r = (1, 2) + s(4, 2) starts at the same point and strides in the same direction, twice as far each time: s = 1 gives (5, 4), which is t = 2 on the first equation. Any multiple of d, other than 0, gives the same line, including a negative one, which walks it the other way.
The starting point can change too. r = (3, 3) + t(2, 1) starts from another point of the same line. So two equations that look different can describe one line. To check, see whether the two direction vectors are multiples of each other, and whether a point of one line lies on the other.
From A, d = (2, 1) and 2d = (4, 2) both run along the same line; 2d simply reaches twice as far.
A line through two points
For the line through two points A and B, start at a and take the direction from A to B, which is b − a. With A(1, 2) and B(5, 4), d = (5 − 1, 4 − 2) = (4, 2), and the line is r = (1, 2) + t(4, 2).
Then t = 0 gives A and t = 1 gives B. Values of t from 0 to 1 give the points between them, so the segment AB is the part with , and its midpoint is at : (1 + 2, 2 + 1) = (3, 3).
In three dimensions
The equation keeps the same form with three components. The line through (1, 2, 0) with direction (2, −1, 3) is r = (1, 2, 0) + t(2, −1, 3). At t = 2, r = (1 + 4, 2 − 2, 0 + 6) = (5, 0, 6).
Is (7, −1, 9) on it? The x-coordinate needs 1 + 2t = 7, so t = 3. Then y = 2 − 3 = −1 and z = 0 + 9 = 9, both of which match, so the point is on the line at t = 3.
The usual mistakes
Stopping after one stride. For r = (1, 2) + t(2, 1) at t = 2, the point is (5, 4), not (3, 3): t = 2 walks d twice.
Swapping the roles of a and d. (2, 1) + 2(1, 2) = (4, 5) starts at the wrong point and strides the wrong way. The start is a, and t multiplies d.
Taking the start for the direction. a only says where the line begins; every stride follows d.
Checking one coordinate only. A value of t that fits x must also fit y, and z in three dimensions.
Deciding that a doubled direction gives a different line. A multiple of d points the same way, so the line is the same.
A ship on a straight course
In the application below, the parameter is time. The ship starts at the position vector (2, 1) at noon, and each hour adds the direction vector (3, 4), so the length of that vector is the distance covered in an hour: the speed. Testing the buoy and the reef is testing whether a point is on the line, with one value of the time for both components.
Worked example: A Ship on a Straight Course, and a Buoy and a Reef on Its Chart
Question A ship's course is r = 21 + λ34, where r is its position in kilometers east and north of a harbor and λ is the time in hours since noon. (a) Where is the ship at 2 pm, and what is its speed? (b) At what time does the ship pass the buoy B at (14, 17)? Does it pass over a reef at (11, 12)?
1.At noon λ = 0 and the ship is at (2, 1). Each hour adds the direction vector 34.
At noon λ = 0 and the ship is at (2, 1). Each hour adds the direction vector 34. 2.At 2 pm, λ = 2: r = 21 + 234 = 89.
At 2 pm, λ = 2: r = 21 + 234 = 89. 3.(a) At 2 pm the ship is at (8, 9). Each hour it moves √32 + 42 = 5 km, so its speed is 5 km/h.
(a) At 2 pm the ship is at (8, 9), and each hour it moves √32 + 42 = 5 km: its speed is 5 km/h. 4.For the buoy: 2 + 3λ = 14 gives λ = 4, and 1 + 4λ = 17 gives λ = 4 as well. Both components agree, so the ship passes the buoy at 4 pm.
For the buoy, 2 + 3λ = 14 and 1 + 4λ = 17 both give λ = 4: the ship passes it at 4 pm. 5.(b) For the reef: 2 + 3λ = 11 gives λ = 3, but then 1 + 4 × 3 = 13, not 12. No single time fits both, so the ship does not pass over the reef; at 3 pm it is at (11, 13), 1 km due north of it.
(b) For the reef, 2 + 3λ = 11 gives λ = 3, but then the north coordinate is 13, not 12. The ship misses the reef, passing 1 km north of it at 3 pm.
Answer: (a) (8, 9), at 5 km/h; (b) it passes the buoy at 4 pm, and it misses the reef
Common mistakes
- Solving only the east component, 2 + 3λ = 11, and deciding that the ship reaches the reef at 3 pm. A point is on the line only when one value of λ fits both components.
- Giving the speed as 3 + 4 = 7 km/h, or as the length of 21. The start says where the ship is, not how fast it goes; the speed is the magnitude of the direction vector, 5 km/h.