M5.6.5 Chapter 5

Lines in vector form

How can one equation describe every point on a straight line, even in space?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Write the equation of a line as r = a + tb
  • Find where two lines meet, or show that they never meet

A line needs two things: one point on it, and a direction. In vectors, the point is a position vector a and the direction is a vector b. To reach any point of the line, start at a and then move along b by some multiple. The result is r = a + tb. Here r is the position vector of a point of the line, and t is a number called the parameter.

For each value of t you get one point. With t = 0 you are at a. With t = 1 you are at a + b. With t = −1 you go back to a − b. Every real number t gives a point, so the line goes on for ever in both directions. The vector b is the direction vector of the line.

A grid with the x axis x and the y axis y. A straight line runs up and to the right. Four points on it are named by their value of t: −1 at (-1, 1), 0 at (1, 2), 1 at (3, 3) and 2 at (5, 4). An arrow named a runs from the origin to the point at t = 0, and an arrow named b runs from that point to the point at t = 1.−2246240xy−1012ab
The line r = (1, 2) + t(2, 1). The position vector a gets us to the point at t = 0. Each step of b along the line adds 1 to t. The number beside each dot is its value of t.

To find the equation of a line through two points A and B, use A as the point and AB as the direction. The direction is B minus A, from the last chapter. Any point of the line can be used as a, and any multiple of AB can be used as b. So one line has many correct equations.

Worked example

Find the equation of the line through A(2, 1) and B(5, 5). Then find the point of the line with t = 2.

  1. The direction is AB = b − a = (5 − 2, 5 − 1) = (3, 4).
  2. Use A as the starting point. The line is r = (2, 1) + t(3, 4).
  3. Put t = 2: r = (2, 1) + 2(3, 4) = (2, 1) + (6, 8).
  4. So the point is (8, 9).

Answer: r = (2, 1) + t(3, 4) and the point is (8, 9).

In space, the line works in the same way with three parts in each vector. The equation r = a + tb is also written as three separate equations for x, y and z. For r = (x, y, z), a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), we have x = a₁ + tb₁, y = a₂ + tb₂ and z = a₃ + tb₃. To test whether a point is on the line, find the t from one part and check the other parts.

Worked example

A line passes through A(1, 2, 3) and B(4, 6, 15). Write its equation. Is the point (7, 10, 27) on it? Is (7, 10, 28)?

  1. The direction is AB = (4, 6, 15) − (1, 2, 3) = (3, 4, 12).
  2. The line is r = (1, 2, 3) + t(3, 4, 12).
  3. For the point (7, 10, 27), the x part gives 1 + 3t = 7, so t = 2.
  4. Check y: 2 + 4 × 2 = 10. Check z: 3 + 12 × 2 = 27. All three agree, so the point is on the line.
  5. For (7, 10, 28), the x and y parts still give t = 2. But z would be 27, not 28. So this point is not on the line.

Answer: r = (1, 2, 3) + t(3, 4, 12). The first point is on the line and the second is not.

Three axes named x, y and z. The points A, (1, 2, 3), and B, (4, 6, 15), are marked. A solid arrow named AB runs from A to B, in the direction of the line. Dashed lines drop from A and from B to the floor, which is the x y plane, a short dashed step runs from each foot back to the y axis, and short dashed lines carry the line on past B and past A.xyzABAB
The line through A and B in space. Its direction vector is AB = (3, 4, 12). The x axis is drawn at half its true length. The dashed lines drop to the floor, and a short step from each foot meets the y axis at that point's y value. The line goes on past A and B.

Now two lines. Write them with different letters for the parameters, say r = a + sb and r = c + td. A point is on both lines if the same position vector comes from some s and some t. Put the two expressions equal. This gives one equation for each part, which is two equations in s and t in a plane. Solve them, then put s into the first line to find the point.

A grid with the x axis x and the y axis y. Two straight lines named r₁ and r₂ cross at the point P, (5, 4). The line r₁ runs up and to the right. The line r₂ runs up and to the left.246810−224680xyr₁r₂P
The lines r₁ = (1, 2) + s(2, 1) and r₂ = (9, −2) + t(−2, 3) cross at P. The next example finds P.

Worked example

Find where r₁ = (1, 2) + s(2, 1) meets r₂ = (9, −2) + t(−2, 3).

  1. Put the two lines equal. The x parts give 1 + 2s = 9 − 2t.
  2. The y parts give 2 + s = −2 + 3t.
  3. From the y equation, s = 3t − 4.
  4. Put this into the x equation: 1 + 2(3t − 4) = 9 − 2t. Multiplying out, −7 + 6t = 9 − 2t.
  5. Collect the t terms: 8t = 16. So t = 2.
  6. Then s = 3 × 2 − 4 = 2.
  7. Put s = 2 into r₁: (1, 2) + 2(2, 1) = (5, 4). Check with r₂ and t = 2: the same point.

Answer: The lines meet at (5, 4).

In a plane, two lines either meet at one point, or are parallel and never meet. In space there is a third possibility. Two lines that are not parallel may still never meet. They are called skew lines, like a road and a bridge that crosses over it without touching. To test, solve two of the three equations for s and t, and then see whether the third equation is also true.

Worked example

r₁ = (1, 1, 1) + s(1, 2, 3). Do r₂ = (−1, 7, 5) + t(2, −1, 1) and r₃ = (−1, 7, 6) + t(2, −1, 1) meet r₁?

  1. For r₂, the x parts give 1 + s = −1 + 2t, so s = 2t − 2.
  2. The y parts give 1 + 2s = 7 − t. Put in s: −3 + 4t = 7 − t.
  3. So 5t = 10, which gives t = 2, and then s = 2 × 2 − 2 = 2.
  4. Check the z parts: 1 + 3 × 2 = 7, and 5 + 1 × 2 = 7. They agree, so r₁ and r₂ meet at (3, 5, 7).
  5. For r₃ the x and y equations are the same as for r₂, so again s = 2 and t = 2. The z parts are 7 and 8.
  6. 7 is not 8, so the third equation fails. The directions (1, 2, 3) and (2, −1, 1) are not multiples of each other, so r₁ and r₃ are not parallel. They are skew lines, and they never meet.

Answer: r₁ meets r₂ at (3, 5, 7). r₁ and r₃ never meet.

The angle between two lines is the angle between their direction vectors, which we find with the scalar product. If the scalar product is negative, the angle between the vectors is obtuse. Then the angle between the lines is 180° minus it, because we give the smaller angle. For r₁ and r₂ in the last example, the directions have a scalar product of 3, which is positive, so the angle between those two lines is acute.

Worked example

Find the acute angle between the lines with directions (3, 4, 0) and (0, 4, 3).

  1. The scalar product is 3 × 0 + 4 × 4 + 0 × 3 = 16.
  2. The lengths are √25 and √25.
  3. cos θ = 16 ÷ (√25 × √25) = 0.64.
  4. θ = cos⁻¹(0.64) ≈ 50.2°. This is acute, so it is the angle between the lines.

Answer: 50.2°

See it three ways

With things

Stand at a lamp post. Walk along a straight road in steps that each move you 2 m east and 1 m north. After t steps you are at the post plus t of those moves. A negative t means walking the other way, back past the post.

As a picture

A grid with the x axis x and the y axis y. A straight line runs up and to the right. Four points on it are named by their value of t: −1, 0, 1 and 2. An arrow named a runs from the origin to the point at t = 0, and an arrow named b runs from that point to the point at t = 1.−2246240xy−1012ab

In words

A line is a starting point plus any multiple of a direction. Every value of t gives one point, and a negative t goes backwards.

In symbols

r = a + tb. For example r = (1, 2) + t(2, 1).

Try it

Mark the points of a line

You need: squared paper, a ruler, a pencil.

  1. Draw an x axis and a y axis on the squared paper, with the origin near the left. Mark the point (1, 2).
  2. The direction is (2, 1). From (1, 2), move 2 squares across and 1 up, and mark the point. Move the same again, and mark it. Do it three times.
  3. Now go the other way from (1, 2): 2 squares left and 1 down. Mark that point too.
  4. Lay the ruler along the points. They lie on one straight line. Write each point beside its value of t.

What you will see: All the points are on one straight ruler line. The step "2 across and 1 up" is the direction b, and the number of steps from (1, 2) is the value of t.

If you cannot try it, this is what happens.
A table with the heads t and point. The rows read −1 and (−1, 1), 0 and (1, 2), 1 and (3, 3), 2 and (5, 4), 3 and (7, 5).tpoint−1(−1, 1)0(1, 2)1(3, 3)2(5, 4)3(7, 5)

A wrong idea many people have

A line has only one vector equation.

Why it feels right: We write the line as one formula, so it seems that the formula should be unique.

The test that breaks it: Take r = (1, 2) + s(2, 1). Put s = 1 to get the point (3, 3), and use it as a new start. Use (−4, −2) as the direction. Then r = (3, 3) + t(−4, −2). Every point is still on the same line: t = 0 gives (3, 3) and t = −1 gives (7, 5).

What is true: Any point on the line can be the starting point a, and any non-zero multiple of the direction can be b. So a line has many equations. To compare two equations, check that the directions are multiples and that one start point is on the other line.

A wrong idea many people have

If two lines in space do not meet, they must be parallel.

Why it feels right: In a plane, two lines that do not meet are parallel, so the same seems true in space.

The test that breaks it: Take r₁ = (1, 1, 1) + s(1, 2, 3) and r₃ = (−1, 7, 6) + t(2, −1, 1). The directions (1, 2, 3) and (2, −1, 1) are not multiples of each other, so the lines are not parallel. But the example above showed that they never meet.

What is true: In space, two lines that never meet are either parallel or skew. Parallel lines have directions that are multiples. Skew lines have directions that are not.

Key words

parameter
the number t in r = a + tb. Each value of t gives one point of the line.
direction vector
the vector b in r = a + tb, which gives the direction of the line.
skew lines
lines in space that are not parallel and never meet.
vector equation
an equation r = a + tb that gives the position vector of every point of a line.

Back to your guess

The answer is B: The point (3, 5) lies on the line r = (1, 2) + t(2, 3), for some value of t.

Put t = 1. Then r = (1, 2) + (2, 3) = (3, 5). Each value of t gives one point of the line. Try t = 0 for the starting point (1, 2), and t = 2 for (5, 8).

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Which equation is the line through A(3, 1) and B(7, 4)?

    Tap your answer.
    1. Not this one. You used B as the direction. The direction vector is AB = b − a, not the position vector of B. Read this page again. Try another.

    2. Yes, that is right. The direction is AB = (7, 4) − (3, 1) = (4, 3). Starting from A, the line is r = (3, 1) + t(4, 3).

    3. Not this one. You used A as the direction. The direction of the line is the vector AB, not the position vector of A. Read this page again. Try another.

    4. Not this one. The direction (4, 3) is right, but the start point is not on the line. The point (10, 5) is a + b, which is not A and not B. Read this page again. Try another.

    See the answer

    r = (3, 1) + t(4, 3)

    The direction is AB = (7, 4) − (3, 1) = (4, 3). Starting from A, the line is r = (3, 1) + t(4, 3).

    • If you chose A: You used B as the direction. The direction vector is AB = b − a, not the position vector of B. Read this page again.
    • If you chose C: You used A as the direction. The direction of the line is the vector AB, not the position vector of A. Read this page again.
    • If you chose D: The direction (4, 3) is right, but the start point is not on the line. The point (10, 5) is a + b, which is not A and not B. Read this page again.
  2. Which point is on the line r = (2, −1, 3) + t(1, 4, −2)?

    Tap your answer.
    1. Yes, that is right. Put t = 2: (2, −1, 3) + 2(1, 4, −2) = (2, −1, 3) + (2, 8, −4) = (4, 7, −1).

    2. Not this one. The x and y parts fit t = 2, but the z part does not. All three parts must give the same t. Read this page again. Try another.

    3. Not this one. The x and y parts fit t = 1, but the z part of the point at t = 1 is 1, not 5. The sign of the z part of the direction was lost. Read this page again. Try another.

    4. Not this one. You used only the direction. The line starts at a, so the point is a plus a multiple of b. Read this page again. Try another.

    See the answer

    (4, 7, −1)

    Put t = 2: (2, −1, 3) + 2(1, 4, −2) = (2, −1, 3) + (2, 8, −4) = (4, 7, −1).

    • If you chose B: The x and y parts fit t = 2, but the z part does not. All three parts must give the same t. Read this page again.
    • If you chose C: The x and y parts fit t = 1, but the z part of the point at t = 1 is 1, not 5. The sign of the z part of the direction was lost. Read this page again.
    • If you chose D: You used only the direction. The line starts at a, so the point is a plus a multiple of b. Read this page again.
  3. Which vector is a direction vector of the line r = (2, 5) + t(4, −6)?

    Tap your answer.
    1. Yes, that is right. Any non-zero multiple of (4, −6) is a direction vector. Half of it is (2, −3), which points the same way.

    2. Not this one. This swaps the two parts of the direction. It points a different way. Read this page again. Try another.

    3. Not this one. This is the starting point, not the direction. Read this page again. Try another.

    See the answer

    (2, −3)

    Any non-zero multiple of (4, −6) is a direction vector. Half of it is (2, −3), which points the same way.

  4. The picture shows a point A and an arrow d. Which equation is the line through A in the direction d?

    A grid with the x axis x and the y axis y. The point A is at (2, 1). An arrow named d starts at A and ends at (4, 4).−1123456−11234560xyAd
    Tap your answer.
    1. Not this one. This starts at the end of d and uses the position of A as the direction. Start at A, and use d as the direction. Read this page again. Try another.

    2. Not this one. You used the end point of the arrow as the direction. The direction is d, the change from A to the end. Read this page again. Try another.

    3. Yes, that is right. A is (2, 1) and the arrow d goes from A to (4, 4), which is (2, 3) more. So the line is r = (2, 1) + t(2, 3).

    4. Not this one. You swapped the parts of A. The point A is (2, 1), with 2 across and 1 up. Read this page again. Try another.

    See the answer

    r = (2, 1) + t(2, 3)

    A is (2, 1) and the arrow d goes from A to (4, 4), which is (2, 3) more. So the line is r = (2, 1) + t(2, 3).

    • If you chose A: This starts at the end of d and uses the position of A as the direction. Start at A, and use d as the direction. Read this page again.
    • If you chose B: You used the end point of the arrow as the direction. The direction is d, the change from A to the end. Read this page again.
    • If you chose D: You swapped the parts of A. The point A is (2, 1), with 2 across and 1 up. Read this page again.
  5. From an earlier chapter

    What is (3, −1, 2) · (2, 4, 5)?

    Tap your answer.
    1. Not this one. You multiplied the matching parts but did not add them. The scalar product is a single number. Go to M5.6.4. Try another.

    2. Yes, that is right. 3 × 2 + (−1) × 4 + 2 × 5 = 6 + (−4) + 10 = 12.

    3. Not this one. Check the sign of the middle product, (−1) × 4 = −4. Add the three products: 6, −4 and 10. Go to M5.6.4. Try another.

    See the answer

    12

    3 × 2 + (−1) × 4 + 2 × 5 = 6 + (−4) + 10 = 12.

    • If you chose A: You multiplied the matching parts but did not add them. The scalar product is a single number. Go to M5.6.4.
    • If you chose C: Check the sign of the middle product, (−1) × 4 = −4. Add the three products: 6, −4 and 10. Go to M5.6.4.
  6. Find the point on r = (4, −1, 2) + t(3, 2, −1) when t = 3. Give it as (x, y, z).

    See the answer

    (13, 5, −1)

    (4, −1, 2) + 3(3, 2, −1) = (4, −1, 2) + (9, 6, −3) = (13, 5, −1).

  7. The lines r = (0, 1) + s(1, 2) and r = (5, 1) + t(−1, 3) meet at one point. Find it, as (x, y).

    See the answer

    (3, 7)

    Equating the x parts and the y parts gives s = 3 and t = 2. The point is (3, 7).

  8. r₁ = (2, 1, 0) + s(1, 2, 1) and r₂ = (3, 7, 1) + t(1, −2, 2). Which statement is true?

    Tap your answer.
    1. Not this one. The x and y parts agree at s = 2 and t = 1, but the z parts do not: 2 and 3. So the lines do not meet. Read this page again. Try another.

    2. Not this one. Parallel lines have directions that are multiples. Here (1, 2, 1) and (1, −2, 2) are not. Read this page again. Try another.

    3. Yes, that is right. The directions are not multiples of each other, so the lines are not parallel. Solving the x and y equations gives s = 2 and t = 1, but then the z parts are 2 and 3, which are different. So the lines never meet, and they are skew.

    See the answer

    The lines are skew.

    The directions are not multiples of each other, so the lines are not parallel. Solving the x and y equations gives s = 2 and t = 1, but then the z parts are 2 and 3, which are different. So the lines never meet, and they are skew.

    • If you chose A: The x and y parts agree at s = 2 and t = 1, but the z parts do not: 2 and 3. So the lines do not meet. Read this page again.
    • If you chose B: Parallel lines have directions that are multiples. Here (1, 2, 1) and (1, −2, 2) are not. Read this page again.
  9. The point (k, 11, −1) is on the line r = (1, 3, −5) + t(2, 4, 2). Find k.

    See the answer

    5

    The z part gives −5 + 2t = −1, so t = 2. Then k = 1 + 2 × 2 = 5.

Keep it

Copy this into your exercise book.

Line: r = a + tb, with a a point and b a direction. Through A and B: b = AB. Meeting: equate parts, solve for s and t, then check every part. Skew: not parallel and no meeting.

Draw: A line with the points t = −1, 0, 1 and 2 marked, and the arrows a and b.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (864 KB). It opens on any phone.